/* =========================================================================
   screenschatz.com — Tilo Erwin
   Light editorial theme. Off-white ground, ink text, ONE coral accent.
   Big type is the imagery. Mobile-first, fluid type via clamp().
   Rebuilt from Figma "TIlo_Upate" (node 17:87).
   ========================================================================= */

/* ---- Tokens ---- */
:root {
  --bg:         #fdfdfd;   /* page ground (off-white)          */
  --ink:        #33332d;   /* body text / logos                */
  --surface:    #f0efe8;   /* Cases card                       */
  --accent:     #ff5640;   /* coral — greeting, contact, dots  */
  --deepl-blue: #0f2b46;   /* language badge                   */
  --sc-muted:   #b6c2c4;   /* muted grey — foundations badge   */
  --line:       #000;      /* pill borders / hairlines         */
  --white:      #fff;

  --maxw: 1300px;
  --pad: clamp(1.25rem, 5vw, 4rem);
  --section-y: clamp(4.5rem, 11vw, 10rem);
  --gap: clamp(2.5rem, 6vw, 6rem);

  /* Fluid type — Figma desktop value is the clamp max */
  /* Greeting scales with viewport width AND height (svh ceiling keeps it
     filling the viewport without overflowing; JS sizes the reserve box to
     the tallest greeting so there's no wasted line and no reflow). */
  --fs-greeting:  clamp(3.5rem, min(18vw, 26svh), 18rem);
  --fs-contact:   clamp(2.75rem, 11vw, 150px);
  --fs-statement: clamp(1.5rem, 1rem + 2.2vw, 2.375rem);  /* 38px */
  --fs-lg:        clamp(1.25rem, 1rem + 1.2vw, 1.75rem);  /* 28px */
  --fs-sm:        clamp(1rem, .9rem + .35vw, 1.125rem);   /* 18px */
  --fs-pill:      clamp(1.05rem, 1rem + .7vw, 1.5rem);    /* 24px */

  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.23, 1, .32, 1);   /* strong ease-out — modal enter/exit */

  --rotate-ms: 3600ms;   /* greeting refresh cycle — drives the badge ring */
  --case-ms:   6000ms;   /* per-case display time — JS overrides from CASE_MS */
}

/* ---- Reset ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'ApfelGrotezk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-weight: 400;
  font-size: var(--fs-lg);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---- Layout utilities ---- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}
.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(3rem, 7vw, 6rem); }

/* Modest left indent on large screens, echoing the Figma composition */
.indent { padding-inline-start: clamp(0px, 6vw, 120px); }

/* =========================================================================
   Brand bar + floating nav
   ========================================================================= */
.brandbar {                  /* overlays the top so the hero fills the viewport;
                                scrolls away with the page (absolute, not fixed) */
  position: absolute;
  top: 16px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 40;
  pointer-events: none;
}
.brandbar__name {
  font-weight: 700;
  font-size: .8125rem;        /* 13px */
  letter-spacing: .12em;
  color: var(--accent);
  text-align: center;
}
.nav {                       /* fixed pill — stays at the top across the page */
  position: fixed;
  top: 38px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  width: fit-content;
  display: flex;
  gap: clamp(1.25rem, 3vw, 2.75rem);
  align-items: center;
  padding: clamp(.75rem, 1.5vw, 1.5rem) clamp(1.25rem, 3vw, 2.25rem);
  background: rgba(253, 253, 253, .62);
  backdrop-filter: blur(27px);
  -webkit-backdrop-filter: blur(27px);
  border-radius: 18px;
  box-shadow: none;          /* shadow appears once scrolling starts (.is-stuck) */
  transition: box-shadow .25s var(--ease), background .25s var(--ease);
}
/* On scroll: keep the frosted base, add an 8% black tint + shadow */
.nav.is-stuck {
  background: linear-gradient(rgba(0, 0, 0, .08), rgba(0, 0, 0, .08)), rgba(253, 253, 253, .62);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}
.nav a {
  font-size: clamp(1.05rem, 1rem + .7vw, 1.75rem);
  color: var(--ink);
  transition: color .25s var(--ease);
}
.nav a:hover { color: var(--accent); }

/* =========================================================================
   Hero — rotating greeting + portrait + language badge
   ========================================================================= */
.hero {
  position: relative;
  min-height: 100svh;               /* fixed viewport height — no jump on reload */
  display: grid;
  place-items: center;
  padding-block: clamp(2rem, 5vw, 4rem);
}
.hero__inner {
  position: relative;
  width: 100%;
  max-width: min(1500px, 92vw);     /* wide, so long greetings wrap less */
  margin-inline: auto;
}
/* Reserve room so changing language never reflows. JS refines min-height to
   the exact tallest greeting; this 3-line value is the pre-JS default. */
.hero__greeting-box {
  font-size: var(--fs-greeting);
  min-height: calc(1em * .9 * 3);
  display: grid;
  place-items: center;
}
.hero__greeting {
  font-size: 1em;
  /* Latin uses ApfelGrotezk; Hangul falls through to Noto Sans KR (700) */
  font-family: 'ApfelGrotezk', 'Noto Sans KR', sans-serif;
  font-weight: 700;                 /* Fett */
  line-height: .9;
  color: var(--accent);
  text-align: center;
  text-wrap: balance;
  word-break: break-word;
}

/* Per-character typographic reveal, replayed on every greeting change.
   Default state is visible; the animation reveals FROM hidden (fill: both),
   so text can never get stuck invisible if the animation doesn't run. */
.hero__greeting .word { display: inline-block; }
.hero__greeting .ch {
  display: inline-block;
  animation: typoIn .55s var(--ease) both;
  animation-delay: calc(var(--i) * 32ms);
}
@keyframes typoIn {
  from { opacity: 0; transform: translateY(.5em); filter: blur(8px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}

/* Portrait overlaps the greeting on large screens */
.hero__portrait {
  width: clamp(120px, 18vw, 223px);
  height: auto;                 /* override the width/height attrs so… */
  aspect-ratio: 1;              /* …aspect-ratio keeps it a circle at any width */
  border-radius: 50%;
  object-fit: cover;
  margin: clamp(1.5rem, 3vw, 2rem) auto 0;
}
.hero__badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: fit-content;       /* hug the widest child (icon or label) */
  margin: 14px auto 0;
}
.hero__badge-icon { position: relative; display: block; width: 56px; height: 56px; }
.hero__badge-base { width: 100%; height: 100%; }
.hero__badge--mobile { display: none; }   /* shown on mobile only (see media query) */
/* Progress ring — fills clockwise from the top over one refresh cycle */
.hero__badge-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  overflow: visible;
}
.hero__badge-ring__progress {
  fill: none;
  stroke: var(--white);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 213.63;          /* 2πr, r = 34 */
  stroke-dashoffset: 213.63;
  animation: ringFill var(--rotate-ms) var(--ease) forwards;  /* eased finish, not static */
}
@keyframes ringFill { to { stroke-dashoffset: 0; } }
.hero__badge-label {
  width: max-content;        /* pill width follows the language name */
  white-space: nowrap;
  display: flex;
  justify-content: center;
  padding: 5px 10px 6px;
  background: var(--deepl-blue);
  border-radius: 4px;
  color: var(--white);
  font-weight: 600;
  font-size: .8125rem;
  letter-spacing: .04em;
  line-height: 1;
  text-transform: uppercase;
}

@media (min-width: 900px) {
  /* Pull portrait + badge up to overlap the greeting, as in Figma.
     This right/bottom placement is the pre-JS / no-JS fallback. */
  .hero__media {
    position: absolute;
    right: clamp(2rem, 10vw, 8rem);
    bottom: -2.5rem;
    margin: 0;
    z-index: 2;
  }
  /* JS anchors the portrait just after the greeting's last word and glides it */
  .hero__media.is-anchored {
    left: var(--media-x);
    top: var(--media-y);
    right: auto;
    bottom: auto;
    transform: translateY(-50%);
    transition: left .6s var(--ease), top .6s var(--ease);
  }
  .hero__portrait { margin: 0; }
}

/* Mobile hero (Figma node 35:805): big text-filling headline (JS fit-to-width),
   then language badge, then a larger portrait — all stacked & centred. */
@media (max-width: 899px) {
  .hero__inner { max-width: 94vw; padding-inline: 0; }   /* near-full width for the headline */
  .hero__greeting-box { width: 100%; }
  .hero__badge--mobile {
    display: flex;
    margin: clamp(1.25rem, 5vw, 2rem) auto 0;
  }
  .hero__portrait {
    width: min(52vw, 189px);
    margin: clamp(1.5rem, 6vw, 2.5rem) auto 0;
  }
}

/* =========================================================================
   Hero custom cursor — blue dot (friction-follow) that rests into a badge.
   Desktop / fine-pointer only; JS toggles .is-cursor-custom + .is-active.
   ========================================================================= */
.hero.is-cursor-custom { cursor: none; }      /* hide native cursor while active */

.hero-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-100px, -100px, 0);  /* parked off-screen until active */
  will-change: transform;
}
.hero-cursor.is-active { opacity: 1; }

/* Both states centre on the cursor point */
.hero-cursor__dot,
.hero-cursor__badge {
  position: absolute;
  top: 0;
  left: 0;
}
.hero-cursor__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--deepl-blue);              /* the blue dot */
  /* --dot-scale is driven per-frame by JS (grows as it nears the target) */
  transform: translate(-50%, -50%) scale(var(--dot-scale, 1));
  transition: opacity .2s var(--ease);
}
.hero-cursor__badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.3);
  transform-origin: center;
  transition: opacity .25s var(--ease), transform .35s var(--ease);
}
.hero-cursor__icon { position: relative; display: block; width: 56px; height: 56px; }
.hero-cursor__icon img { width: 100%; height: 100%; }

/* Resting: dot fades, badge scales up (matches .hero__badge-icon size) */
.hero-cursor.is-resting .hero-cursor__dot {
  opacity: 0;
}
.hero-cursor.is-resting .hero-cursor__badge {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* =========================================================================
   Statement blocks (About, How I work)
   ========================================================================= */
.statement {
  font-size: var(--fs-statement);
  line-height: 1.2;
  max-width: 35ch;
}
.statement--wide { max-width: 38ch; }

.about-row {
  margin-top: clamp(2.5rem, 5vw, 3.75rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1rem, 2vw, 2rem);
  font-size: var(--fs-lg);
}
.about-row__label { font-weight: 500; }   /* Mittel */
.about-row__body { line-height: 1.4; }

@media (min-width: 760px) {
  .about-row { grid-template-columns: 280px minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); }
}

/* How-I-work header: 4/FOUNDATIONS badge + statement */
.how__head {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 50px);
}
.foundations-badge {
  flex: 0 0 auto;
  width: clamp(120px, 16vw, 192px);
  display: flex;
  flex-direction: column;
  will-change: transform, opacity;   /* scroll-scrubbed entrance (set by JS) */
}
.foundations-badge__num {
  font-weight: 600;                  /* Satt */
  font-size: clamp(5rem, 12vw, 178px);
  line-height: .9;
  color: var(--sc-muted);
  text-align: center;
}
.foundations-badge__label {
  background: var(--sc-muted);
  color: var(--bg);
  font-weight: 600;                  /* Satt */
  font-size: 1.125rem;               /* 18px */
  line-height: .95;
  letter-spacing: .9px;
  text-transform: uppercase;
  text-align: center;
  padding: 6px 0;
}
@media (max-width: 759px) {
  .how__head { flex-direction: column; align-items: flex-start; }
  .how.indent { padding-inline-start: 0; }   /* drop the left indent so the badge centres on screen */
  /* Bigger (≈2×), centred on screen, and no scroll animation on mobile */
  .foundations-badge {
    width: clamp(180px, 55vw, 260px);
    align-self: center;
    transform: none !important;
    opacity: 1 !important;
    margin-bottom: 32px;
  }
  .foundations-badge__num { font-size: clamp(7.5rem, 44vw, 220px); }
  .foundations-badge__label { font-size: 1.0625rem; letter-spacing: .8px; }
}
@media (prefers-reduced-motion: reduce) {
  .foundations-badge { transform: none !important; opacity: 1 !important; }
}

/* Foundations 2×2 grid */
.foundations {
  margin-top: clamp(2.5rem, 5vw, 3.75rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3rem) clamp(2rem, 4vw, 3rem);
  font-size: var(--fs-lg);
}
@media (min-width: 760px) {
  .foundations { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.foundation__name { font-weight: 500; margin-bottom: clamp(1rem, 1.75vw, 1.75rem); }
.foundation__desc { line-height: 1.4; }

/* =========================================================================
   Experience list
   ========================================================================= */
.experience { display: flex; flex-direction: column; align-items: center; gap: clamp(3rem, 6vw, 6rem); }
.exp-list { width: 100%; display: flex; flex-direction: column; gap: clamp(2.5rem, 5vw, 5rem); }

.exp-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem 2rem;
  align-items: center;
}
/* Figma SVGs use preserveAspectRatio="none" with no intrinsic size,
   so width + height must be set explicitly to match each viewBox ratio. */
.exp-logo { display: flex; align-items: center; min-height: 28px; }
.exp-logo--deepl { gap: 6px; }
.exp-logo--deepl .exp-logo__mark { width: 22px;  height: 28px; }  /* vb 21.84×28   */
.exp-logo--deepl .exp-logo__word { width: 50px;  height: 14px; }  /* vb 50.69×14.17 */
.exp-logo--tby img        { width: 162px; height: 16px; }         /* vb 162×16     */
.exp-logo--metadesign img { width: 124px; height: 23px; }         /* vb 122.28×22.69 */
/* The Accenture PNG is pre-stretched tall; a wide-short box restores its
   true proportions (matches the Figma 167×21 display box). */
.exp-logo--accenture img  { width: 168px; height: 22px; max-width: none; }

.exp-desc { font-size: var(--fs-lg); line-height: 1.15; }
.exp-meta { font-size: var(--fs-sm); line-height: 1.4; color: var(--ink); }
.exp-meta b { font-weight: 500; }

@media (min-width: 820px) {
  .exp-row {
    grid-template-columns: 181px minmax(0, 1.3fr) 240px;
    gap: 8px clamp(1.5rem, 3vw, 3.25rem);
  }
}

/* =========================================================================
   Pill button
   ========================================================================= */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px 16px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-pill);
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: background .25s var(--ease), color .25s var(--ease), transform .2s var(--ease);
}
.pill:hover { background: var(--ink); color: var(--bg); transform: translateY(-2px); }

/* =========================================================================
   Cases card
   ========================================================================= */
/* Wide, viewport-driven container so the Cases card reads big and impressive */
.cases-wrap {
  width: 100%;
  max-width: min(1800px, 94vw);
  margin-inline: auto;
  padding-inline: clamp(1rem, 3vw, 2rem);
}
.cases {
  background: var(--surface);
  border-radius: clamp(20px, 2vw, 32px);
  padding: clamp(2.5rem, 4vw, 4.5rem) clamp(1.5rem, 4vw, 5rem) clamp(3rem, 5vw, 5.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(2.5rem, 4vw, 4rem);
}
.cases__title {
  font-size: clamp(2.75rem, 5vw + 1rem, 6rem);
  font-weight: 400;            /* ApfelGrotezk Regular */
  line-height: .95;
  text-align: center;
}

.case-tabs {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem) clamp(1rem, 3vw, 3.25rem);
}
@media (min-width: 760px) { .case-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.case-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
  background: none;
  border: 0;
  font: inherit;
  font-size: var(--fs-sm);
  color: var(--ink);
  text-align: center;
  cursor: pointer;
  padding: 0;
}
.case-tab__title { min-height: 2.8em; }

/* Underline doubles as a timeline. Track = faint ink; on the active tab the
   track is body-text (ink) and a red fill sweeps across over --case-ms. */
.case-tab__line {
  position: relative;
  width: 100%;
  height: 3px;
  border-radius: 3px;
  overflow: hidden;
  background: color-mix(in srgb, var(--ink) 18%, transparent);
  transition: background .25s var(--ease);
}
.case-tab__fill {
  position: absolute;
  inset: 0;
  transform-origin: left center;
  transform: scaleX(0);
  background: var(--accent);          /* the moving timeline */
}
.case-tab[aria-selected="true"] { font-weight: 500; }
.case-tab[aria-selected="true"] .case-tab__line { background: var(--ink); }
.case-tab[aria-selected="true"] .case-tab__fill {
  animation: caseFill var(--case-ms) var(--ease) forwards;  /* match the ring's eased finish */
}
@keyframes caseFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* User tapped a tab → auto-play stops; freeze the active bar as a full red mark */
.cases.is-stopped .case-tab[aria-selected="true"] .case-tab__fill {
  animation: none;
  transform: scaleX(1);
}
.case-tab:hover .case-tab__line { background: var(--ink); }

.case-show {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 2rem);
}
.case-show__media {
  width: 100%;
  aspect-ratio: 1145 / 613;
  border-radius: 22px;
  overflow: hidden;
  background: #d9d8cf;
}
.case-show__media img,
.case-show__media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.case-show__media [hidden] { display: none; }
.case-show__desc {
  max-width: 700px;
  font-size: var(--fs-sm);
  line-height: 1.5;
}
/* Gentle fade each time the case image / description is swapped (JS restarts it) */
.case-show__media img, .case-show__media video, .case-show__desc { animation: caseFade .4s var(--ease) both; }
@keyframes caseFade { from { opacity: 0; } to { opacity: 1; } }

/* ---- Case image → opens the modal ---- */
.case-show__link {
  display: block;
  width: 100%;
  border-radius: 22px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .2s var(--ease-out);
}
.case-show__link:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}
.case-show__link:active { transform: scale(.99); }   /* subtle "press" feedback */
.case-show__media { position: relative; }            /* anchor the hint overlay */
.case-show__media img { transition: transform .5s var(--ease-out); }

/* Locked case: no detail view available, so the link no longer invites a click */
.case-show__link.is-locked { cursor: not-allowed; }
.case-show__link.is-locked:active { transform: none; }

/* "View case" hint — only on real hover-capable pointers (no false-positive on touch) */
.case-show__hint {
  position: absolute;
  bottom: 16px; right: 16px;
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .75em 1.4em;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  color: var(--white);
  font-size: var(--fs-sm);
  line-height: 1;
  opacity: 0;
  transform: translateY(6px) scale(.96);
  transition: opacity .2s var(--ease-out), transform .2s var(--ease-out);
  pointer-events: none;
}
.case-show__lock { flex: none; }
@media (hover: hover) and (pointer: fine) {
  .case-show__link:hover .case-show__media img { transform: scale(1.03); }
  .case-show__link:hover .case-show__hint { opacity: 1; transform: translateY(0) scale(1); }
}

/* =========================================================================
   Case modal (layer)
   Centered dialog: transform-origin stays center (modals are exempt from the
   origin-aware popover rule). Enters from scale(.95)+opacity — never scale(0).
   Only transform/opacity animate (GPU). Exit is faster than enter.
   ========================================================================= */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  --modal-accent: var(--accent);   /* JS overrides from the case link's href */
}
.modal[hidden] { display: none; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--ink) 58%, transparent);
  opacity: 0;
  transition: opacity .26s var(--ease-out);
}

/* Full-bleed panel — also the scroll container for long content */
.modal__panel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: var(--bg);
  /* enter state */
  opacity: 0;
  transform: scale(.95);
  transform-origin: center;
  transition: opacity .26s var(--ease-out), transform .26s var(--ease-out);
}

/* Readable measure, centered; the panel scrolls when this overflows */
.modal__inner {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(3.5rem, 7vw, 6rem) var(--pad) clamp(3rem, 8vw, 7rem);
}

/* Accent stripe — tinted by the editable href color */
.modal__bar {
  display: block;
  height: 4px;
  width: 56px;
  border-radius: 999px;
  background: var(--modal-accent);
  margin-bottom: clamp(1.25rem, 2.5vw, 1.75rem);
}

.modal.is-open .modal__backdrop { opacity: 1; }
.modal.is-open .modal__panel { opacity: 1; transform: scale(1); }
/* Exit: snappier than the entrance */
.modal.is-closing .modal__backdrop,
.modal.is-closing .modal__panel { transition-duration: .18s; }

.modal__media {
  width: 100%;
  aspect-ratio: 1145 / 613;
  border-radius: 14px;
  overflow: hidden;
  background: #d9d8cf;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}
.modal__media img { width: 100%; height: 100%; object-fit: cover; }

.modal__title {
  font-size: var(--fs-statement);
  font-weight: 500;
  line-height: 1.1;
  margin-bottom: .5em;
}
.modal__desc {
  max-width: 700px;
  font-size: var(--fs-lg);
  line-height: 1.5;
}

/* Per-case sections — the longer, scrollable body */
.modal__sections {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  gap: clamp(1.75rem, 3.5vw, 2.75rem);
}
.modal-section {
  max-width: 700px;
  padding-top: clamp(1.5rem, 3vw, 2.25rem);
  border-top: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
}
.modal-section__heading {
  font-size: var(--fs-sm);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--modal-accent);   /* tinted by the editable href color */
  margin-bottom: .65em;
}
.modal-section__body {
  font-size: var(--fs-lg);
  line-height: 1.5;
}

/* Sticky to the viewport so it stays reachable while the panel scrolls */
.modal__close {
  position: fixed;
  top: clamp(1rem, 2vw, 1.5rem);
  right: clamp(1rem, 2vw, 1.5rem);
  z-index: 1;
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: background .2s var(--ease-out), transform .16s var(--ease-out);
}
.modal__close:hover { background: color-mix(in srgb, var(--modal-accent) 18%, var(--surface)); }
.modal__close:active { transform: scale(.94); }   /* press feedback */
.modal__close:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Reduced motion: keep the opacity fade, drop the scale/movement */
@media (prefers-reduced-motion: reduce) {
  .modal__panel { transform: none; }
  .modal.is-open .modal__panel { transform: none; }
  .case-show__media img { transition: none; }
}

/* =========================================================================
   Contact
   ========================================================================= */
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3rem);
  align-items: center;
}
@media (min-width: 900px) {
  .contact__grid { grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(2rem, 4vw, 2.4rem); }
}
.contact__lead { display: flex; flex-direction: column; align-items: flex-start; gap: clamp(1.75rem, 3vw, 2.7rem); }
@media (min-width: 900px) { .contact__lead { align-items: flex-end; } }

.contact__headline {
  font-weight: 600;                 /* Satt */
  font-size: var(--fs-contact);
  line-height: .85;
  color: var(--accent);
}
@media (min-width: 900px) { .contact__headline { text-align: right; } }

.contact__actions { display: flex; gap: clamp(1rem, 2vw, 1.6rem); flex-wrap: wrap; }
.contact__text { font-size: var(--fs-lg); line-height: 1.2; }

/* =========================================================================
   Footer
   ========================================================================= */
.footer {
  border-top: 1px solid color-mix(in srgb, var(--ink) 15%, transparent);
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  padding-block: clamp(1.5rem, 3vw, 2.5rem);
  font-size: var(--fs-sm);
  color: color-mix(in srgb, var(--ink) 70%, transparent);
}
.footer__inner a:hover { color: var(--accent); }

/* =========================================================================
   Motion — scroll reveals (strictly rationed)
   ========================================================================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
