/* Dharmik Mavani: Websites, engineered.
   Layout: paper and ink chapters on one 12-column grid. The hero is drawn like a technical drawing
   (guides, dimensions, a live tilt readout) around a 3D glass portrait card. One accent: signal yellow.
   One family (Mona Sans, expanded for display) plus Geist Mono for measurements. See DESIGN.md. */

@font-face {
  font-family: "Mona Sans";
  src: url("fonts/mona-sans.woff") format("woff");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("fonts/geist-mono.woff") format("woff");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* colour: a deliberate single look, paper and ink chapters with one yellow */
  --paper: #f1f1ee;
  --paper-2: #e6e6e1;
  --ink: #0c0c0d;
  --ink-2: #19191b;
  --ink-3: #26262a;
  --mute: #63635c;
  --night-mute: #a6a69f;
  --signal: #ffd400;
  --line: rgba(12, 12, 13, 0.14);
  --line-night: rgba(243, 242, 238, 0.14);
  --leaf: #d4e36c;
  --rose: #cf977f;

  /* type */
  --font: "Mona Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* space */
  --pad: clamp(16px, 2.4vw, 36px);
  --pad-l: max(var(--pad), env(safe-area-inset-left, 0px));
  --pad-r: max(var(--pad), env(safe-area-inset-right, 0px));
  --gutter: clamp(12px, 1.6vw, 24px);
  --sec: clamp(88px, 11vw, 176px);
  --nav-h: 76px;

  /* motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);

  color-scheme: light;
}

/* ---------- base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: clamp(1.0625rem, 1rem + 0.2vw, 1.1875rem);
  font-weight: 450;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

main {
  overflow-x: clip;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

button,
input {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

:focus-visible {
  outline: 3px solid var(--focus, var(--ink));
  outline-offset: 3px;
}

::selection {
  background: var(--signal);
  color: var(--ink);
}

/* bilingual: both languages are in the markup, the root lang decides which one shows */
:root[lang="de"] [lang="en"]:not(html),
:root[lang="en"] [lang="de"]:not(html) {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: fixed;
  left: var(--pad-l);
  top: -120px;
  z-index: 60;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  text-decoration: none;
}

.skip:focus {
  top: calc(env(safe-area-inset-top, 0px) + 12px);
}

.mono {
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 450;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* ---------- type scale ---------- */

.h2 {
  font-size: clamp(2.75rem, 1.2rem + 5.2vw, 6.25rem);
  font-weight: 900;
  font-stretch: 118%;
  line-height: 0.9;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.h3 {
  font-size: clamp(2rem, 1.2rem + 2.4vw, 3.5rem);
  font-weight: 850;
  font-stretch: 112%;
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.h4 {
  font-size: clamp(1.5rem, 1.15rem + 1vw, 2.125rem);
  font-weight: 850;
  font-stretch: 112%;
  line-height: 1;
  letter-spacing: -0.02em;
}

.lead {
  max-width: 38ch;
  font-size: clamp(1.1875rem, 1rem + 0.6vw, 1.5rem);
  font-weight: 500;
  line-height: 1.35;
  text-wrap: pretty;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(1px) scale(0.98);
}

.btn--signal {
  background: var(--signal);
  color: var(--ink);
}

.btn--signal:hover {
  box-shadow: 0 10px 24px -10px rgba(255, 212, 0, 0.9);
}

.btn--ghost {
  box-shadow: inset 0 0 0 1.5px currentColor;
}

.btn--ghost:hover {
  background: var(--ink);
  color: var(--paper);
  box-shadow: none;
}

.btn--ink {
  background: var(--ink);
  color: var(--paper);
}

.btn--leaf {
  background: var(--leaf);
  color: #1d140e;
}

.btn--rose {
  background: var(--rose);
  color: #0e0d0c;
}

/* ---------- navigation: glass pills ---------- */

.nav {
  --glass: rgba(244, 244, 241, 0.72);
  --glass-line: rgba(12, 12, 13, 0.08);
  --glass-hover: rgba(12, 12, 13, 0.06);
  --nav-ink: var(--ink);
  --cta-bg: var(--ink);
  --cta-ink: var(--paper);
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  left: var(--pad-l);
  right: var(--pad-r);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
  --focus: var(--nav-ink);
}

.nav > * {
  pointer-events: auto;
}

.nav.is-dark {
  --glass: rgba(30, 30, 33, 0.66);
  --glass-line: rgba(255, 255, 255, 0.1);
  --glass-hover: rgba(255, 255, 255, 0.08);
  --nav-ink: var(--paper);
  --cta-bg: var(--paper);
  --cta-ink: var(--ink);
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  padding: 5px;
  border: 0;
  border-radius: 999px;
  background: var(--glass, rgba(244, 244, 241, 0.72));
  color: var(--nav-ink, var(--ink));
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  backdrop-filter: blur(18px) saturate(1.6);
  box-shadow: inset 0 0 0 1px var(--glass-line, rgba(12, 12, 13, 0.08)), 0 10px 30px -16px rgba(12, 12, 13, 0.35);
  transition: background-color 300ms ease, color 300ms ease;
}

.nav__brand {
  gap: 10px;
  padding-right: 18px;
  font-weight: 750;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-decoration: none;
}

.nav__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--signal);
  font-weight: 900;
  font-stretch: 125%;
  font-size: 1.125rem;
}

.nav.is-dark .nav__mark {
  background: var(--signal);
  color: var(--ink);
}

.nav__links {
  gap: 2px;
}

.nav__links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 650;
  text-decoration: none;
  transition: background-color 180ms ease, color 180ms ease;
}

.nav__links a:hover {
  background: var(--glass-hover);
}

.nav__links a[aria-current="true"] {
  background: var(--nav-ink);
  color: var(--glass-solid, var(--paper));
}

.nav.is-dark .nav__links a[aria-current="true"] {
  color: var(--ink);
}

.nav__end {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav__lang {
  justify-content: center;
  min-width: 50px;
  padding-inline: 14px;
  font-weight: 750;
  cursor: pointer;
}

.nav__lang:hover {
  background: var(--glass-hover);
}

.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--cta-bg);
  color: var(--cta-ink);
  font-weight: 750;
  text-decoration: none;
  transition: transform 160ms var(--ease-out), background-color 300ms ease, color 300ms ease;
}

.nav__cta:hover {
  transform: translateY(-2px);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 4px rgba(255, 212, 0, 0.28);
}

.nav__menu {
  display: none;
  padding-inline: 20px;
  font-weight: 750;
  cursor: pointer;
}

.sheet {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 74px);
  left: var(--pad-l);
  right: var(--pad-r);
  z-index: 39;
  padding: 10px;
  border-radius: 28px;
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.55);
  overscroll-behavior: contain;
  --focus: var(--signal);
}

.sheet nav {
  display: grid;
}

.sheet a {
  padding: 14px 18px;
  border-radius: 18px;
  font-size: 1.625rem;
  font-weight: 850;
  font-stretch: 112%;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.sheet a:hover {
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 940px) {
  .nav__links,
  .nav__cta {
    display: none;
  }

  .nav__menu {
    display: inline-flex;
  }
}

@media (max-width: 420px) {
  .nav__brand {
    padding-right: 14px;
    font-size: 0.9375rem;
  }

  .nav__mark {
    width: 36px;
    height: 36px;
  }

  .nav__lang {
    min-width: 46px;
    padding-inline: 10px;
  }

  .nav__menu {
    padding-inline: 16px;
  }
}

/* ---------- hero ---------- */

.hero {
  --hs: clamp(3rem, 9.4vw, 9.25rem);
  --card-w: clamp(240px, 27vw, 400px);
  --oil-depth: clamp(140px, 26vh, 260px);
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: auto minmax(min(34vh, 340px), 1fr) auto auto;
  column-gap: var(--gutter);
  min-height: max(min(100svh, 1000px), 700px);
  padding: calc(var(--nav-h) + clamp(16px, 3vh, 40px)) var(--pad-r) clamp(24px, 4vh, 48px) var(--pad-l);
  background: var(--paper);
  overflow: clip;
}

:root[lang="de"] .hero {
  --hs: clamp(2.75rem, 7.4vw, 7.5rem);
}

/* keep the dots of the Ä in "PRÄZISE" clear of the card */
@media (min-width: 721px) {
  :root[lang="de"] .hero__stage {
    margin-top: 0;
  }

  :root[lang="de"] .hl--2 {
    margin-top: 0.22em;
  }
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(12, 12, 13, 0.16) 1px, transparent 1.6px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 55% 45%, #000 30%, transparent 85%);
  mask-image: radial-gradient(ellipse 70% 60% at 55% 45%, #000 30%, transparent 85%);
  pointer-events: none;
}

.hl {
  position: relative;
  z-index: 1;
  font-size: var(--hs);
  font-weight: 900;
  font-stretch: 125%;
  line-height: 0.84;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}

.hl__in {
  display: block;
}

.hl--1 {
  grid-column: 1 / -1;
  grid-row: 1;
  justify-self: start;
}

.hl--2 {
  grid-column: 1 / -1;
  grid-row: 3;
  justify-self: end;
  /* black on paper, white where the oil runs behind it */
  color: #ffffff;
  mix-blend-mode: difference;
}

.hl--2::after {
  background: repeating-linear-gradient(90deg, #ffffff 0 6px, transparent 6px 12px);
}

/* drafting guides along the two baselines */
.hl::after {
  content: "";
  position: absolute;
  top: calc(100% + 0.06em);
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 6px, transparent 6px 12px);
  opacity: 0.3;
  transform-origin: left;
}

.hl--1::after {
  left: 0;
  width: 100vw;
}

.hl--2::after {
  right: 0;
  width: 100vw;
  transform-origin: right;
}

.hero__stage {
  position: relative;
  z-index: 2;
  grid-column: 4 / 10;
  grid-row: 1 / 4;
  align-self: center;
  justify-self: center;
  display: grid;
  justify-items: center;
  gap: 16px;
  margin-top: clamp(24px, 5vh, 56px);
  perspective: 1100px;
  touch-action: pan-y;
}

.hero__stage::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -40vh;
  bottom: -40vh;
  width: 1px;
  background: repeating-linear-gradient(180deg, var(--ink) 0 6px, transparent 6px 12px);
  opacity: 0.22;
  transform-origin: top;
}

.card {
  --rx: 0deg;
  --ry: 0deg;
  --gx: 30%;
  --gy: 18%;
  position: relative;
  width: var(--card-w);
  aspect-ratio: 4 / 5;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry)) rotateZ(-3deg);
  will-change: transform;
}

.card__face {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 12px;
  border-radius: 32px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.36) 46%, rgba(255, 255, 255, 0.66));
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.95),
    inset 0 -3px 8px rgba(12, 12, 13, 0.08),
    0 50px 90px -40px rgba(12, 12, 13, 0.55),
    0 16px 30px -18px rgba(12, 12, 13, 0.3);
}

.card__edge {
  position: absolute;
  inset: 0;
  border-radius: 32px;
  background: rgba(200, 199, 192, 0.5);
  transform: translateZ(-7px);
}

.card__edge--2 {
  background: rgba(170, 169, 162, 0.45);
  transform: translateZ(-14px);
}

.card__edge--3 {
  background: rgba(140, 139, 132, 0.4);
  transform: translateZ(-21px);
}

.card__photo {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 22px;
  background: #dcdbd5;
}

.card__photo svg,
.card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* film grain over the portrait, drawn at screen resolution: it keeps the small source photo looking crisp */
.card__photo::after,
.about__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("img/grain.png") 0 0 / 128px 128px;
  mix-blend-mode: overlay;
  opacity: 0.55;
  pointer-events: none;
}

.card__glare {
  position: absolute;
  inset: 0;
  border-radius: 32px;
  background: radial-gradient(circle at var(--gx) var(--gy), rgba(255, 255, 255, 0.6), transparent 42%);
  mix-blend-mode: soft-light;
  pointer-events: none;
  transform: translateZ(1px);
}

.corner {
  position: absolute;
  width: 26px;
  height: 26px;
  border: 0 solid rgba(12, 12, 13, 0.55);
  transform-origin: center;
}

.corner--tl {
  top: 30px;
  left: 30px;
  border-top-width: 2px;
  border-left-width: 2px;
}

.corner--tr {
  top: 30px;
  right: 30px;
  border-top-width: 2px;
  border-right-width: 2px;
}

.corner--bl {
  bottom: 30px;
  left: 30px;
  border-bottom-width: 2px;
  border-left-width: 2px;
}

.corner--br {
  bottom: 30px;
  right: 30px;
  border-bottom-width: 2px;
  border-right-width: 2px;
}

.card__chip {
  position: absolute;
  left: 50%;
  bottom: 30px;
  translate: -50% 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(12, 12, 13, 0.78);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.readout {
  position: absolute;
  top: 50%;
  left: calc(50% + var(--card-w) / 2 + 26px);
  translate: 0 -50%;
  writing-mode: vertical-rl;
  display: flex;
  gap: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--mute);
  font-variant-numeric: tabular-nums;
}

.readout b {
  display: inline-block;
  min-width: 3.4ch;
  color: var(--ink);
  font-weight: 600;
  text-align: right;
}

.hero__intro {
  position: relative;
  z-index: 3;
  grid-column: 1 / span 4;
  grid-row: 2;
  align-self: center;
  display: grid;
  justify-items: start;
  gap: 24px;
  padding-block: 24px;
}

.hero__lede {
  max-width: 30ch;
  font-size: clamp(1.0625rem, 0.95rem + 0.35vw, 1.25rem);
  font-weight: 500;
  line-height: 1.42;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.spec {
  position: relative;
  z-index: 3;
  grid-column: 10 / -1;
  grid-row: 2;
  align-self: center;
  display: grid;
  max-width: 300px;
  justify-self: end;
  width: 100%;
}

.spec div {
  display: grid;
  gap: 2px;
  padding-block: 12px;
  border-top: 1px solid var(--line);
}

.spec div:last-child {
  border-bottom: 1px solid var(--line);
}

.spec dt {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mute);
}

.spec dd {
  font-weight: 650;
}

.hero__creds {
  position: relative;
  z-index: 3;
  grid-column: 1 / -1;
  grid-row: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.hero__creds li {
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line);
  background: rgba(241, 241, 238, 0.8);
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

@media (orientation: portrait) and (min-width: 721px) {
  .hero {
    --card-w: clamp(240px, 32vw, 400px);
    /* just deep enough for the second headline line and the credentials */
    --oil-depth: calc(var(--hs) * 0.84 + 128px);
    grid-template-rows: auto minmax(calc(var(--card-w) * 1.25 + 40px), auto) auto auto;
    min-height: 0;
  }

  /* room for the oil line between the intro and the second headline line */
  .hl--2 {
    margin-top: 64px;
  }

  :root[lang="de"] .hl--2 {
    margin-top: calc(0.22em + 48px);
  }
}

@media (max-width: 1180px) and (min-width: 721px) {
  .hero__stage {
    grid-column: 5 / 10;
  }

  .spec {
    grid-column: 10 / -1;
  }

  .readout {
    display: none;
  }
}

@media (max-width: 720px) {
  .hero {
    --hs: clamp(2.5rem, 14vw, 5rem);
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    min-height: 0;
    row-gap: 0;
  }

  :root[lang="de"] .hero {
    --hs: clamp(2.25rem, 12.4vw, 4.5rem);
  }

  .hl {
    white-space: normal;
  }

  .hl--1,
  .hl--2,
  .hero__stage,
  .hero__intro,
  .spec,
  .hero__creds {
    grid-column: 1;
    grid-row: auto;
  }

  .hl--2 {
    justify-self: start;
    margin-top: 0.08em;
  }

  .hl--2::after {
    left: 0;
    right: auto;
  }

  .hero {
    --card-w: min(76vw, 340px);
  }

  .hero__stage {
    margin-top: 36px;
  }

  .readout {
    position: static;
    translate: none;
    writing-mode: horizontal-tb;
  }

  .hero__intro {
    padding-block: 32px 8px;
  }

  .spec {
    justify-self: stretch;
    max-width: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
    margin-top: 24px;
  }

  .spec div:nth-last-child(2) {
    border-bottom: 1px solid var(--line);
  }
}

/* ---------- oil: WebGL layers (oil.js) and their fallbacks ---------- */

.oil-back {
  position: fixed;
  inset: 0;
  z-index: -1;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.oil-hero {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.oil-static {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  width: 100%;
  height: var(--oil-depth);
  color: var(--ink);
  pointer-events: none;
}

.has-oil .oil-static,
.has-oil .hero__grid {
  display: none;
}

/* if the GPU drops the WebGL context, oil.js removes .has-oil and the fallback comes back */
html:not(.has-oil) .oil-back,
html:not(.has-oil) .oil-hero {
  visibility: hidden;
}

/* where the oil sits in the hero: the nav turns dark over it, and oil.js reads its height */
.hero__oil-zone {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--oil-depth);
  pointer-events: none;
}

.has-oil .hero {
  background: transparent;
}

.services,
.work,
.build,
.about {
  position: relative;
  background: var(--paper);
}

.kiez,
.live,
.prices,
.faq,
.footer {
  position: relative;
}

.has-oil .kiez {
  background: transparent;
}

.has-oil .live,
.has-oil .prices,
.has-oil .faq {
  background: rgba(12, 12, 13, 0.6);
}

.has-oil .footer {
  background: rgba(12, 12, 13, 0.3);
}

/* liquid boundaries between paper and the dark chapters */
.oil-edge {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1;
  height: clamp(26px, 3.6vw, 56px);
  overflow: hidden;
  pointer-events: none;
}

.oil-edge--top {
  top: -1px;
}

.oil-edge--bottom {
  bottom: -1px;
  transform: scaleY(-1);
}

.oil-edge--paper {
  color: var(--paper);
}

.oil-edge--paper2 {
  color: var(--paper-2);
}

.oil-edge--signal {
  color: var(--signal);
}

.oil-edge svg {
  display: block;
  width: 200%;
  max-width: none;
  height: 100%;
}

.oil-edge .rim {
  fill: none;
  stroke: rgba(255, 255, 255, 0.42);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

@media (prefers-reduced-motion: no-preference) {
  .oil-edge svg {
    animation: drift 28s linear infinite;
  }

  .oil-edge--bottom svg {
    animation-duration: 34s;
    animation-direction: reverse;
  }
}

@keyframes drift {
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 720px) {
  .hero {
    padding-bottom: calc(var(--oil-depth) + 28px);
  }
}

/* ---------- Kiez marquee ---------- */

.kiez {
  overflow: hidden;
  /* extra room at the bottom for the liquid edge */
  padding-block: clamp(28px, 4vw, 52px) clamp(56px, 7vw, 100px);
  background: var(--ink);
  color: var(--paper);
}

.kiez__track {
  display: flex;
  width: max-content;
}

.kiez__list {
  display: flex;
  flex: none;
  align-items: center;
}

.kiez__list li {
  display: flex;
  align-items: center;
  gap: 0.35em;
  padding-right: 0.35em;
  font-size: clamp(2.5rem, 1.5rem + 4.4vw, 6rem);
  font-weight: 900;
  font-stretch: 125%;
  line-height: 1;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  white-space: nowrap;
}

.kiez__list li::after {
  content: "";
  width: 0.24em;
  height: 0.24em;
  border-radius: 3px;
  background: var(--signal);
}

.kiez__list li:nth-child(even) {
  color: #5d5d58;
}

.kiez__note {
  margin-top: 18px;
  padding-inline: var(--pad-l) var(--pad-r);
  color: var(--night-mute);
}

@media (prefers-reduced-motion: no-preference) {
  .kiez__track {
    animation: marquee 70s linear infinite;
  }

  .kiez:hover .kiez__track {
    animation-play-state: paused;
  }
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ---------- services: stacking cards ---------- */

.services {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: 40px;
  padding: var(--sec) var(--pad-r) var(--sec) var(--pad-l);
}

.services__head {
  grid-column: 1 / span 4;
  position: sticky;
  top: calc(var(--nav-h) + 48px);
  align-self: start;
  display: grid;
  gap: 24px;
}

.svc-stack {
  grid-column: 5 / -1;
  display: grid;
  gap: 32px;
}

.svc {
  --i: 0;
  position: sticky;
  top: calc(var(--nav-h) + 28px + var(--i) * 28px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(16px, 2.4vw, 40px);
  min-height: min(64vh, 560px);
  padding: clamp(26px, 3.2vw, 48px);
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 -20px 50px -30px rgba(12, 12, 13, 0.45);
}

.svc:nth-child(2) {
  --i: 1;
}

.svc:nth-child(3) {
  --i: 2;
}

.svc--paper {
  background: var(--paper-2);
}

.svc--signal {
  background: var(--signal);
}

.svc--night {
  background: var(--ink);
  color: var(--paper);
  --focus: var(--signal);
}

.svc__text {
  display: grid;
  gap: 18px;
  align-content: center;
}

.svc__text > p:not(.svc__no) {
  max-width: 40ch;
}

.svc__no {
  opacity: 0.6;
}

.svc__img {
  justify-self: center;
  width: 100%;
  max-height: 46vh;
  object-fit: contain;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags li {
  padding: 7px 14px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px currentColor;
  font-size: 0.875rem;
  font-weight: 650;
}

/* ---------- work ---------- */

.work {
  display: grid;
  gap: clamp(20px, 2.4vw, 32px);
  padding: 0 var(--pad-r) var(--sec) var(--pad-l);
}

.work__head,
.build__head,
.prices__head,
.faq__head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: 20px;
  align-items: end;
  margin-bottom: clamp(16px, 3vw, 40px);
}

.work__head .h2,
.build__head .h2,
.prices__head .h2 {
  grid-column: 1 / span 7;
}

.work__head .lead,
.build__head .lead,
.prices__head .lead {
  grid-column: 9 / -1;
}

.project {
  --p-bg: var(--paper-2);
  --p-ink: var(--ink);
  --p-chrome: #fff;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  align-items: center;
  gap: clamp(28px, 4vw, 72px);
  padding: clamp(24px, 4vw, 64px);
  border-radius: 38px;
  background: var(--p-bg);
  color: var(--p-ink);
  overflow: hidden;
  --focus: var(--p-ink);
}

.project--korn {
  --p-bg: #f5efe3;
  --p-ink: #24150b;
  --p-chrome: #fffaf1;
}

.project--linde {
  --p-bg: #1d4a33;
  --p-ink: #efe8da;
  --p-chrome: #2a6045;
}

.project--mira {
  --p-bg: #0e0d0c;
  --p-ink: #f2ede6;
  --p-chrome: #232120;
}

.project:nth-of-type(2) {
  grid-template-columns: minmax(0, 0.65fr) minmax(0, 1.35fr);
}

.project:nth-of-type(2) .project__media {
  order: 2;
}

.project__media {
  position: relative;
  padding: 0 11% 7% 0;
  perspective: 1600px;
}

.browser {
  overflow: hidden;
  border-radius: 16px;
  background: var(--p-chrome);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 0, 0, 0.06);
  transform: rotateY(-7deg) rotateX(3deg);
  transform-origin: left center;
  transition: transform 800ms var(--ease-out);
}

.browser__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 14px;
  font-family: var(--mono);
  font-size: 0.8125rem;
}

.browser__bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.22;
}

.browser__bar span {
  margin-left: 10px;
  opacity: 0.7;
}

.browser img {
  width: 100%;
}

.project__phone {
  position: absolute;
  right: 0;
  bottom: -2%;
  width: 31%;
  transition: transform 800ms var(--ease-out);
}

.project:hover .browser {
  transform: rotateY(-2deg) rotateX(1deg);
}

.project:hover .project__phone {
  transform: translateY(-12px) rotate(-2deg);
}

.project__text {
  display: grid;
  justify-items: start;
  gap: 18px;
}

.project__text > p:not(.project__meta) {
  max-width: 36ch;
}

.project__meta {
  opacity: 0.72;
}

/* ---------- live demo ---------- */

.live {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: 48px;
  align-items: center;
  padding: var(--sec) var(--pad-r) var(--sec) var(--pad-l);
  background: var(--ink);
  color: var(--paper);
  --focus: var(--signal);
}

.live__text {
  grid-column: 1 / span 5;
  display: grid;
  gap: 26px;
  justify-items: start;
}

.live__label {
  color: var(--night-mute);
}

.live__types {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.live__types .live__label {
  width: 100%;
}

.type-btn {
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--paper);
  font-weight: 700;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, transform 140ms var(--ease-out);
}

.type-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.type-btn:active {
  transform: scale(0.97);
}

.type-btn[aria-pressed="true"] {
  background: var(--disc-color, var(--signal));
  color: var(--ink);
}

.live__form {
  display: grid;
  justify-items: start;
  gap: 10px;
  width: min(100%, 26rem);
}

.field {
  width: 100%;
  min-height: 54px;
  padding: 12px 18px;
  border: 0;
  border-radius: 16px;
  background: var(--paper);
  color: var(--ink);
  font-size: 1.0625rem;
}

.field::placeholder {
  color: #77776f;
  opacity: 1;
}

.live__form .btn {
  margin-top: 6px;
}

.live__fact {
  display: grid;
  gap: 6px;
  max-width: 34ch;
  padding-left: 16px;
  border-left: 3px solid var(--disc-color, var(--signal));
}

.live__q {
  font-weight: 750;
}

.live__stage {
  grid-column: 7 / -1;
  display: grid;
  place-items: center;
  min-height: 640px;
}

.live__disc {
  grid-area: 1 / 1;
  width: min(40vw, 560px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--disc-color, #e7b04d);
  transition: background-color 400ms ease;
}

/* the phone: a real interface fragment with its own small borders */
.phone {
  grid-area: 1 / 1;
  position: relative;
  z-index: 1;
  width: 300px;
  aspect-ratio: 9 / 18.5;
  padding: 10px;
  border-radius: 44px;
  background: #1b1b1d;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.1), 0 60px 90px -30px rgba(0, 0, 0, 0.75);
  transform: rotate(-4deg);
}

.phone__screen {
  height: 100%;
  overflow: hidden;
  border-radius: 34px;
  background: #ffffff;
  color: #111111;
  font-size: 13px;
  line-height: 1.35;
}

.pv__head {
  padding: 40px 18px 18px;
  background: var(--disc-color, #e7b04d);
  color: #000000;
  transition: background-color 400ms ease;
}

.pv__name {
  font-size: 23px;
  font-weight: 900;
  font-stretch: 112%;
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.pv__sub {
  margin-top: 6px;
}

.pv__status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-bottom: 1px solid #e4e3de;
  font-weight: 700;
}

.pv__dot {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #12813a;
}

.pv__status[data-open="false"] .pv__dot {
  background: #b3202f;
}

.pv__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px 18px;
}

.pv__btn {
  display: grid;
  place-items: center;
  min-height: 38px;
  padding: 0 8px;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  font-weight: 700;
}

.pv__btn--alt {
  background: #ececea;
  color: #111111;
}

.pv__h {
  padding: 8px 18px 4px;
  font-weight: 900;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.pv__list,
.pv__hours {
  padding: 0 18px;
}

.pv__list li,
.pv__hours li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid #ecebe6;
}

.pv__list span:last-child {
  flex: none;
}

.pv__hours li {
  padding: 2px 0;
  border-bottom: 0;
}

.pv__foot {
  padding: 12px 18px;
  color: #6b6b64;
}

/* ---------- build: exploded view ---------- */

.build {
  padding: var(--sec) var(--pad-r) var(--sec) var(--pad-l);
}

.build__body {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: 32px;
  align-items: center;
  margin-top: clamp(32px, 7vw, 120px);
}

.stack {
  grid-column: 1 / span 7;
  display: grid;
  place-items: center;
  min-height: clamp(460px, 52vw, 680px);
  perspective: 2000px;
}

.stack__scene {
  --gap: 12px;
  position: relative;
  width: min(74%, 400px);
  aspect-ratio: 1;
  transform-style: preserve-3d;
  transform: rotateX(56deg) rotateZ(-40deg) translateZ(-120px);
}

.stack.is-exploded .stack__scene {
  --gap: clamp(34px, 4.4vw, 62px);
}

.plate {
  --z: 0;
  --lift: 0px;
  position: absolute;
  inset: 0;
  border-radius: 28px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(12, 12, 13, 0.14), 0 2px 0 rgba(12, 12, 13, 0.06);
  transform: translateZ(calc(var(--z) * var(--gap) + var(--lift)));
  transition: transform 1000ms var(--ease-out), background-color 220ms ease, color 220ms ease;
}

.plate--6 {
  --z: 0;
  background: var(--paper-2);
}

.plate--5 {
  --z: 1;
  background: var(--ink);
  color: var(--paper);
}

.plate--4 {
  --z: 2;
}

.plate--3 {
  --z: 3;
  background: var(--ink-3);
  color: var(--signal);
}

.plate--2 {
  --z: 4;
  background: var(--paper-2);
}

.plate--1 {
  --z: 5;
  background: #ffffff;
}

.plate.is-active {
  --lift: 22px;
  background: var(--signal);
  color: var(--ink);
}

.plate.is-above {
  --lift: clamp(90px, 10vw, 140px);
}

.plate__no {
  position: absolute;
  top: 18px;
  left: 20px;
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 600;
}

.ph-lines {
  position: absolute;
  left: 16%;
  top: 26%;
  width: 62%;
  display: grid;
  gap: 12px;
}

.ph-lines i {
  height: 10px;
  border-radius: 5px;
  background: currentColor;
  opacity: 0.85;
}

.ph-lines i:first-child {
  height: 22px;
  width: 80%;
}

.ph-lines i:nth-child(3) {
  width: 88%;
  opacity: 0.4;
}

.ph-lines i:nth-child(4) {
  width: 60%;
  opacity: 0.4;
}

.ph-open {
  position: absolute;
  left: 16%;
  bottom: 18%;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--signal);
  font-family: var(--mono);
  font-size: 0.8125rem;
}

.ph-swatches {
  position: absolute;
  left: 16%;
  bottom: 22%;
  display: flex;
  gap: 10px;
}

.ph-swatches i {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--ink);
}

.ph-swatches i:nth-child(2) {
  background: var(--signal);
}

.ph-swatches i:nth-child(3) {
  background: #1d4a33;
}

.ph-swatches i:nth-child(4) {
  background: var(--rose);
}

.ph-aa {
  position: absolute;
  left: 15%;
  top: 18%;
  font-size: 5.5rem;
  font-weight: 900;
  font-stretch: 125%;
  line-height: 1;
  letter-spacing: -0.04em;
}

.ph-code {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 5rem;
  font-weight: 500;
}

.ph-devices {
  position: absolute;
  inset: 22% 14% 24% 14%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
}

.ph-devices i {
  position: relative;
  border: 3px solid currentColor;
  border-radius: 10px;
}

.ph-devices i:nth-child(1) {
  width: 22%;
  height: 58%;
}

.ph-devices i:nth-child(2) {
  width: 34%;
  height: 72%;
}

.ph-devices i:nth-child(3) {
  width: 44%;
  height: 54%;
}

.ph-devices i::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: 34%;
  max-width: 22px;
  aspect-ratio: 2 / 1;
  border-left: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: translate(-50%, -50%) rotate(-45deg);
}

.ph-shield {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 40%;
  aspect-ratio: 5 / 6;
  background: var(--signal);
  clip-path: polygon(50% 0, 100% 16%, 100% 52%, 50% 100%, 0 52%, 0 16%);
  transform: translate(-50%, -50%);
}

.plate.is-active .ph-shield {
  background: var(--ink);
}

.ph-globe {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48%;
  aspect-ratio: 1;
  border: 3px solid currentColor;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background:
    linear-gradient(currentColor, currentColor) center / 100% 3px no-repeat,
    linear-gradient(currentColor, currentColor) center / 3px 100% no-repeat;
}

.ph-globe::before {
  content: "";
  position: absolute;
  inset: -3px 24%;
  border: 3px solid currentColor;
  border-radius: 50%;
}

.bom {
  grid-column: 8 / -1;
  display: grid;
}

.bom li + li {
  border-top: 1px solid var(--line);
}

.bom button {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 2px;
  width: 100%;
  padding: 16px 14px;
  border: 0;
  border-radius: 16px;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: background-color 180ms ease;
}

.bom button:hover,
.bom button.is-active {
  background: var(--paper-2);
}

.bom button.is-active .bom__no {
  background: var(--signal);
}

.bom__no {
  grid-row: span 2;
  align-self: start;
  justify-self: start;
  padding: 4px 8px;
  border-radius: 8px;
  color: var(--ink);
  font-weight: 600;
  transition: background-color 180ms ease;
}

.bom__name {
  font-size: 1.375rem;
  font-weight: 850;
  font-stretch: 112%;
  letter-spacing: -0.02em;
}

.bom__spec {
  color: var(--mute);
  font-size: 1rem;
}

/* ---------- process ---------- */

.process {
  padding: var(--sec) var(--pad-r) var(--sec) var(--pad-l);
  background: var(--paper-2);
}

.dim {
  position: relative;
  width: calc((100% - 3 * var(--gutter)) / 4);
  margin: clamp(48px, 6vw, 80px) 0 22px calc((100% - 3 * var(--gutter)) / 4 + var(--gutter));
}

.dim__line {
  display: block;
  height: 14px;
  border-inline: 1.5px solid var(--ink);
  background: linear-gradient(var(--ink), var(--ink)) center / 100% 1.5px no-repeat;
}

.dim__label {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--signal);
  color: var(--ink);
  font-weight: 600;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gutter);
}

.steps li {
  display: grid;
  align-content: start;
  gap: 12px;
  padding-top: 22px;
  border-top: 2px solid var(--ink);
}

.steps li:nth-child(2) {
  border-top-color: var(--signal);
  border-top-width: 6px;
  padding-top: 18px;
}

.steps li > p:last-child {
  max-width: 30ch;
}

.steps__day {
  color: var(--mute);
}

/* ---------- prices ---------- */

.prices {
  padding: var(--sec) var(--pad-r) var(--sec) var(--pad-l);
  background: var(--ink);
  color: var(--paper);
  --focus: var(--signal);
}

.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.plan {
  --cta-bg: var(--ink);
  --cta-ink: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: clamp(24px, 2.6vw, 36px);
  border-radius: 30px;
  background: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--line-night);
}

.plan--start {
  background: var(--paper);
  color: var(--ink);
  box-shadow: none;
  --focus: var(--ink);
}

.plan--laden {
  background: var(--signal);
  color: var(--ink);
  box-shadow: none;
  --focus: var(--ink);
}

.plan--plus {
  --cta-bg: var(--paper);
  --cta-ink: var(--ink);
}

.plan__price {
  margin-top: 18px;
  font-size: clamp(3rem, 2rem + 3vw, 4.75rem);
  font-weight: 900;
  font-stretch: 125%;
  line-height: 1;
  letter-spacing: -0.045em;
}

.plan__once {
  opacity: 0.65;
}

.plan__list {
  display: grid;
  gap: 10px;
  margin: 24px 0 32px;
}

.plan__list li {
  position: relative;
  padding-left: 26px;
}

.plan__list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.38em;
  width: 12px;
  height: 7px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.plan__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  margin-top: auto;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--cta-bg);
  color: var(--cta-ink);
  font-weight: 750;
  text-decoration: none;
  transition: transform 160ms var(--ease-out);
}

.plan__cta:hover {
  transform: translateY(-2px);
}

.prices__note {
  max-width: 64ch;
  margin-top: 32px;
  color: var(--night-mute);
}

/* ---------- about ---------- */

.about {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: 40px;
  align-items: center;
  padding: var(--sec) var(--pad-r) var(--sec) var(--pad-l);
}

.about__photo {
  position: relative;
  grid-column: 1 / span 5;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 34px;
  background: #dcdbd5;
}

.about__photo svg,
.about__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about__text {
  grid-column: 7 / -1;
  display: grid;
  gap: 28px;
}

.about__story {
  max-width: 36ch;
  font-size: clamp(1.25rem, 1rem + 0.8vw, 1.75rem);
  font-weight: 500;
  line-height: 1.34;
  text-wrap: pretty;
}

.facts div {
  display: grid;
  grid-template-columns: minmax(7rem, 9rem) minmax(0, 1fr);
  gap: 16px;
  padding-block: 14px;
  border-top: 1px solid var(--line);
}

.facts dt {
  color: var(--mute);
  padding-top: 3px;
}

.facts a {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.facts a:hover {
  text-decoration-thickness: 2px;
}

/* ---------- FAQ ---------- */

.faq {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: 32px;
  padding: var(--sec) var(--pad-r) var(--sec) var(--pad-l);
  background: var(--ink);
  color: var(--paper);
  --focus: var(--signal);
}

.faq .faq__head {
  grid-column: 1 / span 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  position: sticky;
  top: calc(var(--nav-h) + 48px);
  align-self: start;
}

.faq .faq__head .lead {
  color: var(--night-mute);
}

.faq__list {
  grid-column: 6 / -1;
  display: grid;
  gap: 10px;
}

.faq details {
  border-radius: 24px;
  background: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--line-night);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 22px 28px;
  font-size: clamp(1.125rem, 1rem + 0.4vw, 1.3125rem);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
  transition: transform 220ms var(--ease-out), background-color 220ms ease, color 220ms ease;
}

.faq details[open] summary::after {
  background: var(--signal);
  color: var(--ink);
  transform: rotate(45deg);
}

.faq details p {
  max-width: 60ch;
  padding: 0 28px 26px;
  color: var(--night-mute);
}

/* ---------- contact ---------- */

.contact {
  padding: var(--sec) var(--pad-r) clamp(64px, 8vw, 120px) var(--pad-l);
  background: var(--signal);
  color: var(--ink);
  --focus: var(--ink);
}

.contact__title {
  font-size: clamp(3rem, 0.8rem + 8.4vw, 9.5rem);
  font-weight: 900;
  font-stretch: 125%;
  line-height: 0.86;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  text-wrap: balance;
}

.contact__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: 28px;
  align-items: end;
  margin-top: clamp(40px, 6vw, 88px);
}

.contact__mail {
  grid-column: 1 / span 8;
  /* sized for the full address; if it must wrap, it wraps after the @ */
  font-size: clamp(1.625rem, 0.75rem + 2.9vw, 3.25rem);
  font-weight: 850;
  font-stretch: 112%;
  line-height: 1;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

.contact__mail a {
  text-decoration: underline;
  text-decoration-thickness: 0.07em;
  text-underline-offset: 0.14em;
}

.contact__actions {
  grid-column: 9 / -1;
  display: grid;
  justify-items: start;
  gap: 12px;
}

.contact__wa {
  font-weight: 700;
}

.contact__status:empty {
  display: none;
}

.contact__note {
  grid-column: 1 / span 7;
  max-width: 44ch;
  font-weight: 550;
}

/* ---------- footer ---------- */

.footer {
  overflow: hidden;
  /* extra room at the top for the liquid edge */
  padding: clamp(80px, 9vw, 128px) var(--pad-r) calc(28px + env(safe-area-inset-bottom, 0px)) var(--pad-l);
  background: var(--ink);
  color: var(--paper);
  --focus: var(--signal);
}

.footer__name {
  display: grid;
  font-size: clamp(3.5rem, 17.6vw, 20rem);
  font-weight: 900;
  font-stretch: 125%;
  line-height: 0.8;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  color: transparent;
  background: repeating-linear-gradient(-45deg, var(--paper) 0 2px, transparent 2px 8px);
  -webkit-background-clip: text;
  background-clip: text;
}

.footer__meta {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 16px 32px;
  margin-top: clamp(28px, 4vw, 48px);
  color: var(--night-mute);
  font-size: 0.9375rem;
}

.footer__meta a {
  margin-right: 20px;
  color: var(--paper);
  text-underline-offset: 3px;
}

@media (prefers-reduced-motion: no-preference) {
  .footer__name {
    animation: hatch 14s linear infinite;
  }
}

@keyframes hatch {
  to {
    background-position: 113.137px 0;
  }
}

/* ---------- legal pages ---------- */

.legal {
  max-width: 76ch;
  margin-inline: auto;
  padding: 28px var(--pad-r) 96px var(--pad-l);
}

.legal__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 56px;
}

.legal__top a {
  font-weight: 700;
}

.legal h1 {
  margin-bottom: 28px;
}

.legal h2 {
  margin-top: 40px;
  margin-bottom: 10px;
  font-size: 1.375rem;
  font-weight: 800;
}

.legal__date {
  margin-top: 40px;
  color: var(--mute);
  font-size: 0.8125rem;
}

.legal p + p {
  margin-top: 12px;
}

.legal ul {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding-left: 1.2em;
  list-style: disc;
}

.draft-note {
  margin-bottom: 36px;
  padding: 20px 22px;
  border-radius: 16px;
  background: var(--signal);
}

.ph {
  padding: 0 0.2em;
  border-radius: 4px;
  background: var(--signal);
}

/* ---------- responsive sections ---------- */

@media (max-width: 1000px) {
  .services__head {
    position: static;
    grid-column: 1 / -1;
  }

  .svc-stack {
    grid-column: 1 / -1;
  }

  .stack,
  .bom {
    grid-column: 1 / -1;
  }

  .stack {
    min-height: clamp(380px, 70vw, 560px);
    padding-top: clamp(60px, 14vw, 120px);
  }

  .faq .faq__head {
    position: static;
    grid-column: 1 / -1;
  }

  .faq__list {
    grid-column: 1 / -1;
  }

  .live__text,
  .live__stage {
    grid-column: 1 / -1;
  }

  .live__stage {
    min-height: 600px;
  }

  .live__disc {
    width: min(86vw, 560px);
  }
}

@media (max-width: 860px) {
  .work__head .h2,
  .work__head .lead,
  .build__head .h2,
  .build__head .lead,
  .prices__head .h2,
  .prices__head .lead {
    grid-column: 1 / -1;
  }

  .project,
  .project:nth-of-type(2) {
    grid-template-columns: minmax(0, 1fr);
  }

  .project:nth-of-type(2) .project__media {
    order: 0;
  }

  .plans {
    grid-template-columns: minmax(0, 1fr);
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 36px;
  }

  .dim {
    width: calc((100% - var(--gutter)) / 2);
    margin-left: calc((100% - var(--gutter)) / 2 + var(--gutter));
  }

  .about__photo,
  .about__text {
    grid-column: 1 / -1;
  }

  .about__photo {
    max-width: 460px;
  }

  .contact__mail,
  .contact__actions,
  .contact__note {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .svc {
    grid-template-columns: minmax(0, 1fr);
    top: calc(var(--nav-h) + 12px + var(--i) * 16px);
    min-height: 0;
  }

  .svc__img {
    max-height: 300px;
    order: -1;
  }

  .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .dim {
    display: none;
  }

  .phone {
    width: 268px;
  }

  .live__stage {
    min-height: 560px;
  }

  .footer__meta {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- motion ---------- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
}

@keyframes line-up {
  from {
    transform: translateY(105%);
  }
}

@keyframes draw-x {
  from {
    transform: scaleX(0);
  }
}

@keyframes draw-y {
  from {
    transform: scaleY(0);
  }
}

@keyframes card-in {
  from {
    clip-path: inset(100% 0 0 0 round 32px);
    transform: rotateX(18deg) rotateY(-24deg) rotateZ(-3deg) translateY(40px);
  }
  to {
    clip-path: inset(0 0 0 0 round 32px);
  }
}

@keyframes corner-in {
  from {
    opacity: 0;
    transform: scale(1.8);
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hl {
    overflow: clip;
    overflow-clip-margin: 0.2em;
    padding-bottom: 0.04em;
  }

  .hl__in {
    animation: line-up 1000ms var(--ease-out) 120ms backwards;
  }

  .hl--2 .hl__in {
    animation-delay: 220ms;
  }

  .hl::after {
    animation: draw-x 1400ms var(--ease-out) 500ms backwards;
  }

  .hero__stage::before {
    animation: draw-y 1400ms var(--ease-out) 400ms backwards;
  }

  .hero__grid {
    animation: fade 1600ms ease 200ms backwards;
  }

  .card {
    animation: card-in 1300ms var(--ease-soft) 300ms backwards;
  }

  .card__photo > * {
    animation: settle 1500ms var(--ease-soft) 400ms backwards;
  }

  .corner {
    animation: corner-in 700ms var(--ease-out) 1100ms backwards;
  }

  .card__chip,
  .readout {
    animation: fade 700ms ease 1300ms backwards;
  }

  .hero__intro,
  .spec,
  .hero__creds {
    animation: rise 900ms var(--ease-out) 600ms backwards;
  }

  .spec {
    animation-delay: 720ms;
  }

  .hero__creds {
    animation-delay: 840ms;
  }

  .js .reveal.is-in {
    animation: rise 820ms var(--ease-out) var(--d, 0ms) backwards;
  }

  .js .project.is-in .browser {
    animation: browser-in 1200ms var(--ease-out) backwards;
  }

  .js .project.is-in .project__phone {
    animation: rise 1100ms var(--ease-out) 180ms backwards;
  }
}

@keyframes settle {
  from {
    transform: scale(1.12);
  }
}

@keyframes browser-in {
  from {
    opacity: 0;
    transform: rotateY(-24deg) rotateX(8deg) translateY(40px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 1ms !important;
  }

  .kiez__track {
    flex-wrap: wrap;
    width: auto;
    padding-inline: var(--pad-l) var(--pad-r);
  }

  .kiez__list {
    flex-wrap: wrap;
  }

  .kiez__list[aria-hidden="true"] {
    display: none;
  }
}
