/* Akhi Lab · shared site styles
   Cool light canvas with a faint grain, navy ink, a wide grotesk for display
   and Geist for reading. Ochre is the rare accent. */

:root {
  --canvas: #F3F5F8;
  --canvas-2: #E8ECF2;
  --canvas-3: #DCE2EA;
  --white: #FFFFFF;
  --paper: #EDF0F4;
  --ink: #172B45;
  --ink-soft: #2E4260;
  --muted: #525C6B;
  --line: rgba(23, 43, 69, 0.14);
  --line-strong: rgba(23, 43, 69, 0.28);
  --ochre: #C66A43;
  --action: #A3502C;
  --sage: #B6C8B4;
  --mist: #D9E4F4;
  --night: #101D30;
  --footer: #101D30;
  --on-dark: #EEF2F7;
  --on-dark-muted: #B9C4D6;
  --on-dark-line: rgba(238, 242, 247, 0.14);

  --font: "Geist", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Clash Grotesk", "Geist", "Helvetica Neue", Arial, sans-serif;
  --font-mark: "Unbounded", "Arial Black", sans-serif;

  --step-small: 0.875rem;
  --step-body: 1.0625rem;
  --step-lead: clamp(1.0625rem, 0.98rem + 0.35vw, 1.25rem);
  --step-h3: clamp(1.375rem, 1.15rem + 0.9vw, 1.875rem);
  --step-head: clamp(2.1rem, 1.4rem + 2.8vw, 3.75rem);
  --step-display: clamp(2.5rem, 1.5rem + 4vw, 5.25rem);
  --step-list: clamp(2.4rem, 1.4rem + 4.4vw, 5.5rem);

  --gutter: clamp(1.25rem, 0.6rem + 2.6vw, 2.75rem);
  --max: 1360px;
  --section: clamp(5rem, 3.5rem + 7vw, 10rem);
  --radius: 6px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --header-h: 84px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}
/* Fine paper grain over everything, like printed stock */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0.1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.09 0 0 0 0 0.17 0 0 0 0 0.27 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--ink); color: var(--canvas); }
:focus-visible { outline: 2px solid var(--action); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--gutter); top: -60px; z-index: 300; background: var(--ink); color: var(--canvas); padding: 0.6rem 1rem; border-radius: var(--radius); text-decoration: none; }
.skip:focus { top: 1rem; }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding-inline: var(--gutter); }

/* ---------- Type ---------- */
.display, .h-display {
  font-family: var(--font-display);
  font-size: var(--step-display);
  line-height: 1.06;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0;
  text-wrap: balance;
}
.display .soft, .h-display .soft, .two-tone .soft { font-weight: 400; display: block; }
.head {
  font-family: var(--font-display);
  font-size: var(--step-head);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 500;
  margin: 0;
  text-wrap: balance;
}
.label {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin: 0;
}
.lead { font-size: var(--step-lead); line-height: 1.5; color: var(--muted); margin: 0; text-wrap: pretty; max-width: 40rem; }
.lead strong { color: var(--ink); font-weight: 500; }
.body-muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  min-height: 44px; padding: 0 1.05rem;
  border-radius: var(--radius);
  font: 600 0.9375rem/1 var(--font-display);
  letter-spacing: 0.005em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  border: 1px solid transparent;
  transition: transform 160ms var(--ease-out), background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 15px; height: 15px; flex: none; }
.btn--ink { background: var(--ink); color: var(--canvas); }
.btn--ink:hover { background: var(--night); }
.btn--line { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--line:hover { border-color: var(--ink); }
.btn--canvas { background: var(--canvas); color: var(--ink); }
.btn--canvas:hover { background: var(--white); }
.btn--ghost { background: transparent; color: var(--on-dark); border-color: rgba(238, 242, 247, 0.3); }
.btn--ghost:hover { border-color: var(--on-dark); }
.btn--lg { min-height: 52px; padding: 0 1.4rem; font-size: 1rem; }
.arrow { display: inline-block; transition: transform 180ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .btn:hover .arrow, .link-arrow:hover .arrow { transform: translateX(3px); } }
.link-arrow { display: inline-flex; align-items: center; gap: 0.45rem; font: 600 0.9375rem/1.2 var(--font-display); text-decoration: none; border-bottom: 1px solid var(--line-strong); padding-bottom: 0.3rem; transition: border-color 180ms ease; }
.link-arrow:hover { border-color: var(--ink); }

.pill { display: inline-flex; align-items: center; gap: 0.4rem; font: 600 0.8125rem/1 var(--font-display); padding: 0.5rem 0.7rem; border-radius: 4px; text-decoration: none; background: var(--canvas); color: var(--ink); border: 1px solid var(--line); white-space: nowrap; }
a.pill:hover { border-color: var(--ink); }

/* ---------- Header ---------- */
.site-head {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background-color 240ms ease, box-shadow 240ms ease, transform 320ms var(--ease-out);
}
.site-head.is-scrolled { background: rgba(243, 245, 248, 0.86); box-shadow: 0 1px 0 var(--line); }
@supports (backdrop-filter: blur(10px)) { .site-head.is-scrolled { background: rgba(243, 245, 248, 0.9); backdrop-filter: blur(12px) saturate(1.2); } }
.site-head.is-hidden { transform: translateY(-100%); }
.site-head__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: var(--header-h); }
.site-brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--ink); }
.site-brand svg { width: 34px; height: 34px; flex: none; transition: transform 500ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .site-brand:hover svg { transform: rotate(-90deg); } }
.site-brand span { font-family: var(--font-mark); font-weight: 600; font-size: 1.1rem; letter-spacing: -0.045em; line-height: 1; }
.site-head__actions { display: flex; align-items: center; gap: 0.5rem; }
.menu-btn { background: var(--canvas); }

/* ---------- Menu overlay ---------- */
.menu {
  position: fixed; inset: 0; z-index: 120;
  background: var(--night); color: var(--on-dark);
  display: grid; grid-template-rows: auto 1fr auto;
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path 380ms var(--ease-in-out), visibility 0s linear 380ms;
}
.menu.is-open { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path 520ms var(--ease-in-out), visibility 0s; }
.menu .site-brand { color: var(--on-dark); }
.menu__top { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.menu__body { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 3rem; align-items: end; padding-block: 2rem 3rem; }
.menu__links { list-style: none; margin: 0; padding: 0; }
.menu__links a {
  display: flex; align-items: baseline; gap: 1.25rem;
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(2.6rem, 1.6rem + 5vw, 6rem); line-height: 1.02; letter-spacing: -0.025em;
  text-decoration: none; color: var(--on-dark);
  padding-block: 0.12em;
  transition: color 200ms ease, transform 300ms var(--ease-out);
}
.menu__links a small { font: 500 0.875rem/1 var(--font); color: var(--on-dark-muted); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.menu__links a:hover { color: var(--ochre); }
@media (hover: hover) and (pointer: fine) { .menu__links a:hover { transform: translateX(6px); } }
.menu__links a[aria-current="page"] { color: var(--on-dark-muted); }
.menu__side { display: flex; flex-direction: column; gap: 1.5rem; color: var(--on-dark-muted); font-size: 0.9375rem; }
.menu__side h2 { font: 600 0.9375rem/1.2 var(--font-display); color: var(--on-dark); margin: 0 0 0.6rem; }
.menu__side a { color: var(--on-dark); text-decoration: none; }
.menu__side a:hover { color: var(--ochre); }
.menu__side p { margin: 0; }
.menu__foot { display: flex; justify-content: space-between; gap: 1rem; padding-block: 1.25rem 1.75rem; border-top: 1px solid var(--on-dark-line); font-size: 0.8125rem; color: var(--on-dark-muted); }
@media (prefers-reduced-motion: no-preference) {
  .menu__links li { opacity: 0; transform: translateY(18px); transition: opacity 200ms ease, transform 200ms var(--ease-out); }
  .menu.is-open .menu__links li { opacity: 1; transform: none; transition-duration: 320ms, 480ms; }
  .menu.is-open .menu__links li:nth-child(1) { transition-delay: 160ms; }
  .menu.is-open .menu__links li:nth-child(2) { transition-delay: 200ms; }
  .menu.is-open .menu__links li:nth-child(3) { transition-delay: 240ms; }
  .menu.is-open .menu__links li:nth-child(4) { transition-delay: 280ms; }
  .menu.is-open .menu__links li:nth-child(5) { transition-delay: 320ms; }
}
html.menu-open { overflow: hidden; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding-top: calc(var(--header-h) + clamp(3rem, 2rem + 6vw, 8rem)); padding-bottom: clamp(3rem, 2rem + 4vw, 6rem); }
.page-hero__label { margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.6rem; }
.page-hero__label svg { width: 14px; height: 14px; }
.page-hero__grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 2rem 4rem; align-items: end; }
.page-hero .lead { max-width: 30rem; }
.page-hero .display { font-size: clamp(2.4rem, 1.5rem + 3.4vw, 4.6rem); }

/* ---------- Sections ---------- */
.section { padding-block: var(--section); }
.section--tight { padding-block: calc(var(--section) * 0.6); }
.section__label { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem); }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }
.dark { background: var(--night); color: var(--on-dark); }
.dark .lead { color: var(--on-dark-muted); }

/* Scroll-filled statement */
.statement { font-family: var(--font-display); font-weight: 500; font-size: clamp(2.1rem, 1.2rem + 4.2vw, 5.5rem); line-height: 1.1; letter-spacing: -0.025em; margin: 0; text-wrap: balance; max-width: 18ch; }
.statement .w { color: rgba(23, 43, 69, 0.16); transition: color 300ms ease; }
.statement .w.on { color: var(--ink); }
.no-js .statement .w, .statement.static .w { color: var(--ink); }

/* Close (the call to action before the footer) */
.close { padding-block: var(--section); }
.close__grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 2.5rem 4rem; align-items: end; }
.close__side p { margin: 0 0 1.5rem; color: var(--muted); font-size: var(--step-lead); line-height: 1.5; max-width: 26rem; }
.close__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* ---------- Footer ---------- */
.foot { background: var(--night); color: var(--on-dark); overflow: hidden; padding-top: clamp(3.5rem, 2.5rem + 3vw, 5rem); }
.foot .site-brand { color: var(--on-dark); }
.foot__grid { display: grid; grid-template-columns: minmax(0, 5fr) repeat(3, minmax(0, 2fr)); gap: 2.5rem 2rem; padding-bottom: 3rem; font-size: 0.9375rem; }
.foot__tag { margin: 1.1rem 0 0; color: var(--on-dark-muted); max-width: 22rem; }
.foot h2 { margin: 0 0 1rem; font: 600 0.9375rem/1.2 var(--font-display); color: var(--on-dark); }
.foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.foot a, .foot li { color: var(--on-dark-muted); text-decoration: none; }
.foot a:hover { color: var(--on-dark); }
.foot__legal { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 2rem; padding-block: 1.4rem; border-top: 1px solid var(--on-dark-line); font-size: 0.8125rem; color: var(--on-dark-muted); }
.wordmark-giant { display: block; font-family: var(--font-mark); font-weight: 600; letter-spacing: -0.055em; line-height: 0.74; font-size: 18vw; white-space: nowrap; user-select: none; margin: 0 0 -0.085em; overflow: hidden; }
.fit-inner { display: inline-flex; align-items: flex-end; gap: 0.08em; white-space: nowrap; }
.fit-inner svg { height: 0.73em; width: auto; flex: none; margin: 0 0.04em 0.012em; }
.foot .wordmark-giant { color: rgba(238, 242, 247, 0.08); padding-top: 1.5rem; }

/* ---------- Newsletter sign-up (footer + overlay) ---------- */
.signup__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.signup input { width: 100%; min-width: 0; font: 400 1rem/1.4 var(--font); border-radius: var(--radius); padding: 0.8rem 0.9rem; transition: border-color 180ms ease, background-color 180ms ease; }
.signup input:focus { outline: none; }
.signup__note { margin: 0.75rem 0 0; font-size: 0.8125rem; line-height: 1.45; }
.signup.is-busy button[type="submit"] { opacity: 0.6; pointer-events: none; }
.signup [aria-invalid="true"] { border-color: var(--ochre) !important; }

.foot__signup { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 1.5rem 2rem; align-items: start; padding-bottom: clamp(2.5rem, 2rem + 2vw, 3.5rem); margin-bottom: clamp(2.5rem, 2rem + 2vw, 3.5rem); border-bottom: 1px solid var(--on-dark-line); }
.foot__signup h2 { font-size: var(--step-h3); line-height: 1.15; margin-bottom: 0.6rem; }
.foot__signup-copy p { margin: 0; color: var(--on-dark-muted); max-width: 26rem; font-size: 0.9375rem; line-height: 1.55; }
.foot .signup { width: 100%; max-width: 34rem; justify-self: end; }
.signup__row { display: flex; gap: 0.5rem; }
.foot .signup input { background: rgba(238, 242, 247, 0.06); color: var(--on-dark); border: 1px solid rgba(238, 242, 247, 0.22); }
.foot .signup input::placeholder { color: var(--on-dark-muted); }
.foot .signup input:hover { border-color: rgba(238, 242, 247, 0.4); }
.foot .signup input:focus { border-color: var(--on-dark); background: rgba(238, 242, 247, 0.1); }
.foot .signup .btn { min-height: 0; flex: none; }
.foot .signup__note { color: var(--on-dark-muted); }
.signup.is-done .signup__row, .signup.is-done .signup__fields, .signup.is-done .signup__submit { display: none; }
.signup.is-done .signup__note { margin-top: 0; font-size: 0.9375rem; }
.foot .signup.is-done .signup__note { color: var(--on-dark); }

/* Overlay */
.pop { padding: 0; border: 0; background: transparent; color: var(--ink); width: min(100% - 2rem, 30rem); max-width: none; max-height: calc(100dvh - 2rem); overflow: visible; }
.pop::backdrop { background: rgba(16, 29, 48, 0.55); }
.pop__card { position: relative; background: var(--canvas); border-radius: 10px; padding: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem); box-shadow: 0 30px 80px -20px rgba(16, 29, 48, 0.45); max-height: calc(100dvh - 2rem); overflow-y: auto; }
.pop__mark { display: block; width: 34px; height: 34px; color: var(--ink); margin-bottom: 1.25rem; }
.pop__mark svg { width: 100%; height: 100%; display: block; }
.pop__mark svg path:nth-child(2) { color: var(--ochre); fill: var(--ochre); }
.pop .label { color: var(--muted); font-size: 0.9375rem; margin-bottom: 0.5rem; }
.pop__title { margin: 0 0 0.75rem; font: 600 clamp(1.75rem, 1.4rem + 1.4vw, 2.25rem)/1.08 var(--font-display); letter-spacing: -0.015em; }
.pop__text { margin: 0 0 1.5rem; color: var(--muted); line-height: 1.55; text-wrap: pretty; }
.signup__fields { display: grid; gap: 0.6rem; }
.pop .signup input { background: var(--white); color: var(--ink); border: 1px solid var(--line); }
.pop .signup input:hover { border-color: var(--line-strong); }
.pop .signup input:focus { border-color: var(--ink); }
.signup__submit { width: 100%; justify-content: center; margin-top: 0.75rem; }
.pop .signup__note { color: var(--muted); }
.pop .signup.is-done .signup__note { color: var(--ink); }
.pop__x { position: absolute; top: 0.75rem; right: 0.75rem; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; transition: background-color 180ms ease, color 180ms ease; }
.pop__x:hover { background: var(--canvas-2); color: var(--ink); }
.pop__x svg { width: 20px; height: 20px; }
.pop__later { display: block; margin: 1rem auto 0; padding: 0.5rem 0.75rem; border: 0; background: none; font: 500 0.875rem/1 var(--font); color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.pop__later:hover { color: var(--ink); }
.pop.is-done .pop__later { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .pop, .pop::backdrop { transition: opacity 260ms var(--ease-out), transform 320ms var(--ease-out), overlay 320ms allow-discrete, display 320ms allow-discrete; }
  .pop { opacity: 0; transform: translateY(14px) scale(0.98); }
  .pop[open] { opacity: 1; transform: none; }
  .pop::backdrop { opacity: 0; }
  .pop[open]::backdrop { opacity: 1; }
  @starting-style {
    .pop[open] { opacity: 0; transform: translateY(14px) scale(0.98); }
    .pop[open]::backdrop { opacity: 0; }
  }
}

@media (max-width: 980px) {
  .foot__signup { grid-template-columns: 1fr; }
  .foot .signup { justify-self: start; }
}
@media (max-width: 560px) {
  .signup__row { flex-direction: column; }
  .foot .signup .btn { min-height: 48px; justify-content: center; }
  .pop { width: 100%; margin: auto 0 0; max-height: calc(100dvh - 1rem); }
  .pop__card { border-radius: 14px 14px 0 0; padding-bottom: calc(1.5rem + env(safe-area-inset-bottom)); max-height: calc(100dvh - 1rem); }
  @media (prefers-reduced-motion: no-preference) {
    .pop { transform: translateY(100%); }
    .pop[open] { transform: none; }
    @starting-style { .pop[open] { transform: translateY(100%); } }
  }
}

/* ---------- Reveal ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 600ms var(--ease-out), transform 700ms var(--ease-out); }
  .js .reveal.is-in { opacity: 1; transform: none; }
  .js .reveal[data-delay="1"] { transition-delay: 70ms; }
  .js .reveal[data-delay="2"] { transition-delay: 140ms; }
  .js .reveal[data-delay="3"] { transition-delay: 210ms; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  :root { --header-h: 72px; }
  .page-hero__grid, .close__grid, .menu__body { grid-template-columns: 1fr; }
  .menu__body { align-items: start; }
  .foot__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot__brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .foot ul { gap: 0; }
  .foot ul a { display: inline-block; padding-block: 0.55rem; }
}
@media (max-width: 560px) {
  .site-brand span { display: none; }
  .talk-btn .talk-long { display: none; }
  .btn { padding: 0 0.85rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-property: opacity, color, background-color, border-color, fill, stroke !important; animation: none !important; }
}
