/* lets-talk-ai.ro styles. Tokens live on :root; every rule sits in a layer.
   Mobile first: rules are written for a 320 to 430 px portrait phone, wider screens are min-width additions.
   Nothing is hidden here: any rule that hides content for a reveal goes in the motion layer under html.js (Plan 4). */
@layer base, layout, components, motion;

:root {
  --veil: 1; /* how much navy lies over the hero's night; the landscape hero lifts it as it opens (landing.js) */
  --night: #00003f;
  --night-2: #001244;
  --deep: #001f4d;
  --indigo: #2b2e8c;
  --electric: #1f75e0;
  --sky: #56b9ea;
  --ice: #aeebf7;
  --violet: #7b3cf0;
  --orange: #ff9a2e;
  --paper: #f5f7ff;
  --glow: var(--deep);
  --card-a: var(--indigo);
  --card-b: var(--night-2);
  --text: var(--paper);
  --muted: #c4cbef;
  --faq-inset: clamp(1rem, 3vw, 1.75rem);
  --link: var(--sky);
  --focus: var(--orange);
  --font-head: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --font-text: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --gutter: clamp(1rem, 4vw, 3rem);
  --measure: 38rem;
  --radius: 999px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

@layer base {
  *, *::before, *::after { box-sizing: border-box; }
  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: 6rem;
    /* one fixed background, painted once: film grain (5 percent), a haze of violet and blue, the chapter glow.
       Separate full-screen layers would be redrawn on every frame of every animation. */
    background:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E") 0 0 / 160px 160px fixed,
      radial-gradient(42% 30.8% at 10.8% 22%, rgba(123, 60, 240, 0.2), transparent 70%) fixed,
      radial-gradient(39.2% 33.6% at 89.2% 72.4%, rgba(31, 117, 224, 0.22), transparent 70%) fixed,
      radial-gradient(30.8% 25.2% at 64% 5.2%, rgba(86, 185, 234, 0.12), transparent 70%) fixed,
      radial-gradient(120% 70% at 50% 0%, var(--glow), var(--night) 70%) fixed,
      var(--night);
  }
  body {
    margin: 0;
    min-height: 100svh;
    padding-bottom: 6rem; /* room for the floating sign-up pill */
    color: var(--text);
    font: 400 1.0625rem/1.6 var(--font-text);
    overflow-wrap: break-word;
  }
  h1, h2, h3 {
    margin: 0 0 0.6em;
    font-family: var(--font-head);
    line-height: 1;
    letter-spacing: -0.02em;
    text-wrap: balance;
    hyphens: auto;
  }
  h1 { font-size: clamp(2.4rem, 9vw + 0.5rem, 5.5rem); font-weight: 800; }
  h2 { font-size: clamp(2rem, 7vw + 0.25rem, 4rem); font-weight: 750; }
  h3 { font-size: 1.25rem; font-weight: 650; line-height: 1.15; letter-spacing: -0.01em; }
  p { margin: 0 0 1em; max-width: var(--measure); text-wrap: pretty; }
  a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
  a:hover { color: var(--ice); }
  :focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
  img, svg, video { display: block; max-width: 100%; height: auto; }
  ul, ol { margin: 0; padding: 0; list-style: none; }
  .visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .skip {
    position: absolute;
    top: -5rem;
    left: 1rem;
    z-index: 100;
    padding: 0.7rem 1.1rem;
    border-radius: var(--radius);
    background: var(--orange);
    color: var(--night);
    font-weight: 600;
    text-decoration: none;
  }
  .skip:focus { top: 1rem; }
}

@layer layout {
  .nav {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    padding: 0.6rem var(--gutter);
    background: rgba(0, 0, 63, 0.95);
  }
  .nav-brand {
    margin-right: auto;
    color: var(--paper);
    font-family: var(--font-head);
    font-weight: 800;
    letter-spacing: 0.02em;
    text-decoration: none;
  }
  /* on a phone the links sit in their own row and scroll sideways inside it, never the page */
  .nav-links {
    order: 3;
    flex: 1 1 100%;
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    scrollbar-width: none;
    white-space: nowrap;
    font-size: 0.9375rem;
  }
  .nav-links a { display: inline-block; padding: 0.5rem 0; color: var(--muted); text-decoration: none; }
  .nav-links a:hover { color: var(--paper); }
  .lang {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 0.9rem;
    border: 1px solid rgba(245, 247, 255, 0.35);
    border-radius: var(--radius);
    color: var(--paper);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    text-decoration: none;
  }
  .chapter { max-width: 76rem; margin: 0 auto; padding: clamp(3.5rem, 12vw, 8rem) var(--gutter); }
  .footer {
    display: grid;
    gap: 1rem;
    padding: 3rem var(--gutter) 2rem;
    border-top: 1px solid rgba(174, 235, 247, 0.2);
    color: var(--muted);
  }
  .footer-mark { display: block; width: min(16rem, 70%); }
  .footer-mark:focus-visible { border-radius: 8px; }
  .footer-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
  .footer-links a { display: inline-block; padding: 0.5rem 0; color: var(--muted); }
  .copyright { font-family: var(--font-mono); font-size: 0.8125rem; }
  .copyright a { color: inherit; }

  @media (min-width: 768px) {
    .nav-links { order: 0; flex: 0 1 auto; overflow: visible; }
  }
}

@layer components {
  .pill {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 0.75rem 1.4rem;
    border: 1px solid rgba(245, 247, 255, 0.35);
    border-radius: var(--radius);
    color: var(--paper);
    font-weight: 500;
    text-decoration: none;
  }
  .pill:hover { border-color: var(--paper); color: var(--paper); }
  .pill-primary { border-color: var(--orange); background: var(--orange); color: var(--night); font-weight: 600; }
  .pill-primary:hover { border-color: #ffb25e; background: #ffb25e; color: var(--night); }
  .pill-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.5rem 0; }
  .signup { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin: 1.5rem 0 0; }
  .signup-alt { display: inline-block; padding: 0.5rem 0; }
  .signup-pill {
    position: fixed;
    right: 1rem;
    bottom: max(1rem, env(safe-area-inset-bottom));
    z-index: 45;
    box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.6);
  }

  /* the brush wordmark: letters are <use> of shared paths, each under its own paint mask */
  .wm-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
  .wordmark { display: block; width: 100%; height: auto; overflow: visible; fill: var(--paper); }
  .hero-mark { position: relative; width: min(100%, 34rem); margin: 0 0 2rem; aspect-ratio: 1176.2 / 1006.4; }
  .hero-mark .wordmark { position: absolute; inset: 0; }
  .drop { position: absolute; border-radius: 50%; pointer-events: none; }
  .drop-1 { top: 8%; right: 6%; width: 14px; height: 14px; background: var(--sky); }
  .drop-2 { top: 40%; right: -2%; width: 8px; height: 8px; background: var(--violet); }
  .drop-3 { bottom: 4%; left: 8%; width: 10px; height: 10px; background: var(--electric); }
  .drop-4 { top: 2%; left: 30%; width: 6px; height: 6px; background: var(--ice); }
  .intro-cover { display: none; }
  .splat { position: absolute; z-index: 95; border-radius: 50%; pointer-events: none; transform: translate(-50%, -50%); }
  .lead { font-size: clamp(1.15rem, 1rem + 1vw, 1.5rem); line-height: 1.45; color: var(--paper); }
  /* round sticker: a text ring around the edition label */
  .sticker {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 7.5rem;
    height: 7.5rem;
    margin: 1.5rem 0 0;
    border-radius: 50%;
    background: var(--orange);
    color: var(--night);
    font-family: var(--font-mono);
    transform: rotate(-8deg);
  }
  /* the ring turns with the scroll (motion.js) through this wrapper: turning the SVG itself lays its text out every frame */
  .sticker-spin, .sticker-ring { position: absolute; inset: 0; width: 100%; height: 100%; }
  .sticker-ring text { fill: var(--night); font-family: var(--font-mono); font-size: 15px; font-weight: 600; letter-spacing: 0.04em; }
  .sticker-label { max-width: 4.2rem; font-size: 1rem; font-weight: 700; line-height: 1.05; text-align: center; text-transform: uppercase; }
  .sticker-label b { display: block; font-size: 1.7rem; line-height: 1; }
  .sticker-label small { font-size: 0.8rem; }
  .poster .sticker { position: absolute; top: 1rem; right: 1rem; margin: 0; }
  .hero-mark .sticker { position: absolute; right: -0.25rem; bottom: -1.5rem; z-index: 2; width: 6.5rem; height: 6.5rem; margin: 0; }

  .brush-underline { display: block; width: min(15rem, 62%); height: auto; margin: -0.35em 0 1.4rem -0.5rem; fill: var(--sky); }
  .badges { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0 0 1.25rem; }
  .badge {
    display: inline-block;
    padding: 0.45rem 0.95rem;
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
  }
  .badge-free { background: var(--sky); color: var(--night); transform: rotate(-6deg); }
  .badge-slides { background: var(--violet); color: var(--paper); transform: rotate(4deg); }
  .marquee-outline .topics li { color: transparent; -webkit-text-stroke: 1px var(--ice); }
  .kicker {
    color: var(--sky);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .more { display: inline-block; margin-top: 2rem; padding: 0.5rem 0; }

  .topics { margin-top: 2rem; }
  .topics li {
    padding: 0.8rem 0;
    border-top: 1px solid rgba(174, 235, 247, 0.2);
    font-family: var(--font-head);
    font-size: clamp(1.3rem, 1rem + 2vw, 2rem);
    font-weight: 600;
    line-height: 1.2;
  }

  .norm-list { display: grid; gap: 1.75rem; counter-reset: norm; }
  .norm-list li { padding-top: 1rem; border-top: 1px solid rgba(174, 235, 247, 0.25); counter-increment: norm; }
  .norm-list li::before {
    content: "0" counter(norm);
    display: block;
    margin-bottom: 0.25rem;
    color: transparent;
    font-family: var(--font-head);
    font-size: clamp(4rem, 22vw, 7rem);
    font-weight: 800;
    line-height: 0.85;
    -webkit-text-stroke: 1.5px var(--sky);
  }
  .norm-list p { color: var(--muted); }

  .timeline { position: relative; margin-left: 0.4rem; padding-left: 1.6rem; border-left: 2px solid var(--sky); }
  .timeline li { position: relative; margin-bottom: 2.25rem; }
  .timeline li:last-child { margin-bottom: 0; }
  .timeline-paint { display: none; }
  .timeline li::before {
    content: "";
    position: absolute;
    top: 0.3rem;
    left: calc(-1.6rem - 7px);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--sky);
  }
  .time {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--ice);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .timeline p { color: var(--muted); }

  .poster {
    position: relative;
    overflow: hidden;
    padding: clamp(1.5rem, 5vw, 3rem);
    border-radius: 28px;
    background: linear-gradient(160deg, var(--indigo), var(--deep));
  }
  .poster-number {
    margin: 0 0 1rem;
    color: var(--paper);
    font-family: var(--font-head);
    font-size: clamp(6rem, 40vw, 16rem);
    font-weight: 800;
    line-height: 0.8;
    letter-spacing: -0.04em;
  }
  .info-pills { display: grid; gap: 0.6rem; }
  .info-pills li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 18px;
    background: rgba(0, 0, 63, 0.45);
  }
  .label {
    color: var(--ice);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .poster-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin-top: 1rem; }
  .poster-links a { display: inline-block; padding: 0.5rem 0; }

  .edition-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
  .edition-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 10rem;
    padding: 1.1rem;
    border: 2px solid transparent;
    border-radius: 20px;
    background: var(--night-2);
  }
  .edition-card.is-next { border-color: var(--orange); }
  .card-number {
    margin: 0;
    color: var(--paper);
    font-family: var(--font-head);
    font-size: clamp(2.8rem, 12vw, 4.5rem);
    font-weight: 800;
    line-height: 0.9;
  }
  .card-date { margin: 0.5rem 0 0; color: var(--ice); font-family: var(--font-mono); font-size: 0.8125rem; }
  .card-venue { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.9375rem; }
  .card-tag {
    align-self: flex-start;
    margin: 0.75rem 0 0;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius);
    background: var(--orange);
    color: var(--night);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
  }
  .card-link { margin-top: auto; padding-top: 0.75rem; font-size: 0.9375rem; }
  /* the whole card is the link's tap target */
  .card-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }

  .help { margin-top: 1.5rem; color: var(--muted); }

  /* one inset for question and answer, so the open panel frames both evenly */
  .faq-item { border-top: 1px solid rgba(174, 235, 247, 0.2); }
  .faq-item:last-of-type { border-bottom: 1px solid rgba(174, 235, 247, 0.2); }
  .faq-item[open] { background: rgba(174, 235, 247, 0.06); box-shadow: inset 3px 0 0 var(--sky); }
  .faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.25rem var(--faq-inset);
    cursor: pointer;
    font-family: var(--font-head);
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.3;
    list-style: none;
  }
  .faq-item summary::-webkit-details-marker { display: none; }
  .faq-item summary::after {
    content: "+";
    flex: none;
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid currentColor;
    border-radius: 50%;
    color: var(--orange);
    font-family: var(--font-mono);
    font-size: 1.3rem;
    line-height: 1;
  }
  .faq-item[open] summary::after { transform: rotate(45deg); }
  .faq-a p { margin: 0; padding: 0 var(--faq-inset) 1.5rem; max-width: 62ch; color: var(--muted); line-height: 1.6; }

  .prose { max-width: 46rem; }
  /* long single words (Confidențialitate) must fit a 320 px phone whole: no Romanian hyphenation in most browsers */
  .prose h1 { font-size: clamp(1.75rem, 9vw, 4.5rem); }
  .prose h2 { margin-top: 2.5rem; font-size: clamp(1.6rem, 5vw + 0.25rem, 2.4rem); }
  .rule-list li { padding: 0.9rem 0; border-top: 1px solid rgba(174, 235, 247, 0.2); color: var(--muted); }
  .rule-list strong { color: var(--paper); }

  .edition-hero h1 { font-size: clamp(3rem, 14vw, 7rem); }

  @media (min-width: 768px) {
    .norm-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem 3rem; }
    .edition-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
    .poster { display: grid; grid-template-columns: auto 1fr; gap: 0 3rem; align-items: end; }
    .poster-number { grid-row: span 3; margin: 0; }
  }
  @media (min-width: 1100px) {
    .edition-cards { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  }

  /* landscape: the wordmark on the left at the height of the screen, the line and the call to action on the right */
  @media (orientation: landscape) and (min-width: 768px) {
    .hero {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
      grid-template-rows: 1fr auto auto 1fr;
      column-gap: clamp(2rem, 5vw, 5rem);
      min-height: calc(100svh - 4.5rem);
      padding-block: clamp(1rem, 5vh, 4rem);
    }
    .hero-mark { grid-row: 1 / -1; align-self: center; width: min(100%, calc((100svh - 7rem) * 1.17)); margin: 0; }
    .hero h1 { grid-row: 2; align-self: end; margin-bottom: 0.4em; font-size: min(4.6rem, 3.4vw + 0.6rem, 9svh); }
    .hero .lead { grid-row: 3; margin-bottom: 0; font-size: min(1.25rem, 4.6svh); }
    .hero .signup { grid-row: 4; align-self: start; margin-top: clamp(0.75rem, 3svh, 2rem); }
  }
  /* landscape phone: the text runs taller than the screen, so the wordmark stays at the top instead of centring */
  @media (orientation: landscape) and (min-width: 768px) and (max-height: 499px) {
    .hero { grid-template-rows: auto auto auto 1fr; }
    .hero-mark { align-self: start; }
  }
}

@layer components {
  /* a venue link inside a card sits above the card's own full-size link */
  .card-venue a { position: relative; z-index: 1; color: inherit; }

  /* the gallery: prints in a masonry of columns, two on a phone, more on wider screens */
  .gallery-grid { columns: 2; column-gap: 0.75rem; margin: 2rem 0 0; padding: 0; list-style: none; }
  .print { margin: 0 0 0.75rem; break-inside: avoid; }
  .print a {
    display: block;
    padding: 0.3rem 0.3rem 0.9rem;
    border-radius: 4px;
    background: var(--paper);
    box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.7);
  }
  .print img { display: block; width: 100%; height: auto; border-radius: 2px; background: var(--deep); }
  .gallery-note { margin-top: 2rem; color: var(--muted); }
  @media (min-width: 768px) {
    .gallery-grid { columns: 3; column-gap: 1.25rem; }
    .print { margin-bottom: 1.25rem; }
  }
  @media (min-width: 1200px) {
    .gallery-grid { columns: 4; }
  }

  /* the lightbox: one photo on the night, previous and next at the sides, close at the top */
  .lightbox {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--paper);
    overflow: hidden;
  }
  .lightbox::backdrop { background: rgba(0, 0, 30, 0.94); }
  .lb-figure { display: grid; place-items: center; height: 100%; margin: 0; }
  .lb-img {
    width: auto;
    height: auto;
    max-width: calc(100vw - 1.5rem);
    max-height: calc(100dvh - 8rem);
    border-radius: 4px;
    touch-action: pan-y pinch-zoom;
    user-select: none;
  }
  .lb-count {
    position: absolute;
    right: 0;
    bottom: max(1.25rem, env(safe-area-inset-bottom));
    left: 0;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-align: center;
  }
  .lb-btn {
    position: absolute;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid rgba(245, 247, 255, 0.35);
    border-radius: 50%;
    background: rgba(0, 0, 63, 0.75);
    color: var(--paper);
    cursor: pointer;
  }
  .lb-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .lb-prev, .lb-next { top: 50%; margin-top: -24px; }
  .lb-prev { left: 0.75rem; }
  .lb-next { right: 0.75rem; }
  .lb-close { top: max(0.75rem, env(safe-area-inset-top)); right: 0.75rem; }
  html.lb-open { overflow: hidden; }
}

@layer motion {
  /* Everything that hides or moves content is scoped to html.js without .motion-failed, and to no reduced motion:
     without JavaScript, if motion never starts, or with reduced motion, the page reads complete and still. */
  @media not (prefers-reduced-motion: reduce) {
    /* under the intro cover the h1 stays painted (it is the page's largest text); the cover hides it */
    html.js:not(.motion-failed):not(.intro) .hero h1,
    html.js:not(.motion-failed) .hero .sticker,
    html.js:not(.motion-failed) .hero .signup > * { opacity: 0; }
    /* the colour sweeps through the letters once as the hero arrives (landing.js); its own layer, so no repaint */
    .hero-wordmark { will-change: filter; }
    html.js:not(.motion-failed) .hero-wordmark .wm-paint,
    html.js:not(.motion-failed) .brush-underline .wm-paint { stroke-dasharray: 1; stroke-dashoffset: 1; }

    html.intro .intro-cover {
      position: fixed;
      inset: 0;
      z-index: 90;
      display: grid;
      place-items: center;
      padding: 12vmin;
      background: radial-gradient(90% 60% at 50% 40%, var(--deep), var(--night) 75%);
    }
    html.intro .intro-mark { width: min(100%, 36rem, 80vh); }
    html.intro .intro-mark .wm-paint { stroke-dasharray: 1; stroke-dashoffset: 1; }
    html.intro body { overflow: hidden; }


    html.motion-on .marquee { overflow: hidden; margin: 2rem calc(var(--gutter) * -1) 0; }
    html.motion-on .marquee-track { display: flex; width: max-content; }
    html.motion-on .marquee .topics { display: flex; margin: 0; }
    html.motion-on .marquee .topics li { padding: 0.6rem 1.4rem; border: 0; white-space: nowrap; }
    html.motion-on .marquee .topics li::after { content: "·"; margin-left: 2.8rem; color: var(--orange); }

    html.motion-on .timeline { border-left-color: rgba(86, 185, 234, 0.18); }
    html.motion-on .timeline-paint {
      position: absolute;
      top: 0;
      bottom: 0;
      left: -2px;
      display: block;
      width: 4px;
      border-radius: 2px;
      background: linear-gradient(var(--ice), var(--sky) 30%, var(--electric));
      box-shadow: 0 0 14px var(--sky);
      transform-origin: top;
    }
    html.motion-on .timeline li::before { background: var(--night-2); box-shadow: inset 0 0 0 2px var(--sky); transition: transform 0.4s var(--ease-out), background 0.4s, box-shadow 0.4s; }
    html.motion-on .timeline li.is-lit::before { background: var(--sky); box-shadow: 0 0 0 6px rgba(86, 185, 234, 0.25); transform: scale(1.25); }

    html.motion-on .signup-pill { transition: transform 0.45s var(--ease-out), opacity 0.3s, visibility 0s; }
    html.js .signup-pill.is-away {
      transform: translateY(160%);
      opacity: 0;
      visibility: hidden;
      transition: transform 0.45s var(--ease-out), opacity 0.3s, visibility 0s 0.45s;
    }
    .faq-item summary::after { transition: transform 0.3s var(--ease-out); }
    html.motion-on .faq-a { overflow: hidden; }
    .faq-item:not([open]) summary:hover { background: rgba(174, 235, 247, 0.04); }

    html.motion-on .norm-list h3 { font-size: clamp(2rem, 9vw, 3.6rem); line-height: 0.95; }
    /* a print lifts a little under the pointer */
    .print a { transition: transform 0.3s var(--ease-out); }
    .print a:hover { transform: translateY(-3px) rotate(-0.6deg); }
  }

  /* portrait: the editions are a swipeable deck (scrolls sideways inside itself, never the page) */
  @media (orientation: portrait), (max-width: 767px) {
    .edition-cards {
      display: flex;
      gap: 0.9rem;
      margin: 0 calc(var(--gutter) * -1);
      padding: 1rem var(--gutter) 2rem;
      overflow-x: auto;
      scroll-snap-type: x mandatory;
      scrollbar-width: none;
      overscroll-behavior-x: contain;
    }
    .edition-card { flex: 0 0 72%; min-height: 22rem; scroll-snap-align: center; }
    .card-number { font-size: clamp(5rem, 30vw, 8rem); }
  }

  .edition-card { background: linear-gradient(165deg, var(--card-a), var(--card-b) 75%); overflow: hidden; }
  .edition-card[data-n="1"] { --card-a: #1b2a7a; }
  .edition-card[data-n="2"] { --card-a: var(--electric); --card-b: var(--deep); }
  .edition-card[data-n="3"] { --card-a: #3a2a9a; }
  .edition-card[data-n="4"] { --card-a: #154a8f; }
  .edition-card[data-n="5"] { --card-a: var(--violet); --card-b: var(--night-2); }
  .edition-card[data-n="6"] { --card-a: var(--indigo); --card-b: var(--night); }

}

@layer components {
  /* clips: the real night behind the hero, a clip per step of the evening. The hero's background runs to the screen's edges; main clips anything that would scroll sideways. */
  main { overflow-x: clip; }
  .hero { position: relative; isolation: isolate; }
  .hero-bg { position: absolute; z-index: -1; top: 0; bottom: 0; left: 50%; width: 100vw; translate: -50% 0; overflow: hidden; }
  .hero-bg video { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
  .hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: var(--veil);
    background:
      linear-gradient(to bottom, rgba(0, 0, 63, 0.35), rgba(0, 0, 63, 0.15) 35%, rgba(0, 0, 63, 0.75) 80%, var(--night)),
      radial-gradient(120% 80% at 20% 40%, transparent 30%, rgba(0, 0, 63, 0.55));
  }
  .video-toggle {
    position: fixed;
    left: 1rem;
    bottom: max(1rem, env(safe-area-inset-bottom));
    z-index: 45;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.85rem;
    border: 1px solid rgba(174, 235, 247, 0.35);
    border-radius: var(--radius);
    background: rgba(0, 0, 63, 0.85);
    color: var(--paper);
    font: 600 0.75rem var(--font-mono);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
  }
  .video-toggle[hidden] { display: none; }
  .video-icon { width: 0.6rem; height: 0.7rem; border-inline: 3px solid currentColor; }
  .video-toggle[aria-pressed="true"] .video-icon { width: 0; height: 0; border: 0; border-left: 0.6rem solid currentColor; border-block: 0.35rem solid transparent; }

  /* a clip beside each step of the evening, like a phone held up in the room */
  .timeline li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 1rem; }
  .timeline li > :not(.step-clip) { grid-column: 1; }
  .step-clip {
    grid-column: 2;
    grid-row: 1 / span 3;
    width: clamp(5.5rem, 26vw, 8rem);
    aspect-ratio: 9 / 16;
    position: relative;
    border: 3px solid var(--paper);
    border-radius: 10px;
    background: var(--deep);
    box-shadow: 0 16px 30px -14px rgba(0, 0, 0, 0.8);
    rotate: 3deg;
  }
  .timeline li:nth-child(even) .step-clip { rotate: -3deg; }
  .step-frame { position: relative; height: 100%; overflow: hidden; border-radius: 7px; }
  .step-frame video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }

  .what-prints { display: none; }
  /* a card from a night with photos carries one, in the card's own colours */
  .edition-card { position: relative; isolation: isolate; }
  .card-photo { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; opacity: 0.5; mix-blend-mode: luminosity; }

  /* landscape: bigger type for bigger screens, prints beside "what it is", the FAQ beside its heading */
  @media (orientation: landscape) and (min-width: 768px) {
    .what { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); column-gap: clamp(2rem, 5vw, 5rem); }
    .what > * { grid-column: 1; }
    .what > .marquee, .what > .topics { grid-column: 1 / -1; }
    .what-prints { display: block; position: relative; grid-column: 2; grid-row: 1 / span 5; min-height: 26rem; }
    .what-print {
      position: absolute;
      width: 72%;
      height: auto;
      padding: 0.35rem 0.35rem 1.4rem;
      border-radius: 4px;
      background: var(--paper);
      box-shadow: 0 24px 40px -18px rgba(0, 0, 0, 0.8);
    }
    .what-print:nth-child(1) { top: 0; left: 0; rotate: -6deg; }
    .what-print:nth-child(2) { top: 26%; right: 0; rotate: 5deg; }
    .what-print:nth-child(3) { top: 56%; left: 10%; rotate: -2deg; }
    .faq { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); grid-template-rows: auto 1fr; column-gap: clamp(2rem, 5vw, 5rem); align-items: start; }
    .faq > h2, .faq > .brush-underline { grid-column: 1; }
    .faq > h2 { position: sticky; top: 6rem; }
    .faq > .faq-list { grid-column: 2; grid-row: 1 / span 2; }
    .hero { min-height: 100svh; }
    .hero-mark { width: min(100%, calc((100svh - 6rem) * 1.17)); }
    main h2 { font-size: clamp(2.8rem, 4.6vw, 5.5rem); }
    .what > p { max-width: 40rem; font-size: clamp(1.1rem, 0.6rem + 0.9vw, 1.5rem); }
    .marquee .topics li { font-size: clamp(1.8rem, 3.2vw, 3.4rem); }
    .norm-list h3 { font-size: clamp(2.2rem, 3.6vw, 4.2rem); }
    .lead { max-width: 34rem; }
  }
}

@layer motion {
  /* landscape with motion: the evening runs sideways while the page holds still (landing.js pins it) */
  @media not (prefers-reduced-motion: reduce) {
    html.motion-on[data-mode="landscape"]:not([data-short]) .evening { max-width: none; min-height: 100svh; padding-inline: 0; overflow: hidden; }
    html.motion-on[data-mode="landscape"]:not([data-short]) .evening > h2,
    html.motion-on[data-mode="landscape"]:not([data-short]) .evening > .brush-underline { margin-left: max(var(--gutter), calc((100vw - 76rem) / 2 + var(--gutter))); }
    html.motion-on[data-mode="landscape"]:not([data-short]) .evening .timeline {
      display: flex;
      gap: 6vw;
      width: max-content;
      margin: 3rem 0 0;
      padding: 3rem max(var(--gutter), calc((100vw - 76rem) / 2 + var(--gutter))) 0;
      border: 0;
    }
    html.motion-on[data-mode="landscape"]:not([data-short]) .evening .timeline li {
      width: min(46rem, 62vw);
      margin: 0;
      grid-template-columns: auto minmax(0, 1fr);
      column-gap: 2.5rem;
      align-items: end;
    }
    html.motion-on[data-mode="landscape"]:not([data-short]) .evening .timeline li > :not(.step-clip) { grid-column: 2; }
    html.motion-on[data-mode="landscape"]:not([data-short]) .evening .step-clip { grid-column: 1; grid-row: 1 / span 3; width: auto; height: min(58svh, 34rem); border-width: 5px; border-radius: 16px; }
    html.motion-on[data-mode="landscape"]:not([data-short]) .evening .step-frame { border-radius: 11px; }
    html.motion-on[data-mode="landscape"]:not([data-short]) .evening .timeline h3 { font-size: clamp(2rem, 3.4vw, 3.6rem); line-height: 1.02; }
    html.motion-on[data-mode="landscape"]:not([data-short]) .evening .time { font-size: 1rem; }
    html.motion-on[data-mode="landscape"]:not([data-short]) .evening .timeline li::before { top: -3rem; left: 0; }
    html.motion-on[data-mode="landscape"]:not([data-short]) .evening .timeline-paint { top: -2px; bottom: auto; left: 0; right: 0; width: auto; height: 4px; transform-origin: left; }

    /* the cursor bubble: a small speech bubble that follows the pointer and opens over links */
    html.js .cursor-bubble {
      position: fixed;
      top: 0;
      left: 0;
      z-index: 120;
      width: 14px;
      height: 14px;
      border-radius: 50% 50% 50% 2px;
      background: var(--sky);
      pointer-events: none;
      mix-blend-mode: screen;
      opacity: 0;
      transition: width 0.25s var(--ease-out), height 0.25s var(--ease-out), background 0.25s, opacity 0.3s;
    }
    html.js .cursor-bubble.is-on { opacity: 0.9; }
    html.js .cursor-bubble.is-link { width: 46px; height: 46px; background: var(--orange); }
  }
}
