/* ----------------------------------------------------------------------------
   JAZZ.IS.NOW — one page, ten skins.
   The structure and content never change; every visual decision is a CSS
   variable. A version is just a block of overrides at the foot of this file,
   chosen at random per visit (or pinned with ?theme=N). No web fonts, no
   build, no dependencies.
   ------------------------------------------------------------------------- */

:root {
  /* —— font stacks (system only) —— */
  --avenir:   "Avenir Next", "Avenir", "Nunito Sans", "Montserrat", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif:    "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, "Times New Roman", serif;
  --grotesk:  "Helvetica Neue", Helvetica, Arial, "Segoe UI", Roboto, sans-serif;
  --humanist: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --mono:     ui-monospace, "SF Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --sans:     var(--avenir);

  /* —— theme tokens (default skin: "Paper & Ink") —— */
  --paper:      #fbfaf7;
  --paper-dim:  #f2efe8;
  --ink:        #1a1916;
  --ink-soft:   #57534a;
  --ink-faint:  #8d877a;
  --accent:     var(--ink);     /* default skin is monochrome */
  --line:       #e4ded2;

  --card-bg:           var(--paper);
  --card-bg-hover:     #ffffff;
  --card-border:       var(--line);
  --card-border-hover: #d7cebd;
  --card-shadow:       0 14px 40px -18px rgba(40, 30, 12, 0.35);
  --radius:            14px;

  --hero-ink:    #fdfbf6;
  --hero-veil:   radial-gradient(120% 90% at 50% 44%, rgba(8,7,5,0.30) 0%, rgba(8,7,5,0.52) 68%, rgba(8,7,5,0.66) 100%);
  --hero-filter: none;
  --logo-fill:   #fdfbf6;
  --logo-glow:   rgba(255, 255, 255, 0.22);

  --font-display: var(--avenir);
  --font-body:    var(--avenir);

  --measure: 64rem;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}

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

/* ───────────────────────────────  HERO  ──────────────────────────────── */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;              /* iOS: the visible viewport             */
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
}

.hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  filter: var(--hero-filter);
  z-index: -2;
}

/* A soft veil so the wordmark always reads, whatever the photo does. */
.hero__veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--hero-veil);
}

.hero__inner {
  text-align: center;
  color: var(--hero-ink);
  padding: 2rem clamp(1.25rem, 5vw, 4rem);
}

.wordmark {
  margin: 0;
  line-height: 0;          /* no text box — the logo is the title */
}
/* The single source SVG, tinted and lit over the photograph. */
.wordmark__logo {
  display: block;
  width: clamp(13rem, 42vw, 27rem);
  height: auto;
  margin: 0 auto;
  fill: var(--logo-fill);
  filter: drop-shadow(0 3px 22px rgba(0,0,0,0.4));
  /* Once the mark has assembled, the whole logo pulses — a clear rise and glow. */
  animation: logo-pulse 5600ms ease-in-out 10500ms infinite;
}
/* The entrance, unhurried: the trumpet surfaces first, then the name follows. */
.wordmark__logo .horn { animation: horn-in 4600ms cubic-bezier(.16,.7,.27,1) 800ms both; }
.wordmark__logo .word { animation: word-in 5200ms cubic-bezier(.16,.7,.27,1) 4900ms both; }
@keyframes horn-in {
  from { opacity: 0; transform: translateY(46px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes word-in {
  from { opacity: 0; transform: translateY(34px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tagline {
  margin: clamp(1.1rem, 3vh, 1.8rem) 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.15rem, 2.8vw, 1.7rem);
  letter-spacing: 0.01em;
  color: var(--hero-ink);
  text-shadow: 0 1px 22px rgba(0,0,0,0.55);
  opacity: 0;
  animation: rise 1600ms cubic-bezier(.16,.7,.27,1) 9200ms both;  /* arrives after the name settles */
}

/* The scroll cue: a thin line that breathes. */
.hero__scroll {
  position: absolute;
  bottom: clamp(1.4rem, 4vh, 2.6rem);
  left: 50%;
  transform: translateX(-50%);
  width: 2.4rem;
  height: 3.2rem;
  display: grid;
  place-items: center;
}
.hero__scroll-line {
  width: 1px;
  height: 2.4rem;
  background: rgba(253,251,246,0.7);
  transform-origin: top;
  animation: drip 2200ms ease-in-out infinite;
}

/* Photographer credit, tucked into the lower-right of the frame. */
.hero__credit {
  position: absolute;
  right: clamp(0.9rem, 2.5vw, 1.6rem);
  bottom: clamp(0.7rem, 2vh, 1.1rem);
  margin: 0;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(253,251,246,0.72);
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

/* ────────────────────────────  MANIFESTO  ────────────────────────────── */

.manifesto {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(4rem, 12vh, 9rem) clamp(1.5rem, 6vw, 4rem) clamp(3rem, 8vh, 6rem);
  text-align: center;
}

/* The five lines flow and wrap like hand-set words — each its own size and a
   slight tilt, echoing the original page. */
.creed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: clamp(0.4rem, 1.4vh, 0.9rem) clamp(1rem, 3.5vw, 1.9rem);
}
.creed__item {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.25;
  color: var(--ink);
}
.creed__item--1 { font-size: clamp(1.5rem, 4.4vw, 2.4rem);  transform: rotate(-1.5deg); }
.creed__item--2 { font-size: clamp(1.1rem, 3.1vw, 1.65rem); font-style: italic; letter-spacing: 0.15em; transform: rotate(0.8deg); }
.creed__item--3 { font-size: clamp(1.3rem, 3.7vw, 2rem);    transform: rotate(-0.5deg); }
.creed__item--4 { font-size: clamp(1rem, 2.7vw, 1.45rem);   letter-spacing: 0.08em; transform: rotate(1.2deg); }
.creed__item--5 { font-size: clamp(1.6rem, 4.8vw, 2.7rem);  font-weight: 700; transform: rotate(-0.7deg); color: var(--accent); }

.contact {
  margin: clamp(2.4rem, 6vh, 4rem) 0 0;
}
.contact__link {
  font-family: var(--mono);
  font-size: clamp(0.95rem, 2.4vw, 1.15rem);
  letter-spacing: 0.02em;
  color: var(--accent);
  border-bottom: 1px solid var(--line);
  transition: border-color 200ms ease;
  padding-bottom: 2px;
}
.contact__link:hover,
.contact__link:focus-visible { border-color: var(--accent); }

/* ──────────────────────────────  WORKS  ──────────────────────────────── */

.works {
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.works__grid {
  list-style: none;
  margin: 0 auto;
  padding: clamp(2.5rem, 7vh, 5rem) clamp(1.25rem, 5vw, 4rem);
  max-width: 78rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: clamp(1rem, 2.5vw, 2rem);
}

.work__link {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  -webkit-touch-callout: none;          /* no link-preview popover on long-press */
  -webkit-user-select: none;
          user-select: none;
  padding: clamp(1.5rem, 3vw, 2.5rem) 1.25rem;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  background: var(--card-bg);
  transition: transform 260ms cubic-bezier(.16,.7,.27,1),
              box-shadow 260ms ease, border-color 260ms ease, background 260ms ease;
}
.work__link:hover,
.work__link:focus-visible {
  transform: translateY(-4px);
  border-color: var(--card-border-hover);
  background: var(--card-bg-hover);
  box-shadow: var(--card-shadow);
}

.work__logo {
  width: clamp(3.5rem, 7vw, 5rem);
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 12px;
}

.work__tagline {
  font-size: clamp(1.02rem, 2vw, 1.18rem);
  color: var(--ink);
  line-height: 1.35;
}
.work__domain {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
  transition: color 200ms ease;
}
.work__link:hover .work__domain,
.work__link:focus-visible .work__domain { color: var(--accent); }

/* ────────────────────────  EASTER-EGG OVERLAY  ───────────────────────── */

.egg {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 5vw, 3.5rem);
  background: rgba(8, 7, 5, 0.88);
  -webkit-backdrop-filter: blur(7px);
          backdrop-filter: blur(7px);
  animation: egg-in 320ms ease both;
}
.egg__frame {
  width: min(94vw, 1120px);
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 12px;
  background: #000;
  box-shadow: 0 30px 90px -24px rgba(0, 0, 0, 0.75);
}
.egg__close {
  position: absolute;
  top: clamp(0.7rem, 3vw, 1.6rem);
  right: clamp(0.7rem, 3vw, 1.6rem);
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  font: 400 1.8rem/1 var(--sans);
  color: rgba(253, 251, 246, 0.85);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease;
}
.egg__close:hover,
.egg__close:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.egg__out {
  position: absolute;
  bottom: clamp(0.8rem, 3vh, 1.6rem);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: rgba(253, 251, 246, 0.66);
  border-bottom: 1px solid transparent;
  transition: color 180ms ease, border-color 180ms ease;
}
.egg__out:hover,
.egg__out:focus-visible { color: #fff; border-color: rgba(255, 255, 255, 0.6); }
@keyframes egg-in { from { opacity: 0; } to { opacity: 1; } }

/* ───────────────────────────  FOCUS RING  ────────────────────────────── */

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

/* ─────────────────────────────  MOTION  ──────────────────────────────── */

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* After the entrance: a clear rise and swell with a soft glow (themed colour). */
@keyframes logo-pulse {
  0%, 100% {
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 3px 22px rgba(0,0,0,0.4));
  }
  50% {
    transform: translateY(-11px) scale(1.035);
    filter: drop-shadow(0 12px 44px var(--logo-glow));
  }
}
@keyframes drip {
  0%, 100% { transform: scaleY(0.35); opacity: 0.35; transform-origin: top; }
  50%      { transform: scaleY(1);    opacity: 0.9;  transform-origin: top; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wordmark__logo,
  .wordmark__logo .horn,
  .wordmark__logo .word { animation: none; }
  .tagline { animation: none; opacity: 1; }
  .hero__scroll-line { animation: none; }
  .work__link { transition: none; }
  .egg { animation: none; }
}

/* ===========================================================================
   THE TEN SKINS — each overrides only the tokens it needs.
   Theme 1 ("Paper & Ink") is the default above. Pin any with ?theme=N.
   =========================================================================== */

/* 2 · Midnight Brass — a late-night jazz club: charcoal, brass, serif. */
html[data-theme="2"] {
  --paper: #14130f; --paper-dim: #1c1a15;
  --ink: #ece6da; --ink-soft: #b6ad9c; --ink-faint: #8a8270;
  --accent: #c8963f; --line: #2b2820;
  --card-bg: #1a1813; --card-bg-hover: #211e17;
  --card-border: #2b2820; --card-border-hover: #4a4230;
  --card-shadow: 0 18px 50px -20px rgba(0,0,0,0.7);
  --hero-veil: radial-gradient(120% 90% at 50% 44%, rgba(0,0,0,0.34) 0%, rgba(0,0,0,0.62) 70%);
  --logo-glow: rgba(200,150,63,0.38);
  --font-display: var(--serif); --font-body: var(--avenir);
}

/* 3 · Blueprint — cool, technical, monospaced. */
html[data-theme="3"] {
  --paper: #eef2f6; --paper-dim: #e2e8ef;
  --ink: #16314d; --ink-soft: #3f5a76; --ink-faint: #7d93a8;
  --accent: #2f6fed; --line: #cdd8e4;
  --card-bg: #f6f9fc; --card-bg-hover: #ffffff;
  --card-border: #cdd8e4; --card-border-hover: #9db8d8;
  --card-shadow: 0 14px 40px -18px rgba(20,50,90,0.30);
  --radius: 6px;
  --hero-filter: grayscale(0.3) brightness(0.92) saturate(1.1);
  --logo-glow: rgba(47,111,237,0.32);
  --font-display: var(--mono); --font-body: var(--mono);
}

/* 4 · Bauhaus — white, black, one red, hard edges, hard shadow. */
html[data-theme="4"] {
  --paper: #f7f6f2; --paper-dim: #ecebe5;
  --ink: #111111; --ink-soft: #444444; --ink-faint: #888888;
  --accent: #e23b2e; --line: #111111;
  --card-bg: #ffffff; --card-bg-hover: #ffffff;
  --card-border: #111111; --card-border-hover: #e23b2e;
  --card-shadow: 8px 8px 0 0 #111111;
  --radius: 0px;
  --logo-glow: rgba(226,59,46,0.30);
  --font-display: var(--grotesk); --font-body: var(--grotesk);
}

/* 5 · Sepia — a sun-faded record sleeve, all serif. */
html[data-theme="5"] {
  --paper: #f3e9d8; --paper-dim: #ece0c9;
  --ink: #3a2c1c; --ink-soft: #6b573f; --ink-faint: #9c876a;
  --accent: #9c5a2b; --line: #ddccb0;
  --card-bg: #f7efdd; --card-bg-hover: #fbf5e8;
  --card-border: #ddccb0; --card-border-hover: #c9b48f;
  --card-shadow: 0 14px 40px -18px rgba(120,80,30,0.35);
  --hero-filter: sepia(0.55) contrast(1.05) brightness(0.96);
  --logo-glow: rgba(180,120,60,0.32);
  --font-display: var(--serif); --font-body: var(--serif);
}

/* 6 · Mint — airy, fresh, humanist. */
html[data-theme="6"] {
  --paper: #f3f8f4; --paper-dim: #e6f1ea;
  --ink: #16312a; --ink-soft: #3f5f54; --ink-faint: #7ba293;
  --accent: #2fa37a; --line: #cfe5da;
  --card-bg: #f8fcf9; --card-bg-hover: #ffffff;
  --card-border: #cfe5da; --card-border-hover: #a4d2bf;
  --card-shadow: 0 14px 40px -18px rgba(30,110,80,0.28);
  --radius: 18px;
  --logo-glow: rgba(47,163,122,0.30);
  --font-display: var(--humanist); --font-body: var(--humanist);
}

/* 7 · Terminal — a dark CRT: phosphor green on near-black, monospaced. */
html[data-theme="7"] {
  --paper: #0c0f0c; --paper-dim: #121712;
  --ink: #9cf0a8; --ink-soft: #5fae6c; --ink-faint: #3f7a49;
  --accent: #7cff6b; --line: #1c2a1c;
  --card-bg: #0f140f; --card-bg-hover: #131a13;
  --card-border: #1c2a1c; --card-border-hover: #3f7a49;
  --card-shadow: 0 0 0 1px rgba(124,255,107,0.25), 0 14px 40px -18px rgba(0,0,0,0.8);
  --radius: 4px;
  --hero-filter: brightness(0.78) grayscale(0.4) sepia(0.4) hue-rotate(70deg) saturate(1.6);
  --logo-fill: #9cf0a8; --logo-glow: rgba(124,255,107,0.42);
  --font-display: var(--mono); --font-body: var(--mono);
}

/* 8 · Editorial — bright magazine: white, serif heads, a red rule. */
html[data-theme="8"] {
  --paper: #ffffff; --paper-dim: #f3f3f1;
  --ink: #16140f; --ink-soft: #4a463d; --ink-faint: #8a857a;
  --accent: #c81e1e; --line: #e6e3da;
  --card-bg: #ffffff; --card-bg-hover: #ffffff;
  --card-border: #e6e3da; --card-border-hover: #d8b3b3;
  --card-shadow: 0 14px 40px -18px rgba(120,30,30,0.30);
  --logo-glow: rgba(200,30,30,0.28);
  --font-display: var(--serif); --font-body: var(--avenir);
}

/* 9 · Dusk Rose — warm plum dark, a rose accent, serif heads. */
html[data-theme="9"] {
  --paper: #1c1418; --paper-dim: #241a20;
  --ink: #f0dfe2; --ink-soft: #c2a3aa; --ink-faint: #977a82;
  --accent: #e08aa0; --line: #33232b;
  --card-bg: #221820; --card-bg-hover: #2a1f27;
  --card-border: #33232b; --card-border-hover: #5a3a47;
  --card-shadow: 0 18px 50px -20px rgba(0,0,0,0.6);
  --hero-filter: brightness(0.92) sepia(0.2) hue-rotate(300deg) saturate(1.25);
  --logo-glow: rgba(224,138,160,0.36);
  --font-display: var(--serif); --font-body: var(--humanist);
}

/* 10 · High Contrast — pure black & white, bold grotesque, grayscale photo. */
html[data-theme="10"] {
  --paper: #ffffff; --paper-dim: #f0f0f0;
  --ink: #000000; --ink-soft: #3a3a3a; --ink-faint: #7a7a7a;
  --accent: #000000; --line: #dcdcdc;
  --card-bg: #ffffff; --card-bg-hover: #fafafa;
  --card-border: #000000; --card-border-hover: #000000;
  --card-shadow: 0 14px 40px -18px rgba(0,0,0,0.45);
  --hero-filter: grayscale(1) contrast(1.18);
  --logo-glow: rgba(255,255,255,0.30);
  --font-display: var(--grotesk); --font-body: var(--grotesk);
}
