/* Inner pages. Builds on base.css (tokens, buttons, glass cards, reveal). */
:root { --teal: #5fd4dc; --teal-soft: rgba(95, 212, 220, .16); }

/* ---------- Nav state + mobile menu ---------- */
.nav a[aria-current="page"]:not(.btn-ghost) { color: var(--white); }
.nav a[aria-current="page"]:not(.btn-ghost)::after { content: ""; display: block; height: 1px; margin-top: 4px; background: linear-gradient(90deg, var(--teal), var(--blue)); }
.menu-btn { display: none; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03); color: var(--white); cursor: pointer; place-items: center; }
.menu-btn span { display: block; width: 18px; height: 1.5px; background: currentColor; position: relative; transition: transform .3s, background .3s; }
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; width: 18px; height: 1.5px; background: currentColor; transition: transform .3s; }
.menu-btn span::before { top: -6px; } .menu-btn span::after { top: 6px; }
.menu-open .menu-btn span { background: transparent; }
.menu-open .menu-btn span::before { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-btn span::after { transform: translateY(-6px) rotate(-45deg); }
.mobile-menu {
  position: fixed; inset: 0; z-index: 30; background: rgba(2, 4, 10, .94); backdrop-filter: blur(18px);
  display: flex; flex-direction: column; justify-content: center; padding: 0 28px; gap: 6px;
  opacity: 0; pointer-events: none; transition: opacity .35s ease;
}
.menu-open .mobile-menu { opacity: 1; pointer-events: auto; }
.mobile-menu a { font-size: 40px; font-weight: 700; letter-spacing: -.05em; color: var(--white); padding: 6px 0; opacity: 0; transform: translateY(14px); transition: opacity .4s, transform .4s; }
.mobile-menu a.small { font-size: 17px; font-weight: 500; letter-spacing: 0; color: var(--muted); margin-top: 24px; }
.menu-open .mobile-menu a { opacity: 1; transform: none; }
.menu-open .mobile-menu a:nth-child(2) { transition-delay: .05s; } .menu-open .mobile-menu a:nth-child(3) { transition-delay: .1s; }
.menu-open .mobile-menu a:nth-child(4) { transition-delay: .15s; } .menu-open .mobile-menu a:nth-child(5) { transition-delay: .2s; } .menu-open .mobile-menu a:nth-child(6) { transition-delay: .25s; }
.site-header { z-index: 40; }
@media (max-width: 860px) { .menu-btn { display: grid; } .nav .btn-ghost { display: none; } }

/* ---------- Page hero ---------- */
.page-hero { position: relative; overflow: hidden; padding: calc(84px + clamp(56px, 10vh, 120px)) 0 clamp(64px, 10vh, 110px); min-height: min(76vh, 760px); display: flex; align-items: center; }
.page-hero .beams { position: absolute; inset: 0; width: 100%; height: 100%; filter: blur(14px); opacity: .9; }
.page-hero .hero-shade { z-index: 1; }
.page-hero .wrap { position: relative; z-index: 2; width: 100%; }
.page-hero h1 { font-weight: 700; font-size: clamp(42px, 6.4vw, 96px); line-height: .97; letter-spacing: -.055em; margin: 0 0 24px; color: var(--white); max-width: 18ch; }
.page-hero.split h1 { font-size: clamp(40px, 5vw, 76px); }
.page-hero .intro { font-size: clamp(17px, 1.6vw, 21px); color: #b8bfce; max-width: 640px; margin: 0; }
.page-hero .actions { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; margin-top: 34px; }
.page-hero.split .wrap { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(36px, 6vw, 90px); align-items: center; }
.hero-photo { position: relative; }
.hero-photo::before { content: ""; position: absolute; inset: -10%; background: radial-gradient(closest-side, rgba(61, 107, 255, .35), rgba(95, 212, 220, .08) 60%, rgba(61, 107, 255, 0)); filter: blur(10px); }
.hero-photo img { position: relative; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 18px; border: 1px solid var(--line-2); transform: perspective(1200px) rotateY(calc(var(--px, 0) * -6deg)) rotateX(calc(var(--py, 0) * 5deg)); transition: transform .3s ease-out; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8); }
.hero-photo.square img { aspect-ratio: 1; }
.page-hero.compact { min-height: 0; padding-bottom: clamp(40px, 7vh, 72px); }

/* ---------- Stat strip with count-up ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stats .gcard { padding: 24px 22px 20px; }
.stats .num { font-size: clamp(32px, 3.6vw, 48px); font-weight: 700; letter-spacing: -.05em; color: var(--white); line-height: 1; font-variant-numeric: tabular-nums; }
.stats .num em { font-style: normal; color: var(--teal); }
.stats .mono { display: block; margin-top: 12px; line-height: 1.45; }

/* ---------- Long-form prose ---------- */
.prose { max-width: 720px; }
.prose p, .prose li { font-size: 18px; line-height: 1.75; color: #b3bacb; }
.prose p { margin: 0 0 22px; }
.prose h2 { font-size: clamp(28px, 3vw, 40px); line-height: 1.08; letter-spacing: -.045em; font-weight: 700; color: var(--white); margin: 56px 0 18px; }
.prose h2:first-child { margin-top: 0; }
.prose strong { color: var(--white); font-weight: 600; }
.prose a { color: var(--white); text-decoration: underline; text-decoration-color: rgba(95, 212, 220, .55); text-underline-offset: 4px; transition: text-decoration-color .2s; }
.prose a:hover { text-decoration-color: var(--teal); }
.prose ul { list-style: none; padding: 0; margin: 0 0 26px; }
.prose li { position: relative; padding-left: 26px; margin-bottom: 10px; }
.prose li::before { content: ""; position: absolute; left: 4px; top: .72em; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 10px var(--teal); }
.prose.lead p:first-child { font-size: 22px; color: #d3d8e3; line-height: 1.55; }

/* ---------- Timeline (About) ---------- */
.timeline { position: relative; display: grid; gap: 0; }
.timeline::before { content: ""; position: absolute; left: 150px; top: 8px; bottom: 8px; width: 1px; background: var(--line-2); }
.timeline .fill { position: absolute; left: 150px; top: 8px; width: 1px; height: calc(var(--progress, 0) * (100% - 16px)); background: linear-gradient(180deg, var(--teal), var(--blue)); box-shadow: 0 0 12px rgba(95, 212, 220, .6); }
.tl-item { position: relative; display: grid; grid-template-columns: 150px 1fr; gap: 0; padding: 0 0 64px; }
.tl-year { position: sticky; top: 110px; align-self: start; font-family: var(--mono); font-size: 13px; letter-spacing: .08em; color: var(--dim); padding-top: 8px; transition: color .4s; }
.tl-dot { position: absolute; left: 150px; top: 12px; width: 13px; height: 13px; margin-left: -6px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line-2); transition: background .4s, border-color .4s, box-shadow .4s; }
.tl-body { padding-left: 48px; }
.tl-body h2 { margin-top: 0; }
.tl-item.on .tl-dot { background: var(--teal); border-color: var(--teal); box-shadow: 0 0 0 5px rgba(95, 212, 220, .14), 0 0 18px var(--teal); }
.tl-item.on .tl-year { color: var(--white); }
.tl-item:last-child { padding-bottom: 0; }

/* ---------- Company blocks ---------- */
.co { display: grid; grid-template-columns: 380px 1fr; gap: clamp(36px, 6vw, 90px); align-items: start; padding: clamp(64px, 8vw, 110px) 0; border-top: 1px solid var(--line); }
.co:first-of-type { border-top: 0; }
.co-card { position: sticky; top: 110px; padding: 30px 28px; }
.co-card .mono { display: block; margin-bottom: 40px; }
.co-card h2 { font-size: 40px; line-height: 1; letter-spacing: -.05em; font-weight: 700; margin: 0 0 12px; color: var(--white); }
.co-card .tag { color: #c3c9d6; font-size: 17px; margin: 0 0 26px; }
.co-card .kv { border-top: 1px solid var(--line); padding: 16px 0; font-size: 15px; color: #d5dae4; }
.co-card .kv .mono { margin: 0 0 6px; }
.co-card .btn { margin-top: 10px; width: 100%; justify-content: center; }

/* ---------- Tabs (Press bios) ---------- */
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); margin-bottom: 18px; }
.tabs button { font: inherit; font-size: 14px; font-weight: 500; color: var(--muted); background: none; border: 0; padding: 9px 16px; border-radius: 9px; cursor: pointer; transition: background .25s, color .25s; }
.tabs button[aria-selected="true"] { background: var(--white); color: #05070d; }
.tab-panel { padding: 30px 32px; }
.tab-panel[hidden] { display: none; }
.tab-panel p { font-size: 18px; line-height: 1.75; color: #c9cfdb; margin: 0 0 16px; }
.tab-panel p:last-of-type { margin-bottom: 0; }
.copy-btn { position: absolute; top: 18px; right: 18px; font: inherit; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--muted); background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; cursor: pointer; transition: color .2s, border-color .2s; z-index: 2; }
.copy-btn:hover { color: var(--white); border-color: var(--line-2); }
.copy-btn.done { color: var(--teal); border-color: rgba(95, 212, 220, .5); }
.tab-panel .wc { font-family: var(--mono); font-size: 12px; color: var(--dim); margin-bottom: 16px; display: block; }

/* ---------- Grids of glass cards ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tile { padding: 24px 24px 22px; }
.tile h3 { font-size: 20px; font-weight: 650; letter-spacing: -.03em; color: var(--white); margin: 0 0 8px; line-height: 1.2; }
.tile p { color: #a3abbc; font-size: 15.5px; margin: 0; }
.tile .mono { display: block; margin-bottom: 18px; }
.fact { padding: 20px 22px; display: flex; gap: 14px; align-items: flex-start; color: #d3d8e3; font-size: 16px; }
.fact::before { content: ""; flex: none; width: 7px; height: 7px; margin-top: 9px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 10px var(--teal); }
.note { font-size: 14px; color: var(--dim); margin-top: 18px; }
.block-title { font-size: clamp(30px, 3.4vw, 46px); line-height: 1.04; letter-spacing: -.05em; font-weight: 700; color: var(--white); margin: 0 0 14px; }
.block-sub { color: #aab2c2; font-size: 18px; max-width: 640px; margin: 0 0 34px; }
.stack { display: grid; gap: clamp(72px, 9vw, 120px); }

/* ---------- Asset / contact cards ---------- */
.asset { display: grid; grid-template-columns: 160px 1fr; gap: 24px; align-items: center; padding: 22px; }
.asset img { border-radius: 12px; aspect-ratio: 1; object-fit: cover; border: 1px solid var(--line); }
.asset h3 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.03em; color: var(--white); }
.asset p { margin: 0 0 16px; color: #a3abbc; font-size: 15.5px; }
.btn-line { display: inline-flex; align-items: center; gap: .5em; font-weight: 600; font-size: 15px; color: var(--white); padding: 11px 18px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03); transition: background .2s, color .2s, border-color .2s; }
.btn-line:hover { background: var(--white); color: #05070d; border-color: var(--white); }
.btn-line span { transition: transform .2s; } .btn-line:hover span { transform: translateX(3px); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; max-width: 860px; }
.faq details { padding: 0; }
.faq summary { list-style: none; cursor: pointer; padding: 22px 60px 22px 26px; font-size: 19px; font-weight: 600; letter-spacing: -.02em; color: var(--white); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 24px; top: 50%; width: 14px; height: 14px; margin-top: -7px; background: linear-gradient(var(--teal), var(--teal)) center / 14px 1.5px no-repeat, linear-gradient(var(--teal), var(--teal)) center / 1.5px 14px no-repeat; transition: transform .3s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .ans { padding: 0 26px 24px; color: #aab2c2; font-size: 16.5px; line-height: 1.7; }

/* ---------- Related links ---------- */
.related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.related a { padding: 24px; display: flex; flex-direction: column; gap: 22px; min-height: 150px; transition: transform .3s, background .3s; }
.related a:hover { transform: translateY(-3px); background: rgba(16, 24, 44, .65); }
.related .lbl { color: var(--white); font-size: 18px; font-weight: 600; letter-spacing: -.02em; line-height: 1.3; }
.related .arr { margin-top: auto; color: var(--teal); font-size: 20px; transition: transform .2s; }
.related a:hover .arr { transform: translateX(5px); }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; text-align: center; padding: clamp(96px, 13vw, 170px) 0; border-top: 1px solid var(--line); }
.cta-band .beams { position: absolute; inset: 0; width: 100%; height: 100%; filter: blur(14px); opacity: .75; }
.cta-band .hero-shade { z-index: 1; background: radial-gradient(70% 70% at 50% 50%, rgba(2, 4, 10, .25), rgba(2, 4, 10, .85)); }
.cta-band .wrap { position: relative; z-index: 2; }
.cta-band h2 { font-size: clamp(40px, 6vw, 86px); line-height: .98; letter-spacing: -.055em; font-weight: 700; color: var(--white); margin: 0 auto 20px; max-width: 14ch; }
.cta-band p { color: #b8bfce; font-size: 19px; max-width: 560px; margin: 0 auto 34px; }

/* ---------- Writing ---------- */
.post-card { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; padding: 30px 30px 28px; transition: transform .3s, background .3s; }
.post-card:hover { transform: translateY(-3px); background: rgba(16, 24, 44, .65); }
.post-card h3 { font-size: 30px; letter-spacing: -.045em; margin: 10px 0 10px; color: var(--white); line-height: 1.05; }
.post-card p { color: #a3abbc; margin: 0; font-size: 16px; max-width: 560px; }
.post-card .arr { color: var(--teal); font-size: 24px; transition: transform .2s; }
.post-card:hover .arr { transform: translateX(5px); }
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 50; transform-origin: 0 50%; transform: scaleX(var(--read, 0)); background: linear-gradient(90deg, var(--teal), var(--blue)); box-shadow: 0 0 10px rgba(95, 212, 220, .7); }
.meta-row { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.meta-row .mono { color: var(--muted); }

/* ---------- Contact ---------- */
.contact-hero .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 90px); align-items: start; }
.contact-hero h1 { max-width: 12ch; }
.aside-cards { display: grid; gap: 12px; margin-top: 40px; max-width: 520px; }
.aside-cards .tile p { font-size: 15px; }
.hint { font-family: var(--sans); font-size: 13px; letter-spacing: 0; color: var(--dim); }

/* ---------- Thank-you check ---------- */
.check { width: 92px; height: 92px; margin-bottom: 30px; }
.check circle { stroke: var(--teal); stroke-width: 1.5; fill: rgba(95, 212, 220, .06); stroke-dasharray: 280; stroke-dashoffset: 280; animation: draw 1s ease forwards .2s; }
.check path { stroke: var(--white); stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .6s ease forwards .9s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- 404 ---------- */
.nf { min-height: 100svh; }
.nf .code { font-family: var(--mono); font-size: 14px; letter-spacing: .1em; color: var(--teal); margin-bottom: 18px; display: block; }

/* ---------- Spacing helpers ---------- */
.sec-tight { padding: clamp(64px, 8vw, 110px) 0; }
.mt-0 { margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
  .check circle, .check path { animation: none; stroke-dashoffset: 0; }
  .hero-photo img { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .page-hero.split .wrap, .contact-hero .wrap { grid-template-columns: 1fr; }
  .hero-photo { max-width: 420px; }
  .co { grid-template-columns: 1fr; }
  .co-card { position: relative; top: 0; }
  .grid-3, .related { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .grid-2, .grid-3, .related { grid-template-columns: 1fr; }
  .timeline::before, .timeline .fill, .tl-dot { left: 6px; }
  .tl-item { grid-template-columns: 1fr; padding-bottom: 48px; }
  .tl-year { position: relative; top: 0; padding: 0 0 10px 30px; }
  .tl-body { padding-left: 30px; }
  .asset { grid-template-columns: 1fr; }
  .asset img { max-width: 200px; }
  .tab-panel { padding: 56px 22px 24px; }
  .tabs { display: flex; width: 100%; }
  .tabs button { flex: 1; padding: 9px 8px; }
  .post-card { grid-template-columns: 1fr; }
  .prose p, .prose li { font-size: 17px; }
}

/* Long dropdown options must not widen the page on phones */
.contact-hero .wrap > *, .contact-grid > * { min-width: 0; }
input, select, textarea { width: 100%; min-width: 0; }

/* Honeypot: real field for bots, invisible to people (see src/static/_worker.js) */
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.cf-turnstile:empty { display: none; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 60; background: var(--white); color: #05070d; padding: 10px 16px; border-radius: 8px; font-weight: 600; transition: top .2s; }
.skip-link:focus { top: 16px; }

/* Above-the-fold entrance runs on CSS alone, so the headline never waits on site.js
   (better LCP, and nothing blank on a slow connection). Scroll reveals below stay JS-driven. */
@keyframes rise { from { opacity: 0; transform: translateY(22px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
html.js .hero .reveal:not(.in), html.js .page-hero .reveal:not(.in) { opacity: 1; transform: none; filter: none; }
.hero .reveal, .page-hero .reveal { transition: none; animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.hero .d1, .page-hero .d1 { animation-delay: .05s; } .hero .d2, .page-hero .d2 { animation-delay: .15s; }
.hero .d3, .page-hero .d3 { animation-delay: .27s; } .hero .d4, .page-hero .d4 { animation-delay: .39s; }
@media (prefers-reduced-motion: reduce) { .hero .reveal, .page-hero .reveal { animation: none; } }
