/* Base layout & typography */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f0e8; /* warm paper tone */
  color: #1a1a1a;
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: #0052cc;
  text-decoration: none;
}

a:hover,
 a:focus {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid #ff4b4b;
  outline-offset: 2px;
}

.shell {
  max-width: 1120px;
  padding: 0 20px;
  margin: 0 auto;
}

main {
  padding-bottom: 4rem;
}

h1,
 h2,
 h3,
 h4 {
  font-weight: 500;
  letter-spacing: 0.02em;
  margin: 0 0 0.75rem;
  color: #111111;
}

p {
  margin: 0 0 0.75rem;
}

.section {
  padding: 4rem 0;
}

.section + .section {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.section-header {
  max-width: 640px;
  margin-bottom: 2.5rem;
}

.section-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0052cc;
  margin-bottom: 0.5rem;
}

.section-header-invert h2,
.section-header-invert p,
.section-header-invert .section-kicker {
  color: #ffffff;
}

/* Header */
.site-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(245, 247, 250, 0.96);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.75rem 20px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: radial-gradient(circle at 30% 20%, #007bff, #0052cc);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand-name {
  font-weight: 600;
  font-size: 0.98rem;
}

.brand-tagline {
  font-size: 0.7rem;
  color: #555555;
}

.primary-nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.82rem;
}

.primary-nav a {
  color: #1a1a1a;
  text-decoration: none;
  position: relative;
  padding-bottom: 0.1rem;
}

.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: #0052cc;
  transition: width 0.18s ease-out;
}

.primary-nav a:hover::after,
.primary-nav a:focus-visible::after {
  width: 100%;
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ghost-link {
  font-size: 0.8rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #ffffff;
}

.lang-toggle {
  font-size: 0.78rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.16);
  background: #1a1a1a;
  color: #ffffff;
  padding: 0.25rem 0.9rem;
  cursor: pointer;
}

.lang-toggle:hover {
  background: #0052cc;
}

/* Hero */
.hero {
  padding: 3.5rem 0 3.5rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.4fr);
  gap: 3rem;
  align-items: center;
}

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #0052cc;
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-size: clamp(1.8rem, 2.4vw, 2.4rem);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero-lead {
  font-size: 0.96rem;
  color: #333333;
  margin-bottom: 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.hero-meta {
  font-size: 0.8rem;
  color: #555555;
}

.hero-media {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.video-frame {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: linear-gradient(135deg, #001a33 0%, #003366 40%, #007bff 100%);
  min-height: 200px;
}

.video-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 15% 10%, rgba(255, 255, 255, 0.14), transparent 60%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.16), transparent 65%);
  mix-blend-mode: screen;
}

.video-caption {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.82);
}

.hero-stats {
  display: flex;
  gap: 1.5rem;
  font-size: 0.78rem;
}

.hero-stats dt {
  font-weight: 500;
  color: #555555;
}

.hero-stats dd {
  margin: 0.1rem 0 0;
  font-size: 0.95rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.84rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn.primary {
  background: #0052cc;
  border-color: #0041a3;
  color: #ffffff;
}

.btn.primary:hover {
  background: #003f99;
}

.btn.secondary {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.18);
  color: #1a1a1a;
}

.btn.secondary:hover {
  border-color: #0052cc;
}

.btn.tertiary {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
}

.text-link {
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.text-link.subtle {
  font-size: 0.78rem;
  color: #555555;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* Grid & cards */
.grid {
  display: grid;
  gap: 1.75rem;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cards .card,
.card-service,
.feature-card,
.news-panel,
.news-item {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.card,
.card-service,
.feature-card {
  padding: 1.5rem 1.4rem;
}

.card p,
.card-service p,
.feature-card p {
  font-size: 0.9rem;
  color: #333333;
}

.card-cta {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: #0052cc;
}

.card-service {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 190px;
}

.card-service:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.service-grid {
  margin-top: 1.5rem;
}

/* Split layout */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.2fr);
  gap: 2.5rem;
  align-items: flex-start;
}

.feature-list {
  display: grid;
  gap: 1.25rem;
}

/* Services section */
.section-services {
  background: #020711; /* very dark blue/black */
  color: #ffffff;
}

.section-services .card,
.section-services .card-service,
.section-services .feature-card {
  background: #0c1220;
  border-color: rgba(255, 255, 255, 0.06);
}

.section-services p {
  color: rgba(255, 255, 255, 0.82);
}

/* News */
.section-news {
  background: #f5f7fa;
}

.news-split {
  align-items: stretch;
}

.news-intro {
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  padding-right: 2rem;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.news-item {
  padding: 0.75rem 1rem;
  transition: background 0.15s ease-out, transform 0.15s ease-out;
}

.news-item a {
  color: inherit;
  text-decoration: none;
}

.news-item:hover {
  background: #ffffff;
  transform: translateY(-1px);
}

.news-meta {
  font-size: 0.76rem;
  color: #666666;
  margin-bottom: 0.2rem;
}

.news-item h3 {
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* Band CTA */
.band {
  background: #1a1a1a;
  color: #ffffff;
}

.band-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.band-copy p {
  margin-bottom: 0.4rem;
}

.band-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding: 1.5rem 0 2rem;
  background: #f5f0e8;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8rem;
}

.footer-meta {
  display: flex;
  align-items: flex-end;
}

/* Language visibility rules (must work without JS) */
[data-lang="ja"] {
  display: none;
}

html[data-lang="ja"] [data-lang="en"] {
  display: none;
}

html[data-lang="ja"] [data-lang="ja"] {
  display: block;
}

/* Ensure inline / flex elements keep layout when toggled */
html[data-lang="ja"] .inline-actions [data-lang="ja"],
html[data-lang="ja"] .hero-actions [data-lang="ja"],
html[data-lang="ja"] .band-actions [data-lang="ja"],
html[data-lang="ja"] .header-cta [data-lang="ja"],
html[data-lang="ja"] .primary-nav [data-lang="ja"] {
  display: inline-flex;
}

/* Responsive */
@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-media {
    order: -1;
  }

  .split {
    grid-template-columns: minmax(0, 1fr);
  }

  .news-intro {
    border-right: none;
    padding-right: 0;
  }
}

@media (max-width: 800px) {
  .primary-nav {
    display: none;
  }
}

@media (max-width: 720px) {
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .header-inner {
    align-items: center;
  }

  .hero {
    padding-top: 2.5rem;
  }

  .section {
    padding: 3rem 0;
  }
}

@media (max-width: 480px) {
  .hero-actions,
  .band-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .ghost-link {
    display: none;
  }
}
