/* ── Design tokens ───────────────────────────────────────── */
:root {
  --gold: #b8941f;
  --gold-light: #e8d48b;
  --gold-muted: rgba(201, 162, 39, 0.18);
  --burgundy: #5c1a33;
  --burgundy-dark: #2f0d1c;
  --burgundy-soft: #7a2848;
  --cream: #f8f5ef;
  --cream-dark: #ebe6dc;
  --ink: #1c1412;
  --ink-muted: rgba(28, 20, 18, 0.62);
  --white: #ffffff;

  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(28, 20, 18, 0.06);
  --shadow-md: 0 8px 28px rgba(28, 20, 18, 0.1);
  --shadow-lg: 0 20px 50px rgba(28, 20, 18, 0.14);

  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1.25rem;
  --space-lg: 2rem;
  --space-xl: 3rem;

  --transition: 0.2s ease;
  --header-h: 4rem;
}

/* ── Base ─────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  background-image:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(201, 162, 39, 0.14), transparent),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(92, 26, 51, 0.07), transparent);
  min-height: 100vh;
}

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

a {
  color: var(--burgundy);
  transition: color var(--transition);
}

a:hover {
  color: var(--burgundy-dark);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--burgundy-dark);
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

.lead {
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--ink);
}

.hidden {
  display: none !important;
}

.container {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container-wide {
  max-width: 56rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  padding: 0.5rem 1rem;
  background: var(--burgundy);
  color: var(--cream);
}

.skip-link:focus {
  left: var(--space-md);
  top: var(--space-md);
}

/* ── Typography utilities ───────────────────────────────── */
.eyebrow {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.section-eyebrow {
  margin: 0 0 var(--space-xs);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--burgundy-soft);
}

.eyebrow-glow {
  color: var(--gold-light);
}

.muted {
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.fine-print {
  font-size: 0.88rem;
  font-style: italic;
  color: var(--ink-muted);
}

/* ── Header & nav ───────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(47, 13, 28, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201, 162, 39, 0.35);
  box-shadow: var(--shadow-sm);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  min-height: var(--header-h);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--cream);
  flex-shrink: 0;
}

.nav-brand:hover {
  color: var(--gold-light);
}

.nav-brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  font-size: 1rem;
  color: var(--gold);
  border: 2px solid rgba(201, 162, 39, 0.6);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
}

.nav-brand-text {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.nav-end {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(248, 245, 239, 0.75);
  text-decoration: none;
  letter-spacing: 0.02em;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--cream);
}

.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after {
  width: 100%;
}

.nav-auth {
  display: flex;
  align-items: center;
}

.nav-signin-link {
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  color: var(--gold-light) !important;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(232, 212, 139, 0.45);
  border-radius: var(--radius-sm);
}

.nav-signin-link::after {
  display: none !important;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  object-fit: cover;
}

.nav-user-name {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--cream);
  max-width: 7rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-signout {
  padding: 0.3rem 0.6rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold-light);
  background: transparent;
  border: 1px solid rgba(232, 212, 139, 0.4);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.nav-signout:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--cream);
}

/* ── Home hero ──────────────────────────────────────────── */
.hero-home {
  padding: var(--space-xl) 0;
  background:
    linear-gradient(135deg, var(--burgundy-dark) 0%, var(--burgundy) 45%, var(--burgundy-soft) 100%);
  color: var(--cream);
  position: relative;
  overflow: hidden;
}

.hero-home::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a227' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
  pointer-events: none;
}

.hero-home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
  position: relative;
}

.hero-copy {
  max-width: 34rem;
}

.hero-copy .seal {
  margin-bottom: var(--space-md);
}

.hero-title {
  margin: 0 0 var(--space-md);
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  color: var(--cream);
  letter-spacing: -0.01em;
}

.hero-lead {
  margin: 0 0 var(--space-md);
  font-size: 1.2rem;
  line-height: 1.55;
  color: rgba(248, 245, 239, 0.92);
}

.hero-meta {
  margin: 0 0 var(--space-lg);
  font-size: 0.9rem;
  color: var(--gold-light);
  letter-spacing: 0.04em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.hero-media {
  margin: 0;
}

.hero-media-frame {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 3px solid rgba(201, 162, 39, 0.55);
  box-shadow: var(--shadow-lg);
  background: var(--burgundy-dark);
}

.hero-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
}

.hero-media figcaption {
  margin-top: var(--space-sm);
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--gold-light);
}

.seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  font-size: 1.5rem;
  color: var(--gold);
  border: 2px solid rgba(201, 162, 39, 0.7);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
}

.seal-glow {
  margin: 0 auto var(--space-md);
  border-color: var(--gold-light);
  box-shadow: 0 0 32px rgba(232, 212, 139, 0.4);
}

/* ── Page hero (inner pages) ────────────────────────────── */
.page-hero {
  padding: var(--space-xl) 0 var(--space-lg);
  background: linear-gradient(160deg, var(--burgundy-dark), var(--burgundy));
  color: var(--cream);
  text-align: center;
}

.page-hero-secret {
  background: linear-gradient(160deg, #12060c, var(--burgundy-dark) 50%, #2d1530);
}

.page-hero-inner {
  max-width: 40rem;
}

.page-hero-title {
  margin: 0 0 var(--space-sm);
  font-size: clamp(2rem, 4vw, 2.75rem);
  color: var(--cream);
}

.page-hero-lead {
  margin: 0;
  font-size: 1.1rem;
  color: rgba(248, 245, 239, 0.85);
}

/* ── Main layout ────────────────────────────────────────── */
.site-main {
  padding: var(--space-xl) var(--space-md) var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* ── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid rgba(92, 26, 51, 0.1);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card h2 {
  margin: 0 0 var(--space-md);
  font-size: 1.75rem;
}

.card-accent {
  border-top: 3px solid var(--gold);
}

.card-highlight {
  background: linear-gradient(180deg, var(--white) 0%, rgba(201, 162, 39, 0.06) 100%);
}

.card-muted {
  background: var(--cream-dark);
  box-shadow: none;
}

.card-muted:hover {
  box-shadow: var(--shadow-sm);
}

.card-glow {
  box-shadow:
    0 0 0 1px rgba(201, 162, 39, 0.25),
    var(--shadow-md);
}

.card-media-teaser {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
}

/* ── Benefits ───────────────────────────────────────────── */
.benefits-grid {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: var(--space-sm) var(--space-md);
}

.benefits-grid li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.98rem;
}

.benefits-grid li::before {
  content: "★";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: 0.75rem;
  top: 0.15rem;
}

.benefits {
  margin: 0;
  padding-left: 1.25rem;
}

.benefits li {
  margin-bottom: 0.5rem;
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.7rem 1.35rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition:
    background var(--transition),
    color var(--transition),
    border-color var(--transition),
    transform 0.1s ease,
    box-shadow var(--transition);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  color: var(--cream);
  background: var(--burgundy);
  border-color: var(--burgundy);
  box-shadow: 0 4px 14px rgba(92, 26, 51, 0.25);
}

.btn-primary:hover {
  background: var(--burgundy-dark);
  border-color: var(--burgundy-dark);
  color: var(--cream);
  box-shadow: 0 6px 18px rgba(47, 13, 28, 0.3);
}

.btn-secondary {
  color: var(--burgundy);
  background: transparent;
  border-color: rgba(92, 26, 51, 0.35);
}

.btn-secondary:hover {
  background: var(--burgundy);
  color: var(--cream);
  border-color: var(--burgundy);
}

.hero-home .btn-secondary {
  color: var(--cream);
  border-color: rgba(248, 245, 239, 0.45);
}

.hero-home .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--gold-light);
  color: var(--cream);
}

/* Legacy button aliases */
.secondary-btn,
.join button,
#oath-form button,
.upload-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.35rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--cream);
  background: var(--burgundy);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), transform 0.1s ease;
}

.secondary-btn {
  color: var(--burgundy);
  background: transparent;
  border: 2px solid rgba(92, 26, 51, 0.35);
  text-decoration: none;
}

.secondary-btn:hover {
  background: var(--burgundy);
  color: var(--cream);
}

.join button:hover,
#oath-form button:hover,
.upload-form button:hover {
  background: var(--burgundy-dark);
}

/* ── Forms ──────────────────────────────────────────────── */
.form-stack,
.join form,
.upload-form,
#oath-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.form-stack label,
.join label,
.upload-form label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--burgundy-dark);
}

.input,
.join input,
.upload-form input,
.upload-form textarea,
#oath-form input[type="text"] {
  padding: 0.7rem 0.9rem;
  font: inherit;
  font-size: 1rem;
  border: 1px solid rgba(92, 26, 51, 0.2);
  border-radius: var(--radius-sm);
  background: var(--cream);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.input:focus,
.join input:focus,
.upload-form input:focus,
.upload-form textarea:focus,
#oath-form input:focus {
  outline: none;
  border-color: var(--burgundy);
  box-shadow: 0 0 0 3px rgba(92, 26, 51, 0.12);
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-weight: 500;
  cursor: pointer;
}

.form-meta,
.upload-as {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-muted);
}

.google-signin-slot {
  display: flex;
  justify-content: flex-start;
  margin: var(--space-md) 0;
  min-height: 44px;
}

.auth-profile {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--gold-muted);
  border-radius: var(--radius-sm);
}

.auth-profile-photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  object-fit: cover;
}

.auth-profile p {
  margin: 0;
}

.auth-error {
  padding: var(--space-sm) var(--space-md);
  background: rgba(92, 26, 51, 0.06);
  border-left: 3px solid var(--burgundy);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--burgundy);
  font-weight: 600;
  font-size: 0.9rem;
}

.upload-gate a {
  font-weight: 600;
}

/* ── Notices ────────────────────────────────────────────── */
.notice,
.welcome,
.upload-status {
  margin-top: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.92rem;
}

.notice-success,
.welcome,
.upload-status-success {
  background: var(--gold-muted);
  border-left: 3px solid var(--gold);
  color: var(--burgundy-dark);
}

.notice-error,
.upload-status-error {
  background: rgba(92, 26, 51, 0.06);
  border-left: 3px solid var(--burgundy);
  color: var(--burgundy);
}

.notice-pending,
.upload-status-pending {
  background: rgba(92, 26, 51, 0.04);
  border-left: 3px solid rgba(92, 26, 51, 0.25);
  color: var(--ink-muted);
}

/* ── Membership card preview ────────────────────────────── */
.card-preview {
  display: flex;
  justify-content: center;
  margin: var(--space-md) 0;
  padding: var(--space-lg);
  background: linear-gradient(145deg, rgba(92, 26, 51, 0.04), rgba(201, 162, 39, 0.08));
  border-radius: var(--radius-md);
  overflow-x: auto;
}

#membership-canvas {
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}

/* ── Oath ───────────────────────────────────────────────── */
.oath-scroll {
  max-height: 14rem;
  overflow-y: auto;
  margin: var(--space-md) 0;
  padding: var(--space-md);
  background: var(--cream);
  border: 1px solid rgba(92, 26, 51, 0.12);
  border-radius: var(--radius-sm);
}

.oath-text {
  margin: 0;
  white-space: pre-wrap;
  font-family: var(--font-display);
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--burgundy-dark);
}

.oath-signed {
  margin-top: var(--space-md);
  padding: var(--space-md);
  background: var(--cream);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(201, 162, 39, 0.35);
}

.oath-signature-display {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-style: italic;
  color: var(--burgundy);
  margin: 0.35rem 0;
}

/* ── Badges ─────────────────────────────────────────────── */
.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.3rem;
  padding: var(--space-md) var(--space-sm);
  font: inherit;
  background: var(--cream);
  border: 1px solid rgba(92, 26, 51, 0.12);
  border-radius: var(--radius-sm);
  cursor: default;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.badge.locked {
  cursor: pointer;
  opacity: 0.82;
}

.badge.locked:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: var(--shadow-sm);
  opacity: 1;
}

.badge.earned {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(201, 162, 39, 0.14), rgba(201, 162, 39, 0.04));
}

.badge-emoji {
  font-size: 1.65rem;
}

.badge-title {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--burgundy-dark);
}

.badge-desc {
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--ink-muted);
}

.badge-status {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--burgundy-soft);
}

.badge-progress {
  margin: 0 0 var(--space-sm);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--burgundy);
}

/* ── Gallery ────────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.gallery-item {
  position: relative;
  margin: 0;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(92, 26, 51, 0.1);
  transition: transform var(--transition), box-shadow var(--transition);
}

.gallery-link {
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.gallery-link:hover img {
  transform: scale(1.03);
  box-shadow: var(--shadow-md);
}

.gallery-tag,
.quote-tag {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 1;
  padding: 0.2rem 0.55rem;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--burgundy-dark);
  background: var(--gold-light);
  border-radius: 4px;
  box-shadow: var(--shadow-sm);
}

.quote-tag {
  position: static;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.gallery-item-member img {
  border-color: rgba(201, 162, 39, 0.45);
}

.gallery-item figcaption {
  margin-top: var(--space-xs);
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--ink-muted);
}

.gallery-byline {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  font-style: italic;
}

.gallery-delete {
  display: inline-block;
  margin-top: var(--space-xs);
  padding: 0.3rem 0.65rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--burgundy);
  background: transparent;
  border: 1px solid rgba(92, 26, 51, 0.25);
  border-radius: 4px;
  cursor: pointer;
  transition: background var(--transition);
}

.gallery-delete:hover {
  background: rgba(92, 26, 51, 0.08);
}

.upload-preview {
  max-width: 20rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--gold);
}

/* ── Quotes ─────────────────────────────────────────────── */
.quotes-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.quote-card {
  margin: 0;
  padding: var(--space-md) var(--space-lg);
  background: var(--white);
  border: 1px solid rgba(92, 26, 51, 0.1);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  box-shadow: var(--shadow-sm);
}

.quote-card p {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--burgundy-dark);
}

.quote-card footer {
  font-size: 0.88rem;
  font-style: italic;
  color: var(--ink-muted);
  border: none;
  padding: 0;
  text-align: left;
}

.quote-card-member {
  border-left-color: var(--burgundy);
  background: linear-gradient(90deg, rgba(92, 26, 51, 0.04), var(--white));
}

/* ── Lightbox ───────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: rgba(28, 20, 18, 0.94);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox img {
  max-width: min(92vw, 960px);
  max-height: 75vh;
  border-radius: var(--radius-md);
  border: 3px solid var(--gold);
  box-shadow: var(--shadow-lg);
}

.lightbox-caption {
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 1.1rem;
  text-align: center;
  max-width: 36rem;
}

.lightbox-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--cream);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  cursor: pointer;
  transition: background var(--transition);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ── Inner circle page ──────────────────────────────────── */
.page-inner {
  background: #f3eef6;
}

.directives {
  margin: 0;
  padding-left: 1.35rem;
}

.directives li {
  margin-bottom: 0.65rem;
  padding-left: 0.25rem;
}

.anthem {
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.75;
  color: var(--burgundy-dark);
}

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  margin-top: auto;
  padding: var(--space-xl) var(--space-md);
  background: var(--cream-dark);
  border-top: 1px solid rgba(92, 26, 51, 0.1);
}

.site-footer-dark {
  background: var(--burgundy-dark);
  color: rgba(248, 245, 239, 0.75);
  border-top-color: rgba(201, 162, 39, 0.2);
}

.site-footer-inner {
  text-align: center;
  font-size: 0.9rem;
}

.site-footer-inner p {
  margin: 0 0 0.35rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--burgundy-dark);
}

.site-footer-dark .footer-brand,
.site-footer-dark p {
  color: rgba(248, 245, 239, 0.85);
}

.footer-link,
.site-footer a {
  font-weight: 600;
  text-decoration: none;
  color: var(--burgundy);
}

.site-footer-dark .footer-link {
  color: var(--gold-light);
}

.disclaimer {
  font-size: 0.8rem;
  font-style: italic;
  color: var(--ink-muted);
}

/* ── Admin panel ────────────────────────────────────────── */
.card-admin {
  border-top: 3px solid var(--burgundy);
  background: linear-gradient(180deg, rgba(92, 26, 51, 0.04) 0%, var(--white) 100%);
}

.admin-meta {
  font-size: 0.85rem;
  word-break: break-all;
}

.admin-subhead {
  margin: var(--space-md) 0 var(--space-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--burgundy-soft);
}

.admin-list {
  margin: 0 0 var(--space-md);
  padding: 0;
  list-style: none;
}

.admin-list-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid rgba(92, 26, 51, 0.1);
  font-size: 0.92rem;
}

.admin-list-item:last-child {
  border-bottom: none;
}

.admin-grant-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: stretch;
}

.admin-grant-row .input {
  flex: 1;
  min-width: 12rem;
}

.admin-revoke {
  display: inline-block;
  margin: 0;
}

.quote-card footer .gallery-delete {
  margin-top: 0.35rem;
}

/* ── Secret toast ───────────────────────────────────────── */
#secret-toast {
  position: fixed;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: 200;
  max-width: 22rem;
  padding: var(--space-sm) var(--space-md);
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  color: var(--cream);
  background: var(--burgundy-dark);
  border: 1px solid var(--gold);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
}

#secret-toast.visible {
  transform: translateX(-50%) translateY(0);
}

/* ── Legacy layout aliases ──────────────────────────────── */
.main-wide {
  max-width: 56rem;
}

.hero,
.hero-compact,
.hero-inner,
.tagline,
.featured-photo,
.est {
  /* legacy classes unused or mapped above */
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-home-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .hero-copy {
    text-align: center;
    max-width: none;
  }

  .hero-copy .seal {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-media {
    order: -1;
  }
}

@media (max-width: 640px) {
  :root {
    --space-lg: 1.5rem;
    --space-xl: 2rem;
  }

  .nav-brand-text {
    font-size: 1rem;
    max-width: 9rem;
    line-height: 1.2;
  }

  .nav-links {
    gap: 0.85rem;
  }

  .nav-links a {
    font-size: 0.82rem;
  }

  .card {
    padding: var(--space-md);
  }

  .benefits-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
