:root {
  --bg: #f5f5f3;
  --ink: #111111;
  --ink-2: #55554f;
  --muted: #b4b4ae;
  --line: #e4e4df;
  --card-shadow: 0 30px 60px -28px rgba(20, 20, 30, .45), 0 8px 18px -10px rgba(20, 20, 30, .25);
  --orange: #ff6a1a;
  --blue: #2340ff;
  --lime: #d9f24a;
  --pink: #ff3d8b;
  --green: #12a05c;
  --yellow: #ffc21a;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --font: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 99px; z-index: 50; }
.skip-link:focus { left: 16px; }

/* ---------- NAV ---------- */
.nav {
  position: relative; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1280px; margin: 0 auto; padding: 22px 32px;
}
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 19px; letter-spacing: -.03em; }
.brand-mark {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px;
  background: var(--ink); color: #fff; font-size: 14px;
}
.nav nav { display: flex; gap: 30px; font-size: 13.5px; font-weight: 500; color: var(--ink); }
.nav nav { gap: 6px; }
.nav nav a {
  position: relative; display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 99px; opacity: .82;
  transition: opacity .25s, background .35s var(--ease), box-shadow .35s var(--ease), transform .35s var(--ease);
}
.nav nav a::before { /* dot slides in on hover */
  content: ""; width: 0; height: 6px; border-radius: 50%; background: var(--ink); margin-right: -7px;
  transition: width .35s var(--ease), margin .35s var(--ease);
}
.nav nav a:hover, .nav nav a:focus-visible {
  opacity: 1; background: #fff; transform: translateY(-1px);
  box-shadow: 0 8px 18px -12px rgba(0, 0, 0, .35), 0 0 0 1px rgba(0, 0, 0, .04);
}
.nav nav a:hover::before, .nav nav a:focus-visible::before { width: 6px; margin-right: 0; }
.nav nav a:has(.dot)::before { display: none; }
.nav nav .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); }

/* ---------- PILLS ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 9px;
  height: 46px; padding: 0 22px; border-radius: 999px;
  font-size: 14.5px; font-weight: 500; letter-spacing: -.01em;
  transition: transform .35s var(--ease), background .25s, box-shadow .35s var(--ease);
}
.pill-sm { height: 38px; padding: 0 17px; font-size: 13.5px; }
.pill-dark { background: var(--ink); color: #fff; box-shadow: 0 10px 22px -12px rgba(0,0,0,.6); }
.pill-dark:hover { transform: translateY(-2px); box-shadow: 0 16px 28px -14px rgba(0,0,0,.7); }
.pill-dark span { transition: transform .35s var(--ease); }
.pill-dark:hover span { transform: translate(2px, -2px); }
.pill-ghost { background: #fff; border: 1px solid var(--line); }
.pill-ghost:hover { transform: translateY(-2px); border-color: #cfcfc8; }
.play {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--ink); color: #fff; font-size: 8px; padding-left: 2px;
}

/* ---------- HERO ---------- */
.hero {
  max-width: 1280px; margin: 0 auto;
  padding: clamp(14px, 3vh, 44px) 24px 72px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.eyebrow {
  margin: 0 0 18px; font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--ink);
}
.eyebrow b { color: inherit; font-weight: 600; }

.headline {
  margin: 0; font-weight: 500;
  font-size: clamp(40px, 5.8vw, 80px);
  line-height: .98; letter-spacing: -.055em;
}
.headline .line { display: block; }
.headline .muted { color: var(--muted); }
.headline em { font-style: normal; color: var(--ink); }

/* word blur-in (mirrors the reference's soft text reveal) */
.w {
  display: inline-block; white-space: pre;
  opacity: 0; filter: blur(14px); transform: translateY(.18em);
}
.in .w {
  animation: wordIn 1s var(--ease) forwards;
  animation-delay: calc(var(--i) * 70ms + 120ms);
}
@keyframes wordIn { to { opacity: 1; filter: blur(0); transform: none; } }

.reveal { opacity: 0; filter: blur(10px); transform: translateY(10px); }
.in .reveal, .reveal.in {
  animation: wordIn .9s var(--ease) forwards;
  animation-delay: calc(var(--d, 0) * 90ms);
}

.lede {
  max-width: 470px; margin: 0 0 22px;
  font-size: 15.5px; line-height: 1.5; color: var(--ink-2); letter-spacing: -.005em;
}
.actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.footnote { margin: 22px 0 0; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* ---------- DECK ---------- */
.deck-wrap {
  width: 100%; perspective: 1600px;
  margin: clamp(66px, 9vh, 86px) 0 clamp(14px, 2vh, 26px);
}
.deck {
  position: relative; height: 340px; margin: 0 auto; max-width: 1120px;
  transform-style: preserve-3d;
  transform: rotateX(var(--tx, 8deg)) rotateY(var(--ty, 0deg));
  transition: transform .9s var(--ease);
}

.card {
  --w: 212px;
  position: absolute; left: 50%; top: 18px;
  width: var(--w); aspect-ratio: 4 / 5; margin-left: calc(var(--w) / -2);
  border-radius: 18px; overflow: hidden;
  background: var(--c);
  box-shadow: var(--card-shadow);
  transform: translate3d(0, 40px, -80px) rotate(0deg) scale(.86);
  opacity: 0;
  transition: transform .9s var(--ease), opacity .6s var(--ease), box-shadow .5s var(--ease);
  cursor: pointer; outline: none;
}
.deck.is-in .card {
  opacity: 1;
  transform: translate3d(var(--x), var(--y), 0) rotate(var(--r));
  transition-delay: calc(var(--k) * 70ms);
}
.deck.is-in.settled .card { transition-delay: 0ms; }
.deck.is-in .card.active,
.deck.is-in .card:hover,
.deck.is-in .card:focus-visible {
  transform: translate3d(var(--x), calc(var(--y) - 22px), 60px) rotate(calc(var(--r) * .4)) scale(1.1);
  box-shadow: 0 44px 70px -30px rgba(20, 20, 30, .55), 0 10px 22px -10px rgba(20, 20, 30, .3);
}
.card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card::after { /* legibility gradient */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.22) 0%, rgba(0,0,0,0) 26%, rgba(0,0,0,0) 52%, rgba(0,0,0,.5) 100%);
}

.card-top {
  position: absolute; z-index: 2; top: 11px; left: 11px; right: 11px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 9.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #fff; text-align: left;
}
.card-time { padding: 4px 8px; border-radius: 99px; background: rgba(0,0,0,.28); backdrop-filter: blur(8px); letter-spacing: .04em; }

.card-play {
  position: absolute; z-index: 2; left: 50%; top: 46%;
  width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.9); color: var(--ink); font-size: 12px; padding-left: 3px;
  transform: scale(.6); opacity: 0;
  transition: transform .5s var(--ease), opacity .4s;
}
.card.active .card-play, .card:hover .card-play { transform: scale(1); opacity: 1; }

.card-foot {
  position: absolute; z-index: 2; left: 9px; right: 9px; bottom: 9px;
  padding: 9px 10px 10px; border-radius: 12px; text-align: left;
  background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
}
.card-foot small { display: block; font-size: 8.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.card-foot strong { display: block; margin-top: 3px; font-size: 13px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
.card-bar { margin-top: 8px; height: 3px; border-radius: 3px; background: #e9e9e4; overflow: hidden; }
.card-bar i { display: block; height: 100%; width: 0; background: var(--c); }
.card.active .card-bar i { animation: progress var(--dur, 2600ms) linear forwards; }
@keyframes progress { to { width: 100%; } }

/* chat-bubble handle, like the reference's @tags */
.handle {
  position: absolute; z-index: 3; left: 50%; top: -18px;
  padding: 6px 12px 7px; border-radius: 14px 14px 14px 4px;
  background: var(--hc, var(--c)); color: var(--ht, #fff);
  font-size: 12.5px; font-weight: 500; letter-spacing: -.01em; white-space: nowrap;
  box-shadow: 0 10px 20px -10px rgba(0,0,0,.45);
  transform: translate(-30%, 8px) scale(.7) rotate(-6deg); opacity: 0;
  transition: transform .5s var(--ease), opacity .35s;
  pointer-events: none;
}
.handle-layer { position: absolute; inset: 0; pointer-events: none; transform-style: preserve-3d; }
.handle-anchor {
  position: absolute; left: 50%; top: 18px; width: 0; height: 0;
  transform: translate3d(var(--x), var(--y), 80px);
  transition: transform .9s var(--ease);
}
.handle-anchor.show .handle { opacity: 1; transform: translate(-30%, -54px) scale(1) rotate(-6deg); }
/* "each" flickers through the customers' colours once, then settles to ink */
.headline .each { transition: color .12s linear; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .nav nav { display: none; }
  .deck { height: 300px; }
  .card { --w: 176px; }
}
@media (max-width: 560px) {
  .nav { padding: 16px; }
  .hero { padding: 20px 16px 56px; }
  .headline { font-size: clamp(30px, 9.4vw, 48px); }
  .card-top span:first-child { display: none; }
  .card-top { justify-content: flex-end; }
  .eyebrow { font-size: 10px; letter-spacing: .16em; }
  .deck { height: 230px; }
  .card { --w: 128px; border-radius: 14px; }
  .card-foot strong { font-size: 11px; }
  .card-foot small { font-size: 7.5px; }
  .card-top { font-size: 8px; }
  .lede { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .w, .reveal { animation: none; opacity: 1; filter: none; transform: none; }
  .card, .deck, .handle, .handle-anchor { transition: none !important; }
  .card.active .card-bar i { animation: none; width: 60%; }
}
