/* ==========================================================================
   broemel.co - main design (Redesign v12)
   Light card layout shared by the home page, the two case studies and the
   legal pages. Every value comes from the v12 prototype; the breakpoint
   layouts the prototype wrote as inline styles are media queries here.
   ========================================================================== */

/* --- reset ---------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
}

/* Match the prototype's viewport-based sizing on the home page. */
html[data-page="home"] {
  scrollbar-gutter: auto;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  /* Neutralise the width/height presentational hints so the intrinsic size
     attributes reserve space without fighting aspect-ratio. */
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

ul,
ol,
dl {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

h1,
h2,
h3,
h4,
p,
figure {
  margin: 0;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* --- tokens --------------------------------------------------------------- */

:root {
  --bg: #edefee;
  --card: #ffffff;
  --tint: #f2f5f3;
  --soft: #dcede7;
  --ink: #14181a;
  --muted: #5f6968;
  --accent: #0f6f5c;
  --on-accent: #f4fbf8;

  --font: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --r: 20px;
  --shadow: 0 1px 2px rgba(20, 24, 26, 0.04), 0 12px 32px -12px rgba(20, 24, 26, 0.12);
  --shadow-lift: 0 2px 4px rgba(20, 24, 26, 0.05), 0 22px 46px -14px rgba(20, 24, 26, 0.18);

  --page-pad: clamp(16px, 2.2vw, 32px);
  --gap: clamp(16px, 1.6vw, 26px);
  --card-pad: clamp(25px, 3.1vw, 46px);
  /* Case-study default; the home page uses its prototype's 282px rail. */
  --rail-w: 300px;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

.page-case {
  --card-pad: clamp(26px, 3.4vw, 52px);
}

.page-home {
  --rail-w: 282px;
  --shadow: 0 1px 2px rgba(23, 23, 26, 0.04), 0 12px 32px -12px rgba(23, 23, 26, 0.12);
  --shadow-lift: 0 2px 4px rgba(23, 23, 26, 0.05), 0 22px 46px -14px rgba(23, 23, 26, 0.18);
}

/* --- layout --------------------------------------------------------------- */

.shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--page-pad);
}

.shell__main,
.shell__main > main {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  min-width: 0;
}

.rail {
  align-self: start;
}

@media (min-width: 940px) {
  .shell {
    grid-template-columns: minmax(240px, var(--rail-w)) minmax(0, 1fr);
  }

  .rail {
    position: sticky;
    top: var(--page-pad);
    max-height: calc(100vh - 2 * var(--page-pad));
    overflow-y: auto;
  }
}

/* --- cards ---------------------------------------------------------------- */

.card {
  background: var(--card);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: var(--card-pad);
  scroll-margin-top: 96px;
}

/* Sections whose image band bleeds to the card edge carry their own padding. */
.card--bleed {
  padding: var(--card-pad) 0 0;
  overflow: hidden;
}

/* A bleeding card can widen or deepen its own body padding; the prototypes
   use slightly different values per section. */
.card--bleed .card__body {
  padding: 0 var(--bleed-x, var(--card-pad)) var(--bleed-y, clamp(22px, 2.6vw, 32px));
}

.card--accent {
  background: var(--accent);
  color: var(--on-accent);
  padding: clamp(27px, 3.35vw, 50px);
}

.card--accent a:hover {
  color: var(--on-accent);
  opacity: 0.75;
}

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

.kicker {
  margin: 0 0 18px;
  color: var(--accent);
  font-weight: 600;
  font-size: 14.5px;
}

.h-lead {
  margin: 0 0 22px;
  font-size: clamp(26px, 3.2vw, 42px);
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.1;
  max-width: 26ch;
  text-wrap: pretty;
}

.h-section {
  margin: 0 0 26px;
  font-size: clamp(24px, 2.8vw, 36px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.12;
}

.h-invert {
  margin: 0 0 14px;
  font-size: clamp(25px, 3vw, 40px);
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.1;
  max-width: 24ch;
}

.balance {
  text-wrap: balance;
}

.lead {
  font-size: 17.5px;
}

.muted {
  color: var(--muted);
}

.note {
  font-size: 14.5px;
}

/* Case-study headings share one rhythm; the two modifiers below are the
   exceptions the prototype makes. */
.page-case :where(.h-section) {
  margin-bottom: 16px;
  max-width: 30ch;
  text-wrap: balance;
}

.h-section--28 {
  max-width: 28ch;
}

.h-section--32 {
  max-width: 32ch;
}

.h-section--free {
  max-width: none;
}

/* The paragraph that sits between a section heading and its tiles. */
.section-intro {
  margin: 0 0 26px;
  color: var(--muted);
  max-width: 70ch;
}

.section-intro--tight {
  max-width: 66ch;
}

.section-intro--snug {
  margin-bottom: 24px;
}

/* The sentence that closes a section, in body colour rather than muted. */
.section-outro {
  margin: 26px 0 0;
  max-width: 72ch;
  font-size: 16.5px;
}

.about__text {
  max-width: 84ch;
}

.contact__text {
  margin: 0 0 26px;
  opacity: 0.86;
  max-width: 52ch;
}

/* --- grids ---------------------------------------------------------------- */

.grid-two,
.grid-thirds,
.grid-tiles,
.grid-stats,
.grid-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.grid-two {
  gap: 20px 40px;
}

.grid-steps {
  gap: 22px 18px;
}

@media (min-width: 660px) {
  .grid-two {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

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

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

/* --- buttons, pills, chips ------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn--solid {
  background: var(--accent);
  color: var(--on-accent);
}

.btn--solid:hover {
  background: color-mix(in oklab, var(--accent) 86%, #000);
  color: var(--on-accent);
}

.btn--ghost {
  background: var(--tint);
  color: inherit;
}

.btn--ghost:hover {
  background: var(--soft);
  color: var(--accent);
}

.btn--onCard {
  background: var(--card);
}

.btn--compact {
  padding: 11px 17px;
}

.btn--back {
  padding: 8px 13px;
  border-radius: 100px;
  font-size: 14px;
}

.btn--onAccent,
.card--accent .btn--onAccent:hover {
  background: var(--on-accent);
  color: var(--accent);
  padding: 12px 18px;
}

.btn--onAccentGhost {
  background: rgba(255, 255, 255, 0.16);
  color: inherit;
  padding: 12px 18px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 100px;
  background: var(--soft);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 600;
}

.badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill {
  padding: 6px 11px;
  border-radius: 100px;
  background: var(--tint);
  font-size: 13.5px;
  transition: background 0.2s, color 0.2s;
}

.pill:hover {
  background: var(--soft);
  color: var(--accent);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--card);
  color: var(--muted);
}

.chip--tint {
  background: var(--tint);
}

.chip--accentText {
  color: var(--accent);
}

.chip--link {
  background: var(--accent);
  color: var(--on-accent);
  transition: background 0.2s;
}

.chip--link:hover {
  background: color-mix(in oklab, var(--accent) 86%, #000);
  color: var(--on-accent);
}

/* --- rail ----------------------------------------------------------------- */

.rail__card {
  background: var(--card);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.rail__card--padded {
  padding: 20px;
}

.rail__photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: 50% 50%;
  cursor: default;
  transition: filter 0.18s;
}

.rail__ident {
  padding: 20px 20px 0;
  min-width: 0;
}

.rail__body {
  padding: 0 20px 22px;
  min-width: 0;
}

.rail__name {
  margin: 0 0 5px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.14;
}

.rail__role {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 15px;
}

.rail__intro {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 15.5px;
}

.rail__actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.rail__actions .btn {
  display: flex;
}

.rail__block {
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid var(--tint);
}

.rail__blockHead {
  margin: 0 0 11px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
}

/* 660-939px: portrait sits beside the name, the buttons run in a row. */
@media (min-width: 660px) and (max-width: 939.98px) {
  .rail__top {
    display: flex;
    align-items: stretch;
  }

  .rail__photo {
    width: 240px;
    max-width: 42%;
    height: auto;
    aspect-ratio: auto;
    object-position: 50% 26%;
    align-self: stretch;
    flex-shrink: 0;
  }

  .rail__ident {
    flex: 1;
  }

  .rail__actions {
    flex-direction: row;
  }

  .rail__actions .btn {
    flex: 1;
  }
}

/* --- case-study rail ------------------------------------------------------ */

.case-id {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.case-id__icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 13px;
}

.case-id__name {
  margin: 0 0 3px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.case-id__meta {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.facts {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--tint);
}

.facts dt {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 3px;
}

.facts dd {
  margin: 0;
  font-size: 15px;
}

/* --- experience ----------------------------------------------------------- */

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stack--wide {
  gap: 20px;
}

.tile {
  background: var(--tint);
  border-radius: 16px;
  padding: 22px;
}

.tile--roomy {
  padding: 20px 22px;
}

.tile__head {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.tile__head--sm {
  margin: 0 0 6px;
  font-size: 16.5px;
}

/* Head of a tile that carries a mono counter above it. */
.tile__head--num {
  font-size: 17px;
  letter-spacing: -0.012em;
}

.tile__text {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.tile__num {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.lift {
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}

.lift:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.job {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px 24px;
  align-items: center;
}

@media (min-width: 660px) {
  .job {
    grid-template-columns: 220px minmax(0, 1fr);
  }
}

.job__period {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--card);
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 10px;
}

.job__period--now {
  background: var(--accent);
  color: var(--on-accent);
}

.job__title {
  margin: 0 0 3px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.job__org {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
}

.bullets {
  display: flex;
  flex-direction: column;
  gap: 11px;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.5;
}

.bullets li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.bullets li::before {
  content: "";
  flex-shrink: 0;
  width: 5px;
  height: 5px;
  margin-top: 9px;
  border-radius: 100px;
  background: var(--accent);
  opacity: 0.5;
}

/* --- stats ---------------------------------------------------------------- */

.stat {
  background: var(--tint);
  border-radius: 14px;
  padding: 20px 22px;
}

.stat__value {
  font-size: clamp(28px, 2.5vw, 36px);
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.05;
}

.stat__value--accent {
  color: var(--accent);
}

.stat__caption {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14.5px;
}

/* --- project cards -------------------------------------------------------- */

.project {
  background: var(--tint);
  border-radius: 18px;
  overflow: hidden;
}

.project__body {
  padding: 24px 24px 20px;
}

.page-home .project .btn-row {
  gap: 9px;
}

.project__name {
  margin: 0 0 8px;
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 700;
  letter-spacing: -0.022em;
}

.project__tagline {
  margin: 0 0 14px;
  font-size: 17.5px;
}

.project__text {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 15.5px;
  max-width: 72ch;
}

.project__tech {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 14.5px;
}

/* A numbered tile head: the counter chip beside the title. */
.tile__row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.tile__row .tile__head {
  margin: 0;
}

.num-chip {
  flex-shrink: 0;
  padding: 3px 9px;
}

/* --- image bands ---------------------------------------------------------- */

.band {
  background: var(--soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.band--devices {
  aspect-ratio: 4 / 3;
  padding: 22px 22px 0;
}

/* A definite width so the box has a size before the lazy image loads: with
   width and height both auto an unloaded image is 0x0, never enters the
   viewport, and therefore never loads. object-fit keeps the picture in
   proportion once max-height clamps the box. */
.band--devices img {
  width: 100%;
  max-width: 820px;
  height: auto;
  max-height: 84%;
  object-fit: contain;
  transition: transform 0.4s var(--ease);
}

.band--phone {
  aspect-ratio: 5 / 4;
  gap: clamp(6px, 1.4%, 18px);
}

.band__phone {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  height: 58%;
}

.band__phone--main {
  height: 68%;
  margin-top: 8px;
}

.band__phone img {
  height: 100%;
  width: auto;
  transition: transform 0.4s var(--ease);
}

@media (min-width: 660px) {
  .band--devices {
    aspect-ratio: 16 / 9;
  }

  .band--devices img {
    max-height: 94%;
  }

  .band--phone {
    aspect-ratio: 16 / 9;
  }

  .band__phone {
    height: 84%;
  }

  .band__phone--main {
    height: 99%;
    margin-top: 14px;
  }
}

/* Full-bleed bands inside a card, used by the case studies. */
.band-flat {
  background: var(--soft);
  display: flex;
  justify-content: center;
  gap: clamp(16px, 2.4vw, 32px);
  padding: clamp(22px, 2.8vw, 38px) clamp(20px, 3vw, 44px);
}

.band-grid {
  background: var(--soft);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(12px, 1.6vw, 22px);
  padding: clamp(22px, 2.8vw, 38px) clamp(20px, 3vw, 44px) 0;
}

.band-grid--pair {
  align-items: center;
  gap: clamp(16px, 2.4vw, 30px);
  padding-bottom: clamp(22px, 2.8vw, 38px);
}

.band-grid--hero {
  align-items: end;
  gap: clamp(16px, 2.4vw, 32px);
}

@media (min-width: 660px) {
  .band-grid--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

@media (min-width: 940px) {
  .band-grid--pair {
    grid-template-columns: auto auto minmax(0, 1fr);
  }

  .band-grid--pair > .band__shot--phone {
    width: 240px;
  }
}

.band__caption {
  margin: 0;
  padding: 14px clamp(20px, 3vw, 44px) 20px;
  background: var(--soft);
  color: var(--muted);
  font-size: 13.5px;
  text-align: center;
}

.band__shot {
  justify-self: center;
  width: 100%;
}

/* Shots that land in an `auto` grid track need a definite width: a chain of
   percentage widths inside an intrinsically sized track collapses to zero. */
.band__shot--phone {
  max-width: 240px;
}

.band__shot img {
  width: 100%;
  height: auto;
  transition: transform 0.4s var(--ease);
}

.shot-radius img {
  border-radius: 8px;
  box-shadow: 0 18px 40px -18px rgba(20, 24, 26, 0.42);
}

/* --- zoom triggers -------------------------------------------------------- */

[data-zoom] {
  cursor: zoom-in;
}

[data-zoom]:focus-visible,
.rail-scroll:focus-visible {
  outline-offset: -3px;
}

[data-zoom]:hover img {
  transform: translateY(-4px);
}

.zoom-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(12, 14, 16, 0.96);
  cursor: zoom-out;
  opacity: 0;
  transition: opacity 0.18s;
}

.zoom-overlay.is-open {
  display: flex;
}

.zoom-overlay.is-visible {
  opacity: 1;
}

.zoom-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.14);
  /* The fill alone is about 1.5:1 against the backdrop, so the pill needs an
     edge to be visible as a control rather than as a floating glyph. */
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}

.zoom-close:hover {
  background: rgba(255, 255, 255, 0.26);
  color: #fff;
}

.zoom-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.zoom-overlay img {
  max-width: min(1400px, 100%);
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
}

/* --- device frames (Celisara case, section 07) ---------------------------- */

.framed {
  transition: transform 0.3s var(--ease);
}

.framed:hover {
  transform: translateY(-4px);
}

.framed:hover img {
  transform: none;
}

.macbook {
  align-self: end;
}

.macbook__lid {
  position: relative;
  padding: 3px;
  border-radius: 13px 13px 3px 3px;
  background: linear-gradient(158deg, #f2f3f4 0%, #c9ccd0 16%, #e4e6e8 44%, #b9bdc2 82%, #d6d9dc 100%);
  box-shadow: 0 20px 44px -24px rgba(20, 24, 26, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12);
}

.macbook__screen {
  position: relative;
  padding: 11px 9px 12px;
  border-radius: 11px 11px 2px 2px;
  background: #0b0c0e;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.macbook__notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 15%;
  height: 9px;
  border-radius: 0 0 6px 6px;
  background: #0b0c0e;
  z-index: 1;
}

.macbook__screen img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 3px;
  background: #fff;
  transition: transform 0.4s var(--ease);
}

.macbook__base {
  position: relative;
  width: 104%;
  margin: 0 -2%;
  height: 11px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(180deg, #bfc3c8 0%, #e8eaec 26%, #c4c8cd 62%, #9ba0a6 100%);
  box-shadow: 0 16px 26px -16px rgba(20, 24, 26, 0.5);
}

.macbook__thumb {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 16%;
  height: 6px;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(180deg, #9da2a8, #c6cace);
}

.macbook__lip {
  position: absolute;
  bottom: 0;
  left: 3%;
  right: 3%;
  height: 2px;
  border-radius: 0 0 3px 3px;
  background: rgba(20, 24, 26, 0.22);
}

.iphone {
  justify-self: center;
  width: 100%;
  max-width: 218px;
}

.iphone__body {
  position: relative;
  padding: 4px;
  border-radius: 38px;
  background: linear-gradient(152deg, #6e7378 0%, #2a2d31 22%, #46494e 52%, #1b1d21 78%, #55585d 100%);
  box-shadow: 0 22px 44px -22px rgba(20, 24, 26, 0.5), inset 0 0 0 0.5px rgba(255, 255, 255, 0.22);
}

.iphone__body img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 34px;
  background: #f5f3ee;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.55);
  transition: transform 0.4s var(--ease);
}

@media (min-width: 660px) {
  .iphone {
    width: 200px;
    max-width: 100%;
  }
}

/* --- case-study details --------------------------------------------------- */

.mono-label {
  margin-bottom: 5px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.mono-label--lg {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 500;
}

.defs {
  margin: 0;
  display: grid;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--tint);
}

.defs dd {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.contrast-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--tint);
  border-radius: 14px;
  overflow: hidden;
}

.contrast-list > div {
  display: grid;
  gap: 4px 20px;
  padding: 14px 18px;
  background: var(--card);
  font-size: 14.5px;
}

@media (min-width: 660px) {
  .contrast-list > div {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

.contrast-list b {
  font-weight: 600;
}

.filed {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 7px 14px;
  font-size: 14.5px;
}

.filed dt {
  color: var(--muted);
}

.filed dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 13.5px;
}

.rule-block {
  display: grid;
  gap: 18px 32px;
  padding: 24px 0;
  border-top: 1px solid var(--tint);
  border-bottom: 1px solid var(--tint);
}

.step__caption {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.5;
}

.step__label {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 5px;
}

.step__shot {
  background: var(--soft);
  border-radius: 16px;
  padding: 16px 16px 0;
  overflow: hidden;
  margin-bottom: 12px;
}

.step__shot img {
  width: 100%;
  height: auto;
  transition: transform 0.4s var(--ease);
}

/* --- DogPass screen rail -------------------------------------------------- */

.rail-scroll {
  display: flex;
  gap: clamp(14px, 1.6vw, 24px);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 6px var(--bleed-x, var(--card-pad)) 10px;
  scroll-padding-left: var(--bleed-x, var(--card-pad));
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.rail-scroll::-webkit-scrollbar {
  display: none;
}

.slide {
  margin: 0;
  flex-shrink: 0;
  scroll-snap-align: start;
  width: 196px;
}

.slide img {
  width: 100%;
  height: auto;
  border-radius: 26px;
  box-shadow: var(--shadow);
  transition: transform 0.35s var(--ease), box-shadow 0.35s;
}

.slide figcaption {
  margin-top: 12px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.rail-scroll [data-zoom]:hover img {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

.rail-arrows {
  margin-left: auto;
  display: none;
  gap: 8px;
}

.rail-arrows button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 100px;
  background: var(--tint);
  color: var(--ink);
  cursor: pointer;
  font-size: 16px;
  transition: background 0.2s, color 0.2s;
}

.rail-arrows button:hover {
  background: var(--soft);
  color: var(--accent);
}

.rail-arrows button[aria-disabled="true"] {
  opacity: 0.4;
  cursor: default;
}

.rail-arrows button[aria-disabled="true"]:hover {
  background: var(--tint);
  color: var(--ink);
}

.swipe-hint {
  margin: 6px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

@media (min-width: 660px) {
  .slide {
    width: 210px;
  }

  .rail-arrows {
    display: flex;
  }

  .swipe-hint {
    display: none;
  }
}

@media (min-width: 940px) {
  .slide {
    width: 232px;
  }
}

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

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  align-items: center;
  padding: 4px 8px 8px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer a:hover,
.site-footer button:hover {
  color: var(--accent);
}

.linkish {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

/* --- consent panel -------------------------------------------------------- */

.consent {
  display: none;
  position: fixed;
  right: var(--page-pad);
  bottom: var(--page-pad);
  z-index: 60;
  width: min(400px, calc(100vw - 2 * var(--page-pad)));
  background: var(--card);
  color: var(--ink);
  border-radius: 18px;
  box-shadow: 0 4px 10px rgba(20, 24, 26, 0.06), 0 26px 60px -18px rgba(20, 24, 26, 0.34);
  padding: 22px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.24s var(--ease), transform 0.24s var(--ease);
}

.consent.is-open {
  display: block;
}

.consent.is-visible {
  opacity: 1;
  transform: none;
}

.consent__head {
  margin: 0 0 8px;
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.012em;
}

.consent__text {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.55;
}

.consent__text a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  font-size: 14.5px;
  font-weight: 600;
}

.consent__actions .btn {
  flex: 1;
  min-width: 116px;
}

.page-home .consent__actions .btn {
  padding: 11px 16px;
  font-size: inherit;
}

.consent__state {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  display: none;
}

.consent__state.is-shown {
  display: block;
}

/* --- reveal on scroll ----------------------------------------------------- */

/* The .js class is set unconditionally in the head, so a site.js that never
   runs would leave the page blank. The failsafe reveals everything after the
   same 2.6s the script's own fallback uses, and .is-revealed cancels it. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  animation: reveal-failsafe 0s linear 2.6s forwards;
}

@keyframes reveal-failsafe {
  to {
    opacity: 1;
    transform: none;
  }
}

.js [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
  }

  [data-zoom]:hover img,
  .rail-scroll [data-zoom]:hover img,
  .framed:hover,
  .lift:hover {
    transform: none;
  }
}

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

.legal-shell {
  max-width: 820px;
  margin: 0 auto;
  padding: var(--page-pad);
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.legal-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.legal-bar .btn--back {
  padding: 9px 14px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 100px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 13.5px;
  font-weight: 600;
}

.lang-switch button {
  padding: 6px 13px;
  border: 0;
  border-radius: 100px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.lang-switch button:hover {
  color: var(--accent);
}

.lang-switch button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--on-accent);
}

.legal {
  line-height: 1.65;
}

.legal h1 {
  margin: 0 0 20px;
  font-size: clamp(28px, 3.2vw, 42px);
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.08;
}

.legal h2 {
  margin: 34px 0 10px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.014em;
}

.legal h2:first-of-type {
  margin-top: 0;
}

.legal p {
  margin: 0 0 14px;
  color: var(--muted);
  max-width: 68ch;
  text-wrap: pretty;
}

.legal a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

.legal__address {
  background: var(--tint);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 0 0 14px;
  line-height: 1.7;
}

.legal__notice {
  margin: 0 0 30px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--soft);
  color: var(--ink);
  font-size: 14px;
}

/* Without JavaScript neither rule matches, so both language blocks are shown
   and the binding German text is never unreachable. The head script picks one
   before first paint. */
[data-legal-lang="en"] [data-lang="de"],
[data-legal-lang="de"] [data-lang="en"] {
  display: none;
}

/* --- utilities ------------------------------------------------------------ */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 300;
  padding: 12px 18px;
  border-radius: 0 0 12px 0;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}

.skip-link:hover {
  color: var(--on-accent);
}

.skip-link:focus {
  left: 0;
}
