/* zpheros website.
   Size, spacing and type: our system (rem = body text, from the frame width; edge, bleed, padding and crop marks
   1rem). Colours and components: zpheros colour system (stylesheet.css); strokes are
   in rem here, all 0.15rem. Type: Big Shoulders (display), Ronzino (text), Space Mono (data), all SIL OFL. */

@font-face { font-family: "Big Shoulders"; src: url("../assets/fonts/BigShoulders.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Ronzino"; src: url("../assets/fonts/Ronzino-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Ronzino"; src: url("../assets/fonts/Ronzino-Oblique.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Ronzino"; src: url("../assets/fonts/Ronzino-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url("../assets/fonts/SpaceMono-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url("../assets/fonts/SpaceMono-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }

/* colours ------------------------------------------------------------------------------------------------ */
:root {
  --pink: #EB008C;
  --green: #008C3F;
  --yellow: #FFC924;                /* only as the fill of a sign, with a dark glyph */
  --red: #F50004;

  /* bluish ramp, OKLab, one hue, even lightness steps */
  --blue-grey-0: #030112;
  --blue-grey-1: #131128;
  --blue-grey-2: #29283F;
  --blue-grey-3: #414157;
  --blue-grey-4: #5C5C71;
  --blue-grey-5: #78788B;
  --blue-grey-6: #9595A6;
  --blue-grey-7: #B3B3C2;
  --blue-grey-8: #D2D2DE;
  --blue-grey-9: #F2F2FB;

  /* neutral ramp, OKLab, chroma 0, even lightness steps */
  --grey-0: #141414;
  --grey-1: #282828;
  --grey-2: #3E3E3E;
  --grey-3: #555555;
  --grey-4: #6E6E6E;
  --grey-5: #878787;
  --grey-6: #A1A1A1;
  --grey-7: #BDBDBD;
  --grey-8: #D8D8D8;
  --grey-9: #F5F5F5;
}

/* roles: dark is the default, light mirrors the steps (n becomes 9 - n) --------------------------------- */
:root {
  --ground: var(--blue-grey-0);
  --surface: var(--blue-grey-1);
  --line: var(--blue-grey-3);
  --secondary: var(--blue-grey-5);
  --text: var(--blue-grey-9);
  --ink: var(--blue-grey-0);        /* dark text on pink and dark glyphs in signs, in both modes */
  --paper: var(--blue-grey-9);      /* light text on pink */
  --accent: var(--pink);
}
:root[data-mode="light"] {
  --ground: var(--blue-grey-9);
  --surface: var(--blue-grey-8);
  --line: var(--blue-grey-6);
  --secondary: var(--blue-grey-4);
  --text: var(--blue-grey-0);
}
:root[data-ground="neutral"] {
  --ground: var(--grey-0);
  --surface: var(--grey-1);
  --line: var(--grey-3);
  --secondary: var(--grey-5);
  --text: var(--grey-9);
  --ink: var(--grey-0);
  --paper: var(--grey-9);
}
:root[data-ground="neutral"][data-mode="light"] {
  --ground: var(--grey-9);
  --surface: var(--grey-8);
  --line: var(--grey-6);
  --secondary: var(--grey-4);
  --text: var(--grey-0);
}

/* type and size ------------------------------------------------------------------------------------------ */
:root {
  --display: "Big Shoulders", "Arial Narrow", sans-serif;
  --body: "Ronzino", "Helvetica Neue", Arial, sans-serif;
  --mono: "Space Mono", ui-monospace, Menlo, monospace;

  /* Type system (sizes, line heights, spacing): type.css. */

  --stroke: 0.15rem;                /* 1px in the colour system */
  --stroke-bold: 0.15rem;           /* 2px in the colour system */

  --logo-h: 2rem;                   /* icon height, both orientations */

  /* Vertical spacing between texts and objects (never inside them), measured between visible edges. */
  --space-section: 8rem;            /* between sections */
  --space-head: 4rem;               /* section headline to its first block */
  --space-block: 2rem;              /* between blocks */
  --space-inner: 1rem;              /* within a block */

  /* Design area width (Gestaltungsfläche): 80rem landscape, 24rem portrait = content width of every section. */
  --frame-w: calc(1920rem / 24);

}

/* rem = body text size, in both orientations; one unit for everything. The website switches at 1:1.
   Reference format (Bezugsformat) = the window, counted at most up to 16:9 (landscape) or 9:16 (portrait).
   Design area (Gestaltungsfläche) = reference format minus 1rem edge.
   Landscape: design area 80rem wide, so the reference format is 82rem wide. The logo (1rem + 2rem + 1rem above the frame) is
   included: in a window wider than about 1.67:1 the height limits rem, (height x 16/9) / (82 + 3 x 16/9),
   which is height / 49.125.
   Portrait: frame 24rem wide, area 26rem wide, from the width only. */
/* Width: the usable width without a classic scrollbar, measured by js/viewport-width.js (--viewport-w); 100vw would
   include the scrollbar. Without JavaScript it falls back to 100vw. */
html { font-size: min(var(--viewport-w, 100vw) / 82, 100svh / 49.125); }

/* Portrait: columns stack; larger text steps and headlines in their own sizes. Spacing tokens and stroke as in
   landscape. */
@media (orientation: portrait) {
  html { font-size: calc(var(--viewport-w, 100vw) / 26); }
  :root {
    --frame-w: 24rem;
  }
}

/* base --------------------------------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

body { margin: 0; background: var(--ground); color: var(--text); font: var(--type-base)/var(--type-base-lh) var(--body); }

a { color: inherit; }
img, video { display: block; max-width: 100%; }

/* Sizes, line heights and spacing come from the .type-* classes in type.css. Tags only set the font.
   Element rules further down with their own margins still win. */
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 900; text-transform: uppercase; }
p { margin: 0; }

/* Structure (see SYSTEM.md): sections are type-0 apart, groups type-1, objects in a group type-2 (end of file); text in a group
   follows the type rules, stacked in normal flow. Hero: headline top, block bottom, held by the frame; hero to problem stays an exception. */
.group + .group { margin-top: var(--type-1); }


/* Data and labels. */
.note, .ph, .spec dt, .table th, .toggle label, .signup__trust, figcaption, .feature__meta {
  font-family: var(--mono);
  font-size: var(--type-small);
  line-height: var(--type-small-lh);
}

.arrow { font-family: var(--mono); }   /* the body font has no arrow */

/* Step number in running text: a filled pink circle as high as the surrounding text (1em), the digit in the
   same font in light text. The border keeps the size of the former outlined circle. Smaller than the line,
   so the line spacing stays as it is. */
.num {
  display: inline-grid;
  place-items: center;
  font-size: 0.6em;
  width: calc(1em / 0.6);
  height: calc(1em / 0.6);
  border: var(--stroke) solid var(--accent);
  background: var(--accent);
  color: var(--paper);
  border-radius: 50%;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  vertical-align: 0.287em;   /* measured: centres the circle on the cap height of the body font (0.68em) */
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Sections: design area width, content 2rem inside. No vertical padding: sections are type-0 apart, footer included. */
.container { width: var(--frame-w); margin-inline: auto; padding: 0 1rem; }
main > section + section, .foot { margin-top: var(--type-0); }
.problem { margin-top: 8rem; }   /* exception: hero to problem */

/* Divider: a line on top of a block, no space of its own. At the line the block counts as an object: text below
   it follows the type rules (the line keeps its space before below it). */
.divider { border-top: var(--stroke) solid var(--line); }

/* Lines: a list with one item per row, divided by lines (part of the list, not dividers). */
.lines { margin: 0; padding: 0; list-style: none; }
.lines li { padding: 1rem 0; border-top: var(--stroke) solid var(--line); }   /* line above every item, like .spec */

/* text colours ------------------------------------------------------------------------------------------- */
.secondary, .note { color: var(--secondary); }
.value { color: var(--accent); }
.logo { color: var(--accent); }

/* buttons ------------------------------------------------------------------------------------------------ */
.button, .button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  min-height: 2rem;   /* controls: height 2rem, 1rem left and right (button, field, toggle) */
  border: 0;
  font: 400 var(--type-small)/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  cursor: pointer;
}
.button { background: var(--accent); color: var(--paper); }
.button-secondary { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 var(--stroke) var(--accent); }
.button:disabled { cursor: wait; opacity: 0.5; }

/* input -------------------------------------------------------------------------------------------------- */
.field { display: flex; background: var(--surface); box-shadow: inset 0 0 0 var(--stroke) var(--line); }
.field input { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--text); padding: 0 1rem; font: var(--type-small)/1 var(--mono); }
.field input::placeholder { color: var(--secondary); }
.field:focus-within { box-shadow: inset 0 0 0 var(--stroke-bold) var(--accent); }
.field input { caret-color: var(--accent); outline: none; }

/* toggle ------------------------------------------------------------------------------------------------- */
.toggle { display: inline-flex; box-shadow: inset 0 0 0 var(--stroke) var(--line); }
.toggle > * { display: flex; align-items: center; min-height: 2rem; padding: 0 1rem; color: var(--secondary); }
.toggle > .active, .toggle > :has(:checked) { color: var(--accent); box-shadow: inset 0 calc(-1 * var(--stroke-bold)) 0 var(--accent); }

/* table and surface -------------------------------------------------------------------------------------- */
.table { border-collapse: collapse; }
.table th, .table td { border-bottom: var(--stroke) solid var(--line); }
.table th { color: var(--secondary); }
.surface { background: var(--surface); }

/* status: the sign carries the colour, the message stays in text colour (not used on the page yet) ------ */
.status { display: flex; align-items: center; gap: .75em; color: var(--text); }
.sign { flex: none; color: var(--ink); }   /* glyph in the sign uses currentColor */
.status-ok .sign .shape { fill: var(--green); }
.status-warning .sign .shape { fill: var(--yellow); }
.status-error .sign .shape { fill: var(--red); }

/* placeholder for media that is not there yet ------------------------------------------------------------ */
.ph { display: flex; align-items: center; justify-content: center; padding: var(--space-inner); color: var(--secondary); text-align: center; }
.ph--fill { position: absolute; inset: 0; align-items: flex-start; justify-content: flex-end; }

/* logo: proportions from lockup.svg, icon H, wordmark 0.52 H, gap 0.25 H; wordmark.svg is the accent colour */
.logo { display: inline-flex; align-items: center; gap: calc(var(--logo-h) * 0.25); text-decoration: none; }
.logo zpheros-icon { width: var(--logo-h); }
.logo zpheros-icon img { width: 100%; height: auto; }
.logo__wordmark { height: calc(var(--logo-h) * 0.52); width: auto; aspect-ratio: 912.79 / 150; }


/* ---------- Hero: full-screen 1:1 video, inside it the format frame (Formatrahmen, full format; landscape 80rem, portrait 24rem wide) ---------- */

/* The hero ends with a hard edge. Workaround for iOS 26 Safari: the page stays visible below the large viewport
   (100lvh ends in the middle of the floating address bar, safe-area insets report 0), so the hero runs 10% beyond
   it and the next section never shows under the bar. Measured on iPhone: about 59pt visible below 100lvh, 10% of
   100lvh is about 75pt. Frame and copy stay within the small viewport (100svh): the rest is bottom padding.
   Portrait only; on landscape the hero is exactly 100svh, so the edge is the bottom of the window (see below). */
.hero {
  position: relative;
  height: 110vh;
  height: 110lvh;
  padding-bottom: calc(110lvh - 100svh);
  overflow: hidden;
  display: grid;
  place-items: center;
}
/* The video runs below the hero by the same amount the hero runs below the small viewport (110lvh - 100svh),
   clipped there. It gets larger and shows less of its lower part in the visible area. */
.hero__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(220lvh - 100svh);
  max-width: none;
  object-fit: cover;
}
/* Landscape: no bottom buffer, the hard edge sits at the bottom of the window, at least 1rem below the format frame. The format frame
   sits at the top, directly below the header, like on portrait; extra height goes below it. */
@media (orientation: landscape) {
  .hero { height: 100vh; height: 100svh; padding-bottom: 0; align-items: start; }
  .hero__video { height: 100%; }
}
/* Darkening in the page background colour so the copy stays readable: 35% at the top, 15% at 40svh, 65% at the
   bottom of the small viewport (100svh) and below. Between these points the gradient eases in and out
   (smoothstep, sampled in 6 steps), so there is no kink at any of them. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--ground) 50.0%, transparent) 0,
    color-mix(in srgb, var(--ground) 48.5%, transparent) 6.67svh,
    color-mix(in srgb, var(--ground) 44.8%, transparent) 13.33svh,
    color-mix(in srgb, var(--ground) 40.0%, transparent) 20.00svh,
    color-mix(in srgb, var(--ground) 35.2%, transparent) 26.67svh,
    color-mix(in srgb, var(--ground) 31.5%, transparent) 33.33svh,
    color-mix(in srgb, var(--ground) 30.0%, transparent) 40.00svh,
    color-mix(in srgb, var(--ground) 33.7%, transparent) 50.00svh,
    color-mix(in srgb, var(--ground) 43.0%, transparent) 60.00svh,
    color-mix(in srgb, var(--ground) 55.0%, transparent) 70.00svh,
    color-mix(in srgb, var(--ground) 67.0%, transparent) 80.00svh,
    color-mix(in srgb, var(--ground) 76.3%, transparent) 90.00svh,
    color-mix(in srgb, var(--ground) 80.0%, transparent) 100.00svh
  );
  mix-blend-mode: multiply;
  pointer-events: none;
}

.frame {
  position: relative;
  z-index: 1;
  width: var(--frame-w);
  height: calc(100svh - 5rem);
  align-self: start;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem;
}
/* Format frame: directly below the header (1rem + logo 2rem + 1rem), down to 1rem above the bottom edge.
   Portrait narrower than 9:16: the reference format ends at 9:16 (26rem x 26rem x 16/9), the frame fills it with 1rem edge
   and slides below the logo; free space remains below it. */
@media (orientation: portrait) { .frame { height: min(100svh - 5rem, 26rem * 16 / 9 - 2rem); } }

.frame__corner { position: absolute; width: 1rem; height: 1rem; border: var(--stroke-bold) solid var(--accent); }
.frame__corner--tl { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.frame__corner--tr { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.frame__corner--bl { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.frame__corner--br { bottom: 0; right: 0; border-left: 0; border-top: 0; }

/* Header: fixed above the format frame, logo in line with the frame's content, in both orientations 1rem + logo (2rem) + 1rem
   high, so the logo sits 1rem from the top and does not move. The bar's background (.site-bar) is as high as the header and scaled from the top edge so it always
   reaches down to the hero frame; no colour, it only blurs what is behind it. The blur grows from 0 to 1rem
   from the first scroll until the frame reaches it. While it grows, a gradient mask fades the blur out
   towards the frame so no edge appears there; --bar-solid moves the mask's solid part from 0% to 100%, so the
   finished bar is blurred evenly with a sharp bottom edge. --bar-tint tints it with --ground, 0% to 75%. */
.site-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  height: calc(2rem + var(--logo-h));
  backdrop-filter: blur(0);
  --bar-solid: 0%;
  --bar-tint: 0%;
  background: color-mix(in srgb, var(--ground) var(--bar-tint), transparent);
  mask-image: linear-gradient(to bottom, #000 var(--bar-solid), transparent);
  transform-origin: top;
}
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 2; pointer-events: none; }
.site-header .container { position: relative; display: flex; padding-block: 1rem; }   /* flex: no line box around the logo */
.site-header .logo { pointer-events: auto; }
.hero { padding-top: calc(2rem + var(--logo-h)); }   /* format frame starts at the header's bottom edge, 1rem below the logo */

/* Portrait: the bar ends at the format frame's top edge, so it is not scaled. The frame ends 2rem above the bottom edge. */
@media (orientation: portrait) {
  .hero { padding: calc(2rem + var(--logo-h)) 0 calc(1rem + 110lvh - 100svh); }
}

/* Text, form and trust note: 4 of 12 columns of the frame's inner width on landscape screens, full width on portrait. */
.frame__bottom { width: calc(100% * 4 / 12); }
@media (orientation: portrait) { .frame__bottom { width: auto; } }


/* ---------- Notify: field and button in one row, reply and closing note below ---------- */

.notify { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.notify[hidden] { display: none; }
/* Message below the form and the thanks after signing up: type rules. The empty message takes no space. */
.notify__msg { grid-column: 1 / -1; margin-bottom: 0; font-family: var(--mono); }
.notify__msg:empty { display: none; }
.notify__done { outline: none; }


/* ---------- Problem statement: set in the headline face ---------- */

/* 5 columns like .frames__grid: headline 1-2, list and answer 3-5; tops on one line. */
.problem__grid { display: grid; grid-template-columns: 2fr 3fr; align-items: start; margin-inline: -2rem; }
.problem__grid > * { padding-inline: 2rem; }
/* Answer below the statement: mono in the accent colour. */
.problem__answer { color: var(--accent); font: var(--type-4)/var(--type-4-lh) var(--mono); }


/* ---------- One master: view switcher and copy side by side ---------- */

/* 5-column grid over the total width (design area width + 2 x 2rem): views in columns 1-2, headline and copy in columns 3-5.
   Each half is one element: bleed 2rem | crop line | padding 2rem | content. The grid reaches 4rem beyond the
   container's content (2rem container padding + 2rem bleed). */
.frames { overflow-x: clip; }
.frames__grid { display: grid; grid-template-columns: 2fr 3fr; align-items: start; margin-inline: -2rem; }   /* 5 columns: views 1-2, copy 3-5 */
.frames__copy { padding-inline: 2rem; }   /* horizontal only: copy starts on the top edge of the image */

/* Views: the square box is the crop line, 2rem inside the column; the crop marks sit on it. The image bleeds 2rem
   beyond it to the column edge, like the testimonial photos. Landscape and portrait show the exported clip, fitted
   into the image area. */
.views { display: grid; margin: 0; }   /* grid: margins of image and switcher add up instead of collapsing */
.views__frame { position: relative; width: calc(100% - 2rem); align-self: start; aspect-ratio: 1; margin: 1rem; }   /* explicit width: height follows from it in every engine */
.views__image { position: absolute; inset: -1rem; overflow: hidden; }   /* no background: landscape and portrait stand free on the page */
/* The grid video is twice the image area; the checked view moves its quarter into the area. Landscape and portrait are
   letterboxed in the grid: clip-path cuts the area down to the clip. Lens: the fisheye circle (measured: centre 538 / 547 px,
   diameter 1020 of a 1080 px quarter) is scaled to the full width of the area and cut out round. */
.views__media { position: absolute; top: 0; left: 0; width: 200%; height: 200%; max-width: none; }
.views:has([value="full"]:checked) .views__media { left: -100%; }
.views:has([value="landscape"]:checked) .views__media { top: -100%; }
.views:has([value="portrait"]:checked) .views__media { top: -100%; left: -100%; }
.views:has([value="landscape"]:checked) .views__image { clip-path: inset(calc((100% - 100% * 9 / 16) / 2) 0); }
.views:has([value="portrait"]:checked) .views__image { clip-path: inset(0 calc((100% - 100% * 9 / 16) / 2)); }
.views:has([value="lens"]:checked) .views__media {
  width: calc(200% * 1080 / 1020);
  height: calc(200% * 1080 / 1020);
  left: calc(50% - 100% * 538 / 1020);
  top: calc(50% - 100% * 547 / 1020);
}
.views:has([value="lens"]:checked) .views__image { clip-path: circle(50%); }

/* Crop marks on the frame line: circle (lens), 16:9 across the full width, 9:16 across the full height, both centred. */
.views__mark { position: absolute; display: none; }
.views__mark--circle { inset: 0; border: var(--stroke-bold) solid var(--accent); border-radius: 50%; }
.views__mark--landscape { left: 0; right: 0; top: 50%; aspect-ratio: 16 / 9; transform: translateY(-50%); }
.views__mark--portrait { top: 0; bottom: 0; left: 50%; aspect-ratio: 9 / 16; transform: translateX(-50%); }
/* Full view: both crops roughly where they sit in the master (measured: about a third of the edge, around the middle,
   landscape slightly above), drawn larger for legibility: 60% of the edge, centres at 50% / 46% and 50% / 48%. */
.views:has([value="full"]:checked) .views__mark--landscape { left: 20%; right: 20%; top: 46%; }
.views:has([value="full"]:checked) .views__mark--portrait { top: 18%; bottom: 22%; left: 50%; }

/* Landscape and portrait views: the marks sit 2rem inside the exported clip on every side (not an exact 16:9 / 9:16).
   The clip fills the image area (box + 2rem each side) in one direction; its other side is (box + 4rem) * 9/16. */
.views:has([value="landscape"]:checked) .views__mark--landscape {
  top: calc((100% - (100% + 2rem) * 9 / 16) / 2 + 1rem);
  bottom: calc((100% - (100% + 2rem) * 9 / 16) / 2 + 1rem);
  aspect-ratio: auto;
  transform: none;
}
.views:has([value="portrait"]:checked) .views__mark--portrait {
  left: calc((100% - (100% + 2rem) * 9 / 16) / 2 + 1rem);
  right: calc((100% - (100% + 2rem) * 9 / 16) / 2 + 1rem);
  aspect-ratio: auto;
  transform: none;
}
.views:has([value="lens"]:checked) .views__mark--circle,
.views:has([value="full"]:checked) .views__mark--landscape,
.views:has([value="full"]:checked) .views__mark--portrait,
.views:has([value="landscape"]:checked) .views__mark--landscape,
.views:has([value="portrait"]:checked) .views__mark--portrait { display: block; }

/* Toggle across the full width: always one row of four equal parts; a label may wrap inside its part. */
.views__switch { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: auto; margin: 1rem 2rem 0; padding: 0; border: 0; min-width: 0; }   /* below the image, inside the content area */
.views__switch label { display: flex; align-items: center; justify-content: center; text-align: center; cursor: pointer; }
.views__switch input { position: absolute; opacity: 0; }
/* Text per view, 1rem below the switcher; all texts share one cell, so the height follows the longest. */
.views__texts { display: grid; margin: 0 2rem; color: var(--secondary); }   /* figcaption: mono label size */
.views__text { grid-area: 1 / 1; margin-bottom: 0; visibility: hidden; }   /* switch to text: type rules (space before) */
.views:has([value="lens"]:checked) .views__text--lens,
.views:has([value="full"]:checked) .views__text--full,
.views:has([value="landscape"]:checked) .views__text--landscape,
.views:has([value="portrait"]:checked) .views__text--portrait { visibility: visible; }
.views__switch label:has(:focus-visible) { outline: var(--stroke-bold) solid var(--accent); outline-offset: calc(-1 * var(--stroke-bold)); }


/* ---------- Made for / not made for: headline, then two columns, one line per item ---------- */

.fit__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--space-block); }
.fit__list li { display: grid; grid-template-columns: 1rem 1fr; gap: 1rem; align-items: baseline; }
.fit__icon { width: 1em; height: 1em; align-self: center; }   /* assets/icons/*.svg, colour and stroke in the file */


/* ---------- Versus: full-width table ---------- */

.intro { margin: var(--space-inner) 0 0; }
.versus .table { width: 100%; margin: 1rem 0 0; }
.versus th, .versus td { padding: var(--space-inner) var(--space-inner) var(--space-inner) 0; text-align: left; vertical-align: top; }
.versus thead th { font-weight: 400; }
.versus tbody th { width: 50%; font: var(--type-base)/var(--type-base-lh) var(--body); }
.versus .note { margin: var(--space-inner) 0 0; }


/* ---------- Only MAX2: features as strips 2rem wider than the frame, 45svh high, media behind ---------- */

.feature { position: relative; height: 45vh; height: 45svh; overflow: hidden; display: grid; place-items: center; }
.feature__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* two videos side by side in one strip, left and right half */
.feature__media--pair { display: grid; grid-template-columns: 1fr 1fr; }
.feature__media--pair video { width: 100%; height: 100%; object-fit: cover; }
/* inner crop corners of the two videos: crop lines 2rem either side of the seam, so the two crops are 4rem apart.
   Landscape: side by side, 1 and 2 close the left video, 3 and 4 open the right one. */
.feature__cut--1 { top: 0; right: calc(50% + 1rem); border-width: var(--stroke-bold) var(--stroke-bold) 0 0; }
.feature__cut--2 { bottom: 0; right: calc(50% + 1rem); border-width: 0 var(--stroke-bold) var(--stroke-bold) 0; }
.feature__cut--3 { top: 0; left: calc(50% + 1rem); border-width: var(--stroke-bold) 0 0 var(--stroke-bold); }
.feature__cut--4 { bottom: 0; left: calc(50% + 1rem); border-width: 0 0 var(--stroke-bold) var(--stroke-bold); }
/* Portrait: stacked, each video full width in 16:9 (strip 16:18); 1 and 2 close the top video, 3 and 4 open the bottom one. */
@media (orientation: portrait) {
  .feature--pair { height: auto; aspect-ratio: 16 / 18; }
  .feature__media--pair { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
  .feature__cut--1 { top: auto; right: auto; left: 0; bottom: calc(50% + 1rem); border-width: 0 0 var(--stroke-bold) var(--stroke-bold); }
  .feature__cut--2 { right: 0; bottom: calc(50% + 1rem); border-width: 0 var(--stroke-bold) var(--stroke-bold) 0; }
  .feature__cut--3 { left: 0; top: calc(50% + 1rem); border-width: var(--stroke-bold) 0 0 var(--stroke-bold); }
  .feature__cut--4 { bottom: auto; left: auto; right: 0; top: calc(50% + 1rem); border-width: var(--stroke-bold) var(--stroke-bold) 0 0; }
}
/* Title and text outside, above the strip: content area of the frame; 4 of 12 columns on landscape. */
.feature__intro { width: var(--frame-w); margin-inline: auto; padding-inline: 1rem; }
.feature__intro > * { width: calc(100% * 4 / 12); }
@media (orientation: portrait) { .feature__intro > * { width: auto; } }
/* Settings on the footage: the pink bars sit 1rem from the crop line on all sides, the text 0.25rem further in.
   Exception to the layout rules: inside the padding zone. */
.feature__meta { position: absolute; margin: 0; padding: 1rem; }
/* each line on its own pink bar, as tall as the line */
.feature__meta span { display: block; width: fit-content; padding-inline: 0.25rem; background: color-mix(in srgb, var(--accent) 25%, transparent); color: var(--paper); }
/* 1 = first video (left, portrait top), 2 = second video (right, portrait bottom); tl/bl = its corner. */
.feature__meta--1tl { top: 0; left: 0; }
.feature__meta--1bl { bottom: 0; left: 0; }
.feature__meta--2tl { top: 0; left: calc(50% + 1rem); }
.feature__meta--2bl { bottom: 0; left: calc(50% + 1rem); }
@media (orientation: portrait) {
  .feature__meta--1bl { bottom: calc(50% + 1rem); }
  .feature__meta--2tl { top: calc(50% + 1rem); left: 0; }
  .feature__meta--2bl { left: 0; }
}
/* Width: design area plus 2rem on each side, so the footage bleeds beyond the crop corners like the testimonial photos. */
.feature { width: calc(var(--frame-w) + 2rem); margin-inline: auto; }
/* Content box: design area width, 2rem from the strip's top and bottom edge, marked by the crop corners. */
.feature__box { position: relative; z-index: 1; width: var(--frame-w); height: calc(100% - 2rem); }


/* ---------- Spec: term above its description ---------- */

/* Landscape, 2 columns: headline left, list right, both start on one line; portrait stacked. */
.software__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; margin-inline: -2rem; }
.software__grid > * { padding-inline: 2rem; }
.spec { margin: 0; }
.spec div { padding: 1rem 0; border-top: var(--stroke) solid var(--line); }
.spec dt { text-transform: uppercase; letter-spacing: 0.08em; color: var(--secondary); }
/* Term to description: type rules. The row's own padding holds its edges, so the spaces there are trimmed. */
.spec div > :first-child { margin-top: 0; }
.spec div > :last-child { margin-bottom: 0; }
.spec dd { margin-inline: 0; }   /* no browser indent */


/* ---------- Story: two text columns ---------- */

/* 5-column grid over the total width; headline and copy in columns 1-3, photo in columns 4-5. The photo is square
   like the views element: it fills its columns including the 2rem bleed, the crop line is a square 2rem inside;
   within it a 9:16 frame across the full height, centred (like the portrait frame in Full View). The credit sits
   1rem below the image, in the content area. */
.story__grid { display: grid; grid-template-columns: 3fr 2fr; align-items: start; width: calc(var(--frame-w) + 2rem); padding-inline: 0; }
.story__copy { padding-inline: 2rem; }   /* horizontal only: copy starts on the top edge of the image */
.story__media { margin: 0; display: grid; }
.story__crop { position: relative; width: calc(100% - 2rem); align-self: start; aspect-ratio: 1; margin: 1rem; }   /* explicit width: height follows from it in every engine */
.story__crop img { position: absolute; inset: -1rem; width: calc(100% + 2rem); height: calc(100% + 2rem); max-width: none; object-fit: cover; }
.story__mark { position: absolute; top: 0; bottom: 0; left: 50%; aspect-ratio: 9 / 16; transform: translateX(-50%); }
.story__media figcaption { margin-inline: 2rem; color: var(--secondary); }   /* below the photo: type rules (space before) */
.story__body { columns: 1; }
.story__body p { break-inside: avoid; }


/* ---------- Testimonials: 4-column grid, two per row ---------- */

/* The list spans the total width (container content + 2 x 4rem). Each column is one element: the photo fills it
   including the 2rem bleed, the circle sits on the crop line 2rem inside, quote and name sit in the content area
   4rem inside. On narrow windows the photos reach the window edge; clip cuts off rounding overshoot without making
   the section a scroll container (unlike overflow: hidden). */
.testimonials { overflow-x: clip; }
/* 4-column grid, two testimonials per row (2 columns each). Portrait in column 1 of its two,
   quote and name across both. */
.testimonials__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--type-2); margin-inline: -2rem; }   /* tiles are objects: rows type-2 apart */
.testimonial { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; margin: 0; }   /* grid: margins add up instead of collapsing */
.portrait { grid-column: 1; }
.testimonial blockquote, .testimonial figcaption { grid-column: 1 / -1; }
/* Crop box on the crop line; the photo bleeds 2rem beyond it to the column edge. */
.portrait { position: relative; width: calc(100% - 2rem); align-self: start; aspect-ratio: 1; margin: 1rem; }   /* explicit width: height follows from it in every engine */
.portrait img { position: absolute; inset: -1rem; width: calc(100% + 2rem); height: calc(100% + 2rem); max-width: none; object-fit: cover; }
.portrait::after { content: ""; position: absolute; inset: 0; border: var(--stroke-bold) solid var(--accent); border-radius: 50%; }
.testimonial blockquote { margin: 1rem 2rem 0.5rem; font-size: var(--type-4); line-height: var(--type-4-lh); font-style: italic; }
.testimonial blockquote p { margin: 0; }
.testimonial figcaption { margin: 0 2rem; color: var(--secondary); }


/* ---------- Objections: question left, answer right ---------- */

.objections__list { margin: 0; }
.objections__list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 1rem;
  padding: 1rem 0;
  border-top: var(--stroke) solid var(--line);
}
.objections__list dt { font: 900 var(--type-4)/var(--type-4-lh) var(--display); text-transform: uppercase; }
.objections__list dd { margin-inline: 0; }   /* no browser indent */
/* Objection to answer: side by side on landscape, stacked with the type rules on portrait; row edges trimmed. */
.objections__list div > :first-child { margin-top: 0; }
.objections__list div > :last-child { margin-bottom: 0; }
@media (orientation: landscape) { .objections__list div > * { margin-block: 0; } }


/* ---------- Get notified ---------- */

/* Landscape: headline left, form and trust note right, bottom aligned; portrait: stacked. */
.cta__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; align-items: end; }


/* ---------- Confirmed page (after the double opt-in link) ---------- */



/* ---------- Footer: imprint and privacy on the surface colour ---------- */

.foot { font-size: var(--type-small); line-height: var(--type-small-lh); }
.foot .container { padding-block: var(--type-2); }   /* colour edge to the group: object to object */
.confirmed .container { padding-block: 3rem; }   /* page edge, unchanged */
/* Logo to content as on the start page (logo, 1rem to the frame, 1rem to the headline): 2rem; the space before
   of the first text is trimmed, like at the top of the hero frame. */
.confirmed .logo { display: flex; width: fit-content; }   /* block: no line box around the logo */
.confirmed .logo + .group { margin-top: 2rem; }
.confirmed .group > :first-child { margin-top: 0; }
.foot__cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 1rem; }
.foot h3 { font: 700 var(--type-base)/var(--type-base-lh) var(--body); text-transform: none; break-after: avoid; }   /* body text, bold */
.foot p { color: var(--secondary); }
.foot__contact { font-family: var(--mono); font-style: normal; }
.foot__text { columns: 2; column-gap: 1rem; }
/* Language switch: Deutsch / English, one version shown at a time. */
.foot__switch { margin: 0; padding: 0; border: 0; min-width: 0; }
.foot__switch label { cursor: pointer; }
.foot__switch input { position: absolute; opacity: 0; }
.foot__switch label:has(:focus-visible) { outline: var(--stroke-bold) solid var(--accent); outline-offset: calc(-1 * var(--stroke-bold)); }
.foot:has([value="de"]:checked) .foot__lang--en,
.foot:has([value="en"]:checked) .foot__lang--de { display: none; }
.foot__legal { margin-top: 2rem; font-family: var(--mono); }   /* legal block: 2rem above its divider, a fixed value of this object */


/* ---------- Portrait: columns stack ---------- */

@media (orientation: portrait) {
  .fit__grid,
  .objections__list div,
  .foot__cols { grid-template-columns: minmax(0, 1fr); }
  .objections__list div { display: block; }
  .story__body, .foot__text { columns: 1; }
  .versus tbody th { width: auto; }
  /* One testimonial per row: the photo keeps the size of one of two columns, the copy runs below across both. */
  .testimonials__list { grid-template-columns: minmax(0, 1fr); }
  .testimonial { grid-template-columns: repeat(2, minmax(0, 1fr)); }   /* photo in the first of two columns */
  .portrait { grid-column: 1; }
  .testimonial blockquote, .testimonial figcaption { grid-column: 1 / -1; }
  .testimonial blockquote { font-size: var(--type-4); line-height: var(--type-4-lh); }
}

@media (orientation: portrait) {
  /* Exception: hero to problem 8rem, half the section spacing. */
  .problem { margin-top: 4rem; }
}

/* Columns, last in the file so no layout rule above overrides them. A grid only side by side (landscape);
   spaces at the column edges are trimmed, columns start on one line.
   Portrait: the columns stack in normal flow, so the type rules apply between them; only the outer edges are trimmed.
   The trimmed spaces move to the column block (see below). */
@media (orientation: landscape) {
  .cols > * { margin-block: 0; }
  .cols > * > :first-child { margin-top: 0; }
  .cols > * > :last-child { margin-bottom: 0; }
}
@media (orientation: portrait) {
  .cols { display: block; }
  .cols > :first-child, .cols > :first-child > :first-child { margin-top: 0; }
  .cols > :last-child, .cols > :last-child > :last-child { margin-bottom: 0; }
}

/* Column blocks take over the spaces trimmed at their edges: on top the space before of the texts the columns start
   with, at the bottom the space after of the texts they end with; the larger one applies (steps in ascending order,
   so the later rule wins). Same depth as the trimming. :where keeps them below the object rule. */
@media (orientation: landscape) {
  .cols:where(:has(> * > .type-small:first-child)) { margin-top: var(--type-small-before); }
  .cols:where(:has(> * > .type-base:first-child)) { margin-top: var(--type-base-before); }
  .cols:where(:has(> * > .type-4:first-child)) { margin-top: var(--type-4-before); }
  .cols:where(:has(> * > .type-3:first-child)) { margin-top: var(--type-3-before); }
  .cols:where(:has(> * > .type-2:first-child)) { margin-top: var(--type-2-before); }
  .cols:where(:has(> * > .type-1:first-child)) { margin-top: var(--type-1-before); }
  .cols:where(:has(> * > .type-0:first-child)) { margin-top: var(--type-0-before); }
  .cols:where(:has(> * > .type-small:last-child)) { margin-bottom: var(--type-small-after); }
  .cols:where(:has(> * > .type-base:last-child)) { margin-bottom: var(--type-base-after); }
  .cols:where(:has(> * > .type-4:last-child)) { margin-bottom: var(--type-4-after); }
  .cols:where(:has(> * > .type-3:last-child)) { margin-bottom: var(--type-3-after); }
  .cols:where(:has(> * > .type-2:last-child)) { margin-bottom: var(--type-2-after); }
  .cols:where(:has(> * > .type-1:last-child)) { margin-bottom: var(--type-1-after); }
  .cols:where(:has(> * > .type-0:last-child)) { margin-bottom: var(--type-0-after); }
}
@media (orientation: portrait) {
  .cols:where(:has(> :first-child.type-small, > :first-child > .type-small:first-child)) { margin-top: var(--type-small-before); }
  .cols:where(:has(> :first-child.type-base, > :first-child > .type-base:first-child)) { margin-top: var(--type-base-before); }
  .cols:where(:has(> :first-child.type-4, > :first-child > .type-4:first-child)) { margin-top: var(--type-4-before); }
  .cols:where(:has(> :first-child.type-3, > :first-child > .type-3:first-child)) { margin-top: var(--type-3-before); }
  .cols:where(:has(> :first-child.type-2, > :first-child > .type-2:first-child)) { margin-top: var(--type-2-before); }
  .cols:where(:has(> :first-child.type-1, > :first-child > .type-1:first-child)) { margin-top: var(--type-1-before); }
  .cols:where(:has(> :first-child.type-0, > :first-child > .type-0:first-child)) { margin-top: var(--type-0-before); }
  .cols:where(:has(> :last-child.type-small, > :last-child > .type-small:last-child)) { margin-bottom: var(--type-small-after); }
  .cols:where(:has(> :last-child.type-base, > :last-child > .type-base:last-child)) { margin-bottom: var(--type-base-after); }
  .cols:where(:has(> :last-child.type-4, > :last-child > .type-4:last-child)) { margin-bottom: var(--type-4-after); }
  .cols:where(:has(> :last-child.type-3, > :last-child > .type-3:last-child)) { margin-bottom: var(--type-3-after); }
  .cols:where(:has(> :last-child.type-2, > :last-child > .type-2:last-child)) { margin-bottom: var(--type-2-after); }
  .cols:where(:has(> :last-child.type-1, > :last-child > .type-1:last-child)) { margin-bottom: var(--type-1-after); }
  .cols:where(:has(> :last-child.type-0, > :last-child > .type-0:last-child)) { margin-bottom: var(--type-0-after); }
}

/* Objects, defined here by kind (manual, Website > Struktur): image, video, feature strip, tile, button, input field,
   toggle, form, and a block with a divider at its top edge. Object to object type-2; object to text follows the
   type rules of the text. A column block is no object: its edges take the spaces of what its columns start and
   end with. */
:where(figure, video, .feature, .testimonial, .button, .button-secondary, .field, .toggle, form, .divider)
  + :where(figure, video, .feature, .testimonial, .button, .button-secondary, .field, .toggle, form, .divider):where(:not(:is(figure, video, .feature, .testimonial, .button, .button-secondary, .field, .toggle, form, .divider) *)) { margin-top: var(--type-2); }
/* Only between objects, not between parts inside an object (two videos in a feature strip, field and button in a
   form). :where keeps the rule at zero specificity: objects placed by a grid (tiles in rows) keep the grid's gaps. */

/* Surfaces: a group on its own colour area. The edge counts as an object, so edge to group is type-2 (padding of the
   group). The hero frame holds its headline at the top and its block at the bottom edge. In both, the spaces of the
   elements at the edges are trimmed, two levels deep like the columns. */
:is(.surface > .group, .frame__top, .frame__bottom) > :first-child { margin-top: 0; }
:is(.surface > .group, .frame__top, .frame__bottom) > :last-child,
:is(.surface > .group, .frame__top, .frame__bottom) > :last-child > :last-child { margin-bottom: 0; }
