/* Mudeford Web Design — coastal, classy, dark structural base with navy/sage/
   taupe/sand accents drawn from the beach-hut logo. No neon, no tech-dashboard
   styling. */

:root {
  --ink: #f3efe6;
  --ink-muted: #b9b3a4;
  --ink-faint: #85806f;

  --bg: #101211;
  --bg-alt: #171a19;
  --surface: #1c201f;
  --surface-raised: #232827;

  --line: rgba(243, 239, 230, 0.1);
  --line-strong: rgba(243, 239, 230, 0.18);

  --navy: #1c3a5e;
  --navy-light: #35577e;
  --sage: #93b0c2;
  --taupe: #c9b48f;
  --sand: #ddceac;

  --accent: var(--sand);
  --accent-strong: var(--sage);

  --ring-color: #85806f;

  /* Translucent scrim layered behind text-bearing panels (.card,
     .contact-panel) on top of --surface. Transparent by default; only themes
     whose --surface is too bright/saturated for direct text contrast (e.g.
     Sunburst) override this. */
  --panel-tint: transparent;

  --radius: 14px;
  --radius-sm: 8px;
  --container: 1180px;

  --shadow: 0 20px 50px -25px rgba(0, 0, 0, 0.6);
}

/* ---------- Themes ----------
   :root above holds the "Original" theme's default values. Each block below
   overrides the same custom properties for an alternate theme selected from
   the staff dashboard (see /js/theme.js, which sets data-theme on <html>). */

[data-theme="sunburst"] {
  --ink: #fbe8d2;
  --ink-muted: #bdad9b;
  --ink-faint: #877a6d;

  --bg: #140d08;
  --bg-alt: #1f140c;
  --surface: #ff8c52;
  --surface-raised: #ff9661;

  --line: rgba(251, 232, 210, 0.1);
  --line-strong: rgba(251, 232, 210, 0.18);

  --navy: #5e1c2c;
  --navy-light: #7e3547;
  --sage: #f2c94c;
  --taupe: #f2c94c;
  --sand: #f2567d;

  --ring-color: #f2c94c;

  /* Surface is a vivid orange — a flat scrim keeps card text readable
     without dulling the swatch colour itself. */
  --panel-tint: rgba(20, 13, 8, 0.7);
}

[data-theme="ocean"] {
  --ink: #dcf0f7;
  --ink-muted: #a2b2b9;
  --ink-faint: #717e84;

  --bg: #070c12;
  --bg-alt: #0b131d;
  --surface: #12283f;
  --surface-raised: #152f4b;

  --line: rgba(220, 240, 247, 0.1);
  --line-strong: rgba(220, 240, 247, 0.18);

  --navy: #1c4e5e;
  --navy-light: #356c7e;
  --sage: #7cc3d8;
  --taupe: #7cc3d8;
  --sand: #2f8fae;

  --ring-color: #7cc3d8;
}

[data-theme="woodland"] {
  --ink: #f0ece0;
  --ink-muted: #b4b0a7;
  --ink-faint: #807d76;

  --bg: #100f0c;
  --bg-alt: #191712;
  --surface: #4f5738;
  --surface-raised: #57603e;

  --line: rgba(240, 236, 224, 0.1);
  --line-strong: rgba(240, 236, 224, 0.18);

  --navy: #454d31;
  --navy-light: #a08b6f;
  --sage: #a08b6f;
  --taupe: #a08b6f;
  --sand: #8ba888;

  --ring-color: #a08b6f;
}

[data-theme="gilded"] {
  --ink: #f0ece0;
  --ink-muted: #b3b0a8;
  --ink-faint: #7e7d78;

  --bg: #0d0e10;
  --bg-alt: #141518;
  --surface: #26282d;
  --surface-raised: #2d2f35;

  --line: rgba(240, 236, 224, 0.1);
  --line-strong: rgba(240, 236, 224, 0.18);

  --navy: #5e4e1c;
  --navy-light: #7e6d35;
  --sage: #b07a4e;
  --taupe: #b07a4e;
  --sand: #d4af37;

  --ring-color: #b07a4e;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 700;
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; color: var(--ink-muted); }

a { color: var(--sand); text-decoration: none; }
a:hover { color: var(--sage); }

img { max-width: 100%; display: block; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--sand);
  color: var(--bg-alt);
}
.btn-primary:hover { background: var(--sage); color: var(--bg); }

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--sand); color: var(--sand); }

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: #ffffff;
}
.brand:hover { color: var(--sand); }
.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  border: 2px solid var(--ring-color);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text small { font-family: "Segoe UI", system-ui, sans-serif; font-weight: 400; font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--ink); margin: 0 8px; }

.site-nav { display: flex; align-items: center; justify-content: center; gap: 1.75rem; }
.site-nav a {
  color: var(--ink-muted);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--sand);
}
.nav-cta {
  color: var(--ink) !important;
  background: linear-gradient(var(--panel-tint), var(--panel-tint)), var(--surface-raised);
  border: 1px solid var(--line-strong);
  padding: 0.5rem 1.1rem !important;
  border-radius: 999px;
}
.nav-cta:hover { border-color: var(--sand) !important; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-self: end;
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--line);
    padding: 1rem 1.5rem 1.5rem;
    gap: 0.9rem;
    display: none;
  }
  .site-nav.is-open { display: flex; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(color-mix(in srgb, var(--bg) 70%, transparent), color-mix(in srgb, var(--bg) 70%, transparent)),
    radial-gradient(1100px 480px at 85% -10%, color-mix(in srgb, var(--sage) 14%, transparent), transparent 60%),
    radial-gradient(900px 420px at 5% 0%, color-mix(in srgb, var(--sand) 10%, transparent), transparent 55%),
    url("/images/pebbles-bg.jpg");
  background-size: cover, auto, auto, cover;
  background-position: center, center, center, center;
  background-repeat: no-repeat;
}
.hero-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 5rem 1.5rem 4.5rem;
  display: grid;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 900px) {
  .hero-inner { grid-template-columns: 1.15fr 0.85fr; padding: 6.5rem 1.5rem 5.5rem; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--sand);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 1.4rem;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--sage); }

.hero p.lede {
  font-size: 1.1rem;
  max-width: 42ch;
  color: var(--ink-muted);
}
.hero-heading-img {
  max-width: 100%;
  height: auto;
  display: block;
}
h1:has(.hero-heading-img) { margin-bottom: 0.5em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.6rem; }

.hero-art {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(var(--panel-tint), var(--panel-tint)), var(--surface);
  padding: 2.2rem;
  box-shadow: var(--shadow);
  text-align: center;
}
.hero-art img {
  margin: 0 auto;
  max-width: 460px;
  width: 100%;
  border-radius: 50%;
  border: 6px solid var(--ring-color);
  background: #fff;
}
.hero-art-video {
  margin: 0 auto;
  max-width: 460px;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  border: 6px solid var(--ring-color);
  background: #fff;
  display: block;
}
.hero-art p { margin: 1.2rem 0 0; font-size: 0.85rem; color: var(--ink-faint); }

.hero-art-mute {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  backdrop-filter: blur(4px);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.hero-art-mute:hover { border-color: var(--sand); color: var(--sand); }
.hero-art-mute .icon-muted { display: none; }
.hero-art-mute[aria-pressed="true"] .icon-sound { display: none; }
.hero-art-mute[aria-pressed="true"] .icon-muted { display: block; }

.image-box {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  background: var(--surface);
}
.image-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/images/huts-bg.jpg") center / cover no-repeat;
  opacity: 0.7;
  z-index: 0;
}
.image-box > * {
  position: relative;
  z-index: 1;
}
.image-box .section-head,
.image-box .reason {
  background: rgba(8, 8, 6, 0.6);
  backdrop-filter: blur(3px);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.9rem;
}
.image-box .section-head {
  display: inline-block;
}
.image-box h2 {
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  margin-bottom: 0.3em;
}
.image-box .reason h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}
.image-box .section-head p,
.image-box .reason p {
  font-size: 0.9rem;
  color: #f2f0ea;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
}
.image-box h2,
.image-box .reason h3 {
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}
.image-box .grid-2 {
  grid-template-columns: repeat(4, 1fr);
  gap: 0.9rem;
}
@media (max-width: 860px) {
  .image-box .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .image-box .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* ---------- Sections ---------- */

.section { padding: 3.5rem 0; border-bottom: 1px solid var(--line); }
.section:last-child { border-bottom: none; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 640px; margin: 0 0 3rem; }
.section-head p { font-size: 1.05rem; }

.grid {
  display: grid;
  gap: 1.5rem;
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-portfolio-large { grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* #services-boxes-list gets its column count set inline by
   /js/services-boxes.js, chosen from how many boxes are live so the row
   balances (1-4 -> one row, 5-6 -> two rows of 3, 7-8 -> two rows of 4).
   These breakpoints override that inline style on narrower screens so the
   grid still collapses sensibly on tablet/phone, matching the pattern
   already used for .image-box .grid-2 above. */
@media (max-width: 860px) {
  #services-boxes-list { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 560px) {
  #services-boxes-list { grid-template-columns: 1fr !important; }
}

.card {
  background: linear-gradient(var(--panel-tint), var(--panel-tint)), var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: var(--line-strong); }
.card-link { display: block; color: inherit; }
.card-link:hover { transform: translateY(-2px); color: inherit; }
.card-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--sage) 14%, transparent);
  color: var(--sage);
  font-size: 1.2rem;
  margin-bottom: 1rem;
}
.card h3 { margin-bottom: 0.5rem; }
.card p:last-child { margin-bottom: 0; }

.reason { display: flex; gap: 1rem; align-items: flex-start; }
.reason .dot {
  margin-top: 0.5rem;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--sand);
  flex-shrink: 0;
}
.reason h3 { margin-bottom: 0.35rem; font-size: 1.1rem; }
.reason p { margin: 0; }

/* ---------- Portfolio ---------- */

.portfolio-card { overflow: hidden; padding: 0; }
.portfolio-card-media {
  aspect-ratio: 4 / 3;
  background: var(--taupe);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink);
  font-family: Georgia, serif;
  font-size: 1.3rem;
  overflow: hidden;
}
.portfolio-card-media img { width: 100%; height: 100%; object-fit: contain; }
.portfolio-card-media { position: relative; }
.portfolio-card-media .rotator-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
}
.portfolio-card-media .rotator-img.is-active { opacity: 1; }
.portfolio-card-media .rotator-overlay {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.6s ease;
  z-index: 2;
}
.portfolio-card-media .rotator-overlay.is-covering { opacity: 1; }
.portfolio-card-media.is-logo { padding: 0.9rem; }
.portfolio-card-media.is-logo img { width: auto; height: auto; max-width: 88%; max-height: 88%; object-fit: contain; }
.portfolio-card-body { padding: 1.6rem; }
.portfolio-card-body h3 { display: flex; align-items: center; gap: 0.65rem; margin-bottom: 0.5rem; }
.portfolio-card-title-logo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  border: 1px solid var(--line-strong);
  flex-shrink: 0;
}
.portfolio-card-explore {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--sand);
}
.card-link:hover .portfolio-card-explore { color: var(--sage); }
.portfolio-empty { color: var(--ink-faint); font-style: italic; }

/* ---------- Portfolio carousel (/portfolio page) ---------- */

.portfolio-carousel {
  position: relative;
  padding: 0 4.5rem;
}
.carousel-viewport {
  overflow: hidden;
  padding: 1.5rem 0;
}
.carousel-track {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}
.carousel-slide {
  flex-shrink: 0;
  width: 300px;
  opacity: 0.35;
  transform: scale(0.86);
  transition: opacity 0.45s ease, transform 0.45s ease;
  cursor: pointer;
  background: linear-gradient(var(--panel-tint), var(--panel-tint)), var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.carousel-slide.is-adjacent { opacity: 0.65; transform: scale(0.92); }
.carousel-slide.is-active {
  width: 560px;
  opacity: 1;
  transform: scale(1);
  cursor: default;
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}
.carousel-slide-media {
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--taupe);
  overflow: hidden;
}
.carousel-slide-media img { width: 100%; height: 100%; object-fit: contain; }
.carousel-slide-body { padding: 1.4rem 1.6rem; }
.carousel-slide-body h3 { margin-bottom: 0.4rem; font-size: 1.1rem; }
.carousel-slide:not(.is-active) .carousel-slide-body p { display: none; }
.carousel-slide-body p { margin: 0; font-size: 0.92rem; }

.carousel-arrow {
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--bg-alt);
  color: var(--ink);
  font-size: 1.6rem;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.carousel-arrow:hover { border-color: var(--sand); color: var(--sand); }
.carousel-prev { left: 0; }
.carousel-next { right: 0; }

.carousel-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 1.2rem;
}
.carousel-dots { display: flex; gap: 0.5rem; }
.carousel-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  border: none;
  background: var(--line-strong);
  cursor: pointer;
  padding: 0;
}
.carousel-dot.is-active { background: var(--sand); }
.carousel-pause {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink-muted);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}
.carousel-pause:hover { border-color: var(--sand); color: var(--sand); }
.carousel-pause.is-paused { color: var(--sand); border-color: var(--sand); }

@media (max-width: 720px) {
  .portfolio-carousel { padding: 0 3rem; }
  .carousel-slide { width: 220px; }
  .carousel-slide.is-active { width: 320px; }
  .carousel-arrow { width: 38px; height: 38px; font-size: 1.3rem; }
}

/* ---------- Pricing ---------- */

.pricing-card {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.pricing-card > .btn {
  margin-top: auto;
}
.pricing-card.is-featured {
  border-color: var(--sand);
  box-shadow: var(--shadow);
  position: relative;
}
.pricing-card.is-featured::before {
  content: "Most popular";
  position: absolute;
  top: -12px; left: 1.8rem;
  background: var(--sand);
  color: var(--bg-alt);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}
.pricing-price {
  font-family: Georgia, serif;
  font-size: 1.9rem;
  color: var(--ink);
}
.pricing-card > p {
  min-height: 3.2em;
}
.pricing-features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.pricing-features li { display: flex; gap: 0.6rem; align-items: flex-start; color: var(--ink-muted); font-size: 0.95rem; }
.pricing-features li::before { content: "✓"; color: var(--sage); font-weight: 700; }

/* ---------- Forms ---------- */

.form-grid { display: grid; gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--ink-muted); }
.field input, .field select, .field textarea {
  font-family: inherit;
  font-size: 1rem;
  background: var(--bg-alt);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--sand);
}
.field textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 0.85rem; color: var(--ink-faint); }
.form-status { font-size: 0.9rem; margin-top: 0.5rem; }
.form-status.is-success { color: var(--sage); }
.form-status.is-error { color: #d98a7a; }

.contact-panel {
  background: linear-gradient(var(--panel-tint), var(--panel-tint)), var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
}

.contact-details { display: flex; flex-direction: column; gap: 1.1rem; margin-top: 1.5rem; }
.contact-details a { color: var(--ink); font-weight: 600; }
.contact-details span { display: block; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); margin-bottom: 0.2rem; }

/* ---------- CTA band ---------- */

.cta-band {
  background: linear-gradient(var(--panel-tint), var(--panel-tint)), var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  margin: 0 1.5rem;
}
.cta-band h2, .cta-band p { color: var(--ink); }
.cta-band p { color: var(--ink-muted); max-width: 46ch; margin-left: auto; margin-right: auto; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 1.5rem;
}
.site-footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1.3fr 1fr 1fr;
}
@media (max-width: 720px) {
  .site-footer-inner { grid-template-columns: 1fr; }
}
.footer-brand { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-brand .brand { margin-bottom: 0.6rem; }
.footer-col h4 {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  margin-bottom: 0.9rem;
}
.footer-col a, .footer-col p { display: block; margin-bottom: 0.6rem; color: var(--ink-muted); }
.footer-col a:hover { color: var(--sand); }
.footer-copyright {
  max-width: var(--container);
  margin: 1.75rem auto 0;
  padding: 1.25rem 1.5rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--ink-faint);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ---------- 404 ---------- */

.error-page { padding: 7rem 0; text-align: center; }
.error-page .eyebrow { margin-bottom: 1.5rem; }

/* ---------- Page hero (interior pages) ---------- */

.page-hero { padding: 2.5rem 0 2rem; border-bottom: 1px solid var(--line); }
.page-hero .eyebrow { margin-bottom: 1rem; }
.page-hero p { max-width: 60ch; font-size: 1.05rem; }

/* ---------- Connections diagram (/connections page) ---------- */

.connections-section {
  position: relative;
  background-color: var(--bg-alt);
  background-image:
    linear-gradient(color-mix(in srgb, var(--bg) 35%, transparent), color-mix(in srgb, var(--bg) 35%, transparent)),
    url("/images/sardines-bg.jpg");
  background-size: cover, contain;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
}
.connections-diagram {
  max-width: 700px;
  margin: 0 auto;
}
.connections-diagram svg {
  display: block;
  min-width: 600px;
}
@media (max-width: 640px) {
  .connections-diagram {
    overflow-x: auto;
    padding-bottom: 1rem;
  }
}

/* ---------- Scroll reveal (site-wide, see /js/scroll-reveal.js) ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; }
}

/* ---------- Interactions demo (/interactions page) ---------- */

.theme-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.theme-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 1rem 1.3rem;
  cursor: pointer;
  color: var(--ink-muted);
  font-family: inherit;
  transition: border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.theme-swatch:hover { border-color: var(--sand); color: var(--ink); }
.theme-swatch.is-active {
  border-color: var(--sand);
  color: var(--ink);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--sand) 35%, transparent);
}
.theme-swatch-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--swatch-color);
  border: 2px solid var(--line-strong);
}
.theme-swatch-label {
  font-size: 0.85rem;
  font-weight: 600;
}

.sound-toggle.is-active {
  border-color: var(--sand);
  color: var(--sand);
}

/* Scoped to this page only (see #page-interactions wrapper in base.njk) so
   the shared .page-hero/.theme-swatches rules stay untouched elsewhere. */
#page-interactions .page-hero { padding: 1.75rem 0 1.25rem; }
#page-interactions .page-hero h1 { font-size: clamp(1.7rem, 2.8vw, 2.3rem); margin-bottom: 0.4em; }
#page-interactions .page-hero p { font-size: 0.98rem; }
#page-interactions .section { padding: 2.4rem 0; }
#page-interactions .section-head { margin-bottom: 1.6rem; }

#page-interactions .theme-swatches { gap: 0.7rem; }
#page-interactions .theme-swatch { padding: 0.7rem 0.9rem; gap: 0.4rem; }
#page-interactions .theme-swatch-dot { width: 24px; height: 24px; }
#page-interactions .theme-swatch-label { font-size: 0.78rem; }

.interactions-tool-card {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.interactions-stage {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.interactions-stage-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.2rem;
  border-bottom: 1px solid var(--line);
}

.interactions-scene {
  position: relative;
  aspect-ratio: 16 / 8;
  background: var(--surface);
}
.interactions-stage-large { max-width: 560px; margin: 0 auto; }
@media (max-width: 640px) {
  .interactions-scene { aspect-ratio: 4 / 3; }
}
.interactions-scene-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.interactions-scene-video.is-visible { opacity: 1; }
.interactions-scene-scrim {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 6, 0.6);
}
.interactions-scene-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding: 1.6rem;
}
.interactions-scene-content .eyebrow { margin-bottom: 0; background: rgba(8, 8, 6, 0.4); }
@media (max-width: 640px) {
  .interactions-scene { aspect-ratio: 4 / 3; }
}

/* ---------- Visibility page (/visibility page) ---------- */

.visibility-section { padding: 3.5rem 0; }
.visibility-panel {
  max-width: 920px;
  margin: 0 auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--surface);
}
@media (max-width: 640px) {
  .visibility-section { padding: 2rem 0; }
  .visibility-panel { border-radius: 0; border-left: none; border-right: none; }
}
.visibility-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface);
}
.visibility-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 1;
  transition: opacity 1.1s ease;
}
.visibility-video.is-faded { opacity: 0; }
.visibility-stage-content {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 1;
  padding: 2.2rem 1.5rem;
  text-align: center;
  background: linear-gradient(to top, rgba(8, 8, 6, 0.65), transparent);
}
.visibility-stage-content h2 { color: #fff; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8); margin-bottom: 0.3em; }
.visibility-stage-content p { color: #f2f0ea; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7); max-width: 46ch; margin: 0 auto; }

.interactions-together {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}
.interactions-together .section-head { margin: 0 auto 1.8rem; text-align: center; }
.interactions-together-btn {
  font-size: 1.05rem;
  padding: 1.1rem 2.4rem;
}

.interactions-slideshow {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #060605;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.6rem;
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.interactions-slideshow.is-open {
  display: flex;
  opacity: 1;
}

.interactions-slideshow-frame {
  position: relative;
  width: min(1500px, 94vw, calc(82vh * 16 / 9));
  aspect-ratio: 16 / 9;
  border-radius: calc(var(--radius) + 14px);
  border: 42px solid #ddceac;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.85);
}
.interactions-slideshow-frame-label {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 2;
  transform: translate(-50%, -50%);
  background: #ddceac;
  color: #14120d;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 1.15rem;
  padding: 0.7rem 2rem;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.6);
}
.interactions-slideshow-frame-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 0;
  overflow: hidden;
  background: #000;
}
.interactions-slideshow-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.7s ease;
}
.interactions-slideshow-video.is-visible { opacity: 1; }
.interactions-slideshow-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent 45%);
}

.interactions-slideshow-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 2;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.interactions-slideshow-close:hover { border-color: #fff; }

.interactions-slideshow-dots {
  display: flex;
  gap: 0.6rem;
}
.interactions-slideshow-dot {
  width: 34px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
}
.interactions-slideshow-dot.is-active { background: #fff; }
.interactions-slideshow-dot.is-done { background: rgba(255, 255, 255, 0.55); }
@media (max-width: 640px) {
  .interactions-slideshow-frame { width: 92vw; border-width: 20px; }
  .interactions-slideshow-frame-label { font-size: 0.85rem; padding: 0.5rem 1.3rem; }
}
