/* Aerobotek — one-page 3D site */
:root {
  --bg: #07080a;
  --panel: rgba(13, 15, 18, 0.72);
  --panel-solid: #0e1013;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --ink: #f2f2f0;
  --mute: #9aa1a9;
  --dim: #626a73;
  --amber: #ff6b1a;
  --green: #39d98a;
  --f-display: "Inter Tight", "Inter", system-ui, sans-serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1360px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--f-body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, video { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 700; letter-spacing: -0.025em; margin: 0; line-height: 1.05; }
p { margin: 0; }
.mono { font-family: var(--f-mono); font-weight: 500; letter-spacing: .04em; }
.mute { color: var(--dim); }
.dim { color: var(--dim); }
.amber { color: var(--amber); }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.kicker { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--amber); margin-bottom: 20px; }
h2 { font-size: clamp(34px, 5.2vw, 76px); max-width: 15ch; }
.lede { color: #c4c9ce; font-size: clamp(16px, 1.35vw, 19px); max-width: 56ch; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

/* ── the 3D world, fixed behind everything ── */
.world { position: fixed; inset: 0; z-index: 0; background: #0a0b0c; }
.world canvas { width: 100% !important; height: 100% !important; display: block; }
.world-hud { position: fixed; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; transition: opacity .6s; }
.world-shade { position: fixed; inset: 0; z-index: 1; pointer-events: none; transition: background .9s var(--ease);
  background: linear-gradient(90deg, rgba(7,8,10,.82) 0%, rgba(7,8,10,.45) 38%, rgba(7,8,10,0) 62%), linear-gradient(0deg, rgba(7,8,10,.85) 0%, rgba(7,8,10,0) 30%); }
body:not([data-scene="hero"]):not([data-scene="vast"]) .world-hud { opacity: 0; }
body[data-scene="intel"] .world-shade,
body[data-scene="proof"] .world-shade,
body[data-scene="contact"] .world-shade { background: rgba(7,8,10,.78); }
body[data-scene="fleet"] .world-shade { background: linear-gradient(90deg, rgba(7,8,10,.7) 0%, rgba(7,8,10,.2) 40%, rgba(7,8,10,0) 60%); }
main { position: relative; z-index: 2; }
html.no-webgl .world { background: radial-gradient(ellipse at 70% 40%, #2b241b, #07080a 70%); }

/* ── nav ── */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 20; height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 var(--gutter); transition: background .3s, border-color .3s; border-bottom: 1px solid transparent; }
.nav.solid { background: rgba(7,8,10,.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom-color: var(--line); }
.brand-logo { width: 168px; height: auto; }
.nav-links { display: flex; gap: 30px; }
.nav-links a { text-decoration: none; font-size: 14px; color: var(--mute); transition: color .2s; }
.nav-links a:hover, .nav-links a.on { color: var(--ink); }
.nav-right { display: flex; align-items: center; gap: 14px; }
.lang { display: flex; border: 1px solid var(--line-2); }
.lang button { background: none; border: 0; color: var(--dim); font: 500 11px var(--f-mono); padding: 7px 9px; cursor: pointer; }
.lang button.on { color: var(--bg); background: var(--ink); }
.burger { display: none; background: none; border: 0; width: 34px; height: 34px; cursor: pointer; flex-direction: column; justify-content: center; gap: 7px; }
.burger span { display: block; height: 1.5px; background: var(--ink); transition: transform .3s; }

/* ── buttons ── */
.btn { display: inline-flex; align-items: center; gap: 10px; background: var(--ink); color: #000; text-decoration: none; font-weight: 600; font-size: 15px; padding: 16px 24px; border: 1px solid var(--ink); transition: background .2s, color .2s, border-color .2s; }
.btn:hover { background: var(--amber); border-color: var(--amber); }
.btn-ghost { background: rgba(7,8,10,.35); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--ink); color: #000; border-color: var(--ink); }
.btn-sm { padding: 10px 16px; font-size: 13px; }
.btn i { font-style: normal; }

/* ── hero ── */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; padding: 0 0 13vh; }
.hero-copy { position: relative; }
.eyebrow { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); margin-bottom: 24px; }
.hero h1 { font-size: clamp(46px, 8.4vw, 132px); line-height: .94; letter-spacing: -0.045em; margin-bottom: 28px; text-shadow: 0 2px 30px rgba(0,0,0,.4); }
.hero .lede { margin-bottom: 36px; max-width: 54ch; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hud-corner { position: absolute; top: 108px; right: var(--gutter); font-size: 10.5px; line-height: 1.9; text-align: right; color: var(--ink); }
.hud-corner b { font-weight: 500; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); vertical-align: 1px; }
.dot.live { animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.scroll-cue { position: absolute; bottom: 30px; right: var(--gutter); font-size: 10px; letter-spacing: .2em; color: var(--mute); text-decoration: none; display: flex; align-items: center; gap: 12px; }
.scroll-cue span { width: 1px; height: 42px; background: linear-gradient(var(--ink), transparent); animation: cue 2.2s infinite; }
@keyframes cue { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ── sections ── */
section { position: relative; }
.why { min-height: 120vh; padding: 22vh 0; }
.panel-left { max-width: var(--max); }
.panel-left > * { max-width: 640px; }
.why h2 { margin-bottom: 52px; }
.stats { display: grid; gap: 28px; margin-bottom: 40px; }
.stat b { font: 700 clamp(44px, 5.4vw, 76px)/1 var(--f-display); letter-spacing: -0.04em; display: flex; align-items: baseline; gap: 10px; }
.stat b small { font-size: .32em; font-weight: 600; letter-spacing: 0; color: var(--mute); }
.stat p { color: var(--mute); margin-top: 6px; }
.note { font-size: clamp(17px, 1.5vw, 21px); color: var(--ink); border-left: 2px solid var(--amber); padding-left: 18px; margin-bottom: 18px; }
.src { font-size: 10px; color: var(--dim); }

/* ── advantage: scroll-driven video steps ── */
.intel { padding: 18vh 0 14vh; }
.intel-head { max-width: 760px; margin-bottom: 9vh; }
.intel-head h2 { margin-bottom: 26px; }
.intel-body { display: grid; grid-template-columns: minmax(300px, 0.8fr) 1.2fr; gap: clamp(28px, 5vw, 80px); }
.step { min-height: 88vh; display: flex; flex-direction: column; justify-content: center; opacity: .28; transition: opacity .5s; }
.step.on { opacity: 1; }
.step-n { font-size: 11.5px; letter-spacing: .14em; color: var(--amber); margin-bottom: 18px; }
.step h3 { font-size: clamp(26px, 2.8vw, 40px); margin-bottom: 18px; }
.step p { color: #c4c9ce; font-size: 16.5px; }
.step .cap { color: var(--mute); font-size: 11px; margin-top: 18px; line-height: 1.6; }
.step-media { display: none; margin: 22px 0 0; aspect-ratio: 16/9; background: #000; border: 1px solid var(--line); overflow: hidden; }
.step-media video { width: 100%; height: 100%; object-fit: cover; }
.intel-stage { position: relative; }
.stage-frame { position: sticky; top: calc(50vh - min(26vw, 270px)); aspect-ratio: 16/9; background: #000; border: 1px solid var(--line-2); overflow: hidden; box-shadow: 0 40px 120px rgba(0,0,0,.6); }
.stage-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s; }
.stage-frame video.on { opacity: 1; }
.stage-tag { position: absolute; left: 14px; top: 14px; font-size: 10.5px; padding: 6px 10px; background: rgba(7,8,10,.82); border: 1px solid var(--line-2); }
.stage-bar { position: absolute; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; height: 3px; }
.stage-bar i { background: rgba(255,255,255,.18); }
.stage-bar i.on { background: var(--amber); }
.intel-foot { margin-top: 8vh; color: var(--mute); font-size: 15px; max-width: 70ch; }
.intel-foot a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--amber); white-space: nowrap; }
.intel-foot a:hover { color: var(--amber); }

/* ── fleet: text left, the 3D aircraft lives in the world behind ── */
.fleet { padding: 16vh 0 10vh; }
.fleet-head { margin-bottom: 6vh; }
.craft { min-height: 92vh; display: flex; flex-direction: column; justify-content: center; max-width: 420px; opacity: .3; transition: opacity .5s; }
.craft.on { opacity: 1; }
.craft-n { font-size: 11px; color: var(--amber); letter-spacing: .14em; margin-bottom: 12px; }
.craft h3 { font-size: clamp(44px, 5.6vw, 84px); letter-spacing: -0.04em; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.craft h3 em { font: 500 12px var(--f-mono); letter-spacing: .12em; color: var(--dim); font-style: normal; }
.craft-role { color: var(--mute); margin: 10px 0 26px; font-size: 16px; }
.craft dl { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 24px; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.craft dl div { padding: 14px 0; }
.craft dl div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.craft dt { font: 500 10px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.craft dd { margin: 4px 0 0; font: 600 clamp(18px, 1.7vw, 24px) var(--f-display); letter-spacing: -0.02em; }
.craft > p:last-child { color: #c4c9ce; }

/* ── made here ── */
.made { padding: 18vh 0; }
.made h2 { margin-bottom: 7vh; max-width: 17ch; }
.made-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.tile { background: var(--panel); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 30px 26px 32px; }
.tile b { display: block; font: 700 clamp(40px, 4.2vw, 64px)/1 var(--f-display); letter-spacing: -0.04em; color: var(--ink); margin-bottom: 22px; }
.tile h4 { font: 500 11px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--amber); margin-bottom: 10px; }
.tile p { color: var(--mute); font-size: 14.5px; }
.made-foot { margin-top: 40px; max-width: 68ch; color: #c4c9ce; font-size: clamp(16px, 1.3vw, 18px); }

/* ── proof ── */
.proof { padding: 16vh 0 12vh; }
.proof h2 { margin-bottom: 6vh; }
.proof-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; align-items: start; }
.proof-main { margin: 0; }
.proof-main video { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: #000; border: 1px solid var(--line-2); }
figcaption { display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; color: var(--mute); font-size: 14px; margin-top: 12px; }
figcaption .mono { font-size: 10.5px; color: var(--amber); }
.vids { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.vid { margin: 0; }
.vid-frame { display: block; width: 100%; aspect-ratio: 16/9; border: 1px solid var(--line-2); background: #000 center/cover no-repeat; cursor: pointer; position: relative; padding: 0; }
.vid-frame:hover .vid-play { background: var(--amber); }
.vid-play { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: rgba(7,8,10,.75); transition: background .2s; }
.vid-play::after { content: ""; position: absolute; left: 18px; top: 14px; border: 9px solid transparent; border-left: 14px solid #fff; border-right: 0; }
.vid figcaption { font-size: 12.5px; margin-top: 8px; gap: 8px; }
iframe.vid-frame { cursor: auto; }
.timeline { list-style: none; padding: 0; margin: 9vh 0 0; display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line-2); }
.timeline li { padding: 18px 18px 0 0; position: relative; }
.timeline li::before { content: ""; position: absolute; top: -4px; left: 0; width: 7px; height: 7px; background: var(--ink); }
.timeline li.now::before { background: var(--amber); }
.timeline b { display: block; font: 600 22px var(--f-display); margin-bottom: 6px; }
.timeline span { color: var(--mute); font-size: 14px; }

/* ── contact ── */
.contact { padding: 16vh 0 0; }
.contact-h { font-size: clamp(40px, 6.6vw, 104px); max-width: 14ch; margin-bottom: 7vh; letter-spacing: -0.045em; }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.c-card { background: var(--panel-solid); padding: 30px 28px 34px; text-decoration: none; position: relative; transition: background .25s; min-height: 210px; display: flex; flex-direction: column; }
.c-card:hover { background: #16191d; }
.c-card .mono { font-size: 11px; color: var(--amber); margin-bottom: auto; }
.c-card h4 { font-size: 22px; margin: 34px 0 8px; }
.c-card p { color: var(--mute); font-size: 14.5px; }
.c-card i { position: absolute; top: 26px; right: 28px; font-style: normal; font-size: 20px; transition: transform .25s; }
.c-card:hover i { transform: translateX(4px); color: var(--amber); }
.team { display: flex; flex-wrap: wrap; gap: 10px 34px; margin-top: 44px; font-size: 12px; color: var(--mute); }
.team b { color: var(--ink); font-weight: 500; }
.addr { display: flex; flex-wrap: wrap; gap: 10px 34px; margin-top: 14px; font-size: 12px; color: var(--mute); }
.addr a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--amber); }
.foot { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; padding-top: 12vh; padding-bottom: 36px; font-size: 11px; color: var(--dim); }
.foot-logo { width: 200px; height: auto; margin-right: auto; opacity: .9; }

/* ── reveal ── */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ── responsive ── */
@media (max-width: 1100px) {
  .made-grid { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: repeat(3, 1fr); row-gap: 24px; }
  .proof-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .nav-links { position: fixed; inset: 64px 0 auto 0; flex-direction: column; gap: 0; background: rgba(7,8,10,.96); border-bottom: 1px solid var(--line); display: none; }
  .nav-links a { padding: 16px var(--gutter); border-top: 1px solid var(--line); font-size: 16px; }
  .menu-open .nav-links { display: flex; }
  .burger { display: flex; }
  .nav { height: 64px; }
  .intel-body { grid-template-columns: 1fr; }
  .intel-stage { display: none; }
  .step { min-height: 0; opacity: 1; padding: 6vh 0; border-top: 1px solid var(--line); }
  .step-media { display: block; }
  .world-shade { background: linear-gradient(0deg, rgba(7,8,10,.92) 0%, rgba(7,8,10,.55) 45%, rgba(7,8,10,.1) 75%); }
  body[data-scene="fleet"] .world-shade { background: linear-gradient(0deg, rgba(7,8,10,.94) 0%, rgba(7,8,10,.6) 38%, rgba(7,8,10,0) 60%); }
  .craft { justify-content: flex-end; padding-bottom: 10vh; min-height: 100vh; }
  .contact-grid { grid-template-columns: 1fr; }
  .c-card { min-height: 0; }
}
@media (max-width: 560px) {
  .brand-logo { width: 132px; }
  .nav-right .btn { display: none; }
  .hero { padding-bottom: 10vh; }
  .hud-corner { top: 84px; font-size: 9.5px; }
  .made-grid { grid-template-columns: 1fr; }
  .vids { grid-template-columns: 1fr 1fr; gap: 10px; }
  .timeline { grid-template-columns: 1fr 1fr; }
  .craft dl div + div { padding-left: 10px; }
  .foot-logo { width: 150px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .dot.live, .scroll-cue span { animation: none; }
}

/* ── showreel dialog ── */
.btn .play-ic { width: 0; height: 0; border: 6px solid transparent; border-left: 10px solid currentColor; border-right: 0; margin-right: 2px; }
.reel { padding: 0; border: 1px solid var(--line-2); background: #000; width: min(1100px, 94vw); max-width: none; color: var(--ink); }
.reel::backdrop { background: rgba(4,5,6,.86); backdrop-filter: blur(6px); }
.reel video { width: 100%; aspect-ratio: 16/9; display: block; background: #000; }
.reel-x { position: absolute; top: 8px; right: 8px; width: 38px; height: 38px; border: 1px solid var(--line-2); background: rgba(7,8,10,.8); color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; }
.reel-x:hover { background: var(--amber); border-color: var(--amber); }

/* ── Japanese ── */
html:lang(ja) body { font-family: "Noto Sans JP", var(--f-body); line-height: 1.75; }
html:lang(ja) h1, html:lang(ja) h2, html:lang(ja) h3, html:lang(ja) h4, html:lang(ja) .btn,
html:lang(ja) .stat b, html:lang(ja) .tile b, html:lang(ja) .craft dd, html:lang(ja) .timeline b { font-family: "Inter Tight", "Noto Sans JP", sans-serif; letter-spacing: 0; }
html:lang(ja) .hero h1 { font-size: clamp(38px, 6.6vw, 104px); line-height: 1.12; letter-spacing: -0.01em; }
html:lang(ja) h2 { font-size: clamp(28px, 4vw, 60px); line-height: 1.22; max-width: 18ch; }
html:lang(ja) .contact-h { font-size: clamp(32px, 5vw, 80px); line-height: 1.18; }
html:lang(ja) .step h3 { font-size: clamp(22px, 2.3vw, 34px); line-height: 1.35; }
html:lang(ja) .kicker, html:lang(ja) .eyebrow, html:lang(ja) .step-n, html:lang(ja) .tile h4 { letter-spacing: .08em; }
.lang button[lang="ja"] { font-family: "Noto Sans JP", var(--f-mono); }
.reel-lang { position: absolute; top: 8px; left: 8px; display: flex; border: 1px solid var(--line-2); background: rgba(7,8,10,.8); }
.reel-lang button { background: none; border: 0; color: var(--mute); font: 500 12px var(--f-mono); padding: 9px 12px; cursor: pointer; }
.reel-lang button[lang="ja"] { font-family: "Noto Sans JP", var(--f-mono); }
.reel-lang button.on { background: var(--ink); color: #000; }
.reel-lang button:hover:not(.on) { color: var(--ink); }
