/* ============================================================
   Hana Mondekova — Portfolio
   Type + motion modeled on karolinahess.com:
   grotesque type, #fafafa canvas, snappy cubic-bezier hovers,
   soft scroll reveals, pill nav. Accent: butter yellow.
   ============================================================ */

/* Karolina's exact typeface — Neue Montreal (Pangram Pangram). */
@font-face {
  font-family: 'Neue Montreal';
  src: url('assets/fonts/NeueMontreal-Light.woff2') format('woff2');
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: 'Neue Montreal';
  src: url('assets/fonts/NeueMontreal-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Neue Montreal';
  src: url('assets/fonts/NeueMontreal-Medium.woff2') format('woff2');
  font-weight: 500 600;
  font-display: swap;
}
@font-face {
  font-family: 'Neue Montreal';
  src: url('assets/fonts/NeueMontreal-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #fafafa;
  --ink: #0f0f0f;
  --ink-60: rgba(15, 15, 15, 0.6);
  --ink-40: rgba(15, 15, 15, 0.4);
  --ink-12: rgba(15, 15, 15, 0.12);
  --accent: #ff4b3e;         /* coral red — site accent */
  --accent-soft: #ffe1dd;
  --coral: #ff4b3e;
  --card: #ffffff;
  --radius: 20px;
  --ease-snap: cubic-bezier(0.2, 0, 0, 1);      /* hover — from KH site */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);   /* reveals */
  --font: 'Neue Montreal', 'Switzer', 'Inter', -apple-system, 'Helvetica Neue', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 28px; }

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

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

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(8px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out), filter 0.9s var(--ease-out);
}
.reveal.in { opacity: 1; transform: translateY(0); filter: blur(0); }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; filter: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: 22px 0;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--ink-12);
}
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; }
.logo {
  font-weight: 600; font-size: 18px; letter-spacing: 0.06em;
}
.logo sup { font-size: 10px; }
.contact-pill {
  background: var(--coral); color: #fff;
  padding: 10px 22px; border-radius: 100px;
  font-size: 14px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform 0.18s var(--ease-snap), background 0.18s var(--ease-snap);
}
.contact-pill span { transition: transform 0.18s var(--ease-snap); }
.contact-pill:hover { transform: scale(1.04); background: #e5382c; }
.contact-pill:hover span { transform: translateX(3px); }

/* ---------- Bottom pill nav ---------- */
.bottom-nav {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 60;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid rgba(15, 15, 15, 0.08);
  border-radius: 100px;
  padding: 7px;
  display: flex; gap: 4px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.10);
}
.bottom-nav a {
  color: var(--ink-60);
  font-size: 13.5px; font-weight: 500; letter-spacing: 0.04em;
  padding: 9px 20px; border-radius: 100px;
  transition: color 0.18s var(--ease-snap), background 0.18s var(--ease-snap), transform 0.18s var(--ease-snap);
}
.bottom-nav a:hover { color: var(--ink); transform: scale(1.05); }
.bottom-nav a.active { background: var(--coral); color: #fff; }

/* ---------- Hero — Apple-style: centered, huge, calm ---------- */
/* Tall track; inner pin holds the viewport while the photo grows
   and a scribble draws itself behind it, then hands off smoothly. */
.hero { height: 200vh; }
.hero-pin {
  position: sticky; top: 0;
  height: 100svh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-start; align-items: center;
  text-align: center;
  padding: clamp(110px, 15vh, 170px) 24px 0;
}
.hero-inner {
  position: relative; z-index: 2;
  will-change: transform, opacity;
}
.hero-title {
  font-size: clamp(48px, 8vw, 112px);
  line-height: 1.04;
  font-weight: 400;                 /* Neue Montreal Regular */
  letter-spacing: -0.03em;
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: 0.18em; margin-bottom: -0.18em; }
.hero-title .line > span { display: inline-block; }
.hero-lede {
  margin: 30px auto 0;
  max-width: 480px;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.5;
  color: var(--ink-60);
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13.5px; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-60);
  margin-bottom: 30px;
}
.eyebrow .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.35; } }

/* Hero figure — cutout grows on scroll; hand-drawn scribble behind */
.hero-figure {
  position: absolute; bottom: 0; left: 0; right: 0;
  margin: 0 auto;
  width: fit-content;
  line-height: 0;
  pointer-events: none;
  will-change: transform;
  transform-origin: center bottom;
  z-index: 1;
}
.hero-figure img {
  position: relative; z-index: 1;
  width: auto;
  max-height: 43svh;               /* reaches up close to the lede */
  max-width: 84vw;
  filter: grayscale(1) contrast(1.05);
  mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
}
.scribble {
  position: absolute; z-index: 0;
  left: 50%; top: 48%;
  width: 230%;
  transform: translate(-50%, -50%) rotate(-3deg);
  stroke: var(--coral);
  stroke-width: 16;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}

/* Scroll cue */
.scroll-cue {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border-radius: 100px;
  border: 1.5px solid var(--ink-40);
}
.scroll-cue span {
  position: absolute; top: 8px; left: 50%; margin-left: -2px;
  width: 4px; height: 8px; border-radius: 4px;
  background: var(--ink-60);
  animation: cue 1.8s var(--ease-out) infinite;
}
@keyframes cue {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* Load-in: Apple-style rise + de-blur, staggered */
.rise {
  opacity: 0;
  transform: translateY(34px);
  filter: blur(10px);
  animation: riseIn 1s var(--ease-out) forwards;
}
.r0 { animation-delay: 0.05s; }
.r1 { animation-delay: 0.15s; }
.r2 { animation-delay: 0.27s; }
.r3 { animation-delay: 0.45s; }
.r4 { animation-delay: 0.58s; }
.r5 { animation-delay: 0.72s; }
@keyframes riseIn {
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@media (prefers-reduced-motion: reduce) {
  .rise { animation: none; opacity: 1; transform: none; filter: none; }
}

/* ---------- Marquee ---------- */
.marquee {
  border-top: 1px solid var(--ink-12);
  border-bottom: 1px solid var(--ink-12);
  overflow: hidden;
  padding: 18px 0;
  white-space: nowrap;
}
.marquee-track {
  display: inline-block;
  animation: marquee 28s linear infinite;
}
.marquee span {
  font-size: 15px; font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-60);
  padding: 0 28px;
}
.marquee span.sep { color: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ---------- Statement — Apple keynote scrub ---------- */
/* Pinned full-viewport statement; each word brightens as you scroll. */
.statement { background: var(--bg); }
.statement-track { height: 180vh; }
.statement-pin {
  position: sticky; top: 0;
  height: 100svh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center;
  padding: 0 24px;
}
.statement-kicker {
  font-size: 13.5px; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-60);
  margin-bottom: 34px;
}
.statement h2 {
  font-size: clamp(36px, 5vw, 76px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.14;
  max-width: 1040px;
}
.statement h2 em { font-style: normal; color: var(--coral); }
.statement h2 .w { opacity: 0.12; }
.statement-sub {
  margin: 40px auto 0;
  max-width: 560px;
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.5;
  color: var(--ink-60);
  opacity: 0;
}
.statement-cta {
  display: inline-flex; align-items: center; gap: 9px;
  margin-top: 40px;
  background: var(--coral); color: #fff;
  padding: 13px 28px; border-radius: 100px;
  font-size: 16px; font-weight: 500;
  opacity: 0;
  transition: transform 0.18s var(--ease-snap), background 0.18s var(--ease-snap);
}
.statement-cta:hover { transform: scale(1.05); background: #e5382c; }
.statement-cta span { transition: transform 0.18s var(--ease-snap); }
.statement-cta:hover span { transform: translateY(3px); }
.statement.static .statement-track { height: auto; }
.statement.static .statement-pin { position: static; height: auto; min-height: 0; padding: 100px 24px; }
.statement.static h2 .w, .statement.static .statement-sub, .statement.static .statement-cta { opacity: 1 !important; }

/* ---------- Sections ---------- */
.section { padding: 110px 0; }
.section-head { margin-bottom: 56px; }
.section-head h2 {
  font-size: clamp(38px, 6vw, 72px);
  font-weight: 500; letter-spacing: -0.02em; line-height: 1.02;
}
.section-head p { margin-top: 14px; color: var(--ink-60); max-width: 480px; }

/* ---------- Project panels — each product is its own colored world ---------- */
/* Panels pin at the top and each next one slides over the last (KH-style stack).
   JS adds a subtle scale/dim to the panel being covered. */
.project-strip { display: flex; flex-direction: column; gap: 16px; padding: 0 12px 16px; }
.project-panel {
  position: sticky;
  top: 12px;
  display: flex;
  align-items: center;
  min-height: calc(100svh - 24px);
  background: var(--p-bg);
  color: var(--p-ink);
  border-radius: 28px;
  padding: clamp(48px, 6vw, 80px) 0;
  overflow: hidden;
  transform-origin: center top;
  will-change: transform, filter;
}
.project-panel .wrap { width: 100%; }
.project-panel .panel-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 32px; flex-wrap: wrap;
}
.project-panel .kicker {
  font-size: 13px; font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; opacity: 0.65;
  display: block; margin-bottom: 14px;
}
.project-panel h3 {
  font-size: clamp(36px, 5.5vw, 72px);
  font-weight: 500; letter-spacing: -0.02em; line-height: 1;
}
.project-panel .panel-desc { max-width: 420px; font-size: 17px; opacity: 0.75; }
.panel-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.panel-tags span {
  font-size: 13px; font-weight: 500;
  padding: 8px 16px; border-radius: 100px;
  border: 1px solid currentColor;
  opacity: 0.85;
}
.panel-media {
  margin-top: 42px;
  display: flex;
  justify-content: flex-start;
}
.panel-media img,
.panel-media video {
  width: 100%;
  max-height: 46svh;
  object-fit: cover;
  border-radius: var(--radius);
  transition: transform 0.7s var(--ease-out);
}
a.project-panel:hover .panel-media img { transform: scale(1.03); }
.panel-cta {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 40px;
  font-weight: 500; font-size: 15px;
  padding: 12px 26px; border-radius: 100px;
  background: var(--p-accent); color: var(--p-cta-ink, #0f0f0f);
  transition: transform 0.18s var(--ease-snap);
}
a.project-panel:hover .panel-cta { transform: scale(1.05); }
.panel-cta.soon { background: transparent; border: 1px dashed currentColor; color: inherit; opacity: 0.7; }

/* Per-product worlds */
.panel-martrust { --p-bg: #0d3b3f; --p-ink: #f2f7f5; --p-accent: #c8f560; }
.panel-booking  { --p-bg: #003b95; --p-ink: #ffffff; --p-accent: #ffb700; }
.panel-muhdo    { --p-bg: #14304a; --p-ink: #ffffff; --p-accent: #ffffff; --p-cta-ink: #14304a; }
.panel-zalando  { --p-bg: #ff6900; --p-ink: #ffffff; --p-accent: #17120e; --p-cta-ink: #ffffff; }

/* ---------- Work grid ---------- */
.works-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px;
}
.work-card {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--ink-12);
  transition: transform 0.18s var(--ease-snap), box-shadow 0.3s ease-in-out;
}
.work-card:hover { transform: translateY(-4px); box-shadow: 0 24px 60px rgba(0,0,0,0.08); }
.card-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--accent-soft);
}
.card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s var(--ease-out);
}
.work-card:hover .card-media img { transform: scale(1.05); }
.card-meta {
  padding: 22px 24px 26px;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
}
.card-meta .kicker {
  font-size: 12.5px; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-40);
  display: block; margin-bottom: 6px;
}
.card-meta h3 { font-size: 24px; font-weight: 500; letter-spacing: -0.01em; }
.card-meta p { font-size: 15px; color: var(--ink-60); margin-top: 6px; max-width: 380px; }
.card-meta .arrow {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  border: 1px solid var(--ink-12);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  transition: transform 0.18s var(--ease-snap), background 0.18s var(--ease-snap), border-color 0.18s var(--ease-snap);
}
.work-card:hover .arrow { background: var(--accent); border-color: var(--accent); transform: rotate(45deg); }

.work-card.placeholder {
  border: 1px dashed var(--ink-12);
  background: transparent;
  min-height: 320px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-40); font-size: 15px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.work-card.placeholder:hover { transform: none; box-shadow: none; border-color: var(--accent); color: var(--ink-60); }

/* ---------- Beyond — Apple-style pinned scroll story ---------- */
/* Tall track; inner stage pins to the viewport; JS drives 3 scenes
   (title → featured project → full grid) from scroll progress. */
.beyond { background: #f5f5f7; }           /* Apple's section grey */
.beyond-track { height: 440vh; position: relative; }
.beyond-stage {
  position: sticky; top: 0;
  height: 100svh; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.scene {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 0 24px;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity, filter;
}
.scene.active { pointer-events: auto; }

/* Scene 1 — title */
.scene-kicker {
  font-size: 13.5px; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-60);
  margin-bottom: 24px;
}
.scene-title h2 {
  font-size: clamp(44px, 8vw, 110px);
  font-weight: 400; letter-spacing: -0.03em; line-height: 1.06;
  max-width: 14ch;
}
.scene-title em { font-style: normal; color: var(--coral); }
.scene-sub {
  margin-top: 30px; font-size: 15px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-40);
}

/* Scene 2+3 merged — the grid IS the featured scene: it starts scaled up,
   centered on the vibe-coded tile, and zooms out as you scroll (dilanomer). */
.beyond-grid { will-change: transform; }
.expand-caption {
  position: absolute;
  left: 0; right: 0;
  bottom: clamp(28px, 7vh, 72px);
  text-align: center;
  padding: 0 24px;
  pointer-events: none;
}
.expand-caption .kicker {
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--coral);
  display: block; margin-bottom: 10px;
}
.expand-caption h3 {
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 400; letter-spacing: -0.02em;
}
.expand-caption p {
  margin: 10px auto 0; max-width: 520px;
  font-size: 16px; color: var(--ink-60);
}
.beyond.static .expand-caption { display: none; }

/* Scene 3 — grid */
.grid-head h3 {
  font-size: clamp(30px, 4.6vw, 54px);
  font-weight: 400; letter-spacing: -0.025em;
  margin-bottom: 40px;
}
.beyond-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  width: min(1080px, 92vw);
}
.b-tile {
  border-radius: 20px;
  aspect-ratio: 4 / 3;
  position: relative; overflow: hidden;
  display: flex; align-items: flex-end;
  transition: transform 0.3s var(--ease-snap);
}
.b-tile:hover { transform: scale(1.03); }
.b-tile figcaption {
  width: 100%; padding: 90px 20px 18px; text-align: left;
  background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.45) 45%, rgba(0,0,0,0) 100%);
  color: #fff;
}
.b-tile figcaption strong { display: block; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; margin-bottom: 3px; }
.b-tile figcaption span { display: block; font-size: 13.5px; line-height: 1.3; opacity: 0.85; }
a.b-tile { text-decoration: none; color: inherit; }
.b-tile-arrow {
  position: absolute; top: 14px; right: 14px; z-index: 1;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 6px 18px rgba(255,75,62,0.45);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 17px; line-height: 1;
  transition: transform 0.22s var(--ease-snap), box-shadow 0.22s var(--ease-snap);
}
.b-tile:hover .b-tile-arrow { transform: translateY(-2px) scale(1.12); box-shadow: 0 10px 26px rgba(255,75,62,0.6); }

.ph { background: #e9e9ee; background-size: cover; background-position: center; }
.ph-app   { background-image: url('assets/beyond/app.jpg'); }
.ph-tee   { background-image: url('assets/beyond/tee.jpg'); }
.ph-dance { background-image: url('assets/beyond/dance.jpg'); }
.ph-teach { background-image: url('assets/beyond/teach.jpg'); }
.ph-work  { background-image: url('assets/beyond/work.png'); }
.ph-mum   { background-image: url('assets/beyond/mum.jpg'); }
.ph-note {
  position: absolute; inset: 14px;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px dashed rgba(255,255,255,0.65);
  border-radius: 16px;
  color: rgba(255,255,255,0.9);
  font-size: 14px; font-weight: 500; letter-spacing: 0.04em;
}

/* Static fallback — small screens & reduced motion get a normal section */
.beyond.static .beyond-track { height: auto; }
.beyond.static .beyond-stage {
  position: static; height: auto; overflow: visible;
  display: block; padding: 90px 0;
}
.beyond.static .scene {
  position: static; opacity: 1; pointer-events: auto;
  transform: none !important; filter: none !important;
  padding: 30px 24px;
}
.beyond.static .beyond-grid { grid-template-columns: 1fr 1fr; }
.beyond.static .scene-sub { display: none; }

/* Hero static fallback — no pinning on small screens / reduced motion */
@media (max-width: 860px), (prefers-reduced-motion: reduce) {
  .hero { height: auto; }
  .hero-pin { position: static; height: auto; min-height: 100svh; padding-bottom: 0; }
  .hero-figure { position: static; margin: 44px auto 0; }
}

@media (max-width: 700px) {
  .beyond.static .beyond-grid { grid-template-columns: 1fr; }
}

/* ---------- About ---------- */
.about-grid {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 60px;
  align-items: start;
}
.about-grid p { margin-bottom: 22px; font-size: 18px; }
.about-grid strong { font-weight: 600; }
.facts-card {
  background: var(--card);
  border: 1px solid var(--ink-12);
  border-radius: var(--radius);
  padding: 28px;
}
.facts-card + .facts-card { margin-top: 20px; }
.facts-card h4 {
  font-size: 13px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-40);
  margin-bottom: 18px;
}
.facts-card p { font-size: 15px; margin-bottom: 12px; }
.fact-row {
  display: flex; justify-content: space-between; gap: 20px;
  padding: 11px 0; border-bottom: 1px solid var(--ink-12);
  font-size: 15px;
}
.fact-row span:first-child { color: var(--ink-40); flex-shrink: 0; }
.fact-row span:last-child { text-align: right; font-weight: 500; }
.hooks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hooks span {
  font-size: 13px; font-weight: 500;
  padding: 7px 14px; border-radius: 100px;
  background: var(--accent-soft);
  transition: transform 0.18s var(--ease-snap), background 0.18s var(--ease-snap);
}
.hooks span:hover { transform: scale(1.06); background: var(--accent); }
.quote { font-style: italic; color: var(--ink-60); font-size: 15px; margin-bottom: 0 !important; }

/* ---------- Footer — quiet, huge, Apple-calm ---------- */
footer {
  padding: clamp(120px, 16vh, 190px) 0 48px;
  text-align: center;
  background: var(--bg);
  color: var(--ink);
}
.foot-kicker {
  font-size: 13.5px; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-60);
  margin-bottom: 28px;
}
footer h2 {
  font-size: clamp(44px, 7vw, 104px);
  font-weight: 400; letter-spacing: -0.03em; line-height: 1.06;
}
footer h2 em { font-style: normal; color: var(--coral); }

/* "trust." underlines itself as the footer scrolls into view */
footer h2 em.ul-trust { position: relative; display: inline-block; color: inherit; }
.trust-underline {
  position: absolute; left: -4%; bottom: -0.14em;
  width: 108%; height: 0.32em; overflow: visible; pointer-events: none;
}
.trust-underline path {
  fill: none; stroke: var(--coral); stroke-width: 4; stroke-linecap: round;
  stroke-dasharray: var(--tl, 220); stroke-dashoffset: var(--tl, 220);
  transition: stroke-dashoffset 0.7s var(--ease-out) 0.35s;
}
em.ul-trust.in .trust-underline path { stroke-dashoffset: 0; }
@media (prefers-reduced-motion: reduce) {
  .trust-underline path { transition: none; stroke-dashoffset: 0; }
}
footer .email {
  display: inline-block;
  margin-top: 44px;
  font-size: clamp(20px, 3vw, 32px);
  font-weight: 400;
  border-bottom: 2px solid var(--coral);
  transition: background 0.18s var(--ease-snap), transform 0.18s var(--ease-snap);
  padding: 2px 8px;
}
footer .email:hover { background: var(--accent); transform: scale(1.02); }
.foot-bar {
  margin-top: clamp(90px, 12vh, 150px);
  padding-top: 26px;
  border-top: 1px solid var(--ink-12);
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  font-size: 13.5px; color: var(--ink-40);
}
.foot-loc { display: inline-flex; align-items: center; gap: 8px; }
.foot-loc .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}
.to-top { color: var(--ink-60); font-weight: 500; transition: color 0.18s var(--ease-snap); }
.to-top:hover { color: var(--ink); }
@media (max-width: 700px) {
  .foot-bar { flex-direction: column; gap: 10px; }
}

/* ============================================================
   Case study — each project gets its own immersive world
   ============================================================ */
.project-world { color: var(--pw-ink, var(--ink)); background: var(--pw-bg, var(--bg)); }
.theme-martrust {
  --pw-bg: #0d3b3f;          /* deep maritime teal — MarTrust's world */
  --pw-ink: #f2f7f5;
  --pw-ink-60: rgba(242, 247, 245, 0.66);
  --pw-accent: #c8f560;      /* MarTrust lime — theirs, not the portfolio's */
  --pw-card: rgba(255, 255, 255, 0.05);
  --pw-line: rgba(242, 247, 245, 0.16);
}

.cs-hero { padding: 170px 0 70px; }
.cs-hero .eyebrow { color: var(--pw-accent); }
.cs-hero .eyebrow .dot { background: var(--pw-accent); animation: none; }
.cs-hero h1 {
  font-size: clamp(52px, 9vw, 120px);
  font-weight: 500; letter-spacing: -0.03em; line-height: 1;
}
.cs-hero .lead {
  margin-top: 24px; max-width: 620px;
  font-size: 20px; color: var(--pw-ink-60);
}
.cs-hero-media {
  margin-top: 56px; border-radius: var(--radius); overflow: hidden;
}
.facts-strip {
  margin-top: 40px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  border-top: 1px solid var(--pw-line);
  padding-top: 28px;
}
.facts-strip span {
  font-size: 12.5px; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--pw-ink-60);
}
.facts-strip p { margin-top: 6px; font-size: 15px; }

.cs-block { padding: 70px 0; border-top: 1px solid var(--pw-line); }
.cs-block h2 {
  font-size: clamp(30px, 4.4vw, 52px);
  font-weight: 500; letter-spacing: -0.02em;
  margin-bottom: 34px;
}
.cs-block .intro { font-size: 18px; max-width: 760px; margin-bottom: 20px; }
.disclaimer { font-size: 13.5px; color: var(--pw-ink-60); font-style: italic; }

.constraint-list, .outcome-list { list-style: none; max-width: 760px; }
.constraint-list li, .outcome-list li {
  padding: 16px 0 16px 34px; position: relative;
  border-bottom: 1px solid var(--pw-line);
  font-size: 17px;
}
.constraint-list li::before, .outcome-list li::before {
  content: '→'; position: absolute; left: 0; color: var(--pw-accent);
}

/* Two-column case study rows — text pins left, visuals scroll right (KH works) */
.cs-cols {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: start;
}
.cs-copy { position: sticky; top: 100px; }
.cs-copy h2 { margin-bottom: 28px; }
.cs-media-col .media-block { margin: 0 0 32px; }
.cs-media-col .media-block:first-child { margin-top: 6px; }

.process-item, .decision-item { max-width: 760px; margin-bottom: 36px; }
.process-item h3, .decision-item h3 {
  font-size: 22px; font-weight: 500; margin-bottom: 10px;
}
.process-item p, .decision-item p { color: var(--pw-ink-60); margin-bottom: 12px; }

.media-block { margin: 48px 0; }
.media-block img, .media-block video {
  border-radius: var(--radius); width: 100%;
}
.media-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.media-row img { height: 100%; object-fit: cover; }
.media-caption {
  margin-top: 14px; font-size: 14px; color: var(--pw-ink-60);
}

.note-card {
  background: var(--pw-card);
  border: 1px solid var(--pw-line);
  border-radius: var(--radius);
  padding: 28px; max-width: 760px; margin-top: 48px;
}
.note-card h4 {
  font-size: 13px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--pw-accent); margin-bottom: 12px;
}
.back-link {
  display: inline-block; margin-top: 56px;
  font-weight: 500;
  border-bottom: 2px solid var(--pw-accent);
  transition: transform 0.18s var(--ease-snap);
}
.back-link:hover { transform: translateX(-4px); }

/* case-study pages: top bar adapts to the dark world */
body.cs .topbar .logo { color: #f2f7f5; }
body.cs .topbar .contact-pill { background: var(--coral); color: #fff; }
body.cs .topbar .contact-pill:hover { background: #e5382c; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .works-grid, .about-grid, .media-row, .cs-cols { grid-template-columns: 1fr; }
  .cs-copy { position: static; }
  .facts-strip { grid-template-columns: 1fr 1fr; }
  .hero-figure { width: 220px; margin-top: 36px; }
  .project-panel { min-height: auto; position: relative; top: 0; }
  .section { padding: 80px 0; }
  body { font-size: 16px; }
  .bottom-nav { bottom: 16px; }
  .card-meta { flex-direction: column; }
  .card-meta .arrow { display: none; }
}

/* ============================================================
   CASE STUDY — LIGHT / EDITORIAL (v2)
   White canvas, artifact-led storytelling. Near-monochrome
   with a single deep-teal accent. Big framed screens, small-
   caps section labels, generous whitespace.
   ============================================================ */
body.cs-light { background: #ffffff; color: #101010; }

.cs-light .topbar {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--ink-12);
}
.cs-light .topbar .logo { color: #101010; }

.csx {
  --accent: #0d3b3f;         /* MarTrust teal — used only as an accent now */
  --lime: #b7e23f;
  --panel: #f4f4f0;          /* soft neutral behind screenshots */
  --line: rgba(16, 16, 16, 0.10);
  --muted: rgba(16, 16, 16, 0.56);
  --body-ink: #2b2b2b;
}
.csx-wrap { max-width: 1080px; margin: 0 auto; padding: 0 28px; }
.csx-wide { max-width: 1320px; margin: 0 auto; padding: 0 28px; }

/* ---- Section label (small caps eyebrow) ---- */
.csx-label {
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 22px;
}

/* ---- Hero ---- */
.csx-hero { padding: 150px 0 20px; }
.csx-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 30px;
}
.csx-eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); }
.csx-hero h1 {
  font-size: clamp(56px, 11vw, 150px);
  font-weight: 400; letter-spacing: -0.045em; line-height: 0.92;
}
.csx-hero .lead {
  margin-top: 30px; max-width: 700px;
  font-size: clamp(20px, 2.4vw, 27px); line-height: 1.4;
  color: var(--muted);
}

/* ---- Framed artifact ---- */
.csx-figure { margin: 80px auto 0; }
.csx-figure .frame {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(14px, 3vw, 44px);
  overflow: hidden;
}
.csx-figure img, .csx-figure video { width: 100%; border-radius: 8px; display: block; }
.csx-figure.bare .frame { padding: 0; background: transparent; border: none; }
.csx-figure.bare img, .csx-figure.bare video { border-radius: 16px; }
.csx-caption {
  margin-top: 16px; font-size: 14px; color: var(--muted);
  text-align: center; max-width: 780px; margin-left: auto; margin-right: auto;
}

/* ---- Meta strip ---- */
.csx-meta {
  margin-top: 84px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 28px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 34px 0;
}
.csx-meta .k {
  font-size: 12px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
  display: block; margin-bottom: 10px;
}
.csx-meta .v { font-size: 16px; font-weight: 500; line-height: 1.45; }

/* ---- Section ---- */
.csx-section { padding: clamp(72px, 9vw, 128px) 0; }
.csx-section h2 {
  font-size: clamp(30px, 4.6vw, 60px);
  font-weight: 500; letter-spacing: -0.03em; line-height: 1.04;
  max-width: 920px;
}
.csx-section .body { margin-top: 30px; max-width: 700px; }
.csx-section .body p { font-size: 18px; line-height: 1.68; color: var(--body-ink); margin-bottom: 22px; }
.csx-section .body p.disclaimer { font-size: 14px; font-style: italic; color: var(--muted); }

/* ---- List ---- */
.csx-list { list-style: none; max-width: 780px; margin-top: 20px; }
.csx-list li {
  position: relative; padding: 18px 0 18px 34px;
  border-top: 1px solid var(--line); font-size: 17px; line-height: 1.5;
}
.csx-list li:last-child { border-bottom: 1px solid var(--line); }
.csx-list li::before {
  content: ''; position: absolute; left: 2px; top: 25px;
  width: 9px; height: 9px; border-radius: 50%; background: var(--accent);
}

/* ---- Pull quote / core tension ---- */
.csx-quote {
  margin: 52px 0 0; max-width: 940px;
  padding-left: 30px; border-left: 3px solid var(--lime);
  font-size: clamp(24px, 3.4vw, 42px);
  font-weight: 500; line-height: 1.24; letter-spacing: -0.025em;
}
.csx-quote span { color: var(--muted); }

/* ---- Principle / process cards ---- */
.csx-cards { margin-top: 52px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.csx-card { border: 1px solid var(--line); border-radius: 18px; padding: 32px; }
.csx-cards.four { grid-template-columns: repeat(4, 1fr); gap: 16px; }
.csx-cards.four .csx-card { padding: 26px; }
.csx-card .n { font-size: 13px; font-weight: 600; color: var(--accent); margin-bottom: 18px; }
.csx-card h3 { font-size: 20px; font-weight: 500; letter-spacing: -0.01em; margin-bottom: 12px; }
.csx-card p { font-size: 15px; line-height: 1.6; color: var(--muted); }

/* ---- Duo media row ---- */
.csx-duo { margin-top: 56px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.csx-duo .frame {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 18px; overflow: hidden;
}
.csx-duo .frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.csx-duo.bare .frame { background: transparent; border: none; }

/* ---- Showcase block ---- */
.csx-show { padding-top: clamp(60px, 7vw, 96px); }
.csx-show .head { max-width: 740px; }
.csx-show h3 { font-size: clamp(24px, 3vw, 34px); font-weight: 500; letter-spacing: -0.02em; margin-bottom: 16px; }
.csx-show .head p { font-size: 18px; line-height: 1.6; color: var(--body-ink); }

/* ---- Outcomes ---- */
.csx-outcomes { max-width: 940px; margin-top: 44px; }
.csx-outcomes .row { display: flex; gap: 22px; padding: 26px 0; border-top: 1px solid var(--line); align-items: baseline; }
.csx-outcomes .row:last-child { border-bottom: 1px solid var(--line); }
.csx-outcomes .row .mark { color: var(--accent); font-size: 15px; font-weight: 700; flex-shrink: 0; letter-spacing: 0.06em; }
.csx-outcomes .row p { font-size: clamp(18px, 2vw, 23px); font-weight: 500; line-height: 1.36; letter-spacing: -0.015em; }
.csx-outcomes .row p strong { color: var(--accent); font-weight: 600; }

/* ---- Note card ---- */
.csx-note {
  margin-top: 60px; max-width: 860px;
  background: var(--accent); color: #eef5f2;
  border-radius: 24px; padding: 44px;
}
.csx-note h4 { font-size: 12.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--lime); margin-bottom: 16px; }
.csx-note p { font-size: 18px; line-height: 1.62; }

/* ---- Constraints with icons ---- */
.csx-constraints { list-style: none; max-width: 840px; margin-top: 26px; display: grid; gap: 14px; }
.csx-constraints li {
  display: flex; gap: 18px; align-items: center;
  padding: 18px 22px; border: 1px solid var(--line); border-radius: 16px;
  font-size: 17px; line-height: 1.45;
}
.csx-constraints .ico {
  flex-shrink: 0; width: 46px; height: 46px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  background: #e7f3c4; color: var(--accent);   /* lime tile, teal icon — case study palette */
}
.csx-constraints .ico svg { width: 23px; height: 23px; }

/* ---- Testimonial ---- */
.csx-testimonial {
  max-width: none; margin: 24px 0 0; text-align: center;
  padding: clamp(44px, 6vw, 80px) clamp(24px, 4vw, 56px);
  border: 1px solid var(--line); border-radius: 26px; background: var(--panel);
}
.csx-testimonial .avatar {
  width: 88px; height: 88px; border-radius: 50%;
  margin: 0 auto 22px; overflow: hidden; border: 1px solid var(--line);
}
.csx-testimonial .avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.csx-testimonial .name { font-size: 20px; font-weight: 600; }
.csx-testimonial .role { font-size: 14px; color: var(--muted); margin-top: 4px; }
.csx-testimonial blockquote {
  font-size: clamp(20px, 2.5vw, 28px); line-height: 1.4; letter-spacing: -0.02em;
  font-weight: 500; max-width: 780px; margin: 28px auto 0;
}
.csx-ttags { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 32px; }
.csx-ttags span { font-size: 13px; font-weight: 600; padding: 8px 16px; border-radius: 100px; background: rgba(13, 59, 63, 0.08); color: var(--accent); }
.csx-watch {
  display: inline-flex; align-items: center; gap: 9px; margin-top: 32px;
  padding: 12px 26px; border-radius: 100px; border: 1px solid var(--accent);
  color: var(--accent); font-weight: 500; font-size: 15px;
  transition: background 0.18s var(--ease-snap), color 0.18s var(--ease-snap);
}
.csx-watch:hover { background: var(--accent); color: #fff; }
.csx-watch svg { width: 16px; height: 16px; }
.csx-credit {
  margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line);
  font-size: 15px; color: var(--muted);
}
.csx-credit strong { color: #101010; font-weight: 600; }

/* ---- Apple motion: staggered children when a revealed group enters ---- */
.csx-cards.reveal > .csx-card,
.csx-constraints.reveal > li,
.csx-meta.reveal > div,
.csx-stats.reveal > div,
.csx-pillars.reveal > .csx-pillar,
.csx-outcomes.reveal > .row,
.csx-duo.reveal > .frame,
.csx-define.reveal > .col {
  opacity: 0;
  transform: translateY(26px);
  filter: blur(8px);
}
.csx-cards.reveal.in > .csx-card,
.csx-constraints.reveal.in > li,
.csx-meta.reveal.in > div,
.csx-stats.reveal.in > div,
.csx-pillars.reveal.in > .csx-pillar,
.csx-outcomes.reveal.in > .row,
.csx-duo.reveal.in > .frame,
.csx-define.reveal.in > .col {
  animation: riseIn 0.9s var(--ease-out) forwards;
}
.reveal.in > :nth-child(1) { animation-delay: 0.02s; }
.reveal.in > :nth-child(2) { animation-delay: 0.10s; }
.reveal.in > :nth-child(3) { animation-delay: 0.18s; }
.reveal.in > :nth-child(4) { animation-delay: 0.26s; }
.reveal.in > :nth-child(5) { animation-delay: 0.34s; }
.reveal.in > :nth-child(6) { animation-delay: 0.42s; }
.reveal.in > :nth-child(7) { animation-delay: 0.50s; }
.reveal.in > :nth-child(8) { animation-delay: 0.58s; }

/* Frames scale in as they cross the viewport (scroll-linked, set by JS) */
.csx-figure .frame { will-change: transform; }

/* Pull quotes: keynote word scrub */
.csx-quote .w { opacity: 0.15; }

@media (prefers-reduced-motion: reduce), (max-width: 860px) {
  .csx-cards.reveal > .csx-card,
  .csx-constraints.reveal > li,
  .csx-meta.reveal > div,
  .csx-stats.reveal > div,
  .csx-pillars.reveal > .csx-pillar,
  .csx-outcomes.reveal > .row,
  .csx-duo.reveal > .frame,
  .csx-define.reveal > .col { opacity: 1; transform: none; filter: none; animation: none; }
  .csx-quote .w { opacity: 1; }
}

/* ---- Back link ---- */
.csx-back {
  display: inline-block; margin-top: 60px; font-weight: 500;
  border-bottom: 2px solid var(--accent); padding-bottom: 2px;
  transition: transform 0.18s var(--ease-snap);
}
.csx-back:hover { transform: translateX(-4px); }

/* ---- Booking world: blue accent + light-blue highlight (no lime) ---- */
.csx.theme-booking { --accent: #003b95; --lime: #7ea9e0; }
.theme-booking .csx-constraints .ico { background: #e0eafb; color: var(--accent); }

/* ---- Muhdo world: indigo/violet accent + lavender highlight ---- */
.csx.theme-muhdo { --accent: #4b3fce; --lime: #a99df0; }
.theme-muhdo .csx-constraints .ico { background: #ece9fc; color: var(--accent); }
.theme-muhdo .csx-define .col.is { background: rgba(75, 63, 206, 0.05); border-color: rgba(75, 63, 206, 0.20); }

/* ---- Zalando world: near-black accent + Zalando-orange highlight ---- */
.csx.theme-zalando { --accent: #18181b; --lime: #ff6900; }
.theme-zalando .csx-label { color: #ff6900; }
.theme-zalando .csx-constraints .ico { background: #ffe4d1; color: #d15900; }

/* ---- Stat band ---- */
.csx-stats {
  margin-top: 8px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 40px 0;
}
.csx-stats .num { font-size: clamp(32px, 4vw, 52px); font-weight: 500; letter-spacing: -0.03em; line-height: 1; color: var(--accent); }
.csx-stats .lab { margin-top: 12px; font-size: 14px; color: var(--muted); line-height: 1.4; }

/* ---- Is / Isn't definition ---- */
.csx-define { margin-top: 44px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.csx-define .col { border: 1px solid var(--line); border-radius: 18px; padding: 30px 32px; }
.csx-define .col.is { background: rgba(0, 59, 149, 0.045); border-color: rgba(0, 59, 149, 0.18); }
.csx-define h4 { font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 14px; }
.csx-define .is h4 { color: var(--accent); }
.csx-define .isnt h4 { color: var(--muted); }
.csx-define ul { list-style: none; }
.csx-define li { position: relative; padding: 13px 0 13px 30px; font-size: 16px; line-height: 1.5; border-top: 1px solid var(--line); }
.csx-define li:first-child { border-top: none; }
.csx-define .is li::before { content: '✓'; position: absolute; left: 0; top: 13px; color: var(--accent); font-weight: 700; }
.csx-define .isnt li::before { content: '✕'; position: absolute; left: 2px; top: 13px; color: var(--muted); }

/* ---- Pillars (Promise / Intent / Trust) ---- */
.csx-pillars { margin-top: 52px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.csx-pillar { border: 1px solid var(--line); border-radius: 18px; padding: 32px; display: flex; flex-direction: column; }
.csx-pillar .ph { display: flex; align-items: center; gap: 12px; background: transparent; }
.csx-pillar .ph .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.csx-pillar h3 { font-size: 22px; font-weight: 500; letter-spacing: -0.01em; }
.csx-pillar .q { font-size: 15px; color: var(--muted); line-height: 1.55; margin-top: 14px; }
.csx-pillar .focus { margin-top: auto; padding-top: 22px; font-size: 12.5px; font-weight: 600; letter-spacing: 0.04em; color: var(--accent); }

@media (max-width: 860px) {
  .csx-meta { grid-template-columns: 1fr 1fr; gap: 26px; }
  .csx-cards { grid-template-columns: 1fr; }
  .csx-duo { grid-template-columns: 1fr; }
  .csx-hero { padding-top: 120px; }
  .csx-stats { grid-template-columns: 1fr 1fr; gap: 28px; }
  .csx-pillars { grid-template-columns: 1fr; }
}
