/* =========================================================
   BiL Corporate Site — Design System
   Dark navy + champagne gold, with subtle cyan/purple
   ========================================================= */

:root {
  /* Surfaces */
  --bg-black:        #050B14;
  --bg-deep-navy:    #0A1628;
  --bg-navy:         #11203A;
  --bg-navy-light:   #1B2D4D;

  /* Primary accent: champagne gold (rich) */
  --gold:            #C9A961;
  --gold-bright:     #E8CF8E;
  --gold-deep:       #8E7A40;
  --gold-glow:       rgba(232, 207, 142, 0.18);

  /* Secondary accents (controlled) */
  --cyan:            #06B6D4;
  --cyan-soft:       rgba(34, 211, 238, 0.30);
  --purple:          #8B5CF6;
  --purple-soft:     rgba(167, 139, 250, 0.22);

  /* Text + lines */
  --fg:              #F5F7FA;
  --fg-dim:          #C8D0DA;
  --fg-mute:         #94A3B8;
  --fg-faint:        #5C6A82;
  --line:            #2C3E5A;
  --line-soft:       rgba(148, 163, 184, 0.10);

  /* Type scale */
  --t-12: 12px;
  --t-14: 14px;
  --t-16: 16px;
  --t-18: 18px;
  --t-24: 24px;
  --t-32: 32px;
  --t-48: 48px;
  --t-64: 64px;
  --t-80: 80px;

  /* Spacing */
  --gap-xs: 8px;
  --gap-s:  16px;
  --gap-m:  24px;
  --gap-l:  48px;
  --gap-xl: 56px;
  --gap-2xl: 88px;

  --max-w: 1280px;
  --rail-w: 1200px;

  --radius:    10px;
  --radius-sm: 6px;
  --radius-lg: 16px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg-black);
  color: var(--fg);
  font-family: 'Noto Sans JP', 'Inter', system-ui, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  text-wrap: pretty;
  word-break: auto-phrase;
  line-break: strict;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { max-width: 100%; display: block; }

/* Background canvas — global, dark-navy field with network/grid */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

.page-shell {
  position: relative;
  z-index: 1;
  isolation: isolate;
}

/* =========================================================
   Type
   ========================================================= */
.font-en  { font-family: 'Inter', 'Geist', system-ui, sans-serif; letter-spacing: -0.02em; }
.font-jp  { font-family: 'Noto Sans JP', system-ui, sans-serif; }
.font-mono { font-family: 'JetBrains Mono', 'Geist Mono', ui-monospace, monospace; letter-spacing: 0; }

.eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--gold);
  opacity: 0.7;
}

h1, h2, h3 {
  font-family: 'Noto Sans JP', system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

.h-display {
  font-size: clamp(48px, 6.5vw, 88px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 800;
}
.h-section {
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.18;
  font-weight: 700;
}
.h-card {
  font-size: 22px;
  line-height: 1.4;
  font-weight: 700;
}

.lead {
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.85;
  text-wrap: pretty;
  word-break: auto-phrase;
  line-break: strict;
  color: var(--fg-dim);
  max-width: 56ch;
}

.en-sub {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-mute);
}

.gold-text {
  background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold) 50%, var(--gold-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* =========================================================
   Layout primitives
   ========================================================= */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
}

section { position: relative; }
.section-pad { padding: var(--gap-2xl) 0; }
.section-pad-sm { padding: var(--gap-xl) 0; }

/* CTA banner — shared */
.cta-banner {
  position: relative;
  margin: 0 32px;
  padding: 100px 64px;
  border: 1px solid var(--gold);
  border-radius: 24px;
  background: radial-gradient(ellipse at top right, rgba(201, 169, 97, 0.18), transparent 60%),
              linear-gradient(180deg, rgba(17, 32, 58, 0.85), rgba(10, 22, 40, 0.85));
  overflow: hidden;
  text-align: center;
}
.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(201, 169, 97, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 169, 97, 0.06) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}
.cta-banner h2 {
  font-size: clamp(32px, 4vw, 56px);
  margin-bottom: 28px;
  position: relative;
}
.cta-banner p {
  color: var(--fg-dim);
  margin: 0 auto 44px;
  max-width: 56ch;
  position: relative;
  line-height: 1.85;
}
.cta-banner .ctas {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  position: relative;
}
@media (max-width: 700px) {
  .cta-banner { padding: 64px 28px; margin: 0 16px; }
  .cta-banner h2 { margin-bottom: 20px; }
  .cta-banner p { margin-bottom: 32px; }
}

.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap-l); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap-m); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap-m); }

@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section-pad { padding: 56px 0; }
  .section-pad-sm { padding: 36px 0; }
  .container { padding: 0 20px; }
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--radius);
  transition: all 0.25s var(--ease);
  border: 1px solid transparent;
  position: relative;
}
.btn .arr {
  display: inline-block;
  transition: transform 0.25s var(--ease);
}
.btn:hover .arr { transform: translateX(4px); }

.btn-primary {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: #0A1628;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06) inset, 0 8px 24px -8px rgba(232, 207, 142, 0.45);
}
.btn-primary:hover {
  box-shadow: 0 0 0 1px rgba(255,255,255,0.10) inset, 0 12px 32px -8px rgba(232, 207, 142, 0.65);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--line);
}
.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
}

.btn-gold-outline {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold);
}
.btn-gold-outline:hover {
  background: var(--gold-glow);
  color: var(--gold-bright);
}

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 14px 32px;
  transition: all 0.3s var(--ease);
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(10,22,40,0.08);
}
.site-header.scrolled {
  background: rgba(255,255,255,0.98);
  border-bottom: 1px solid rgba(10,22,40,0.10);
  padding: 10px 32px;
  box-shadow: 0 4px 20px rgba(10,22,40,0.04);
}
.nav a { color: #0a1628; font-weight: 600; }
.nav a:hover { color: var(--gold); }
.nav a.active { color: var(--gold); }
.site-header .header-cta .btn-ghost { color: #0a1628; border-color: rgba(10,22,40,0.25); font-weight: 600; }
.site-header .header-cta .btn-ghost:hover { color: var(--gold); border-color: var(--gold); }
.site-header .inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.brand-wordmark {
  height: 44px;
  width: auto;
  display: block;
}
.site-header.scrolled .brand-wordmark { height: 38px; }
.footer-brand .brand-wordmark { height: 56px; }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #0a1628;
  border-radius: 6px;
  transition: color 0.2s var(--ease);
  position: relative;
}
.nav a:hover { color: var(--gold); }
.nav a.active { color: var(--gold); }
.nav a.active::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 14px; right: 14px;
  height: 1px;
  background: var(--gold);
}

.header-cta { display: flex; align-items: center; gap: 12px; }

/* Hamburger button — mobile only */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: 8px;
  width: 44px;
  height: 44px;
  position: relative;
  z-index: 1001;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--bg-deep-navy);
  margin: 6px auto;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), background 0.3s;
  border-radius: 2px;
}
.site-header.scrolled .nav-toggle span,
body[data-page] .nav-toggle span { background: #f5f7fa; }
.site-header:not(.scrolled) .nav-toggle span { background: #0a1628; }
body[data-page="home"] .site-header:not(.scrolled) .nav-toggle span { background: #f5f7fa; }

.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); background: var(--gold-bright); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); background: var(--gold-bright); }

/* Mobile menu drawer */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 40, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
.mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu a.mm-link {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 28px;
  font-weight: 600;
  color: var(--fg-bright, #f5f7fa);
  padding: 18px 24px;
  text-align: center;
  letter-spacing: -0.01em;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.4s var(--ease), opacity 0.4s var(--ease), color 0.2s;
}
.mobile-menu a.mm-link:hover { color: var(--gold-bright); }
.mobile-menu.open a.mm-link {
  transform: translateY(0);
  opacity: 1;
}
.mobile-menu.open a.mm-link:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu.open a.mm-link:nth-child(2) { transition-delay: 0.10s; }
.mobile-menu.open a.mm-link:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu.open a.mm-link:nth-child(4) { transition-delay: 0.20s; }
.mobile-menu.open a.mm-link:nth-child(5) { transition-delay: 0.25s; }
.mobile-menu .mm-cta {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(280px, 80vw);
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.4s var(--ease) 0.30s, opacity 0.4s var(--ease) 0.30s;
}
.mobile-menu.open .mm-cta { transform: translateY(0); opacity: 1; }
.mobile-menu .mm-cta .btn { width: 100%; justify-content: center; }

/* Lock body scroll when menu open */
body.menu-open { overflow: hidden; }

@media (max-width: 900px) {
  .nav { display: none; }
  .header-cta .btn-ghost { display: none; }
  .header-cta .btn-gold-outline { display: none; }
  .site-header { padding: 14px 20px; }
  .nav-toggle { display: block; }
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  margin-top: var(--gap-2xl);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(10,22,40,0.6));
  padding: 80px 0 48px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: 40px;
}
.footer-brand .brand { margin-bottom: 20px; }
.footer-brand p {
  font-size: 13px;
  color: var(--fg-mute);
  line-height: 1.8;
  max-width: 32ch;
}
.footer-col h4 {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
  font-weight: 600;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  font-size: 13px;
  color: var(--fg-dim);
  transition: color 0.2s var(--ease);
}
.footer-col a:hover { color: var(--gold-bright); }

.footer-bottom {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: var(--fg-mute);
  font-family: 'JetBrains Mono', monospace;
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* =========================================================
   Hero shared
   ========================================================= */
.page-hero {
  padding: 140px 0 64px;
  position: relative;
}
.page-hero .eyebrow { margin-bottom: 24px; }
.page-hero h1 {
  font-size: clamp(44px, 5.5vw, 72px);
  line-height: 1.12;
  margin-bottom: 24px;
}
.page-hero .lead { margin-top: 16px; }

/* =========================================================
   Cards
   ========================================================= */
.card {
  background: linear-gradient(180deg, rgba(27, 45, 77, 0.45), rgba(17, 32, 58, 0.55));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s var(--ease);
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-glow), transparent);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.card:hover {
  border-color: rgba(201, 169, 97, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 0 40px -10px var(--gold-glow);
}
.card:hover::before { opacity: 1; }

.card .num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 18px;
  display: block;
}
.card h3 { margin-bottom: 12px; }
.card .en-title {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg-mute);
  margin-bottom: 8px;
}
.card p {
  font-size: 14px;
  color: var(--fg-dim);
  line-height: 1.8;
}
.card .card-footer {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 0.05em;
}

/* Tag / chip */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.08em;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--fg-mute);
}
.chip.gold { border-color: rgba(201, 169, 97, 0.5); color: var(--gold); }

/* =========================================================
   Section heading
   ========================================================= */
.sec-head {
  margin-bottom: 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: end;
}
.sec-head .eyebrow { margin-bottom: 20px; }
.sec-head h2 { margin-bottom: 0; }
.sec-head .sec-desc { color: var(--fg-dim); font-size: 15px; line-height: 1.85; }

@media (max-width: 900px) {
  .sec-head { grid-template-columns: 1fr; gap: 16px; margin-bottom: 40px; }
}

/* =========================================================
   Reveal on scroll
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   Form
   ========================================================= */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.field label {
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}
.field label .req { color: #FF6B6B; margin-left: 4px; }
.field input,
.field select,
.field textarea {
  background: rgba(10, 22, 40, 0.6);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 15px;
  color: var(--fg);
  font-family: inherit;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-glow);
}
.field textarea { min-height: 120px; resize: vertical; }
.field .hint { font-size: 12px; color: var(--fg-mute); }

/* =========================================================
   Subtle gold underline links
   ========================================================= */
.gold-link {
  color: var(--gold);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  padding-bottom: 2px;
}
.gold-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--gold);
  transform: scaleX(0.4);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.gold-link:hover::after { transform: scaleX(1); }
.gold-link:hover { color: var(--gold-bright); }

/* Decorative gold corner brackets */
.bracket-frame {
  position: relative;
  padding: 32px;
}
.bracket-frame::before,
.bracket-frame::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  border: 1px solid var(--gold);
}
.bracket-frame::before { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.bracket-frame::after { bottom: 0; right: 0; border-left: 0; border-top: 0; }

/* Selection */
::selection { background: var(--gold); color: var(--bg-deep-navy); }

/* Scrollbar — minimal dark */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-black); }
::-webkit-scrollbar-thumb { background: var(--bg-navy-light); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-deep); }
