/* Thinking Frog — type and nothing else. Blush and aubergine, Sentient + Noto Serif SC. */
:root {
  --blush: #edccbe;
  --blush-2: #e5bfae;
  --aub: #351a2b;
  --aub-2: #4a2639;
  --aub-3: #5a2f47;
  --plum: #8f5b6d;
  --rose: #c99a9c;
  --muted-on-blush: #6c4857;
  --muted-on-aub: #c9a6ad;

  --font: "Sentient", "Noto Serif SC", "Songti SC", "SimSun", serif;
  --font-var: "Noto Serif SC", "Songti SC", serif;

  --step-body: clamp(1.0625rem, 1.02rem + 0.2vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --step-head: clamp(2.5rem, 1.6rem + 3.6vw, 5.25rem);
  --step-display: clamp(4rem, 10vw, 9.375rem);

  --m: clamp(20px, 2.2vw, 32px);
  --radius: 999px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--blush); color: var(--aub); font-family: var(--font); font-size: var(--step-body); line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--aub); color: var(--blush); }
:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }
.dark { background: var(--aub); color: var(--blush); }
.dark ::selection { background: var(--blush); color: var(--aub); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: 0 26px;
  border-radius: var(--radius); border: 0; background: var(--aub); color: var(--blush); text-decoration: none;
  font-size: 1.0625rem; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: transform .2s var(--ease), background .2s;
}
.btn:hover { background: var(--aub-3); }
.btn:active { transform: scale(.96); }
.dark .btn { background: var(--blush); color: var(--aub); }
.dark .btn:hover { background: #fff1ea; }

/* ---------- Hero: controls on the sentence ---------- */
.hero { min-height: 100svh; position: relative; padding: var(--m); display: grid; grid-template-rows: auto 1fr; overflow: hidden; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.top .wordmark { margin-right: auto; }
.langs { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.langs a { text-decoration: none; padding: 6px 10px; border-radius: var(--radius); font-size: 0.9375rem; transition: background .2s; }
.langs a:hover { background: var(--aub-3); }
.langs a[aria-current="page"] { background: var(--aub-2); font-weight: 500; }
.foot .langs a { font-size: 0.875rem; }
/* Latin pages: Noto Serif carries the variable-weight headline */
.l-en, .l-fr { --font-var: "Noto Serif", Georgia, serif; }
.l-en .hero h1, .l-fr .hero h1 { font-size: clamp(3.5rem, 8.4vw, 8.25rem); }
.l-en .poster button, .l-fr .poster button { letter-spacing: -0.025em; }
.wordmark { font-size: 1.25rem; font-weight: 500; letter-spacing: -0.01em; text-decoration: none; }
.top nav { display: flex; align-items: center; gap: 28px; }
.top nav a:not(.btn) { text-decoration: none; font-size: 1.0625rem; }
.top nav a:not(.btn):hover { text-decoration: underline; text-underline-offset: 6px; }

.stage { position: relative; display: grid; place-items: center; align-content: center; padding: 140px 0 120px; }
.hero h1 {
  font-family: var(--font-var); font-size: var(--step-display); line-height: 1.04; letter-spacing: -0.015em;
  text-align: center; font-weight: var(--w, 300); transition: font-weight .25s;
}
.hero h1 .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero h1 .line > span { display: inline-block; }
.hero h1 .model { white-space: nowrap; display: inline-block; }
.hero h1 .caret { display: inline-block; width: .06em; height: .8em; background: currentColor; margin-left: .04em; vertical-align: -.02em; animation: blink 1s steps(1) infinite; }
.hero h1 .caret[hidden] { display: none; }
@keyframes blink { 50% { opacity: 0; } }
.hero .sub { margin-top: 72px; max-width: 40ch; text-align: center; font-size: var(--step-lead); line-height: 1.5; }

/* the three request parameters, each a working control */
.chip {
  position: absolute; width: 300px; min-height: 80px; padding: 14px 20px; border-radius: 18px;
  background: var(--aub-2); color: var(--blush); display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 16px;
  transition: transform .3s var(--ease), background .2s;
}
.chip:hover { background: var(--aub-3); }
.chip .k { font-size: 1rem; color: var(--muted-on-aub); }
.chip .v { font-size: 1.25rem; font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; }
.chip select, .chip input[type=range] { grid-column: 1 / -1; width: 100%; }
.chip select { appearance: none; background: var(--aub); border: 0; border-radius: 10px; padding: 8px 12px; font-size: 1.0625rem; cursor: pointer; }
.chip input[type=range] { accent-color: var(--blush); cursor: pointer; margin: 6px 0 2px; }
.c-model { top: 24px; left: 8%; transform: rotate(-3deg); }
.c-temp { top: 40px; right: 8%; transform: rotate(2.5deg); }
.c-stream { bottom: 24px; right: 12%; transform: rotate(-2deg); }
.c-model:hover { transform: rotate(-3deg) translateY(-4px); }
.c-temp:hover { transform: rotate(2.5deg) translateY(-4px); }
.c-stream:hover { transform: rotate(-2deg) translateY(-4px); }
.switch { width: 64px; height: 36px; border-radius: 999px; border: 0; background: var(--aub); position: relative; cursor: pointer; padding: 0; }
.switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 28px; height: 28px; border-radius: 50%; background: var(--muted-on-aub); transition: transform .25s var(--ease), background .2s; }
.switch[aria-checked="true"] { background: var(--blush); }
.switch[aria-checked="true"]::after { transform: translateX(28px); background: var(--aub); }
.chips-low { display: contents; }

/* ---------- Sections ---------- */
.sec { padding: 120px var(--m); position: relative; }
.hero + main > .sec:first-child { padding-top: 160px; }
.h2 { font-size: var(--step-head); font-weight: 300; line-height: 1.04; letter-spacing: -0.015em; }

/* Model catalogue: one item per poster line */
.models .intro { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: end; margin-bottom: 80px; }
.models .intro p { max-width: 34ch; justify-self: end; }
.poster li { display: grid; grid-template-columns: 1fr auto; align-items: last baseline; gap: 24px; }
.poster button {
  all: unset; cursor: pointer; font-size: var(--step-display); font-weight: 300; line-height: 0.98; letter-spacing: -0.02em;
  transition: color .2s, transform .35s var(--ease); display: inline-block; padding: .04em 0; justify-self: start;
}
.poster button:hover, .poster button:focus-visible { color: var(--plum); transform: translateX(.08em); }
.poster button:focus-visible { outline: 3px solid var(--aub); outline-offset: 4px; }
.poster li.is-on button { font-style: italic; }
.poster .d { font-size: 1.125rem; text-align: right; font-variant-numeric: tabular-nums; }
.poster .d b { font-weight: 500; display: block; }

/* How it works: stages as one bar */
.flow .h2 { margin-bottom: 64px; }
.bar { display: flex; gap: 6px; }
.seg { flex: var(--g) 1 0; min-width: 12%; }
.seg .fill { height: 22vh; min-height: 160px; border-radius: 14px; padding: 20px; font-size: clamp(1.25rem, 2vw, 1.875rem); line-height: 1.15; transform-origin: left; }
.seg:nth-child(1) .fill { background: var(--aub); color: var(--blush); }
.seg:nth-child(2) .fill { background: var(--aub-3); color: var(--blush); }
.seg:nth-child(3) .fill { background: var(--plum); color: #fff3ee; }
.seg:nth-child(4) .fill { background: var(--rose); color: var(--aub); }
.seg p { margin-top: 18px; max-width: 22ch; font-size: 1.0625rem; }
.seg p b { font-weight: 500; display: block; }

/* Features: capabilities at poster scale */
.caps { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; }
.caps .row { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: first baseline; padding: .18em 0; }
.caps .name { grid-column: 1 / 9; font-size: clamp(2.5rem, 5.2vw, 5.25rem); line-height: 1.02; letter-spacing: -0.02em; font-weight: 400; transition: color .25s, transform .35s var(--ease); }
.caps .row:not(.head):hover .name { transform: translateX(.06em); color: #fff3ee; }
.caps .desc { grid-column: 9 / 13; font-size: 1.0625rem; }
.caps h2.name { color: var(--muted-on-aub); font-weight: 300; }

/* FAQ: answers as reading text */
.faq { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.faq h2 { grid-column: 1 / 4; font-size: 2rem; font-weight: 400; line-height: 1.1; }
.faq .text { grid-column: 5 / 13; columns: 2; column-gap: 56px; }
.faq .text p { break-inside: avoid; margin-bottom: 22px; font-size: 1.0625rem; line-height: 1.6; }
.faq .text b { font-weight: 500; }

/* Apply: the form as display rows */
.apply { padding: 120px 0 0; }
.apply-head { padding: 0 var(--m) 64px; display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: end; }
.apply-head p { max-width: 36ch; justify-self: end; }
.rows > * { display: block; min-height: 96px; padding: 16px var(--m) 18px; position: relative; }
.rows > *:nth-child(odd) { background: var(--blush-2); }
.rows > *:nth-child(even) { background: var(--blush); }
.rows .lab { display: block; font-size: 1rem; color: var(--muted-on-blush); }
.rows .big {
  display: block; width: 100%; border: 0; background: transparent; outline: none; padding: 10px 0 0; margin: 0;
  font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem); line-height: 1.3; letter-spacing: -0.01em; font-weight: 400;
}
.rows .big::placeholder { color: var(--rose); opacity: 1; }
.rows > label:focus-within, .rows > fieldset:focus-within, .rows .pair > label:focus-within { background: #f6ddd2; }
.rows .pair { display: grid; grid-template-columns: 1fr 1fr; padding: 0; }
.rows .pair > label { padding: 16px var(--m) 18px; display: block; }
.rows .pair > label + label { background: var(--blush); }
.rows .mid {
  font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.625rem); appearance: none; cursor: pointer; padding-right: 40px; border: 0; margin-top: 10px; width: 100%;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='12'%3E%3Cpath d='M2 2l8 8 8-8' fill='none' stroke='%23351a2b' stroke-width='3'/%3E%3C/svg%3E") no-repeat right 4px center;
}
.rows fieldset { border: 0; margin: 0; min-width: 0; }
.rows legend { padding: 0; float: left; }
.picks { display: flex; flex-wrap: wrap; gap: 10px 14px; padding-top: 14px; clear: both; }
.picks label { cursor: pointer; position: relative; }
.picks input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.picks span { display: inline-block; font-size: 1.0625rem; line-height: 1; padding: 9px 16px 10px; border-radius: var(--radius); background: var(--blush); transition: background .2s, color .2s, transform .15s var(--ease); }
.rows > *:nth-child(even) .picks span { background: var(--blush-2); }
.picks label:hover span { background: var(--rose); }
.picks input:checked + span { background: var(--aub); color: var(--blush); }
.picks input:focus-visible + span { outline: 3px solid var(--aub); outline-offset: 3px; }
.picks label:active span { transform: scale(.96); }
.rows .go {
  appearance: none; border: 0; display: flex; align-items: center; gap: 28px; width: 100%; cursor: pointer; text-align: left;
  background: var(--aub); color: var(--blush); font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem); font-weight: 500; letter-spacing: -0.01em; line-height: 1.2;
  min-height: 110px; padding: 16px var(--m) 18px; transition: background .2s;
}
.rows .go:hover { background: var(--aub-3); }
.go .round { width: .9em; height: .9em; border-radius: 50%; background: var(--blush); color: var(--aub); display: grid; place-items: center; flex: none; transition: transform .35s var(--ease); }
.go .round svg { width: 45%; height: 45%; }
.go:hover .round { transform: translateX(10px) rotate(-45deg); }
.go:focus-visible { outline: 4px solid var(--blush); outline-offset: -10px; }
.rows > .note { min-height: 0; background: var(--blush); font-size: 1rem; padding-top: 14px; padding-bottom: 0; }
.note .err { font-weight: 500; color: #8a1c2c; display: block; }
.done[hidden], .form[hidden] { display: none !important; }
.done a { text-decoration: none; }
.done a:hover { text-decoration: underline; text-underline-offset: 8px; }
.copy { appearance: none; border: 0; background: none; padding: 0; cursor: pointer; margin-top: 10px; font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.625rem); text-decoration: underline; text-underline-offset: 8px; }

/* Footer: invitation over a cropped name */
.foot { min-height: 0; padding: 120px var(--m) 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto 200px auto auto; gap: 0 24px; overflow: hidden; position: relative; margin-top: 120px; }
.foot .inv { grid-column: 1 / 8; }
.foot .inv h2 { font-size: clamp(2.75rem, 5vw, 5rem); font-weight: 300; line-height: 1.04; letter-spacing: -0.015em; margin-bottom: 32px; }
.foot .links { grid-column: 10 / 13; display: grid; gap: 8px; align-content: start; font-size: 1.0625rem; }
.foot .links a { text-decoration: none; }
.foot .links a:hover { text-decoration: underline; text-underline-offset: 6px; }
.foot .legal { grid-column: 1 / -1; grid-row: 3; display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; font-size: 0.875rem; padding-bottom: 12px; }
.foot .name { grid-column: 1 / -1; grid-row: 4; font-size: 14.5vw; line-height: .8; letter-spacing: -0.045em; white-space: nowrap; font-weight: 400; transform: translateY(30%); margin-top: -0.1em; }

/* ---------- Motion ---------- */
.hero h1 .line > span { animation: up 900ms var(--ease) both; }
.hero h1 .line:nth-child(2) > span { animation-delay: 110ms; }
.hero .sub, .hero .chip { animation: fade 700ms var(--ease) 500ms both; }
@keyframes up { from { transform: translateY(105%); } }
@keyframes fade { from { opacity: 0; } }
.hero h1 .model.swap { animation: up 600ms var(--ease) both; }
.js [data-reveal] > * { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js [data-reveal].is-in > * { opacity: 1; transform: none; }
.js [data-reveal].is-in > :nth-child(2) { transition-delay: 80ms; }
.js [data-reveal].is-in > :nth-child(3) { transition-delay: 160ms; }
.js [data-reveal].is-in > :nth-child(4) { transition-delay: 240ms; }
.js [data-reveal].is-in > :nth-child(5) { transition-delay: 320ms; }
.js [data-reveal].is-in > :nth-child(6) { transition-delay: 400ms; }
.js [data-reveal].is-in > :nth-child(n+7) { transition-delay: 480ms; }
.js .bar[data-reveal] > * { opacity: 1; transform: none; }
.js .bar[data-reveal] .fill { transform: scaleX(0); transition: transform 1s var(--ease); }
.js .bar[data-reveal].is-in .fill { transform: none; }
.js .bar[data-reveal].is-in > :nth-child(2) .fill { transition-delay: 120ms; }
.js .bar[data-reveal].is-in > :nth-child(3) .fill { transition-delay: 240ms; }
.js .bar[data-reveal].is-in > :nth-child(4) .fill { transition-delay: 360ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .js [data-reveal] > *, .js .bar[data-reveal] .fill { opacity: 1; transform: none; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  .chip { width: 250px; }
  .c-model { left: 2%; } .c-temp { right: 2%; } .c-stream { right: 4%; }
  .caps .name { grid-column: 1 / -1; }
  .caps .desc { grid-column: 1 / -1; margin: 6px 0 22px; }
  .faq h2, .faq .text { grid-column: 1 / -1; }
  .foot .inv { grid-column: 1 / 9; } .foot .links { grid-column: 9 / 13; }
  .foot { min-height: 0; grid-template-rows: auto 160px auto auto; }
}

/* ---------- Phone ---------- */
@media (max-width: 720px) {
  :root { --m: 16px; }
  .top nav a:not(.btn) { display: none; }
  .top { gap: 8px; flex-wrap: wrap; }
  .top .wordmark { font-size: 1.0625rem; }
  .top-langs { order: 3; width: 100%; }
  .langs a { padding: 6px 9px; }
  .l-en .hero h1, .l-fr .hero h1 { font-size: 11vw; }
  .btn { min-height: 44px; padding: 0 18px; font-size: 1rem; }
  .stage { padding: 32px 0; display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 16px; }
  .hero h1 { font-size: 13vw; order: 2; }
  .chip { position: static; width: auto; min-height: 60px; transform: none !important; padding: 12px 16px; }
  .c-model { order: 1; }
  .chips-low { order: 3; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .hero .sub { order: 4; margin-top: 8px; font-size: 1.0625rem; text-align: left; }
  .sec { padding: 120px var(--m); }
  .models .intro, .apply-head { grid-template-columns: 1fr; }
  .models .intro p, .apply-head p { justify-self: start; }
  .poster li { grid-template-columns: 1fr; gap: 0; margin-bottom: 22px; }
  .poster button { font-size: 15vw; }
  .poster .d { text-align: left; font-size: 0.9375rem; margin-top: 6px; }
  .bar { flex-direction: column; }
  .seg { min-width: 0; }
  .seg .fill { height: auto; min-height: 72px; }
  .seg:nth-child(1) .fill { min-height: 80px; } .seg:nth-child(2) .fill { min-height: 96px; }
  .seg:nth-child(3) .fill { min-height: 200px; } .seg:nth-child(4) .fill { min-height: 120px; }
  .seg p { margin: 10px 0 18px; font-size: 1rem; }
  .js .bar[data-reveal] .fill { transform-origin: top; }
  .caps .name { font-size: 11vw; }
  .caps .desc { padding-left: var(--m); }
  .faq .text { columns: 1; }
  .faq h2 { font-size: 1.5rem; }
  .apply { padding-top: 120px; }
  .sec, .hero + main > .sec:first-child { padding-top: 96px; padding-bottom: 96px; }
  .rows > * { min-height: 76px; }
  .rows .big { font-size: 1.25rem; }
  .rows .go { font-size: 1.375rem; }
  .rows .pair { grid-template-columns: 1fr; }
  .rows .go { min-height: 84px; justify-content: space-between; }
  .go .round { width: 48px; height: 48px; }
  .foot { grid-template-columns: minmax(0, 1fr); padding-top: 96px; margin-top: 120px; }
  .foot .inv, .foot .links, .foot .legal, .foot .name { grid-column: 1; }
  .foot .inv h2 { font-size: 11vw; }
  .foot .inv .btn { width: 100%; }
  .foot .links { grid-row: 2; display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 40px 0 80px; font-size: 0.9375rem; }
  .foot { grid-template-rows: auto auto auto auto; }
  .foot .name { font-size: 14.5vw; }
}
