/* cellubodyslim.com: the field. A round patch of soft bristles in the packs' apricot,
   caramel and periwinkle, combed by a slow circular gesture that leaves a sheen of golden
   oil (assets/field.js). One layer behind the whole page; the words sit on its ground.
   The type, the black tabs and the ruled panels come from the brand's packs (DESIGN.md). */

/* French sets a narrow no-break space (U+202F) before ; : ! ? and inside « ». "Fine" holds
   only that glyph, 1/8 em wide, and every stack starts with it (shared/fonts). */
@font-face { font-family: "Fine"; src: url("fonts/fine.woff2") format("woff2"); unicode-range: U+202F; font-display: swap; }

@font-face {
  font-family: "Schibsted Grotesk";
  src: url(fonts/schibsted-grotesk-latin.woff2) format("woff2");
  font-weight: 400 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url(fonts/schibsted-grotesk-latin-ext.woff2) format("woff2");
  font-weight: 400 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* the fallback takes Schibsted Grotesk's measure, so the swap moves almost nothing
   (measured in Chrome on the home page's copy: see DESIGN.md) */
@font-face {
  font-family: "Schibsted Fallback";
  src: local("Arial"), local("ArialMT"), local("Helvetica Neue"), local("Helvetica");
  size-adjust: 104.1%;
  ascent-override: 93.8%; descent-override: 24.8%; line-gap-override: 0%;
}

:root {
  --ground: #f8dbb2;     /* oklch(0.905 0.062 75) the packs' apricot, softened: the ground of every page */
  --deep: #f0cc9f;       /* oklch(0.865 0.072 73) a deeper apricot: form fields */
  --ink: #1e1814;        /* oklch(0.215 0.012 60) the packs' black type: 13.2:1 on the ground */
  --ink2: #504034;       /* oklch(0.385 0.03 58) second text: 7.4:1 */
  --peri: #4b529d;       /* oklch(0.47 0.12 277) the periwinkle line, deepened: links on hover, focus: 5.3:1 */
  --rule: color-mix(in oklab, var(--ink) 72%, transparent);   /* the packs' thin black rules */
  --line: color-mix(in oklab, var(--ink) 20%, transparent);
  --edge: #82695a;       /* oklch(0.54 0.04 55) the edge of a form field: 3:1 and more on the ground and on its fill */
  --top: clamp(76px, 3.6rem + 4.6vw, 108px);
  --m: max(6vw, 24px);
  --ml: calc(var(--m) + env(safe-area-inset-left, 0px));
  --mr: calc(var(--m) + env(safe-area-inset-right, 0px));
  --gap: 2vw;
  --sans: "Fine", "Schibsted Grotesk", "Schibsted Fallback", Arial, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
}
body {
  margin: 0;
  font-size: clamp(1.0625rem, 1rem + 0.2vw, 1.1875rem);
  line-height: 1.58;
  font-weight: 400;
  touch-action: pan-y pinch-zoom;
  -webkit-tap-highlight-color: transparent;
  font-kerning: normal;
}
::selection { background: color-mix(in oklab, var(--peri) 24%, var(--ground)); color: var(--ink); }

h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; -webkit-hyphens: manual; hyphens: manual; }
p, li, dd { text-wrap: pretty; }
p { margin: 0 0 1em; }
:lang(fr) :where(main p, main dd, main li) {
  -webkit-hyphens: auto; hyphens: auto; hyphenate-limit-chars: 10 4 4;
}
:lang(fr) :where(.lead, .identity), a, label, button { -webkit-hyphens: manual; hyphens: manual; }
.date, .nb { white-space: nowrap; }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.22em;
    text-decoration-color: color-mix(in oklab, currentColor 45%, transparent); transition: color 0.2s, text-decoration-color 0.2s; }
a:hover { color: var(--peri); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--peri); outline-offset: 3px; border-radius: 2px; }
main p a, main dd a { padding-block: 0.3em; margin-block: -0.3em; }
@media (pointer: coarse) { main p a, main dd a { padding-block: 0.6em; margin-block: -0.6em; } }

.skip {
  position: absolute; z-index: 10; left: var(--ml); top: calc(0.5rem + env(safe-area-inset-top, 0px));
  display: inline-flex; align-items: center; padding: 0.7rem 1rem; min-height: 44px;
  background: var(--ink); color: var(--ground);
  transform: translateY(-180%);
}
.skip:focus, .skip:focus-visible { transform: none; }

/* ── the one scene: the field behind the whole page ────────────────────── */
/* as tall as the large viewport, so a browser bar that comes and goes never resizes it;
   the canvas is transparent where there are no bristles, so the ground is the page's */
.scene {
  position: fixed; z-index: 0; top: 0; left: 0; width: 100%;
  height: 100vh; height: 100lvh;
  pointer-events: none;
}
canvas.field {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%;
  opacity: 0; transition: opacity 0.4s ease;
}
canvas.field.on { opacity: 1; }
html.no-gl canvas.field { display: none; }
.top, main, .foot { position: relative; z-index: 1; }
/* when nothing moves, the scene belongs to the first screen and scrolls away with it */
html.still .scene, html.no-gl .scene { position: absolute; }
@media (scripting: none) { .scene { position: absolute; } }

/* ── the header ────────────────────────────────────────────────────────── */
/* the wordmark is the packs' own: lowercase, in a semibold grotesque, black */
.top {
  height: calc(var(--top) + env(safe-area-inset-top, 0px));
  display: flex; align-items: center; justify-content: space-between; column-gap: 1rem;
  padding: env(safe-area-inset-top, 0px) var(--mr) 0 var(--ml);
}
.mark {
  display: inline-flex; align-items: center; min-height: 44px; flex: 0 1 auto; min-width: 0;
  color: var(--ink); text-decoration: none;
}
.mark svg { display: block; height: clamp(21px, 1.05rem + 1.1vw, 32px); width: auto; max-width: 100%; fill: currentColor; }
.mark:hover { color: var(--peri); }
.site { display: flex; align-items: center; flex: none; margin-left: auto; }
.write, .lang {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px;
  font-size: 0.9375rem; font-weight: 500; white-space: nowrap; text-decoration: none;
}
.write + .lang { padding-left: 1.4rem; }
.write:hover, .write:focus-visible, .lang:hover, .lang:focus-visible { text-decoration: underline; text-decoration-color: currentColor; }
.lang.offer { animation: offer 2.6s ease-in-out 1.4s 1 both; }
@keyframes offer { 0%, 100% { color: var(--ink); } 45% { color: var(--peri); } }

/* ── the grid ──────────────────────────────────────────────────────────── */
.grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap);
  padding-inline: var(--ml) var(--mr);
}

/* ── the first screen: the words low on the left, the patch on the right ── */
.hero, .lost { min-height: calc(100vh - var(--top)); min-height: calc(100svh - var(--top)); padding-block: 2svh 11svh; grid-template-rows: 1fr; }
.copy { grid-row: 1; }
.hero .copy, .lost .copy { grid-column: 1 / 7; align-self: end; }
.hero h1 {
  font-size: clamp(2.375rem, 1.05rem + 3.4vw, 4.5rem); line-height: 1.02; font-weight: 620; letter-spacing: -0.026em;
  max-width: 11.5em;
}
.lead { margin: 1.5rem 0 0; max-width: 31em; font-size: clamp(1.125rem, 1rem + 0.42vw, 1.375rem); line-height: 1.5; }

/* the one control: it holds the field still. Bottom right of the screen, 16 px from its
   edges; shown once the field runs */
.pause {
  position: fixed; z-index: 3;
  right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin: 0; padding: 0;
  border: 1px solid var(--rule); border-radius: 50%;
  background: color-mix(in oklab, var(--ground) 82%, transparent); color: var(--ink); cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.pause:hover { color: var(--peri); border-color: currentColor; }
.pause svg { display: block; width: 20px; height: 20px; fill: currentColor; }
.pause[aria-pressed="true"] .i-pause, .pause:not([aria-pressed="true"]) .i-play { display: none; }
html.no-gl .pause, html.still .pause { display: none; }
@media (scripting: none) { .pause { display: none; } }

/* ── the designed still, when nothing is computed: the same composition, in the space the
   words leave free on the first screen; its edge is feathered into the ground ─────────── */
html.no-gl :is(.hero, .lost)::before {
  content: ""; grid-row: 1; grid-column: 7 / 13; align-self: stretch; min-height: 1px;
  background: url(still.webp) 50% 50% / contain no-repeat;
}
@media (scripting: none) {
  :is(.hero, .lost)::before {
    content: ""; grid-row: 1; grid-column: 7 / 13; align-self: stretch; min-height: 1px;
    background: url(still.webp) 50% 50% / contain no-repeat;
  }
}

/* ── the sections: the text keeps to nine columns, the patch lives beside them ── */
.sec { padding-block: 13svh 0; row-gap: 0; }
.sec > * { grid-column: 1 / 10; }
.sec h2 {
  grid-column: 1 / 8;
  font-size: clamp(1.875rem, 1.2rem + 1.9vw, 3.125rem); line-height: 1.06; font-weight: 600; letter-spacing: -0.02em;
  margin-bottom: 0.7em;
}
.sec .open { grid-column: 1 / 8; max-width: 34em; font-size: clamp(1.125rem, 1.03rem + 0.3vw, 1.3125rem); line-height: 1.5; margin-bottom: 2.6rem; }
.sec .after { grid-column: 1 / 8; max-width: 36em; margin: 2rem 0 0; color: var(--ink2); }

/* the idea: three rows, each with the packs' black tab (01, 02, 03) */
.three { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: subgrid; counter-reset: n; }
.three li { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; padding: 1.4rem 0 1.5rem; border-top: 1px solid var(--rule); counter-increment: n; }
.three li:last-child { border-bottom: 1px solid var(--rule); }
.three h3 { grid-column: 1 / 4; display: flex; align-items: baseline; gap: 0.7rem; font-size: clamp(1.5rem, 1.1rem + 1.1vw, 2.25rem); line-height: 1.15; letter-spacing: -0.016em; }
.three h3::before {
  content: counter(n, decimal-leading-zero); content: counter(n, decimal-leading-zero) / "";
  flex: none; align-self: center; padding: 0.28rem 0.42rem 0.3rem; background: var(--ink); color: var(--ground);
  font-size: 0.8125rem; line-height: 1; font-weight: 600; letter-spacing: 0.02em; font-variant-numeric: tabular-nums;
}
.three p { grid-column: 4 / -1; margin: 0.25rem 0 0; max-width: 34em; }

/* the range: one ruled panel in three cells, as on the packs */
.range { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--rule); }
.range > div { padding: 1.1rem 1.2rem 1.2rem; }
.range > div + div { border-left: 1px solid var(--rule); }
.range h3 { font-size: 0.9375rem; font-weight: 600; letter-spacing: 0.01em; color: var(--ink2); margin-bottom: 0.7rem; }
.range ul { list-style: none; margin: 0; padding: 0; }
.range li { font-size: clamp(1.1875rem, 1.03rem + 0.45vw, 1.5rem); line-height: 1.28; font-weight: 500; letter-spacing: -0.008em; padding: 0.22rem 0; }

/* how it works: a sentence, then a paragraph */
.principle .open { margin-bottom: 1.3rem; }
.sec .more { grid-column: 1 / 8; max-width: 36em; margin: 0; color: var(--ink2); }

/* the company */
.company { padding-bottom: 4svh; }
.identity, .company .reach { grid-column: 1 / 9; max-width: 34em; font-size: clamp(1.125rem, 1.03rem + 0.3vw, 1.3125rem); line-height: 1.5; }

/* ── the end of the page ───────────────────────────────────────────────── */
.foot {
  --family-ink: var(--ink); --family-dim: var(--ink2); --family-line: var(--line); --family-ground: transparent;
  /* the last line ends above the pause button's corner */
  padding: 12svh var(--mr) calc(76px + env(safe-area-inset-bottom, 0px)) var(--ml);
}
.foot .family { padding-block: 0 2rem; border-top: 1px solid var(--line); padding-top: 2.4rem; }
.legal-line {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.75rem;
  margin: 0; font-size: 0.875rem; color: var(--ink2);
}
.legal-line a { display: inline-flex; align-items: center; min-height: 44px; }

/* ── the legal and privacy pages ───────────────────────────────────────── */
.doc { padding-block: 7svh 4svh; }
.doc .copy { grid-column: 1 / 9; max-width: 40em; }
.doc h1 { font-size: clamp(2.375rem, 1.4rem + 2.8vw, 3.75rem); line-height: 1.04; font-weight: 620; letter-spacing: -0.024em; margin-bottom: 0.6em; }
.doc h2 { font-size: clamp(1.3125rem, 1.15rem + 0.5vw, 1.625rem); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; margin: 2.3em 0 0.6em; }
.doc h3 { font-size: 1.125rem; font-weight: 600; margin: 1.6em 0 0.4em; }
.doc ul { margin: 0 0 1em; padding-left: 1.2em; }
.doc li { margin: 0 0 0.45em; }
.doc li::marker { color: var(--ink2); }
.doc strong { font-weight: 640; }
.doc .intro { font-size: clamp(1.125rem, 1.03rem + 0.3vw, 1.3125rem); }
.doc .updated { margin: 3rem 0 0; font-size: 0.9375rem; color: var(--ink2); }
.facts {
  display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.35rem 1.6rem;
  margin: 0.4rem 0 0; line-height: 1.5; font-variant-numeric: lining-nums;   /* tabular figures would widen the commas too */
}
.facts dt { color: var(--ink2); }
.facts dd { margin: 0; }

/* ── the contact page: the form, and the field at rest beside it ───────── */
.form { padding-block: 5svh 4svh; }
.form .bloom {
  grid-column: 8 / 13; align-self: stretch; min-height: 420px;
  background: url(still.webp) 50% 40% / contain no-repeat;
}
.form .copy { grid-column: 1 / 7; align-self: start; max-width: 32em; }
.form h1 { font-size: clamp(2.375rem, 1.4rem + 2.8vw, 3.75rem); line-height: 1.04; font-weight: 620; letter-spacing: -0.024em; }
.form .lead { margin: 1rem 0 1.8rem; }
form.contact p { margin: 0 0 1.1rem; }
form.contact label { display: block; margin-bottom: 0.3rem; font-size: 0.9375rem; color: var(--ink2); }
form.contact input, form.contact textarea {
  display: block; width: 100%; min-height: 44px; margin: 0; padding: 0.55rem 0.75rem;
  font: inherit; font-size: 1rem; line-height: 1.5; color: var(--ink);
  background: color-mix(in oklab, var(--deep) 50%, var(--ground));
  border: 1px solid var(--edge); border-radius: 3px;
  transition: border-color 0.2s;
}
form.contact textarea { resize: vertical; height: 8.5rem; min-height: 6rem; }
form.contact input:hover, form.contact textarea:hover { border-color: var(--ink2); }
form.contact input:focus-visible, form.contact textarea:focus-visible { outline: 2px solid var(--peri); outline-offset: 2px; border-color: var(--ink2); }
form.contact [aria-invalid="true"] { border-color: var(--peri); }
.contact-trap { position: absolute; left: -100vw; width: 1px; overflow: hidden; }
form.contact .contact-note { font-size: 0.875rem; line-height: 1.5; color: var(--ink2); }
form.contact button {
  min-height: 48px; padding: 0 1.8rem; margin-top: 0.4rem;
  font: inherit; font-size: 1rem; font-weight: 600; color: var(--ground);
  background: var(--ink); border: 0; border-radius: 24px; cursor: pointer;
  transition: background-color 0.2s;
}
form.contact button:hover { background: var(--peri); }
form.contact button[aria-disabled="true"] { cursor: progress; opacity: 0.7; }
form.contact .contact-status { min-height: 1.6em; margin: 1rem 0 0; }
form.contact .contact-status:empty { margin: 0; }

/* ── the lost page ─────────────────────────────────────────────────────── */
.lost h1, .lost .h1 { font-size: clamp(2.25rem, 1.2rem + 3vw, 4.25rem); line-height: 1.04; font-weight: 620; letter-spacing: -0.024em; margin: 0; }
.lost .h1 { font-weight: 450; margin-top: 0.4em; font-size: clamp(1.5rem, 0.95rem + 1.5vw, 2.25rem); color: var(--ink2); }
.lost .back { margin: 1.2rem 0 0; font-size: 1.125rem; }
.lost .back a { display: inline-flex; align-items: center; min-height: 44px; }

/* ── phones and tablets held upright: the patch above, the words below, one ground ── */
@media (max-width: 900px) {
  :root { --gap: 4vw; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  /* the words take the lower part of the first screen; the patch lives above them */
  .hero, .lost { grid-template-rows: minmax(42svh, 1fr) auto; padding-block: 0 calc(76px + env(safe-area-inset-bottom, 0px)); }
  .hero .copy, .lost .copy { grid-column: 1 / -1; grid-row: 2; }
  .hero h1 { font-size: clamp(2rem, 1.1rem + 4.4vw, 3.25rem); }
  .sec { padding-block: 10svh 0; }
  .sec > *, .sec h2, .sec .open, .sec .after, .sec .more, .identity, .company .reach { grid-column: 1 / -1; }
  .three h3, .three p { grid-column: 1 / -1; }
  .three p { margin-top: 0.5rem; }
  .range { grid-template-columns: minmax(0, 1fr); }
  .range > div + div { border-left: 0; border-top: 1px solid var(--rule); }
  .form { grid-template-rows: auto; padding-block: 3svh 4svh; }
  .form .bloom { display: none; }
  .form .copy { grid-column: 1 / -1; grid-row: 1; }
  .doc .copy { grid-column: 1 / -1; }
  :is(.hero, .lost)::before { grid-column: 1 / -1; grid-row: 1; margin-inline: calc(-1 * var(--m)); }
}
@media (max-width: 900px) and (max-height: 520px) and (orientation: landscape) {
  .hero, .lost { grid-template-rows: 1fr; padding-block: 3svh calc(24px + env(safe-area-inset-bottom, 0px)); }
  .hero .copy, .lost .copy { grid-column: 1 / 3; grid-row: 1; }
  .hero h1 { font-size: clamp(1.75rem, 1rem + 4svh, 2.5rem); }
  .lead { font-size: 1.0625rem; }
  :is(.hero, .lost)::before { grid-column: 3 / -1; grid-row: 1; margin-inline: 0; }
}
@media (max-width: 900px) and (max-height: 640px) and (orientation: portrait) {
  .hero, .lost { grid-template-rows: minmax(30svh, 1fr) auto; }
}
@media (max-width: 600px) {
  :root { --m: 24px; }
  body { font-size: 1.0625rem; line-height: 1.55; }
  .lead { font-size: 1.1875rem; line-height: 1.45; margin-top: 1.1rem; }
  .write + .lang { padding-left: 1.1rem; }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .facts dd { margin-bottom: 0.6rem; }
  form.contact label, form.contact .contact-note { font-size: 1rem; }
  .legal-line { font-size: 0.9375rem; }
}
@media (max-width: 399px) {
  :root { --m: 20px; }
  .mark svg { height: 19px; }
  .write + .lang { padding-left: 0.8rem; }
}

/* ── preferences ───────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 220ms; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .pause { display: none; }
}
@media (prefers-contrast: more) {
  :root { --ink2: var(--ink); --line: var(--ink); --rule: var(--ink); --edge: var(--ink); }
  a { text-decoration-color: currentColor; }
}
@media (forced-colors: active) {
  canvas.field { display: none; }
  .form .bloom, :is(.hero, .lost)::before { background: none; }
  .mark svg { fill: CanvasText; }
  .three h3::before { forced-color-adjust: none; background: CanvasText; color: Canvas; }
  :focus-visible { outline: 2px solid Highlight; }
  .pause { display: none; }
}
@media print {
  @page { margin: 18mm 16mm; }
  html, body { background: white; color: black; font-size: 11pt; }
  canvas.field, .scene, .skip, .site, .pause, .bloom, .family, form.contact button { display: none !important; }
  .top { height: auto; padding: 0 0 6mm; }
  .mark svg { height: 14pt; }
  .grid { display: block; padding: 0; }
  .doc, .sec, .hero { min-height: 0; padding: 0; }
  .doc h1 { font-size: 22pt; }
  .doc h2 { font-size: 13pt; margin-top: 7mm; break-after: avoid; }
  .facts { break-inside: avoid; }
  .foot { padding: 8mm 0 0; }
  a { text-decoration: none; }
  .doc a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.9em; }
}
