/* AICE Technology: night stage. Home (index.html) and Contact (contact.html) share this file.
   Flero family: Figtree headings, Inter body, Flero blue buttons, the neutral night blacks (never blue-tinted).
   House rules: weight 600 at most, no uppercase, no gradients, no dots in front of text. */

@font-face{
  font-family:"Figtree";
  src:url("/fonts/Figtree.woff2") format("woff2");
  font-weight:100 900; font-style:normal; font-display:swap;
}
@font-face{
  font-family:"Inter";
  src:url("/fonts/Inter.woff2") format("woff2");
  font-weight:100 900; font-style:normal; font-display:swap;
}

/* ── tokens ─────────────────────────────────────────────────────────────── */
:root{
  --night:#0A0A0A;          /* page */
  --night-2:#141414;        /* cards */
  --night-3:#1C1C1C;        /* fields */
  --night-4:#242424;        /* raised bits */
  --text:#F5F5F5;
  --muted:#A3A3A3;          /* body copy on night, 8:1 on --night */
  --faint:#7A7A7A;          /* small print */
  --line:rgba(255,255,255,.10);
  --line-2:rgba(255,255,255,.18);
  --line-3:rgba(255,255,255,.34);
  --blue:#1250FF;           /* Flero blue: buttons */
  --blue-deep:#0F42D1;
  --peri:#9FBBE2;           /* focus ring */
  --ok:#DFFEE9;
  --err:#FCDD88;
  --inv-hover:#D9D9D9;      /* the popup's white button, hovered */

  --head:"Figtree", ui-sans-serif, system-ui, sans-serif;
  --body:"Inter", ui-sans-serif, system-ui, sans-serif;

  --gut:clamp(20px, 4.4vw, 64px);   /* side gutter */
  --sec-y:clamp(72px, 9vw, 120px);  /* section rhythm */
  --r-card:24px;
  --r-pill:9999px;
  color-scheme:dark;
}

/* ── base ───────────────────────────────────────────────────────────────── */
*,*::before,*::after{ box-sizing:border-box; }
[hidden]{ display:none !important; }        /* so `hidden` wins over display:flex (the forms) */
html{ -webkit-text-size-adjust:100%; text-size-adjust:100%; }
/* texture: a fine film grain behind everything (no gradient: a noise tile). The base is a touch darker than
   --night so the grain averages out to it. The model and its floor are solid, so they stand in front of it. */
body{
  margin:0; color:var(--text);
  background:#060606 url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%27180%27 height=%27180%27%3E%3Cfilter id=%27g%27%3E%3CfeTurbulence type=%27fractalNoise%27 baseFrequency=%27.9%27 numOctaves=%272%27 stitchTiles=%27stitch%27/%3E%3CfeColorMatrix values=%270 0 0 0 1 0 0 0 0 1 0 0 0 0 1 .12 0 0 0 -.035%27/%3E%3C/filter%3E%3Crect width=%27180%27 height=%27180%27 filter=%27url(%23g)%27/%3E%3C/svg%3E");
  font:400 16px/1.55 var(--body);
  -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale;
  overflow-x:hidden;
}
h1,h2,h3,p,dl,dd{ margin:0; }
b,strong{ font-weight:600; }
a{ color:inherit; }
:focus-visible{ outline:2px solid var(--peri); outline-offset:3px; }
.sr{ position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }
.skip{ position:absolute; left:var(--gut); top:-60px; z-index:20; padding:10px 16px; border-radius:var(--r-pill); background:var(--text); color:var(--night); text-decoration:none; font-weight:500; }
.skip:focus{ top:16px; }

h1{
  font-family:var(--head); font-weight:600;
  font-size:clamp(40px, 5vw, 76px); line-height:1.04; letter-spacing:-.028em;
  text-wrap:balance;
}
.eyebrow{ font-size:15px; font-weight:500; color:var(--muted); margin-bottom:18px; }
.lede{ font-size:clamp(17px, 1.3vw, 19px); line-height:1.55; color:var(--muted); text-wrap:balance; }

/* ── buttons ────────────────────────────────────────────────────────────── */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:13px 22px; border:1px solid transparent; border-radius:var(--r-pill);
  background:var(--blue); color:#fff; text-decoration:none;
  font:500 15px/1.2 var(--body); cursor:pointer; white-space:nowrap;
  transition:background-color .2s ease, border-color .2s ease;
}
.btn:hover{ background:var(--blue-deep); }
.btn-ghost{ background:transparent; color:var(--text); border-color:var(--line-2); }
.btn-ghost:hover{ background:var(--night-3); border-color:var(--line-3); }
.btn-ic{ width:16px; height:16px; flex:none; }

/* ── header ─────────────────────────────────────────────────────────────── */
.top{
  position:absolute; inset:0 0 auto 0; z-index:10;
  display:flex; align-items:center; justify-content:space-between; gap:24px;
  padding:26px var(--gut);
}
.mark{ display:inline-flex; align-items:baseline; gap:.34em; text-decoration:none; font-family:var(--head); font-size:21px; line-height:1; letter-spacing:-.01em; }
.mark-a{ font-weight:600; letter-spacing:.02em; }
/* the AICE logo before the wordmark (Tanja's file, Nov 27: its shapes exactly, filled, so it takes the text colour in
   both themes): sized in em, so it scales with the wordmark (header, footer). Centred
   on the line, then raised .17em so its middle is level with the middle of the capitals, not the whole line */
.mark-logo{ flex:none; width:1.3em; height:1.3em; fill:currentColor; align-self:center; margin-right:.22em; transform:translateY(-.17em); }
.mark-t{ font-weight:400; color:var(--muted); }
/* the two calls to action live top right: Contact (ghost), then Try Flero (blue, the main action, far right) */
.top-ctas{ display:flex; align-items:center; gap:10px; }
.btn-sm{ padding:10px 18px; font-size:14px; }
.btn-ghost[aria-current="page"]{ background:var(--night-3); }   /* Contact, on the contact page */

/* ── hero: centred. The headline, then the model, a little taller than the screen ─────────────────────── */
.hero{ position:relative; padding-top:clamp(120px, 16vh, 168px); text-align:center; }
.hero-head{ position:relative; z-index:2; max-width:1160px; margin:0 auto; padding:0 var(--gut); }
.hero h1{ max-width:15.5em; margin:0 auto; }
/* on load the headline fades up, then the tower builds and settles into place (js/stage.js). Motion off: no fade */
@keyframes heroIn{ from{ opacity:0; transform:translateY(14px); } to{ opacity:1; transform:none; } }
.js:not(.still) .hero h1{ animation:heroIn .8s cubic-bezier(.2,.7,.2,1) .05s both; }

/* the stage: full width, almost the full screen height; the model sits in its middle */
.stage{
  position:relative;
  height:clamp(870px, calc(156svh + 60px), 2000px);   /* taller than the screen: the model is the page. On desktop
                                                         js/stage.js then sets the exact height, so the tower is as
                                                         wide as the products column (Tanja, Nov 27: "in line with
                                                         the footer"); this is the fallback until it runs. +60px: the
                                                         open band above at0 (TOP in js/stage.js) */
  margin-top:clamp(46px, calc(2.6vh + 30px), 66px);   /* the model starts under the headline (it rises 40px nearer, at most, as it turns) */
}
#model{
  position:absolute; inset:0; width:100%; height:100%; display:block;
  cursor:grab; touch-action:pan-y;          /* phones: vertical swipes still scroll the page */
  -webkit-tap-highlight-color:transparent;
}
#model.grabbing{ cursor:grabbing; }
#model:focus-visible{ outline:2px solid var(--peri); outline-offset:-8px; border-radius:var(--r-card); }

.drag-hint{
  position:absolute; left:50%; bottom:20px; transform:translateX(-50%);
  display:inline-flex; align-items:center; gap:10px;
  font-size:13px; color:var(--faint); white-space:nowrap;
  pointer-events:none; transition:opacity .6s ease;
}
.drag-hint.used{ opacity:0; }

/* ── the product popup: a click on a window in the model opens it, joined to the window by a beam of light that
   js/stage.js draws on the canvas. Placed beside the window by the script; a sheet at the bottom on phones ── */
.pop{
  position:absolute; z-index:4; top:0; left:0; width:360px;
  text-align:left;
  background:var(--night-2); border:1px solid rgba(255,255,255,.12); border-radius:var(--r-card);
  padding:22px 22px 24px;
  box-shadow:0 30px 80px rgba(0,0,0,.55);
  opacity:0; transform:translateY(6px) scale(.98);
  transition:opacity .25s ease, transform .25s ease;
}
.pop.open{ opacity:1; transform:none; }
.pop:focus{ outline:none; }
/* a card's tag (the five floors: "What we're building", Tanja, Nov 28): plain small text at the very top, not a pill */
.pop-tag{ margin:0 0 14px; padding-right:40px; font-size:12px; font-weight:500; line-height:18px; color:var(--faint); }
.pop-x{
  position:absolute; top:14px; right:14px; width:32px; height:32px;
  display:grid; place-items:center; border:0; border-radius:var(--r-pill);
  background:transparent; color:var(--muted); cursor:pointer;
}
.pop-x:hover{ background:var(--night-3); color:var(--text); }
.pop-head{ display:flex; align-items:center; gap:14px; padding-right:36px; }
.pop-logo{ flex:none; width:76px; height:62px; display:block; }
.pop-layer{ font-size:13px; font-weight:500; color:var(--faint); }
.pop-name{ margin-top:2px; font-family:var(--head); font-weight:600; font-size:23px; line-height:1.15; letter-spacing:-.015em; white-space:nowrap; }   /* one line: never "Flero" alone */
.pop-lead{ margin-top:16px; font-size:17px; font-weight:500; line-height:1.4; color:var(--text); text-wrap:balance; }
.pop-text{ margin-top:8px; font-size:15px; line-height:1.55; color:var(--muted); text-wrap:pretty; }
/* the card's foot: its one action, white and centred, or two side by side (Own: Try Flero and Download at0) */
.pop-foot{ display:flex; justify-content:center; flex-wrap:wrap; gap:10px; margin-top:22px; }
.pop-btn{ display:flex; width:max-content; margin:0; background:var(--text); color:var(--night); }
.pop-btn:hover{ background:var(--inv-hover); }

/* the products as plain links: hidden, until a keyboard user tabs into them, then a small panel */
.prod-links:focus-within{
  position:absolute; z-index:5; left:var(--gut); bottom:56px;
  width:auto; height:auto; margin:0; overflow:visible; clip:auto; white-space:normal;
  text-align:left; padding:12px 18px;
  background:var(--night-2); border:1px solid var(--line-2); border-radius:16px;
}
.prod-links ul{ list-style:none; margin:0; padding:0; display:grid; gap:4px; }
.prod-links a{ font-size:14px; color:var(--muted); text-decoration:none; }
.prod-links a:hover, .prod-links a:focus-visible{ color:var(--text); }


/* ── products (below the fold) ──────────────────────────────────────────── */
.products{ padding:var(--sec-y) var(--gut); }
.sec-head{ max-width:760px; margin:0 auto 36px; text-align:center; }
.sec-head h2{
  font-family:var(--head); font-weight:600;
  font-size:clamp(28px, 3.2vw, 46px); line-height:1.1; letter-spacing:-.02em; text-wrap:balance;
}
.sec-head p{ margin-top:16px; font-size:18px; color:var(--muted); text-wrap:balance; }
.keep{ display:inline-block; }               /* a sentence that should not break across the line with its neighbour */
/* the two products: open rows on hairlines, no boxes. Name, one line, the button */
/* the rows share one set of columns (subgrid), so the text column starts at the same place in every row, whatever
   each row's button width. The text sits in the middle (Tanja, Nov 27): the name and button columns share the
   space either side equally, and are never narrower than what they hold (max-content), so on narrower screens the
   text column gives way first */
.rows{
  display:grid; grid-template-columns:minmax(max-content, 1fr) minmax(0, 540px) minmax(max-content, 1fr); gap:0 48px;
  max-width:1120px; margin:0 auto;
}
.row{
  grid-column:1 / -1; display:grid; grid-template-columns:subgrid; align-items:center; row-gap:16px;
  padding:28px 0;
}
.row-id{ display:flex; align-items:center; gap:20px; }
.mini{ flex:none; width:92px; height:76px; display:block; }
.row-name{ font-family:var(--head); font-weight:600; font-size:clamp(24px, 2.2vw, 30px); line-height:1.15; letter-spacing:-.015em; text-wrap:balance; }
.logo-flero{ display:block; height:clamp(27px, 2.4vw, 32px); width:auto; color:var(--text); }
.row-text{ color:var(--muted); font-size:17px; line-height:1.55; max-width:32em; text-wrap:pretty; }
/* the line a row leads with (at0: free tokens, Tanja, Nov 27): the text colour and a touch heavier, no badge */
.row-push{ color:var(--text); font-weight:500; }
.row .btn{ justify-self:end; }

/* contact page panels */
.card{ background:var(--night-2); border:1px solid var(--line); border-radius:var(--r-card); padding:28px; }

.btn[disabled]{ opacity:.7; cursor:progress; }
/* not out yet (at0, Tanja, Nov 30: "Coming soon", disabled): an outline with faint words, nothing to press. Beats the
   blue button, the card's white button and their hovers */
.btn.btn-soon, .btn.btn-soon:hover{
  background:transparent; color:var(--faint); border:1px solid var(--line-2);
  opacity:1; cursor:default; pointer-events:none;
}
.honey{ position:absolute; left:-9999px; width:1px; height:1px; opacity:0; }
.note{ margin-top:12px; font-size:13px; line-height:1.5; color:var(--faint); }
.note a{ color:var(--muted); }
.note a:hover{ color:var(--text); }
.note-ok{ color:var(--ok); }
.note-err{ color:var(--err); }

/* ── contact page ───────────────────────────────────────────────────────── */
.contact{ padding:clamp(132px, 17vh, 176px) var(--gut) var(--sec-y); }
.ct-head{ max-width:1120px; margin:0 auto; text-align:center; }
.ct-head h1{ max-width:none; }
.ct-head .lede{ margin-top:22px; }
.ct-grid{
  display:grid; grid-template-columns:minmax(0, 7fr) minmax(0, 5fr); gap:16px;
  max-width:1120px; margin:56px auto 0;
}
.ct-form{ display:grid; gap:18px; align-content:start; }
.ct-form h2, .ct-info h2{ font-family:var(--head); font-weight:600; font-size:22px; line-height:1.2; letter-spacing:-.01em; }
.fg-row{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.fg{ display:grid; gap:8px; }
.fg label{ font-size:14px; font-weight:500; color:var(--muted); }
.fg .opt{ font-weight:400; color:var(--faint); }
.field{
  width:100%; border:1px solid var(--line-2); border-radius:14px; background:var(--night-3); color:var(--text);
  font:400 15px/1.45 var(--body); padding:13px 16px; outline:0;
  transition:border-color .2s ease;
}
.field::placeholder{ color:var(--faint); }
.field:focus{ border-color:var(--line-3); }
textarea.field{ min-height:168px; resize:vertical; border-radius:18px; }
/* the note on the left, Send message pushed to the form's right edge (margin-left:auto takes up the free space, and
   still keeps the button on the right when the row wraps on a phone) */
.ct-send{ display:flex; flex-wrap:wrap; align-items:center; gap:12px 18px; margin-top:4px; }
.ct-send .btn{ margin-left:auto; }
.ct-send .note{ margin-top:0; }
.ct-info{ display:grid; gap:0; align-content:start; }
.ct-info dl{ display:grid; }
.ct-info dl > div{ padding:20px 0; border-top:1px solid var(--line); }
.ct-info dl > div:first-child{ border-top:0; padding-top:18px; }
.ct-info dt{ font-size:14px; font-weight:500; color:var(--muted); }
.ct-info dd{ margin-top:8px; color:var(--text); font-size:16px; line-height:1.55; }
.ct-info dd .btn{ margin-top:14px; }
.ct-big{ font-family:var(--head); font-weight:600; font-size:22px; letter-spacing:-.01em; text-decoration:none; }
.ct-big:hover{ text-decoration:underline; text-underline-offset:4px; }
.ct-sub{ display:block; color:var(--faint); font-size:14px; margin-top:4px; }

/* ── footer ─────────────────────────────────────────────────────────────── */
.foot{ border-top:1px solid var(--line); padding:36px var(--gut) 40px; }
.foot-in{ display:flex; justify-content:space-between; align-items:flex-start; gap:32px 48px; flex-wrap:wrap; }
.foot-co{ max-width:560px; }
.mark-sm{ font-size:18px; }
.legal{ margin-top:14px; font-size:13px; line-height:1.6; color:var(--faint); }
.foot-links{ display:flex; flex-wrap:wrap; gap:4px 22px; font-size:14px; }
.foot-links a{ color:var(--muted); text-decoration:none; }
.foot-links a:hover{ color:var(--text); }
.copy{ font-size:13px; color:var(--faint); }
/* the footer's last line: the copyright on the left, the theme toggle on the right */
.foot-base{ display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:16px; margin-top:28px; }
/* the theme toggle: three real radio buttons (Device, Light, Dark; js/motion.js) drawn as one segmented control.
   Real radios, so the arrow keys move between them and screen readers say which one is on. The input covers its
   label, invisible; the icon shows through. Hidden in the night look, which is always dark */
.theme{ display:inline-flex; gap:2px; margin:0; padding:3px; border:1px solid var(--line-2); border-radius:var(--r-pill); min-inline-size:0; }
.theme label{
  position:relative; display:grid; place-items:center; width:30px; height:30px;
  border-radius:var(--r-pill); color:var(--faint); cursor:pointer;
  transition:background-color .2s ease, color .2s ease;
}
.theme input{ position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; }
.theme svg{ width:16px; height:16px; display:block; }
.theme label:hover{ color:var(--text); }
.theme label:has(input:checked){ background:var(--night-3); color:var(--text); }
.theme label:has(input:focus-visible){ outline:2px solid var(--peri); outline-offset:2px; }
html:not(.sharp) .theme{ display:none; }

/* ── smaller screens ────────────────────────────────────────────────────── */
@media (max-width:900px){
  .ct-grid{ grid-template-columns:minmax(0, 1fr); }
  .rows{ grid-template-columns:minmax(0, 1fr); }
  .row{ padding:24px 0; }
  .mini{ width:84px; height:68px; }
  .row .btn{ justify-self:start; margin-top:6px; }
}
@media (max-width:820px){
  .top{ padding:20px var(--gut); }
  .mark{ font-size:19px; }
  .hero{ padding-top:112px; }
  .stage{ height:clamp(495px, calc(127vw + 60px), 780px); margin-top:30px; }   /* 127vw (was 118): as big as the tower
                                                                                 goes before it meets the screen's sides.
                                                                                 +60px: the band above at0 */
  .drag-hint{ bottom:14px; }
  .card{ padding:22px 20px; }
  .pop{ position:fixed; left:12px; right:12px; bottom:12px; top:auto; width:auto; z-index:30; }   /* a sheet */
  .fg-row{ grid-template-columns:minmax(0, 1fr); }
}
@media (max-width:620px){
  .hide-sm{ display:none; }                     /* phones: only Try Flero fits beside the wordmark */
}

/* motion off: nothing eases */
.still *{ transition:none !important; }
