@font-face { font-family: "Rhymes Display"; src: url("fonts/RhymesDisplayTrialUnlicensed-Regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Saans"; src: url("fonts/Saans-TRIAL-Regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Saans"; src: url("fonts/Saans-TRIAL-Medium.otf") format("opentype"); font-weight: 500; font-display: swap; }

:root {
  --ink: #111;
  --muted: #6b6b6b;
  --chip: #f4f4f5;
  --blue: #3388f0;
  --green: #22c55e;
  --serif: "Rhymes Display", Georgia, serif;
  --sans: "Saans", "Inter", system-ui, sans-serif;
  --max: 1310px;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html { overflow-x: clip; }
body { margin: 0; background: #fff; color: var(--ink); font-family: var(--sans); font-size: 18px; line-height: 1.35; letter-spacing: -0.01em; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, p { margin: 0; }
.container { width: min(var(--max), 100% - 32px); margin-inline: auto; }

/* The whole page is one screen: nav on top, hero fills the rest, the ticker takes what the text leaves */
.screen { height: max(100svh, 640px); display: flex; flex-direction: column; overflow: clip; }

/* Nav */
.nav-wrap { flex: none; padding-top: clamp(16px, 4svh, 38px); position: relative; z-index: 10; }
.nav { width: min(1394px, 100% - 32px); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 14px 14px 26px; background: rgba(255,255,255,.9); backdrop-filter: blur(12px); border-radius: 44px; box-shadow: 0 8px 24px rgba(0,0,0,.06), 0 0 0 1px rgba(0,0,0,.02); }
.status { display: inline-flex; align-items: center; gap: 10px; color: var(--green); font-size: 16px; }
.status i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
/* Get in touch: copies the email, then shows it with a check */
.cta { display: flex; gap: 2px; margin-left: auto; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; transition: scale .15s; }
.cta-icon { width: 36px; height: 36px; border-radius: 50%; background: #000; color: #fff; display: grid; place-items: center; transition: transform .25s; }
.cta-label { background: #000; color: #fff; border-radius: 20px; padding: 0 14px; display: flex; align-items: center; font-size: 18px; white-space: nowrap; }
.cta .icon-check, .cta.copied .icon-send { display: none; }
.cta.copied .icon-check { display: block; }
.cta.copied .cta-label { animation: swap-in .35s var(--ease-out); }
@keyframes swap-in { from { opacity: 0; translate: 0 5px; } }
.cta:hover .cta-icon { transform: rotate(-12deg); }
.cta:active { scale: .96; }

/* Hero */
.hero { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-top: clamp(28px, 9svh, 120px); }
.display { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 5.6vw, 72px); line-height: .92; letter-spacing: -0.02em; }
/* "systems" is a selected auto-layout frame; hover spreads the letters with spacing tokens between them */
.frame { position: relative; display: inline-flex; padding: 0 .1em; margin: 0 .04em; outline: 2px solid var(--blue); outline-offset: .02em; cursor: default; }
.frame > span { display: inline-flex; }
.frame .ch { display: inline-block; letter-spacing: 0; }
.frame .gap { display: inline-grid; place-items: center; width: 0; transition: width .5s var(--ease-out); }
.frame .gap b { font: 500 13px/1.3 var(--sans); letter-spacing: 0; color: #fff; background: #f24e9b; padding: 1px 5px; border-radius: 4px; opacity: 0; scale: .5; transition: opacity .25s, scale .35s var(--ease-out); }
.frame:hover .gap { width: .5em; }
.frame:hover .gap b { opacity: 1; scale: 1; transition-delay: .15s; }
.frame i { position: absolute; width: 9px; height: 9px; background: #fff; border: 2px solid var(--blue); }
.frame i:nth-of-type(1) { left: -.02em; top: -.02em; translate: -50% -50%; }
.frame i:nth-of-type(2) { right: -.02em; top: -.02em; translate: 50% -50%; }
.frame i:nth-of-type(3) { left: -.02em; bottom: -.02em; translate: -50% 50%; }
.frame i:nth-of-type(4) { right: -.02em; bottom: -.02em; translate: 50% 50%; }
.lead { margin-top: 26px; font-size: 20px; line-height: 1.3; }
.chips { display: flex; flex-wrap: wrap; gap: 12px 20px; margin-top: clamp(20px, 4svh, 46px); }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px 8px 10px; background: var(--chip); border-radius: 20px; font-size: 16px; line-height: 1.2; transition: translate .25s var(--ease-out), background-color .2s; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--dot); transition: scale .3s var(--ease-out); }
.chip:hover { translate: 0 -2px; background: #ececee; }
.chip:hover::before { scale: 1.6; }

/* Ticker: main.js repeats the tiles and moves the track, wrapping by one set.
   Tile height is a share of the space below the text (510 = the tallest tile), width follows the tile's own ratio. */
.hero-media { --pad-top: clamp(56px, 8svh, 92px); position: relative; flex: 1; min-height: 220px; padding-block: var(--pad-top) clamp(16px, 4svh, 48px); }
/* Handwritten note sits top right, just above the ticker, with its arrow pointing down into it */
.handwritten { position: absolute; right: max(16px, (100% - var(--max)) / 2); bottom: calc(100% - var(--pad-top) + 16px); display: flex; align-items: flex-start; gap: 6px; font: 500 22px/1 "Caveat", cursive; letter-spacing: 0; white-space: nowrap; }
.handwritten svg { margin-top: 7px; animation: nudge 1.6s ease-in-out infinite; }
.squiggle-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
  .handwritten { animation: squiggle .36s steps(1) infinite; }
}
@keyframes squiggle {
  0% { filter: url(#squiggle-0); }
  25% { filter: url(#squiggle-1); }
  50% { filter: url(#squiggle-2); }
  75% { filter: url(#squiggle-3); }
}
@keyframes nudge { 50% { translate: 1px 3px; } }
.ticker { display: flex; align-items: flex-end; height: 100%; width: max-content; cursor: grab; user-select: none; touch-action: pan-y; will-change: transform; }
.ticker.dragging { cursor: grabbing; }
.ticker video { pointer-events: none; }
.tile { flex: none; height: calc(var(--h) / 510 * 100%); aspect-ratio: var(--w) / var(--h); margin-right: 12px; border-radius: clamp(18px, 3.4svh, 36px); overflow: hidden; }
video { display: block; width: 100%; height: 100%; object-fit: cover; }
.tile-inset { display: grid; place-items: center; }
.tile-inset video { width: 95.6%; height: 94.2%; border-radius: 6px; }
.tile-offset video { width: 90%; height: 112.7%; margin: 3.8% 0 0 5.2%; }

/* Entrance */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal]:not(.in) { opacity: 0; }
  [data-reveal].in { animation: rise .9s var(--ease-out) var(--d, 0ms) backwards; }
  /* Headline frame: outline wipes in, letters rise, then the handles pop */
  .display.in .frame { animation: frame-in .7s var(--ease-out) .35s backwards; }
  .display.in .frame .ch { animation: rise .6s var(--ease-out) calc(.45s + var(--i) * 40ms) backwards; }
  .display.in .frame i { animation: pop .45s var(--ease-out) .85s backwards; }
}
@keyframes rise { from { opacity: 0; translate: 0 28px; } }
@keyframes pop { from { scale: 0; } }
@keyframes frame-in { from { outline-color: transparent; clip-path: inset(0 100% 0 0); } }

/* Responsive */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav { padding: 10px 10px 10px 18px; }
  .status { font-size: 14px; }
  .cta-label { font-size: 15px; padding: 0 12px; }
  .handwritten { font-size: 18px; }
  /* Room for the email once copied */
  .nav:has(.cta.copied) .status { display: none; }
  .lead br { display: none; }
  .lead { font-size: 17px; margin-top: 18px; }
  .chips { gap: 8px 10px; }
  .chip { font-size: 14px; padding: 6px 10px 6px 8px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
