/* ---------------------------------------------------------
   editorial.css — the redesign layer for the homepage.
   Loaded after styles.css and book.css (homepage only), so the
   admin panel and book editor keep their own look.
   Direction: contemporary creative studio + fashion editorial,
   with Indian textile influence only as material and texture.
--------------------------------------------------------- */

:root {
  --ivory: #f8f5ec;
  --paper-2: #fffdf8;
  --blush: #ebc4cb;
  --blush-soft: #f4dfe2;
  --blush-deep: #b35d70;
  --maroon: #5e1a28;
  --maroon-deep: #45121d;
  --charcoal: #1e1e1e;
  --gold: #d4af7c;
  --line: rgba(var(--fg-rgb), 0.14);
  --line-strong: rgba(var(--fg-rgb), 0.55);

  /* re-point the old tokens so untouched rules inherit the new palette */
  --cream: var(--ivory);
  --paper: var(--paper-2);
  --sand: #efe6d6;
  --coral: var(--blush);
  --coral-deep: var(--blush-deep);
  --mustard: var(--gold);
  --mustard-deep: #a8843f;
  --denim: var(--maroon);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --gutter: clamp(20px, 4vw, 64px);
  --header-h: 68px;

  --serif: 'Playfair Display', 'Fraunces', Georgia, serif;
  --sans: 'Inter', 'Archivo', system-ui, sans-serif;
  --script: 'La Belle Aurore', cursive;
}

/* warm editorial paper: an almost invisible grain */
body {
  font-family: var(--sans);
  background:
    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.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.28 0 0 0 0 0.2 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    var(--ivory);
  color: var(--charcoal);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, .display { font-family: var(--serif); letter-spacing: -0.01em; text-wrap: balance; }
p { line-height: 1.65; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--maroon); outline-offset: 3px; }

/* use the laptop screen: a wide canvas with comfortable outer margins */
.wrap { max-width: 1440px; padding: 0 var(--gutter); }

.skip-link { border-radius: var(--radius-sm); }

/* ---------- labels, rules, notes ---------- */
.kicker {
  font-family: var(--sans); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.18em;
  color: var(--blush-deep); margin-bottom: 16px;
}
.kicker .dot { width: 6px; height: 6px; background: var(--blush-deep); border: 0; }
.band-ink .kicker { color: var(--gold); }
.band-ink .kicker .dot { background: var(--gold); }

.hand-note {
  font-family: var(--script); color: var(--maroon); font-size: clamp(1.25rem, 1.9vw, 1.7rem);
  line-height: 1.25; margin: 0; pointer-events: none; user-select: none;
}

/* thin vertical brocade edges: textile as material, used sparingly */
.textile-edges { position: relative; }
.textile-edges::before, .textile-edges::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 14px; z-index: 1; pointer-events: none;
  background: url("assets/textile-border.jpg") center top / 100% auto repeat-y;
}
.textile-edges::before { left: 0; }
.textile-edges::after { right: 0; transform: scaleX(-1); }

/* ---------- buttons: softly rounded rectangles ---------- */
.btn {
  font-family: var(--sans); font-weight: 600; font-size: 0.92rem; letter-spacing: 0.01em;
  padding: 13px 22px; border-radius: 8px; border: 1px solid transparent; box-shadow: none;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: none; }
.btn span[aria-hidden] { transition: transform .2s ease; }
.btn:hover span[aria-hidden] { transform: translateX(3px); }
.btn.primary { background: var(--maroon); color: var(--on-accent); border-color: var(--maroon); }
.btn.primary:hover { background: var(--blush); color: var(--maroon-deep); border-color: var(--blush); }
.btn.secondary { background: var(--ivory); color: var(--charcoal); border-color: var(--line-strong); }
.btn.secondary:hover { background: var(--blush-soft); border-color: var(--charcoal); }
.btn.blush { background: var(--blush); color: var(--maroon-deep); border-color: var(--blush); }
.btn.blush:hover { background: var(--ivory); border-color: var(--ivory); }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--line-strong); }
.btn.ghost:hover { border-color: var(--fg); background: var(--tint); }

/* ---------- header: floats at the top the whole time ---------- */
.site-header {
  position: sticky; top: 0; z-index: 120;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  height: var(--header-h); padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--page) 86%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(10px); backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px -18px rgba(var(--shade), .35); }

.brand { display: inline-flex; align-items: center; gap: 10px; justify-self: start; font-family: var(--serif); font-weight: 600; font-size: 1.12rem; color: var(--charcoal); }
.brand .lotus { width: 22px; height: 22px; color: var(--maroon); }

/* the old floating nav becomes part of the header */
.nav { position: static; margin: 0; padding: 0; display: block; }
.nav-inner {
  background: transparent; border: 1px solid var(--line-strong); border-radius: 12px; padding: 4px;
  box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; flex-wrap: nowrap;
}
.nav-links { flex-wrap: nowrap; gap: 2px; }
.nav-links a {
  font-family: var(--sans); font-size: 0.8rem; font-weight: 500; letter-spacing: 0.01em;
  padding: 7px 13px; border-radius: 8px; color: var(--charcoal);
  transition: background .2s ease, color .2s ease;
}
.nav-links a:hover { background: var(--blush-soft); transform: none; }
.nav-links a.is-active { background: var(--blush); color: var(--maroon-deep); }

.header-socials { justify-self: end; display: flex; gap: 8px; }
.header-socials a {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center; color: var(--charcoal);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.header-socials a:hover { background: var(--maroon); color: var(--on-accent); border-color: var(--maroon); }

.menu-toggle { display: none; }

/* ---------- 1. hero ---------- */
#landing-hero { min-height: calc(100svh - var(--header-h)); padding: 24px 0 56px; }
.landing-wordmark { display: none; }
.landing-hero-inner {
  max-width: 1440px; padding: 0 calc(var(--gutter) + 20px);
  grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 4vw, 72px);
}
.landing-headline {
  font-family: var(--serif); font-weight: 900; text-transform: uppercase;
  font-size: clamp(3rem, 7vw, 7rem); line-height: 0.9; letter-spacing: -0.02em;
  margin: 8px 0 26px; color: var(--charcoal);
}
.lh-highlight { color: inherit; padding: 0; }
.lh-highlight::before { display: none; }
.landing-subrow {
  font-family: var(--sans); font-weight: 500; font-size: 1rem; letter-spacing: 0.02em; text-transform: none;
  color: var(--charcoal); margin-bottom: 18px;
}
.landing-subrow i { font-style: normal; color: var(--blush-deep); padding: 0 6px; }
.landing-subtext { font-family: var(--sans); font-weight: 400; font-size: 1.08rem; color: var(--fg-3); margin-bottom: 32px; }
.landing-subtext .accent-word { color: var(--maroon); font-weight: 600; }
.landing-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.landing-photo-wrap { aspect-ratio: 1 / 1.08; }
/* torn blush paper behind the portrait */
.landing-photo-block.block-a {
  width: 78%; height: 86%; top: 4%; right: 6%;
  background: var(--blush) url("assets/book-paper.jpg") center / cover;
  background-blend-mode: multiply;
  clip-path: polygon(2% 3%, 18% 0%, 41% 2.5%, 63% 0.5%, 86% 2%, 99% 0%, 97.5% 22%, 100% 47%, 98% 71%, 100% 98%, 78% 100%, 52% 97.5%, 27% 100%, 4% 98%, 0% 76%, 2.5% 49%, 0% 24%);
  opacity: .92;
}
.landing-photo { filter: drop-shadow(0 22px 34px rgba(var(--shade), .2)); }
.hero-thread { position: absolute; inset: -4% -2% 0 -6%; width: 108%; height: 104%; z-index: 0; pointer-events: none; }
.hero-thread path { stroke: var(--maroon); stroke-width: 1.2; opacity: .55; vector-effect: non-scaling-stroke; }
/* pinned-hero transition: About rises over the cover like a card */
/* The browser pins the cover itself (sticky), so it moves in step with the finger on
   phones instead of being chased by scroll code. A cover taller than the screen scrolls
   to its bottom first, then pins (--hero-h is measured in script.js on resize only). */
#landing-hero {
  position: sticky; z-index: 0; overflow: clip;
  top: min(var(--header-h), calc(100svh - var(--hero-h, 100svh)));
}
.hero-dim { position: absolute; inset: 0; z-index: 5; pointer-events: none; background: var(--dark-2); opacity: 0; }
/* dim + slight recede as About covers the cover, run by the compositor on the scroll itself */
@supports (animation-timeline: view()) {
  .cover-stack { timeline-scope: --about-in; }
  #about { view-timeline: --about-in block; }
  .hero-dim, .landing-hero-inner {
    animation-timing-function: linear; animation-fill-mode: both;
    animation-timeline: --about-in; animation-range: entry 0% entry 100%;
  }
  .hero-dim { animation-name: hero-dim; }
  .landing-hero-inner { animation-name: hero-recede; transform-origin: 50% 40%; }
}
@keyframes hero-dim { to { opacity: .6; } }
@keyframes hero-recede { to { transform: scale(.95); } }
@media (prefers-reduced-motion: reduce) {
  .hero-dim, .landing-hero-inner { animation: none; }
}
#about {
  position: relative; z-index: 2;
  border-radius: clamp(22px, 3vw, 40px) clamp(22px, 3vw, 40px) 0 0;
  box-shadow: 0 -24px 60px -28px rgba(var(--dark-2-rgb), .55);
}
.hero-note { position: absolute; right: -2%; top: 16%; z-index: 2; transform: rotate(-14deg); text-align: center; }

#scroll-hint { left: calc(var(--gutter) + 20px); font-family: var(--sans); font-weight: 600; font-size: 0.72rem; letter-spacing: .16em; }

/* ---------- 2. about: a dark editorial spread ---------- */
#about.band-ink { background: var(--dark); padding: clamp(80px, 9vw, 120px) 0 110px; }
.hero-grid { grid-template-columns: 0.95fr 1.05fr; gap: clamp(40px, 6vw, 110px); align-items: center; }
.folio-row { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.folio-row .kicker { margin: 0; }
.folio-row .folio { flex: 1; display: flex; align-items: center; gap: 12px; font-family: var(--serif); font-style: italic; color: rgba(var(--on-dark-rgb), .45); font-size: .9rem; }
.folio-row .folio::before { content: ""; flex: 1; height: 1px; background: rgba(var(--on-dark-rgb), .18); }
#hero-name { font-family: var(--serif); font-weight: 800; font-size: clamp(2.6rem, 5vw, 4.6rem); white-space: normal; margin: 10px 0 18px; color: var(--on-dark); }
.band-ink .hero-meta { color: var(--gold); font-weight: 500; font-size: .86rem; letter-spacing: .04em; }
.hero-bio { font-size: 1.06rem; line-height: 1.75; max-width: 62ch; color: var(--on-dark-2) !important; }
.hero-bio .accent-word { color: var(--on-dark-pink); font-style: italic; font-weight: 500; }
.hero-bio a, #hero-role a { text-decoration-color: var(--on-dark-pink); }
.hero-actions { margin: 30px 0 0; gap: 12px; }

/* photos as printed prints: an off-white border, slight tilt, a strip of tape */
.about-slideshow { aspect-ratio: 4 / 5; max-width: 560px; justify-self: center; width: 100%; }
.about-slide { border: 10px solid var(--print); border-bottom-width: 42px; border-radius: 3px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.8); }
.band-ink .about-slide { border-color: var(--print); }
.photo-tape {
  position: absolute; z-index: 6; top: -14px; left: 50%; width: 120px; height: 30px;
  transform: translateX(-50%) rotate(-4deg);
  background: rgba(var(--tape-rgb), .72); box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.about-slide-arrow { border: 1px solid rgba(var(--dark-2-rgb), .35); background: var(--on-dark); color: var(--dark); bottom: 54px; }

/* ---------- section heads ---------- */
.section-pad { padding: clamp(72px, 9vw, 120px) 0; }
.section-head h2 { font-weight: 700; font-size: clamp(2.2rem, 4.2vw, 3.6rem); }
.section-head p { font-family: var(--serif); font-style: italic; font-weight: 500; text-wrap: balance; }
.section-head--left { text-align: left; max-width: none; margin-left: 0; }
.section-head--left .kicker { justify-content: flex-start; }
.section-head--split { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); padding-bottom: 22px; margin-bottom: 40px; }
.section-head--split h2 { margin-bottom: 0; }
.section-head--split p { max-width: 40ch; text-align: right; }

/* ---------- numbers ---------- */
.dash-card {
  max-width: 1180px; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px -34px rgba(var(--shade), .35); padding: clamp(24px, 3vw, 44px);
}
.dash-live { font-weight: 500; }
.refresh-btn { border: 1px solid var(--line-strong); border-radius: 8px; font-family: var(--sans); font-weight: 600; font-size: .78rem; background: transparent; }
.refresh-btn:hover { background: var(--blush-soft); }
.dash-stats { gap: 16px; }
.stat-box { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--ivory); padding: 30px 20px; }
.stat-num { font-family: var(--serif); font-weight: 700; font-size: clamp(2.2rem, 4.2vw, 3.4rem); }
.stat-box.coral .stat-num { color: var(--maroon); }
.stat-box.mustard .stat-num { color: var(--blush-deep); }
.stat-box.denim .stat-num { color: var(--charcoal); }
.stat-label { font-weight: 500; font-size: .8rem; letter-spacing: .02em; }

/* ---------- building now: an editorial two-column card ---------- */
.band-sand { background: var(--band); }
.mp-card {
  max-width: none; background: var(--paper-2); color: var(--charcoal); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: 0 24px 60px -36px rgba(var(--shade), .35);
  padding: clamp(28px, 4vw, 56px);
  display: grid; grid-template-columns: 1fr 1.15fr; column-gap: clamp(28px, 5vw, 80px); row-gap: 14px;
  grid-template-areas: "title points" "desc points" "links points";
  grid-template-rows: auto auto 1fr;
  align-items: start;
}
.mp-card h3 { grid-area: title; font-weight: 700; font-size: clamp(1.8rem, 3.2vw, 2.6rem); color: var(--maroon); margin: 0; }
.mp-card > p { grid-area: desc; color: var(--fg-3); font-size: 1.05rem; margin: 0; }
.mp-points { grid-area: points; margin: 0; gap: 0; max-width: none; border-top: 1px solid var(--line); }
.mp-points li { color: var(--fg-2); font-size: .96rem; line-height: 1.6; padding: 16px 0 16px 26px; border-bottom: 1px solid var(--line); }
.mp-points li::before { background: var(--maroon); border-radius: 0; transform: rotate(45deg); top: 25px; width: 6px; height: 6px; }
.mp-links { grid-area: links; align-self: end; }
.mp-links a { background: transparent; color: var(--charcoal); border: 1px solid var(--line-strong); border-radius: 8px; font-weight: 600; font-size: .82rem; }
.mp-links a:hover { background: var(--maroon); color: var(--on-accent); border-color: var(--maroon); }

/* ---------- work: wins as mini case studies ---------- */
.wins-marquee-wrap { gap: 18px; }
.wins-track { gap: 24px; padding: 8px 0 14px; }
.win-card {
  width: clamp(300px, 27vw, 400px); background: var(--paper-2);
  border: 1px solid rgba(var(--fg-rgb), .6); border-radius: 12px; box-shadow: none;
  transition: transform .3s ease, box-shadow .3s ease;
}
.win-card:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -26px rgba(var(--shade), .5); }
.win-card .win-media { aspect-ratio: 4 / 3; overflow: hidden; }
.win-card .win-media img { transition: transform .5s ease; }
.win-card:hover .win-media img { transform: scale(1.04); }
.win-card .win-body { padding: 20px 22px 22px; }
.win-card .win-firm { font-family: var(--serif); font-weight: 700; font-size: 1.3rem; margin-bottom: 8px; }
.win-card .win-problem { font-size: .9rem; line-height: 1.6; color: var(--fg-3); }
.win-card .win-link { background: transparent; border: 1px solid var(--line-strong); border-radius: 8px; font-weight: 600; font-size: .78rem; padding: 8px 12px; }
.win-card .win-link:hover { background: var(--maroon); color: var(--on-accent); border-color: var(--maroon); }
.wins-arrow { width: 44px; height: 44px; border: 1px solid var(--line-strong); background: transparent; font-size: 1.3rem; }
.wins-arrow:hover { background: var(--fg); color: var(--page); border-color: var(--fg); transform: none; }

/* ---------- gallery: the image is the star ---------- */
.brand-grid { gap: clamp(14px, 1.6vw, 24px); row-gap: clamp(22px, 2.2vw, 34px); }
.brand-box { background: none; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
.brand-box .brand-reels { border-radius: 10px; overflow: hidden; background: var(--media); border: 1px solid var(--line); gap: 1px; }
.brand-box .brand-media { background: var(--band); }
.brand-box .brand-media img { transition: transform .5s ease; }
.brand-box .brand-media:hover img { transform: scale(1.035); }
/* minimal play indicator */
.brand-box .brand-media::after {
  width: 40px; height: 40px; background-color: rgba(var(--on-dark-rgb), .14);
  border: 1px solid rgba(var(--on-dark-rgb), .85); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: .9;
}
.brand-box .brand-info { padding: 12px 2px 0; flex-direction: row; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.brand-box .brand-label { font-family: var(--serif); font-weight: 600; font-size: .98rem; }
.brand-box .brand-links { gap: 12px; }
.brand-box .brand-link {
  background: none; border: 0; border-radius: 0; padding: 0 0 2px; font-weight: 600; font-size: .76rem;
  letter-spacing: .04em; border-bottom: 1px solid var(--line-strong);
}
.brand-box .brand-link:hover { background: none; color: var(--maroon); border-bottom-color: var(--maroon); }

/* ---------- 6. let's connect: the closing page ---------- */
#connect.band-sand, #connect { background: var(--blush-soft); }
#connect { overflow: hidden; }
#connect::after { /* keep the right textile edge (mirrored) above the section's content */ }
.connect-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(32px, 6vw, 100px); align-items: start; position: relative; }
.connect-intro { position: relative; padding: 12px 0 90px; }
.connect-intro h2 { font-weight: 700; font-size: clamp(2.6rem, 5.4vw, 4.8rem); line-height: .98; margin-bottom: 16px; color: var(--charcoal); }
.connect-intro .sub { font-size: 1.08rem; color: var(--fg-3); max-width: 42ch; margin-bottom: 30px; }
.contact-options { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.contact-options a {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 8px;
  border: 1px solid var(--line-strong); background: color-mix(in srgb, var(--page) 60%, transparent); font-weight: 600; font-size: .84rem;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.contact-options a:hover { background: var(--maroon); color: var(--on-accent); border-color: var(--maroon); }
.contact-meta { justify-content: flex-start; font-weight: 500; }
.connect-note { position: absolute; left: 34%; bottom: 0; transform: rotate(-8deg); }

.contact-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 40px); box-shadow: 0 30px 60px -40px rgba(var(--shade), .45);
}
.field { display: flex; flex-direction: column; gap: 7px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-4); }
.field .optional { text-transform: none; letter-spacing: 0; font-weight: 400; }
.field input, .field textarea {
  font: inherit; font-size: .98rem; color: var(--charcoal); background: var(--ivory);
  border: 1px solid rgba(var(--fg-rgb), .25); border-radius: 8px; padding: 12px 14px;
  transition: border-color .2s ease, box-shadow .2s ease; resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--maroon); box-shadow: 0 0 0 3px color-mix(in srgb, var(--soft) 70%, transparent); }
.field.has-error input, .field.has-error textarea { border-color: var(--danger); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-status { margin: 0; font-size: .9rem; color: var(--fg-3); }
.form-status.is-ok { color: var(--ok); }
.form-status.is-error { color: var(--danger); }

/* ---------- footer ---------- */
.site-footer { padding: 26px 0 34px; border-top: 1px solid var(--line); font-weight: 500; }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .8rem; color: var(--fg-4); }
.brand--small { font-size: .95rem; }
.brand--small .lotus { width: 18px; height: 18px; }
.site-footer a { text-decoration: underline; text-underline-offset: 3px; }
/* in-page links land below the floating header */
section[id] { scroll-margin-top: calc(var(--header-h) - 1px); }

/* ---------- gentle entrances ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; transition-delay: var(--reveal-delay, 0s); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .win-card, .win-card .win-media img, .brand-box .brand-media img { transition: none; }
}

/* ---------- laptop / tablet ---------- */
@media (max-width: 1100px) {
  .nav-links a { padding: 7px 9px; font-size: .76rem; }
  .brand span { font-size: 1rem; }
}

/* ---------- phones & small tablets: designed, not shrunk ---------- */
@media (max-width: 900px) {
  :root { --header-h: 60px; }
  .site-header { grid-template-columns: 1fr auto; }
  .header-socials { display: none; }
  .menu-toggle {
    display: inline-flex; align-items: center; gap: 8px; justify-self: end;
    font: 600 .78rem var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--charcoal);
    background: transparent; border: 1px solid var(--line-strong); border-radius: 8px; padding: 9px 12px; cursor: pointer;
  }
  .menu-toggle-bars, .menu-toggle-bars::before, .menu-toggle-bars::after { display: block; width: 16px; height: 1.5px; background: currentColor; position: relative; transition: transform .25s ease, opacity .2s ease; }
  .menu-toggle-bars::before, .menu-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .menu-toggle-bars::before { top: -5px; }
  .menu-toggle-bars::after { top: 5px; }
  .menu-toggle[aria-expanded="true"] .menu-toggle-bars { background: transparent; }
  .menu-toggle[aria-expanded="true"] .menu-toggle-bars::before { transform: translateY(5px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-toggle-bars::after { transform: translateY(-5px) rotate(-45deg); }

  /* the menu opens as a panel under the header */
  .nav { position: absolute; top: 100%; left: 0; right: 0; }
  .nav-inner { display: block; border: 0; border-radius: 0; padding: 0; }
  .nav-links {
    display: none; flex-direction: column; gap: 0; padding: 8px var(--gutter) 18px;
    overflow: visible; -webkit-mask-image: none; mask-image: none;
    background: var(--ivory); border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 30px -24px rgba(var(--shade), .4);
  }
  .site-header.menu-open .nav-links { display: flex; }
  .nav-links a { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; padding: 12px 4px; border-radius: 0; border-bottom: 1px solid var(--line); }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-links a.is-active { background: none; color: var(--maroon); }

  .textile-edges::before, .textile-edges::after { width: 7px; }

  /* hero: heading first, portrait underneath */
  #landing-hero { min-height: auto; padding: 28px 0 40px; }
  .landing-hero-inner { grid-template-columns: 1fr; padding: 0 calc(var(--gutter) + 6px); gap: 26px; }
  .landing-photo-wrap { order: 0; max-width: 420px; }
  .landing-headline { font-size: clamp(2.7rem, 13vw, 4.6rem); }
  .hero-note { right: -2%; top: 8%; font-size: 1.15rem; }
  #scroll-hint { display: none; }

  /* about: a vertical spread */
  #about.band-ink { padding: 64px 0 80px; }
  .hero-grid { grid-template-columns: 1fr; }
  .about-slideshow { max-width: min(420px, calc(100% - 30px)); }

  .section-head--split { flex-direction: column; align-items: flex-start; }
  .section-head--split p { text-align: left; }

  .mp-card { grid-template-columns: 1fr; grid-template-areas: "title" "desc" "points" "links"; }

  .connect-grid { grid-template-columns: 1fr; }
  .connect-intro { padding-bottom: 70px; }
  .connect-note { left: auto; right: 4%; }
}

@media (max-width: 600px) {
  .brand span { font-size: .98rem; }
  .landing-actions .btn { flex: 1 1 auto; justify-content: center; }
  .dash-stats { grid-template-columns: 1fr; }
  .win-card { width: min(82vw, 340px); }
  .contact-form { grid-template-columns: 1fr; }
  .brand-box .brand-info { flex-direction: column; gap: 4px; padding-top: 8px; }
  .brand-box .brand-label { font-size: .8rem; }
  .brand-box .brand-link { font-size: .68rem; }
  .brand-box .brand-media::after { width: 30px; height: 30px; }
}

/* ---------- gallery: the reel wheel ---------- */
#gallery { padding-bottom: clamp(56px, 7vw, 96px); }
#gallery .section-head--split { margin-bottom: 8px; }
.reel-wheel {
  --card-w: clamp(170px, 15.5vw, 240px);
  position: relative; height: 560px; overflow: hidden;
  touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab;
  /* soften the far ends of the arc into the page */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 11%, #000 89%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 11%, #000 89%, transparent 100%);
}
.reel-wheel.is-dragging { cursor: grabbing; }
.reel-ring { position: absolute; left: 50%; width: 0; height: 0; will-change: transform; }
.reel-card {
  position: absolute; left: 0; top: 0;
  width: var(--card-w); aspect-ratio: 9 / 16; padding: 0; border: 0; cursor: pointer;
  border-radius: 16px; overflow: hidden; background: var(--media);
  /* pivot on the wheel's centre (the ring origin), not the card's own centre */
  transform-origin: 0 0;
  transform: rotate(var(--a)) translateY(calc(-1 * var(--R, 1000px))) translate(-50%, -50%);
  box-shadow: 0 28px 50px -26px rgba(var(--shade), .55), 0 2px 6px rgba(var(--shade), .12);
  transition: box-shadow .3s ease;
}
.reel-wheel.is-dragging .reel-card { cursor: grabbing; }
.reel-card img, .reel-card video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; transition: transform .5s ease; }
.reel-card:hover img, .reel-card:hover video { transform: scale(1.04); }
.reel-card:focus-visible { outline: 3px solid var(--maroon); outline-offset: 4px; }
.reel-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 36px 14px 13px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; text-align: left;
  background: linear-gradient(to top, rgba(var(--dark-2-rgb), .78), rgba(var(--dark-2-rgb), 0));
  color: var(--on-dark); pointer-events: none;
}
.reel-name { font-family: var(--serif); font-weight: 600; font-size: .92rem; line-height: 1.2; }
.reel-play {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid rgba(var(--on-dark-rgb), .85); background: rgba(var(--on-dark-rgb), .14);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); position: relative;
}
.reel-play::after {
  content: ""; position: absolute; left: 11px; top: 9px;
  border-left: 10px solid var(--on-dark); border-top: 6px solid transparent; border-bottom: 6px solid transparent;
}
.reel-controls { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 4px; }
.reel-hint { margin: 0; font-size: .74rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-5); }

/* the player */
.reel-lightbox {
  position: fixed; inset: 0; z-index: 400; display: flex; align-items: center; justify-content: center;
  background: rgba(var(--dark-2-rgb), .86); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .25s ease; padding: 20px;
}
.reel-lightbox[hidden] { display: none; }
.reel-lightbox.is-open { opacity: 1; }
html.reel-open { overflow: hidden; }
.reel-lightbox-inner { display: flex; align-items: center; gap: clamp(8px, 2vw, 24px); max-height: 100%; }
.reel-lb-stage { display: flex; flex-direction: column; gap: 12px; }
.reel-lb-frame {
  width: min(400px, calc(100vw - 150px)); height: min(720px, calc(100svh - 110px));
  border-radius: 14px; overflow: hidden; background: #fff;
}
.reel-lb-frame iframe, .reel-lb-frame video, .reel-lb-frame img { width: 100%; height: 100%; border: 0; display: block; object-fit: contain; background: #000; }
.reel-lb-frame iframe { background: #fff; }
.reel-lb-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; color: var(--on-dark); }
.reel-lb-label { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; }
.reel-lb-link { font-size: .8rem; font-weight: 600; border-bottom: 1px solid rgba(var(--on-dark-rgb), .5); color: var(--on-dark); }
.reel-lb-nav, .reel-lb-close {
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(var(--on-dark-rgb), .5);
  background: transparent; color: var(--on-dark); font-size: 1.5rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background .2s ease, color .2s ease;
}
.reel-lb-nav:hover, .reel-lb-close:hover { background: var(--on-dark); color: var(--dark); }
.reel-lb-close { position: fixed; top: 18px; right: 18px; font-size: 1.7rem; }

@media (max-width: 600px) {
  .reel-wheel { --card-w: 138px; }
  .reel-hint-more { display: none; }
  .reel-name { font-size: .78rem; }
  .reel-cap { padding: 28px 10px 10px; }
  .reel-play { width: 24px; height: 24px; }
  .reel-play::after { left: 9px; top: 7px; border-left-width: 8px; border-top-width: 5px; border-bottom-width: 5px; }
  .reel-lightbox { padding: 12px; }
  .reel-lightbox-inner { flex-direction: column; }
  .reel-lb-nav { position: fixed; bottom: 16px; }
  .reel-lb-nav.prev { left: 16px; }
  .reel-lb-nav.next { right: 16px; }
  .reel-lb-frame { width: calc(100vw - 24px); height: calc(100svh - 150px); }
}
@media (prefers-reduced-motion: reduce) {
  .reel-card img, .reel-card video { transition: none; }
}

/* ---------- phones: compact Building Now + Recent Wins ---------- */
@media (max-width: 600px) {
  #building-now.section-pad, #work.section-pad { padding: 56px 0; }
  #building-now .section-head, #work .section-head { margin-bottom: 22px; }

  /* Building Now: the points become a short swipeable row instead of a long list */
  .mp-card { padding: 22px 0 20px; row-gap: 12px; border-radius: 12px; }
  .mp-card h3, .mp-card > p, .mp-links { padding: 0 20px; }
  .mp-card h3 { font-size: 1.6rem; }
  .mp-card > p { font-size: .95rem; line-height: 1.6; }
  .mp-points {
    display: flex; flex-direction: row; max-width: none; gap: 10px; border-top: 0; margin: 4px 0 2px;
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 20px; padding: 2px 20px 8px;
    scrollbar-width: none; counter-reset: pt;
  }
  .mp-points::-webkit-scrollbar { display: none; }
  .mp-points li {
    flex: 0 0 78%; scroll-snap-align: start; counter-increment: pt;
    padding: 14px 14px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--ivory);
    font-size: .84rem; line-height: 1.55;
  }
  .mp-points li::before {
    content: counter(pt, decimal-leading-zero); position: static; display: block; transform: none;
    width: auto; height: auto; background: none; border-radius: 0; margin-bottom: 6px;
    font: italic 600 .8rem var(--serif); color: var(--maroon);
  }
  .mp-links { gap: 8px; }
  .mp-links a { padding: 8px 12px; font-size: .76rem; }

  /* Recent Wins: smaller cards that sit inside the screen with the next one peeking in */
  .wins-track { gap: 14px; }
  .win-card { width: min(72vw, 280px); border-radius: 10px; }
  .win-card .win-media { aspect-ratio: 16 / 10; }
  .win-card .win-body { padding: 14px 16px 16px; }
  .win-card .win-firm { font-size: 1.1rem; margin-bottom: 6px; }
  .win-card .win-problem {
    font-size: .84rem; line-height: 1.55; margin-bottom: 12px;
    display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
  }
  .win-card .win-link { font-size: .72rem; padding: 7px 10px; }
  .wins-arrow { width: 40px; height: 40px; }
}
