/* ==========================================================================
   nickgray.net — design system v3: casual, playful, real
   One plain typeface (Instrument Sans) for everything. Nick's Sharpie
   (Caveat, a neat pen hand) is the only accent: name tags and the odd note.
   Personality comes from things you can do (write a name tag, draw an
   icebreaker card, tick off a party checklist), not from decoration.
   HTML + CSS only.
   ========================================================================== */

/* ---------- 0. Fonts (self-hosted, latin + latin-ext) ---------- */
@font-face { font-family: "Caveat"; font-style: normal; font-weight: 500 700; font-display: swap; src: url("../fonts/caveat-normal-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Caveat"; font-style: normal; font-weight: 500 700; font-display: swap; src: url("../fonts/caveat-normal-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Sans"; font-style: italic; font-weight: 400 700; font-display: swap; src: url("../fonts/instrument-sans-italic-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Sans"; font-style: italic; font-weight: 400 700; font-display: swap; src: url("../fonts/instrument-sans-italic-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/instrument-sans-normal-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/instrument-sans-normal-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- 1. Tokens ---------- */
:root {
  --ink: #2A2E31;
  --ink-2: #44484B;
  --muted: #64686B;
  --paper: #FFFDF8;
  --cream: #F7F2E7;
  --line: rgba(42, 46, 49, 0.14);
  --line-strong: rgba(42, 46, 49, 0.8);
  --yellow: #FFE000;
  --yellow-soft: #FFF3A8;
  --blue: #0A69FA;
  --blue-soft: #E7F0FF;
  --red: #D4242B;
  --white: #FFFFFF;

  --f-sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-marker: "Caveat", "Bradley Hand", "Segoe Print", cursive;

  --wrap: 1200px;
  --pad: clamp(18px, 4vw, 40px);
  --section: clamp(64px, 8vw, 112px);
  --r: 14px;
  --r-lg: 22px;
  --ease: cubic-bezier(0.22, 0.8, 0.2, 1);
  --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --shadow: 0 1px 2px rgba(42, 46, 49, 0.06), 0 10px 30px -14px rgba(42, 46, 49, 0.28);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
html:has(.menu[open]) { overflow: hidden; }
body {
  margin: 0;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.16 0 0 0 0 0.17 0 0 0 0 0.18 0 0 0 0.09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--ink-2);
  font-family: var(--f-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
@media (min-width: 900px) { body { font-size: 1.125rem; } }
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); font-family: var(--f-sans); font-weight: 650; text-wrap: balance; }
h1, .h1 { font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4.25rem); line-height: 1.04; letter-spacing: -0.025em; }
h2, .h2 { font-size: clamp(1.85rem, 1.4rem + 1.8vw, 2.75rem); line-height: 1.1; letter-spacing: -0.02em; }
h3, .h3 { font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.45rem); line-height: 1.25; letter-spacing: -0.01em; }
h4, .h4 { font-size: 1.125rem; line-height: 1.3; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
cite, em { font-style: italic; }
::selection { background: var(--yellow); color: var(--ink); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 12px; top: -80px; z-index: 300;
  padding: 12px 18px; border-radius: 999px;
  background: var(--ink); color: var(--white); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 3. Layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.wrap--text { max-width: 760px; }
.section { padding-block: var(--section); }
.section--tight { padding-block: clamp(44px, 6vw, 72px); }
.flood-cream { background: var(--cream) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.16 0 0 0 0 0.17 0 0 0 0 0.18 0 0 0 0.09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.flood-yellow-soft { background: var(--yellow-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.16 0 0 0 0 0.17 0 0 0 0 0.18 0 0 0 0.09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.flood-ink { background: var(--ink); color: #D9D5CC; }
.flood-ink h1, .flood-ink h2, .flood-ink h3, .flood-ink h4 { color: var(--white); }
.flood-blue { background: var(--blue); color: var(--white); }
.flood-blue h1, .flood-blue h2, .flood-blue h3, .flood-blue h4 { color: var(--white); }
.flood-yellow { background: var(--yellow); color: var(--ink); }

.split { display: grid; gap: clamp(32px, 5vw, 64px); align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--wide-left { grid-template-columns: 1.2fr 0.8fr; }
  .split--wide-right { grid-template-columns: 0.8fr 1.2fr; }
  .split--top { align-items: start; }
}
.grid { display: grid; gap: clamp(18px, 2.4vw, 28px); }
@media (min-width: 640px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stack > * + * { margin-top: var(--gap, 1rem); }
.head { margin-bottom: clamp(26px, 3.5vw, 40px); max-width: 720px; }
.head p { margin-top: 12px; color: var(--muted); font-size: 1.1rem; }
.flood-ink .head p, .flood-blue .head p { color: inherit; opacity: 0.88; }
.head--row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 32px; max-width: none; }

/* ---------- 4. Type helpers ---------- */
.lede { font-size: clamp(1.2rem, 1.1rem + 0.4vw, 1.4rem); line-height: 1.5; color: var(--ink); }
.flood-ink .lede, .flood-blue .lede { color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 0.95rem; }
/* Nick's Sharpie — accents only */
.marker { font-family: var(--f-marker); font-weight: 650; font-size: 1.25em; letter-spacing: 0; }
/* Yellow highlighter behind a few words */
.hl { background: linear-gradient(transparent 58%, var(--yellow) 58%, var(--yellow) 90%, transparent 90%); padding-inline: 0.08em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.flood-yellow .hl { background-image: linear-gradient(transparent 58%, var(--white) 58%, var(--white) 90%, transparent 90%); }
/* A hand-written note, max one per page */
.note { display: inline-block; color: var(--ink); font: 650 1.6rem/1.1 var(--f-marker); rotate: -3deg; }

.prose a, .link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--yellow);
  text-decoration-thickness: 0.2em;
  text-underline-offset: 0.12em;
  text-decoration-skip-ink: none;
  transition: text-decoration-color 0.2s, background-color 0.2s;
}
.prose a:hover, .link:hover { text-decoration-color: var(--ink); }
.flood-yellow .prose a, .flood-yellow .link { text-decoration-color: var(--ink); }
.flood-ink .prose a:hover, .flood-ink .link:hover, .flood-blue .prose a:hover, .flood-blue .link:hover { text-decoration-color: var(--white); }
.prose h2 { margin: 1.8em 0 0.5em; }
.prose h3 { margin: 1.6em 0 0.4em; }
.prose figure { margin: 2em 0; }
.prose figcaption { margin-top: 10px; color: var(--muted); font-size: 0.95rem; }

/* ---------- 5. Buttons + links ---------- */
.btn {
  --bg: var(--ink); --fg: var(--white); --bd: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 50px; padding: 0 1.35em;
  border: 2px solid var(--bd); border-radius: 999px;
  background: var(--bg); color: var(--fg);
  font: 600 1rem/1 var(--f-sans);
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform 0.25s var(--bounce), background-color 0.2s, color 0.2s, border-color 0.2s;
}
.btn:hover { transform: translateY(-2px) rotate(-1.5deg); }
.btn:active { transform: translateY(0) scale(0.97); }
.btn svg { width: 1.05em; height: 1.05em; flex: none; }
.btn--yellow { --bg: var(--yellow); --fg: var(--ink); --bd: var(--yellow); }
.btn--yellow:hover { --bd: var(--ink); }
.btn--white { --bg: var(--white); --fg: var(--ink); --bd: var(--white); }
.btn--outline { --bg: transparent; --fg: var(--ink); --bd: var(--ink); }
.btn--outline:hover { --bg: var(--ink); --fg: var(--white); }
.flood-ink .btn--outline, .flood-blue .btn--outline { --fg: var(--white); --bd: rgba(255, 255, 255, 0.7); }
.flood-ink .btn--outline:hover, .flood-blue .btn--outline:hover { --bg: var(--white); --fg: var(--ink); --bd: var(--white); }
.btn--sm { min-height: 44px; padding: 0 1.1em; font-size: 0.95rem; }
.btn--lg { min-height: 58px; padding: 0 1.7em; font-size: 1.08rem; }
.btn--block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }

.go { display: inline-flex; align-items: center; gap: 0.35em; padding-block: 8px; color: inherit; font-weight: 600; text-decoration: none; }
.go::after { content: "→"; transition: translate 0.25s var(--bounce); }
.go:hover::after { translate: 5px 0; }
.go:hover { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 3px; text-underline-offset: 4px; }

/* ---------- 6. Header ---------- */
.topbar { position: sticky; top: 0; z-index: 80; border-bottom: 1px solid var(--line); }
/* blur on a pseudo-element so the fixed mobile menu isn't trapped inside the bar */
.topbar::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(255, 253, 248, 0.9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 66px; }
.topbar__logo { display: inline-flex; transition: transform 0.3s var(--bounce); }
.topbar__logo:hover { transform: rotate(-3deg) scale(1.03); }
.topbar__logo img { height: 28px; width: auto; }
.topbar__nav { display: none; align-items: center; gap: clamp(18px, 2.4vw, 32px); }
.topbar__nav a:not(.btn) {
  padding-block: 8px; color: var(--ink); font-weight: 500; text-decoration: none;
  text-decoration-thickness: 3px; text-underline-offset: 6px; text-decoration-color: var(--yellow);
}
.topbar__nav a:not(.btn):hover { text-decoration-line: underline; }
.topbar__nav a[aria-current="page"] { font-weight: 650; text-decoration-line: underline; }
@media (min-width: 960px) { .topbar__nav { display: flex; } .menu { display: none; } }

.menu > summary { list-style: none; position: relative; z-index: 96; }
.menu > summary::-webkit-details-marker { display: none; }
.menu__close { display: none; }
.menu[open] .menu__open { display: none; }
.menu[open] .menu__close { display: inline; }
.menu__overlay {
  position: fixed; inset: 0; z-index: 95;
  display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
  padding: 90px var(--pad) 32px;
  background: var(--yellow); overflow-y: auto;
}
.menu:not([open]) .menu__overlay { display: none; }
.menu__links { display: grid; }
.menu__links a {
  padding: 10px 0; border-bottom: 1.5px solid rgba(42, 46, 49, 0.2);
  color: var(--ink); text-decoration: none;
  font: 650 clamp(2rem, 9vw, 3rem)/1.1 var(--f-sans); letter-spacing: -0.02em;
}
.menu__links a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: 8px; }
.menu__foot { display: grid; gap: 8px; color: var(--ink); font-weight: 600; }
.menu__foot a { color: var(--ink); }

/* ---------- 7. Forms ---------- */
.signup { display: flex; gap: 8px; width: 100%; max-width: 520px; padding: 6px; border: 2px solid var(--ink); border-radius: 999px; background: var(--white); }
.signup input { flex: 1; min-width: 0; min-height: 48px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font-size: 1.05rem; }
.signup input::placeholder { color: #7D8184; }
.signup input:focus { outline: none; }
.signup:focus-within { box-shadow: 0 0 0 4px var(--yellow); }
.signup .btn { flex: none; min-height: 48px; }
.signup .btn:hover { transform: none; }
.flood-ink .signup, .flood-blue .signup { border-color: var(--white); }
@media (max-width: 480px) {
  .signup { flex-direction: column; border-radius: 22px; padding: 8px; }
  .signup input { text-align: center; }
  .signup .btn { width: 100%; }
}

.form { display: grid; gap: 20px; }
.form__row { display: grid; gap: 20px; }
@media (min-width: 640px) { .form__row--2 { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field > label, .field > legend { padding: 0; color: var(--ink); font-weight: 600; }
.field > legend { margin-bottom: 10px; }
.field .opt { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 12px 16px;
  border: 2px solid var(--ink); border-radius: 12px;
  background: var(--white); color: var(--ink); font-size: 1.05rem;
  transition: box-shadow 0.2s;
}
.field textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; box-shadow: 0 0 0 4px var(--yellow); }
.field input::placeholder, .field textarea::placeholder { color: #85898B; }
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.choice span {
  display: inline-flex; align-items: center; min-height: 46px; padding: 0 18px;
  border: 2px solid var(--ink); border-radius: 999px; background: var(--white);
  color: var(--ink); font-weight: 500;
  transition: background 0.2s, transform 0.25s var(--bounce);
}
.choice input:checked + span { background: var(--yellow); transform: rotate(-2deg); }
.choice input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 3px; }

/* ---------- 8. Content components ---------- */
.card { display: flex; flex-direction: column; gap: 10px; padding: clamp(20px, 2.4vw, 28px); border-radius: var(--r-lg); background: var(--white); box-shadow: var(--shadow); }
a.card { color: inherit; text-decoration: none; transition: transform 0.3s var(--bounce); }
a.card:hover { transform: translateY(-4px) rotate(-0.5deg); }
.card--cream { background: var(--cream); box-shadow: none; }

/* Photos: plain rectangles with a soft radius */
.photo { overflow: hidden; border-radius: var(--r-lg); background: var(--cream); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo--yellow { background: var(--yellow); }
figure { margin: 0; }
figcaption { margin-top: 10px; color: var(--muted); font-size: 0.95rem; }

/* Post cards with real thumbnails */
.post { display: flex; flex-direction: column; gap: 12px; color: inherit; text-decoration: none; }
.post__img { overflow: hidden; aspect-ratio: 16 / 10; border-radius: var(--r); background: var(--cream); }
.post__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.post:hover .post__img img { transform: scale(1.05); }
.post h3 { font-size: 1.2rem; }
.post:hover h3 { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 4px; text-underline-offset: 3px; }
.post p { color: var(--muted); font-size: 1rem; line-height: 1.5; }

/* List with small thumbnails (popular posts, projects) */
.list { border-top: 1.5px solid var(--line-strong); }
.list > li { border-bottom: 1px solid var(--line); }
.list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 18px; align-items: center; padding: 18px 0; color: inherit; text-decoration: none; }
.list__title { align-self: end; color: var(--ink); font-weight: 650; font-size: 1.2rem; line-height: 1.3; }
.list__desc { align-self: start; grid-column: 1; color: var(--muted); font-size: 1rem; line-height: 1.45; }
.list__img { grid-column: 2; grid-row: 1 / span 2; width: 104px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; transition: transform 0.3s var(--bounce); }
.list a:hover .list__title { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 4px; text-underline-offset: 3px; }
.list a:hover .list__img { transform: rotate(-3deg) scale(1.04); }
@media (min-width: 760px) { .list__img { width: 140px; } }

/* Press logos: one quiet row */
.press { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 22px clamp(28px, 4vw, 48px); }
.press img { width: auto; height: 24px; opacity: 0.65; filter: grayscale(1); transition: opacity 0.2s, transform 0.25s var(--bounce); }
.press img.is-short { height: 16px; }
.press a:hover img { opacity: 1; transform: translateY(-2px); }

/* Stars + book badge */
.stars { display: inline-flex; gap: 2px; color: var(--ink); }
.stars svg { width: 17px; height: 17px; }
.flood-blue .stars { color: var(--yellow); }
.book-badge {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 10px 18px 10px 10px; border-radius: 16px;
  background: var(--white); box-shadow: var(--shadow);
  color: var(--ink); text-decoration: none;
  transition: transform 0.3s var(--bounce);
}
.book-badge:hover { transform: translateY(-3px) rotate(-1deg); }
.book-badge img { width: 46px; flex: none; border-radius: 2px 4px 4px 2px; box-shadow: 0 6px 12px -4px rgba(0, 0, 0, 0.4); }
.book-badge__title { display: block; font-weight: 600; line-height: 1.3; }
.book-badge__rating { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin-top: 3px; font-size: 0.95rem; }

/* FAQ */
.faq { border-top: 1.5px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 0; color: var(--ink); font-weight: 650; font-size: 1.15rem; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-size: 1.6rem; line-height: 1; transition: rotate 0.3s var(--bounce); }
.faq details[open] summary::after { rotate: 45deg; }
.faq details > div { max-width: 680px; padding: 0 0 22px; }

/* Timeline */
.years { border-top: 1.5px solid var(--line-strong); }
.years li { display: grid; grid-template-columns: 74px 1fr; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.years time { color: var(--ink); font-weight: 700; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
@media (min-width: 900px) { .years li { grid-template-columns: 120px 1fr; } }

/* Nick's name tag (static) */
.nametag { width: 200px; overflow: hidden; text-align: center; background: var(--white); border-radius: 12px; box-shadow: 0 2px 0 rgba(0,0,0,0.05), 0 18px 34px -14px rgba(42,46,49,0.5); rotate: -5deg; }
.nametag__top { padding: 11px 8px 9px; background: var(--red); color: var(--white); }
.nametag__hello { display: block; font: 800 2rem/0.9 var(--f-sans); letter-spacing: 0.02em; }
.nametag__sub { display: block; margin-top: 4px; font: 600 0.85rem/1 var(--f-sans); }
.nametag__name { display: block; padding: 12px 8px 10px; border-bottom: 12px solid var(--red); color: var(--ink); font: 700 3rem/0.9 var(--f-marker); }

/* ---------- 9. Interactive pieces (HTML + CSS only) ---------- */

/* 9a. Write-your-own name tag */
.hello { display: inline-block; width: min(100%, 300px); overflow: hidden; text-align: center; background: var(--white); border-radius: 14px; box-shadow: 0 2px 0 rgba(0,0,0,0.05), 0 22px 40px -16px rgba(42,46,49,0.55); rotate: -3deg; transition: rotate 0.4s var(--bounce), transform 0.4s var(--bounce); }
.hello:focus-within { rotate: 0deg; transform: scale(1.03); }
.hello__top { display: block; padding: 12px 8px 10px; background: var(--red); color: var(--white); }
.hello__top b { display: block; font: 800 2.3rem/0.9 var(--f-sans); letter-spacing: 0.02em; }
.hello__top span { display: block; margin-top: 4px; font-weight: 600; font-size: 0.9rem; }
.hello input {
  display: block; width: 100%; min-height: 84px; padding: 10px 12px;
  border: 0; border-bottom: 14px solid var(--red); background: var(--white);
  color: var(--ink); text-align: center; font: 700 3.1rem/1 var(--f-marker);
}
.hello input::placeholder { color: #B7B9BA; }
.hello input:focus { outline: none; }
.hello-reply { min-height: 1.6em; margin-top: 16px; color: var(--ink); font-weight: 600; opacity: 0; translate: 0 6px; transition: opacity 0.3s, translate 0.4s var(--bounce); }
.hello-wrap:has(input:not(:placeholder-shown)) .hello-reply { opacity: 1; translate: 0 0; }
.hello-wrap:has(input:not(:placeholder-shown)) .hello { animation: stick 0.5s var(--bounce); }

/* 9b. The NICK method: four letter tabs (radio inputs) */
.nick__tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(8px, 1.5vw, 16px); margin: 0 0 22px; padding: 0; border: 0; }
.nick__tab { position: relative; }
.nick__tab input { position: absolute; inset: 0; z-index: 1; margin: 0; opacity: 0; cursor: pointer; }
.nick__tab span {
  display: grid; place-items: center; height: clamp(76px, 11vw, 140px);
  border: 2.5px solid var(--ink); border-radius: 18px; background: var(--white);
  color: var(--ink); font: 800 clamp(2.4rem, 8vw, 5.5rem)/1 var(--f-sans);
  transition: background 0.2s, transform 0.35s var(--bounce), box-shadow 0.2s;
}
.nick__tab small { display: block; margin-top: 8px; color: var(--ink); text-align: center; font-weight: 600; font-size: clamp(0.85rem, 1.4vw, 1rem); line-height: 1.25; }
.nick__tab:hover span { transform: translateY(-4px) rotate(-3deg); }
.nick__tab input:checked + span { background: var(--yellow); transform: rotate(-4deg); box-shadow: 0 8px 0 var(--ink); }
.nick__tab input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 4px; }
.nick__panels { display: grid; }
.nick__panel { display: none; padding: clamp(22px, 3vw, 36px); border-radius: var(--r-lg); background: var(--white); box-shadow: var(--shadow); }
.nick:has(.nick__tab:nth-of-type(1) input:checked) .nick__panel:nth-child(1),
.nick:has(.nick__tab:nth-of-type(2) input:checked) .nick__panel:nth-child(2),
.nick:has(.nick__tab:nth-of-type(3) input:checked) .nick__panel:nth-child(3),
.nick:has(.nick__tab:nth-of-type(4) input:checked) .nick__panel:nth-child(4) { display: block; animation: pop-in 0.45s var(--bounce); }

/* 9c. Icebreaker deck: radios as dots, one card at a time */
.deck { position: relative; max-width: 560px; }
.deck__stack { position: relative; display: grid; }
.deck__stack::before, .deck__stack::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-lg); background: var(--white); box-shadow: var(--shadow); }
.deck__stack::before { rotate: 4deg; translate: 8px 6px; background: var(--yellow-soft); }
.deck__stack::after { rotate: -3deg; translate: -6px 4px; background: var(--blue-soft); }
.deck__card { position: relative; z-index: 1; display: none; flex-direction: column; justify-content: space-between; gap: 24px; min-height: 290px; padding: clamp(24px, 3vw, 34px); border-radius: var(--r-lg); background: var(--white); box-shadow: var(--shadow); }
.deck__q { color: var(--ink); font-weight: 650; font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem); line-height: 1.2; letter-spacing: -0.015em; }
.deck__tip { color: var(--muted); font-size: 1rem; }
.deck__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.deck__next { cursor: pointer; }
.deck__dots { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; border: 0; }
.deck__dots input {
  appearance: none; -webkit-appearance: none; width: 28px; height: 28px; margin: 0;
  border: 2px solid var(--ink); border-radius: 50%; background: var(--white); cursor: pointer;
  transition: background 0.2s, transform 0.25s var(--bounce);
}
.deck__dots input:checked { background: var(--yellow); transform: scale(1.15); }
.deck__dots input:hover { transform: scale(1.1); }
.deck:has(.deck__dots input:nth-of-type(1):checked) .deck__card:nth-child(1),
.deck:has(.deck__dots input:nth-of-type(2):checked) .deck__card:nth-child(2),
.deck:has(.deck__dots input:nth-of-type(3):checked) .deck__card:nth-child(3),
.deck:has(.deck__dots input:nth-of-type(4):checked) .deck__card:nth-child(4),
.deck:has(.deck__dots input:nth-of-type(5):checked) .deck__card:nth-child(5),
.deck:has(.deck__dots input:nth-of-type(6):checked) .deck__card:nth-child(6),
.deck:has(.deck__dots input:nth-of-type(7):checked) .deck__card:nth-child(7),
.deck:has(.deck__dots input:nth-of-type(8):checked) .deck__card:nth-child(8) { display: flex; animation: deal 0.5s var(--bounce); }

/* 9d. Party checklist with party lights + "ready to host" */
.plan { display: grid; gap: 10px; counter-reset: done; }
.plan label { display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px; border-radius: 14px; background: var(--white); box-shadow: 0 1px 2px rgba(42,46,49,0.08); cursor: pointer; transition: background 0.2s, transform 0.25s var(--bounce); }
.plan label:hover { transform: translateX(4px); }
.plan input {
  appearance: none; -webkit-appearance: none; flex: none; width: 28px; height: 28px; margin: 1px 0 0;
  border: 2px solid var(--ink); border-radius: 8px; background: var(--white); cursor: pointer;
  display: grid; place-items: center; transition: background 0.2s, transform 0.3s var(--bounce);
}
.plan input::after { content: ""; width: 12px; height: 7px; border-left: 3px solid var(--ink); border-bottom: 3px solid var(--ink); rotate: -45deg; translate: 0 -2px; scale: 0; transition: scale 0.25s var(--bounce); }
.plan input:checked { background: var(--yellow); transform: rotate(-6deg); counter-increment: done; }
.plan input:checked::after { scale: 1; }
.plan label:has(input:checked) { background: var(--yellow-soft); }
.plan label:has(input:checked) span { text-decoration: line-through; text-decoration-color: rgba(42,46,49,0.45); }
.plan input:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.plan-lights { display: flex; gap: 8px; margin-bottom: 18px; }
.plan-lights i { flex: 1; height: 14px; border-radius: 999px; background: rgba(42,46,49,0.12); transition: background 0.3s, box-shadow 0.3s; }
.plan-wrap:has(.plan li:nth-child(1) input:checked) .plan-lights i:nth-child(1),
.plan-wrap:has(.plan li:nth-child(2) input:checked) .plan-lights i:nth-child(2),
.plan-wrap:has(.plan li:nth-child(3) input:checked) .plan-lights i:nth-child(3),
.plan-wrap:has(.plan li:nth-child(4) input:checked) .plan-lights i:nth-child(4),
.plan-wrap:has(.plan li:nth-child(5) input:checked) .plan-lights i:nth-child(5),
.plan-wrap:has(.plan li:nth-child(6) input:checked) .plan-lights i:nth-child(6),
.plan-wrap:has(.plan li:nth-child(7) input:checked) .plan-lights i:nth-child(7),
.plan-wrap:has(.plan li:nth-child(8) input:checked) .plan-lights i:nth-child(8),
.plan-wrap:has(.plan li:nth-child(9) input:checked) .plan-lights i:nth-child(9),
.plan-wrap:has(.plan li:nth-child(10) input:checked) .plan-lights i:nth-child(10) { background: var(--yellow); box-shadow: 0 0 14px 2px rgba(255, 224, 0, 0.7); }
.plan-count::after { content: counter(done) " of " attr(data-total) " done"; }
.plan-done { display: none; margin-top: 18px; padding: 18px 20px; border-radius: 14px; background: var(--ink); color: var(--white); font-weight: 650; font-size: 1.2rem; }
.plan-wrap:not(:has(.plan input:not(:checked))) .plan-done { display: block; animation: pop-in 0.5s var(--bounce); }

/* 9e. Flip the book over */
.flip-toggle { position: absolute; opacity: 0; pointer-events: none; }
.flip { display: block; width: min(100%, 340px); aspect-ratio: 600 / 913; perspective: 1400px; cursor: pointer; }
.flip__inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.8s var(--ease); }
.flip-toggle:checked + .flip .flip__inner { transform: rotateY(180deg); }
.flip-toggle:focus-visible + .flip { outline: 3px solid var(--blue); outline-offset: 6px; border-radius: 8px; }
.flip__face { position: absolute; inset: 0; overflow: hidden; border-radius: 3px 10px 10px 3px; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 30px 50px -22px rgba(0, 0, 0, 0.6); }
.flip__face img { width: 100%; height: 100%; object-fit: cover; }
.flip__back { display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: 26px; background: var(--blue); color: var(--white); transform: rotateY(180deg); font-size: 1rem; line-height: 1.45; }
.flip__back q { font-size: 1.2rem; font-weight: 600; line-height: 1.3; }
.flip-hint { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; font-weight: 600; }
.flip:hover .flip__inner { transform: rotateY(-10deg); }
.flip-toggle:checked + .flip:hover .flip__inner { transform: rotateY(170deg); }

/* 9f. "Call me anytime" — reveal the number */
.callme summary { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.callme summary::-webkit-details-marker { display: none; }
.callme__num { display: block; margin-top: 14px; font-weight: 700; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); letter-spacing: -0.01em; }
.callme[open] .callme__num { animation: pop-in 0.45s var(--bounce); }
.callme[open] summary .callme__show { display: none; }
.callme:not([open]) summary .callme__hide { display: none; }

/* 9g. Topic filter (radios + :has) — page CSS maps topics to posts */
.filter { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 28px; padding: 0; border: 0; }

/* ---------- 10. Footer ---------- */
.footer { background: var(--yellow); color: var(--ink); padding-block: clamp(56px, 7vw, 88px) 28px; }
.footer a { color: var(--ink); }
.footer__top { display: grid; gap: 28px 48px; padding-bottom: 40px; border-bottom: 1.5px solid rgba(42, 46, 49, 0.3); }
@media (min-width: 900px) { .footer__top { grid-template-columns: 1.2fr 1fr; align-items: end; } }
.footer__mail { display: inline-block; font-weight: 650; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem); letter-spacing: -0.02em; text-decoration: none; }
.footer__mail:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; }
.footer__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; padding-block: 40px; }
@media (min-width: 900px) { .footer__cols { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.footer__cols > * { min-width: 0; }
.footer__cols h2 { margin-bottom: 12px; font-size: 1rem; font-weight: 700; letter-spacing: 0; }
.footer__cols ul { display: grid; gap: 2px; }
.footer__cols li a { display: inline-block; padding: 5px 0; font-size: 0.98rem; line-height: 1.3; text-decoration: none; overflow-wrap: anywhere; }
.footer__cols li a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 22px; border-top: 1.5px solid rgba(42, 46, 49, 0.3); font-size: 0.95rem; }
.socials { display: flex; flex-wrap: wrap; gap: 8px; }
.socials a { display: grid; place-items: center; width: 44px; height: 44px; border: 2px solid var(--ink); border-radius: 50%; transition: background 0.2s, color 0.2s, transform 0.25s var(--bounce); }
.socials a:hover { background: var(--ink); color: var(--yellow); transform: rotate(-8deg); }
.socials svg { width: 18px; height: 18px; }

/* ==========================================================================
   11. Home
   ========================================================================== */
.hero { padding-block: clamp(32px, 5vw, 72px) clamp(48px, 6vw, 88px); }
.hero__grid { display: grid; gap: 26px; grid-template-areas: "intro" "side" "badge"; }
.hero__intro { grid-area: intro; display: grid; gap: 20px; align-content: center; }
.hero__side { grid-area: side; display: grid; justify-items: center; }
.hero__badge { grid-area: badge; justify-self: start; }
.hero__photo { position: relative; width: min(100%, 440px); }
.hero__photo .photo { aspect-ratio: 1; }
.hero__photo .nametag { position: absolute; left: -16px; top: 26px; width: clamp(140px, 36%, 180px); }
.hero__photo .nametag__hello { font-size: clamp(1.4rem, 4vw, 1.9rem); }
.hero__photo .nametag__name { font-size: clamp(2.2rem, 6vw, 2.8rem); }
@media (min-width: 900px) {
  .hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); grid-template-areas: "intro side" "badge side"; column-gap: clamp(36px, 5vw, 72px); row-gap: 28px; align-items: start; }
  .hero__intro { align-self: end; padding-top: clamp(24px, 4vw, 60px); }
  .hero__badge { align-self: start; }
  .hero__side { justify-items: end; }
}

/* Newsletter card tucked under the hero photo */
.hero-signup {
  position: relative; z-index: 2;
  width: min(100%, 440px); margin-top: -44px;
  padding: 22px 22px 24px;
  border-radius: 22px; background: var(--white);
  box-shadow: 0 2px 4px rgba(42, 46, 49, 0.06), 0 26px 50px -24px rgba(42, 46, 49, 0.45);
  border: 1px solid rgba(42, 46, 49, 0.08);
}
.hero-signup__head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.hero-signup__icon { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 12px; background: var(--yellow); color: var(--ink); rotate: -6deg; }
.hero-signup__icon svg { width: 22px; height: 22px; }
.hero-signup__title { font-size: 1.25rem; line-height: 1.2; letter-spacing: -0.01em; }
.hero-signup p { color: var(--ink-2); font-size: 1rem; line-height: 1.5; }
.hero-signup__form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 16px; }
.hero-signup__form input {
  min-width: 0; min-height: 52px; padding: 0 16px;
  border: 2px solid var(--ink); border-radius: 14px; background: var(--paper);
  color: var(--ink); font-size: 1.02rem;
}
.hero-signup__form input::placeholder { color: #7D8184; }
.hero-signup__form input:focus { outline: none; box-shadow: 0 0 0 4px var(--yellow); }
.hero-signup__form .btn { min-height: 52px; border-radius: 14px; border-color: var(--ink); }
.hero-signup__form .btn:hover { transform: translateY(-2px); }
@media (max-width: 420px) { .hero-signup__form { grid-template-columns: 1fr; } .hero-signup__form .btn { width: 100%; } }
@media (prefers-reduced-motion: no-preference) {
  .hero-signup { animation: rise 0.7s 0.35s var(--ease) both; }
}

.nickhub__grid { display: grid; gap: clamp(28px, 4vw, 48px); align-items: start; }
@media (min-width: 960px) { .nickhub__grid { grid-template-columns: 0.85fr 1.15fr; } }



/* Home: statement row with three linked tiles */
.passions { display: grid; gap: clamp(28px, 4vw, 56px); align-items: center; }
@media (min-width: 960px) { .passions { grid-template-columns: 1.1fr 0.9fr; } }
.passions .lit { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem); line-height: 1.18; letter-spacing: -0.02em; max-width: 30ch; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tile { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; aspect-ratio: 3 / 4; padding: 14px; overflow: hidden; border-radius: 18px; color: var(--white); text-decoration: none; background: var(--ink); transition: transform 0.35s var(--bounce); }
.tile:nth-child(1) { rotate: -2deg; }
.tile:nth-child(2) { rotate: 1.5deg; translate: 0 18px; }
.tile:nth-child(3) { rotate: -1deg; }
.tile:hover { transform: translateY(-6px) rotate(-1deg); }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 45%, rgba(0,0,0,0.65)); }
.tile b, .tile span { position: relative; z-index: 1; }
.tile b { font-size: 1.05rem; line-height: 1.2; }
.tile span { font-size: 0.9rem; opacity: 0.9; }
@media (max-width: 599px) { .tiles { gap: 10px; } .tile { padding: 10px; border-radius: 14px; } .tile b { font-size: 0.9rem; } .tile span { display: none; } }
.tile--yellow { background: var(--yellow); color: var(--ink); }
.tile--yellow::after { display: none; }
.tile--yellow svg { position: relative; z-index: 1; width: 54%; margin: auto auto 10px; color: var(--ink); }

/* Home: closing band */
.closer { position: relative; overflow: hidden; background: var(--ink); color: #D9D5CC; padding-block: clamp(64px, 8vw, 104px); }
.closer h2, .closer .thanks { color: var(--white); }
.closer__grid { display: grid; gap: clamp(32px, 5vw, 64px); align-items: center; }
@media (min-width: 960px) { .closer__grid { grid-template-columns: 1fr 1fr; } }
.closer__card { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr); border-radius: 24px; background: var(--yellow); color: var(--ink); }
.closer__text { padding: clamp(26px, 3vw, 40px); }
.closer__card h3 { color: var(--ink); margin-bottom: 10px; }
.closer__card .signup { margin-top: 18px; max-width: none; }
.closer__card img { display: none; }
@media (min-width: 640px) {
  .closer__card { grid-template-columns: minmax(0, 1fr) clamp(150px, 30%, 230px); }
  .closer__text { padding-right: 0; }
  .closer__card img { display: block; align-self: end; width: 100%; height: auto; pointer-events: none; }
}
.closer .go { color: var(--white); }
.closer .link { text-decoration-color: var(--yellow); }

/* "K": a party clock that runs from 7 to 9 when you open the tab */
.party-clock { display: grid; justify-items: center; gap: 14px; }
.party-clock__face { position: relative; width: clamp(170px, 22vw, 230px); aspect-ratio: 1; border: 3px solid var(--ink); border-radius: 50%; background: var(--white) radial-gradient(circle, var(--ink) 0 5px, transparent 6px); box-shadow: var(--shadow); }
.party-clock__face::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: repeating-conic-gradient(from -1deg, var(--ink) 0 2deg, transparent 2deg 30deg); -webkit-mask: radial-gradient(circle, transparent 78%, #000 79%); mask: radial-gradient(circle, transparent 78%, #000 79%); }
.party-clock__h, .party-clock__m { position: absolute; left: 50%; bottom: 50%; transform-origin: 50% 100%; border-radius: 4px; background: var(--ink); }
.party-clock__h { width: 6px; height: 26%; margin-left: -3px; rotate: 270deg; }
.party-clock__m { width: 4px; height: 38%; margin-left: -2px; rotate: 0deg; background: var(--red); }
.party-clock__label { font-weight: 650; font-size: 1.1rem; }
.party-clock__label::after { content: " Party’s over!"; color: var(--red); }
@keyframes hour-hand { from { rotate: 210deg; } to { rotate: 270deg; } }
@keyframes minute-hand { from { rotate: 0deg; } to { rotate: 720deg; } }
@keyframes over { 0%, 80% { opacity: 0; } 100% { opacity: 1; } }
@media (prefers-reduced-motion: no-preference) {
  .party-clock__h { animation: hour-hand 2.6s 0.3s var(--ease) both; }
  .party-clock__m { animation: minute-hand 2.6s 0.3s var(--ease) both; }
  .party-clock__label::after { animation: over 3.1s both; }
}

/* ==========================================================================
   12. Inner-page intro
   ========================================================================== */
.intro { padding-block: clamp(44px, 6vw, 84px) clamp(36px, 5vw, 64px); }
.intro h1 { max-width: 16ch; }
.intro .lede { max-width: 40ch; margin-top: 18px; }

/* ==========================================================================
   13. Motion — calm by default, playful when you do something.
   ========================================================================== */
@view-transition { navigation: auto; }
@keyframes rise { from { opacity: 0.01; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }
@keyframes pop-in { 0% { opacity: 0; scale: 0.96; translate: 0 8px; } 100% { opacity: 1; scale: 1; translate: 0 0; } }
@keyframes deal { 0% { opacity: 0; translate: 40px 0; rotate: 6deg; } 100% { opacity: 1; translate: 0 0; rotate: 0deg; } }
@keyframes stick { 0% { scale: 1; } 40% { scale: 1.08; } 100% { scale: 1; } }
@keyframes wave { 0%, 60%, 100% { rotate: 0deg; } 15%, 45% { rotate: 14deg; } 30% { rotate: -8deg; } }
@keyframes shade { to { box-shadow: 0 12px 26px -22px rgba(42, 46, 49, 0.6); } }

@media (prefers-reduced-motion: no-preference) {
  .load-in { animation: rise 0.6s var(--ease) both; }
  .load-in-2 { animation: rise 0.6s 0.1s var(--ease) both; }
  .wave { display: inline-block; transform-origin: 70% 80%; animation: wave 2.2s 0.6s ease-in-out 2; }
  @supports (animation-timeline: view()) {
    .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
    .topbar { animation: shade linear both; animation-timeline: scroll(); animation-range: 0 120px; }
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  @view-transition { navigation: none; }
}

/* ==========================================================================
   14. Motion layer (merged from motion.css)
   Scroll-driven animations in pure CSS (animation-timeline). The page is
   fully readable without them: every effect lives inside
   @supports (animation-timeline: view()) + prefers-reduced-motion: no-preference,
   and the default styles show the finished state.

   Pieces
   - .words      hero headline: each <span class="w" style="--i:N"> rises in
   - .lit        paragraph that lights up word by word as you scroll
   - .reveal     section heads/blocks rise + un-blur as they enter
   - .stagger    children rise one after another
   - .parallax   image drifts inside its frame
   - .book-3d    book swings from tilted to flat as you scroll to it
   - .pclock     pinned "2-hour party" clock that runs 7:00 → 9:00 with scroll
   - .hstrip     pinned strip that slides sideways while you scroll down
   - .thanks     the closing line scales in
   - top progress bar on the header
   ========================================================================== */

@property --mins { syntax: "<integer>"; inherits: true; initial-value: 0; }
@property --hh { syntax: "<integer>"; inherits: true; initial-value: 0; }
@property --h { syntax: "<integer>"; inherits: true; initial-value: 7; }
@property --m { syntax: "<integer>"; inherits: true; initial-value: 0; }
@property --t { syntax: "<number>"; inherits: true; initial-value: 0; }

/* ---------- Static (no-animation) layouts first ---------- */
.words .w { display: inline-block; }
.lit { color: var(--ink); font-weight: 650; text-wrap: pretty; }
.flood-ink .lit { color: var(--white); }
.lit { max-width: 26ch; }

/* Pinned party clock: default is a simple list of steps next to a clock at 9:00 */
.pclock { padding-block: var(--section); }
.pclock__stage { display: grid; gap: clamp(28px, 4vw, 56px); align-items: center; }
@media (min-width: 900px) { .pclock__stage { grid-template-columns: 0.9fr 1.1fr; } }
.pclock__clock { display: grid; justify-items: center; gap: 18px; padding: clamp(24px, 3vw, 40px); border-radius: 28px; background: var(--yellow); }
@media (min-width: 900px) { .pclock__clock { position: sticky; top: 100px; align-self: start; } }
.pclock__face {
  position: relative; width: clamp(200px, 26vw, 330px); aspect-ratio: 1;
  border: 4px solid var(--ink); border-radius: 50%;
  background: var(--white) radial-gradient(circle, var(--ink) 0 7px, transparent 8px);
  box-shadow: 0 30px 60px -30px rgba(42, 46, 49, 0.45);
}
.pclock__face::before {
  content: ""; position: absolute; inset: 10px; border-radius: 50%;
  background: repeating-conic-gradient(from -1deg, var(--ink) 0 2deg, transparent 2deg 30deg);
  -webkit-mask: radial-gradient(circle, transparent 80%, #000 81%); mask: radial-gradient(circle, transparent 80%, #000 81%);
}
.pclock__face::after {
  /* the party window: a yellow wedge from 7 to 9 */
  content: ""; position: absolute; inset: 18%; border-radius: 50%;
  background: conic-gradient(from 210deg, rgba(255, 224, 0, 0.55) 0 60deg, transparent 60deg);
}
.pclock__hand { position: absolute; z-index: 1; left: 50%; bottom: 50%; transform-origin: 50% 100%; border-radius: 6px; background: var(--ink); }
.pclock__hand--h { width: 9px; height: 25%; margin-left: -4.5px; rotate: calc(210deg + var(--t) * 60deg); }
.pclock__hand--m { width: 6px; height: 38%; margin-left: -3px; background: var(--red); rotate: calc(var(--t) * 720deg); }
.pclock { --t: 1; --mins: 120; }
.pclock__time { color: var(--ink); font-weight: 700; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.pclock__time::after { content: "7:00 to 9:00 p.m."; }
.pclock__steps { display: grid; gap: 28px; }
.pclock__step h3 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); line-height: 1.15; }
.pclock__step img { width: min(100%, 260px); margin-top: 14px; border-radius: 14px; rotate: -2deg; box-shadow: var(--shadow); }
.pclock__step h3 { margin-bottom: 6px; }
.pclock__step time { display: block; margin-bottom: 4px; color: var(--red); font-weight: 700; }
.pclock__bar { display: none; }

/* Sideways strip: default is a normal horizontally scrollable row */
.hstrip { padding-block: clamp(64px, 8vw, 112px); }
.hstrip__stage { overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: max(var(--pad), calc((100vw - var(--wrap)) / 2 + var(--pad))); padding-bottom: 12px; }
.hstrip__track { --edge: max(var(--pad), calc((100vw - var(--wrap)) / 2 + var(--pad))); display: flex; gap: clamp(16px, 2vw, 28px); width: max-content; padding-inline: var(--edge); }
.hstrip__track > * { flex: none; width: clamp(260px, 32vw, 420px); scroll-snap-align: start; }

/* ---------- Load + scroll animations ---------- */
@keyframes m-rise { from { opacity: 0.01; translate: 0 0.6em; filter: blur(8px); } to { opacity: 1; translate: 0 0; filter: blur(0); } }
@keyframes m-up { from { opacity: 0; translate: 0 70px; filter: blur(6px); } to { opacity: 1; translate: 0 0; filter: blur(0); } }
@keyframes m-draw { from { background-size: 0% 100%; } to { background-size: 100% 100%; } }
@keyframes m-wipe { from { clip-path: inset(100% 0 0 0 round 22px); } to { clip-path: inset(0 0 0 0 round 22px); } }
@keyframes m-zoom { from { scale: 1.18; } to { scale: 1; } }
@keyframes m-slap { 0% { opacity: 0; scale: 1.7; rotate: -18deg; translate: -20px -60px; } 60% { opacity: 1; scale: 0.94; rotate: 3deg; translate: 0 0; } 100% { opacity: 1; scale: 1; rotate: -5deg; translate: 0 0; } }
@keyframes m-drift { to { translate: 0 -90px; } }
@keyframes m-lit { to { color: var(--ink); } }
@keyframes m-parallax { from { translate: 0 -7%; } to { translate: 0 7%; } }
@keyframes m-book { from { transform: perspective(1400px) rotateY(-32deg) rotateX(14deg) translateY(90px) scale(0.82); } to { transform: perspective(1400px) rotateY(0) rotateX(0) translateY(0) scale(1); } }
@keyframes m-clock { from { --mins: 0; --t: 0; } to { --mins: 120; --t: 1; } }
@keyframes m-step { 0% { opacity: 0; translate: 0 40px; } 18%, 82% { opacity: 1; translate: 0 0; } 100% { opacity: 0; translate: 0 -40px; } }
@keyframes m-step-first { 0%, 82% { opacity: 1; translate: 0 0; } 100% { opacity: 0; translate: 0 -40px; } }
@keyframes m-step-last { 0% { opacity: 0; translate: 0 40px; } 18%, 100% { opacity: 1; translate: 0 0; } }
@keyframes m-fill { from { scale: 0 1; } to { scale: 1 1; } }
@keyframes m-slide { to { translate: calc(-100% + 100vw) 0; } }
.thanks { font-weight: 650; }
@keyframes m-thanks { from { opacity: 0; scale: 0.7; letter-spacing: 0.08em; } to { opacity: 1; scale: 1; letter-spacing: -0.03em; } }
@keyframes m-progress { to { scale: 1 1; } }

@media (prefers-reduced-motion: no-preference) {
  /* Hero: words rise one by one, highlighter draws, photo wipes in, tag gets slapped on */
  .words .w { animation: m-rise 0.9s calc(var(--i, 0) * 75ms + 0.05s) cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .words .w.hl { background-repeat: no-repeat; animation: m-rise 0.9s calc(var(--i, 0) * 75ms + 0.05s) cubic-bezier(0.2, 0.8, 0.2, 1) both, m-draw 0.7s 0.6s cubic-bezier(0.65, 0, 0.35, 1) both; }
  .hero__photo .photo { animation: m-wipe 1.1s 0.15s cubic-bezier(0.7, 0, 0.2, 1) both; }
  .hero__photo .photo img { animation: m-zoom 1.6s 0.15s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .hero__photo .nametag { animation: m-slap 0.8s 1s cubic-bezier(0.3, 0.9, 0.4, 1) both; }

  @supports (animation-timeline: view()) {
    /* Progress bar along the bottom of the header */
    .topbar::after {
      content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
      background: var(--yellow); transform-origin: 0 50%; scale: 0 1;
      animation: m-progress linear both; animation-timeline: scroll(root);
    }

    /* Hero drifts away as you scroll on */
    .hero__photo { animation: m-drift linear both; animation-timeline: view(); animation-range: exit -10% exit 100%; }

    /* Generic reveals */
    .reveal { animation: m-up linear both; animation-timeline: view(); animation-range: entry 0% entry 75%; }
    .stagger > * { animation: m-up linear both; animation-timeline: view(); animation-range: entry 0% cover 22%; }
    .stagger > :nth-child(2) { animation-range: entry 8% entry 78%; }
    .stagger > :nth-child(3) { animation-range: entry 16% entry 86%; }
    .stagger > :nth-child(4) { animation-range: entry 24% entry 94%; }
    .stagger > :nth-child(n+5) { animation-range: entry 30% entry 100%; }

    /* Paragraph that lights up word by word */
    .lit { view-timeline-name: --lit; }
    .lit .w { color: rgba(42, 46, 49, 0.58); animation: m-lit linear both; animation-timeline: --lit;
      animation-range: cover calc(16% + var(--i) * var(--step, 1.2%)) cover calc(22% + var(--i) * var(--step, 1.2%)); }
    .flood-ink .lit .w { color: rgba(255, 255, 255, 0.55); }
    .flood-ink .lit .w { animation-name: m-lit-light; }
    @keyframes m-lit-light { to { color: var(--white); } }

    /* Parallax photos */
    .parallax { overflow: hidden; }
    .parallax img { scale: 1.16; animation: m-parallax linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }

    /* Book swings flat as it arrives */
    .book-3d { animation: m-book linear both; animation-timeline: view(); animation-range: entry 0% cover 42%; }

    /* Pinned party clock */
    .pclock { --t: 0; --mins: 0; height: 420vh; padding: 0; view-timeline-name: --party;
      animation: m-clock linear both; animation-timeline: --party; animation-range: contain 4% contain 96%;
      --hh: calc(var(--mins) / 60 - 0.5); --h: calc(7 + var(--hh)); --m: calc(var(--mins) - var(--hh) * 60); }
    .pclock__stage { position: sticky; top: 0; height: 100vh; height: 100svh; align-content: center; padding-top: 66px; }
    .pclock__clock { position: static; align-self: center; }
    .pclock__time { counter-reset: hr var(--h) mn var(--m); }
    .pclock__time::after { content: counter(hr) ":" counter(mn, decimal-leading-zero) " p.m."; }
    .pclock__steps { position: relative; display: grid; min-height: 340px; }
    .pclock__step { grid-area: 1 / 1; align-self: center; opacity: 0;
      animation: m-step linear both; animation-timeline: --party; }
    .pclock__step:nth-child(1) { animation-name: m-step-first; animation-range: contain 0% contain 22%; }
    .pclock__step:nth-child(2) { animation-range: contain 18% contain 42%; }
    .pclock__step:nth-child(3) { animation-range: contain 38% contain 62%; }
    .pclock__step:nth-child(4) { animation-range: contain 58% contain 82%; }
    .pclock__step:nth-child(5) { animation-name: m-step-last; animation-range: contain 78% contain 100%; }
    .pclock__bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 26px; }
    .pclock__bar i { height: 6px; border-radius: 6px; background: rgba(42, 46, 49, 0.14); overflow: hidden; position: relative; }
    .pclock__bar i::after { content: ""; position: absolute; inset: 0; background: var(--ink); transform-origin: 0 50%; scale: 0 1; animation: m-fill linear both; animation-timeline: --party; }
    .pclock__bar i:nth-child(1)::after { animation-range: contain 0% contain 20%; }
    .pclock__bar i:nth-child(2)::after { animation-range: contain 20% contain 40%; }
    .pclock__bar i:nth-child(3)::after { animation-range: contain 40% contain 60%; }
    .pclock__bar i:nth-child(4)::after { animation-range: contain 60% contain 80%; }
    .pclock__bar i:nth-child(5)::after { animation-range: contain 80% contain 100%; }

    /* Pinned sideways strip (tablet + desktop) */
    @media (min-width: 760px) {
      .hstrip { height: 300vh; padding-block: 0; view-timeline-name: --strip; }
      .hstrip__stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding-top: 66px; scroll-snap-type: none; }
      .hstrip__track { animation: m-slide linear both; animation-timeline: --strip; animation-range: contain 0% contain 100%; }
    }

    /* Closing line */
    .thanks { animation: m-thanks linear both; animation-timeline: view(); animation-range: entry 0% cover 40%; }
  }
}
