/* ============================================================
   Badr Hashemi — Digital Library
   Luxury minimal design system · emerald & gold · light + dark
   ============================================================ */

:root {
  /* Palette — dark (default) */
  --bg: #0b100c;
  --bg-soft: #10160f;
  --surface: #141b14;
  --surface-2: #1a231b;
  --ink: #efe8d6;
  --ink-soft: #cbc2a9;
  --ink-muted: #96906f;
  --gold: #c9a24b;
  --gold-bright: #e2bd72;
  --gold-soft: rgba(201, 162, 75, 0.16);
  --green: #2e6b4a;
  --green-deep: #16321f;
  --border: rgba(201, 162, 75, 0.18);
  --border-soft: rgba(201, 162, 75, 0.1);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  --overlay-hero: linear-gradient(100deg, rgba(8, 12, 8, 0.92) 0%, rgba(8, 12, 8, 0.55) 45%, rgba(8, 12, 8, 0.15) 100%);
  --overlay-hero-m: linear-gradient(180deg, rgba(8, 12, 8, 0.94) 0%, rgba(8, 12, 8, 0.78) 42%, rgba(8, 12, 8, 0.3) 75%, rgba(8, 12, 8, 0.55) 100%);
  --overlay-flat: linear-gradient(rgba(8, 12, 8, 0.88), rgba(8, 12, 8, 0.88));
  --btn-primary-bg: var(--gold);
  --btn-primary-ink: #14170c;

  /* Type */
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "Jost", "Segoe UI", system-ui, sans-serif;

  /* Rhythm */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6.5rem;
  --radius: 14px;
  --radius-lg: 22px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #faf6ec;
  --bg-soft: #f4eddc;
  --surface: #fffdf7;
  --surface-2: #f6efdf;
  --ink: #22301f;
  --ink-soft: #4c5442;
  --ink-muted: #7c7660;
  --gold: #a8802f;
  --gold-bright: #8a681f;
  --gold-soft: rgba(168, 128, 47, 0.14);
  --green: #1e4d36;
  --green-deep: #163c29;
  --border: rgba(140, 110, 45, 0.28);
  --border-soft: rgba(140, 110, 45, 0.14);
  --shadow: 0 24px 50px rgba(90, 70, 30, 0.18);
  --overlay-hero: linear-gradient(100deg, rgba(250, 246, 236, 0.94) 0%, rgba(250, 246, 236, 0.62) 45%, rgba(250, 246, 236, 0.12) 100%);
  --overlay-hero-m: linear-gradient(180deg, rgba(250, 246, 236, 0.96) 0%, rgba(250, 246, 236, 0.82) 42%, rgba(250, 246, 236, 0.32) 75%, rgba(250, 246, 236, 0.6) 100%);
  --overlay-flat: linear-gradient(rgba(250, 246, 236, 0.93), rgba(250, 246, 236, 0.93));
  --btn-primary-bg: #1e4d36;
  --btn-primary-ink: #f6efd9;

  color-scheme: light;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

.container { max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2rem); }

/* ---------- Ornament helpers ---------- */
.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}
.section-title {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  letter-spacing: 0.02em;
}
.section-head {
  text-align: center;
  display: grid;
  gap: 0.9rem;
  justify-items: center;
  margin-bottom: var(--space-5);
}
.rule {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--gold);
}
.rule::before, .rule::after {
  content: "";
  height: 1px;
  width: clamp(40px, 8vw, 90px);
  background: linear-gradient(90deg, transparent, var(--gold));
}
.rule::after { background: linear-gradient(90deg, var(--gold), transparent); }
.rule svg { flex: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.6rem;
  min-height: 48px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { flex: none; }
.btn-gold {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-ink);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}
.btn-gold:hover { box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45); }
.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold-bright); }
.btn-green {
  background: var(--green);
  color: #f2ecd9;
}
.btn-green:hover { background: var(--green-deep); }
.btn-sm { padding: 0.6rem 1.15rem; min-height: 42px; font-size: 0.88rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border-soft);
  transition: background-color 0.35s var(--ease);
}
.nav {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-right: auto;
}
.brand svg { color: var(--gold); }
.brand-logo { height: 56px; width: auto; }
.footer-logo { width: min(230px, 60vw); height: auto; }
@media (max-width: 860px) { .brand-logo { height: 46px; } }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.22rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
}
.brand-sub {
  display: block;
  font-family: var(--font-body);
  font-size: 0.58rem;
  letter-spacing: 0.42em;
  color: var(--gold);
  text-transform: uppercase;
}
.nav-links {
  display: flex;
  gap: clamp(1rem, 2.5vw, 2rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-size: 0.92rem;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  padding: 0.4rem 0.1rem;
  position: relative;
  transition: color 0.2s var(--ease);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--gold);
  transition: right 0.25s var(--ease);
}
.nav-links a:hover, .nav-links a[aria-current="true"] { color: var(--gold-bright); }
.nav-links a:hover::after, .nav-links a[aria-current="true"]::after { right: 0; }
.nav-actions { display: flex; align-items: center; gap: 0.8rem; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink-soft);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.3s var(--ease);
}
.theme-toggle:hover { color: var(--gold-bright); border-color: var(--gold); transform: rotate(15deg); }
.theme-toggle .icon-sun { display: none; }
html[data-theme="light"] .theme-toggle .icon-sun { display: block; }
html[data-theme="light"] .theme-toggle .icon-moon { display: none; }

.nav-burger {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  align-items: center;
  justify-content: center;
}

@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    inset: 72px 0 auto 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1.3rem 1.2rem;
    transform: translateY(-130%);
    transition: transform 0.3s var(--ease);
    box-shadow: var(--shadow);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { display: block; padding: 0.85rem 0.2rem; font-size: 1.05rem; }
  .nav-burger { display: inline-flex; }
  .nav-cta { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: clamp(560px, 92vh, 880px);
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 68% center;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--overlay-hero);
}
.hero-inner { width: 100%; }
.hero-copy {
  max-width: 560px;
  display: grid;
  gap: 1.4rem;
  padding-block: var(--space-6) var(--space-5);
}
.hero-title {
  font-size: clamp(2.6rem, 6.4vw, 4.3rem);
  font-weight: 600;
}
.hero-title .accent { color: var(--gold-bright); font-style: italic; }
.hero-lede {
  color: var(--ink-soft);
  font-size: 1.06rem;
  max-width: 42ch;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 0.4rem; }
.scroll-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: var(--space-4);
  color: var(--ink-muted);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.scroll-hint .mouse {
  width: 22px; height: 36px;
  border: 1.5px solid var(--ink-muted);
  border-radius: 12px;
  position: relative;
}
.scroll-hint .mouse::after {
  content: "";
  position: absolute;
  top: 6px; left: 50%;
  width: 3px; height: 7px;
  margin-left: -1.5px;
  border-radius: 3px;
  background: var(--gold);
  animation: scrollDot 1.8s infinite var(--ease);
}
@keyframes scrollDot {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

@media (max-width: 760px) {
  .hero { align-items: flex-start; min-height: 100svh; }
  .hero::before { background: var(--overlay-hero-m); }
  .hero-bg img { object-position: center 78%; }
  .hero-copy { padding-block: var(--space-4) var(--space-5); }
  .hero-ctas { flex-direction: column; align-items: stretch; }
}

/* Social rail */
.social-rail {
  position: fixed;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  gap: 0.7rem;
  z-index: 50;
}
.social-rail a {
  width: 42px; height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 75%, transparent);
  backdrop-filter: blur(8px);
  color: var(--ink-soft);
  transition: color 0.2s, border-color 0.2s, transform 0.2s;
}
.social-rail a:hover { color: var(--gold-bright); border-color: var(--gold); transform: translateX(-3px); }
@media (max-width: 1350px) { .social-rail { display: none; } }

/* ---------- Feature strip ---------- */
.features { margin-top: calc(-1 * var(--space-4)); position: relative; z-index: 5; }
.features-card {
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
}
.feature {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.6rem 1.5rem;
  border-left: 1px solid var(--border-soft);
}
.feature:first-child { border-left: none; }
.feature svg { color: var(--gold); flex: none; margin-top: 0.15rem; }
.feature h3 { font-family: var(--font-body); font-size: 0.98rem; font-weight: 600; letter-spacing: 0.02em; }
.feature p { color: var(--ink-muted); font-size: 0.85rem; line-height: 1.45; margin-top: 0.2rem; }
@media (max-width: 900px) {
  .features-card { grid-template-columns: 1fr 1fr; }
  .feature:nth-child(3) { border-left: none; }
  .feature:nth-child(n + 3) { border-top: 1px solid var(--border-soft); }
}
@media (max-width: 520px) {
  .features-card { grid-template-columns: 1fr; }
  .feature { border-left: none; }
  .feature:nth-child(n + 2) { border-top: 1px solid var(--border-soft); }
}

/* ---------- Books ---------- */
.books { padding-block: var(--space-6); position: relative; }
.books-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-size: cover;
  background-position: center;
  opacity: 0.14;
}
html[data-theme="light"] .books-bg { opacity: 0.08; }
.books::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(var(--bg) 0%, transparent 18%, transparent 82%, var(--bg) 100%);
}
.book-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
.book-card {
  display: grid;
  grid-template-columns: minmax(150px, 210px) 1fr;
  gap: clamp(1.2rem, 3vw, 2rem);
  align-items: center;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 3vw, 2.2rem);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.book-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
  box-shadow: var(--shadow);
}
.book-cover { perspective: 1200px; }
.book-cover img {
  border-radius: 6px 10px 10px 6px;
  box-shadow: -12px 18px 38px rgba(0, 0, 0, 0.5), inset 4px 0 8px rgba(255, 255, 255, 0.06);
  transform: rotateY(-14deg);
  transform-origin: left center;
  transition: transform 0.45s var(--ease);
}
.book-card:hover .book-cover img { transform: rotateY(-4deg); }
.book-info { display: grid; gap: 0.8rem; justify-items: start; }
.book-title { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.book-title em { color: var(--gold-bright); font-style: italic; }
.book-volume {
  color: var(--gold);
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
}
.book-divider {
  width: 120px; height: 10px;
  color: var(--gold);
  opacity: 0.9;
}
.book-desc { color: var(--ink-soft); font-size: 0.95rem; max-width: 38ch; }
.book-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 0.4rem; }
.books-more { text-align: center; margin-top: var(--space-4); color: var(--ink-muted); font-size: 0.9rem; letter-spacing: 0.06em; }
@media (max-width: 980px) { .book-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .book-card { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .book-info { justify-items: center; }
  .book-cover { max-width: 190px; }
}

/* ---------- Author ---------- */
.author { padding-block: var(--space-5) var(--space-6); }
.author-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  padding: clamp(1.5rem, 4vw, 3rem);
  isolation: isolate;
}
.author-card::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background-image: url("../assets/img/AboutAuthorBackground.jpg");
  background-size: cover;
  background-position: right center;
  opacity: 1;
}
.author-card::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(95deg, color-mix(in srgb, var(--bg) 88%, transparent) 25%, color-mix(in srgb, var(--bg) 55%, transparent) 100%);
}
.author-portrait {
  position: relative;
  border-radius: 200px 200px 16px 16px;
  overflow: hidden;
  border: 1px solid var(--gold);
  box-shadow: var(--shadow);
}
.author-portrait::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(201, 162, 75, 0.5);
  border-radius: 190px 190px 12px 12px;
  pointer-events: none;
}
.author-content { display: grid; gap: 1.1rem; justify-items: start; }
.author-name { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
.author-bio { color: var(--ink-soft); max-width: 54ch; }
.author-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  width: 100%;
  margin-top: 0.4rem;
}
.author-point { display: flex; gap: 0.7rem; align-items: flex-start; font-size: 0.85rem; color: var(--ink-soft); line-height: 1.4; }
.author-point svg { color: var(--gold); flex: none; margin-top: 0.1rem; }
@media (max-width: 980px) {
  .author-card { grid-template-columns: 1fr; }
  .author-portrait { max-width: 320px; margin-inline: auto; }
  .author-content { justify-items: center; text-align: center; }
  .author-point { text-align: left; }
}
@media (max-width: 640px) { .author-points { grid-template-columns: 1fr; } }

/* ---------- Quote ---------- */
.quote { padding-block: 0 var(--space-6); }
.quote-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: clamp(2rem, 5vw, 3.5rem);
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  isolation: isolate;
}
.quote-card::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background-image: url("../assets/img/QuoteSectionBackground.jpg");
  background-size: cover;
  background-position: center;
}
.quote-card::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: var(--overlay-flat);
}
.calligraphy {
  font-family: var(--font-display);
  color: var(--gold-bright);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  text-align: center;
  line-height: 1.25;
}
.quote-text {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  line-height: 1.5;
  font-style: italic;
}
.quote-text .qmark { color: var(--gold); font-size: 1.6em; line-height: 0; vertical-align: -0.25em; margin-right: 0.15em; }
.quote-ref { margin-top: 1rem; color: var(--gold); letter-spacing: 0.14em; font-size: 0.85rem; text-transform: uppercase; }
@media (max-width: 760px) {
  .quote-card { grid-template-columns: 1fr; text-align: center; }
}

/* ---------- Newsletter ---------- */
.newsletter { padding-bottom: var(--space-6); }
.newsletter-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: clamp(1.6rem, 4vw, 2.6rem);
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
  isolation: isolate;
}
.newsletter-card::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background-image: url("../assets/img/NewsletterBackground.jpg");
  background-size: cover;
  background-position: center;
}
.newsletter-card::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: var(--overlay-flat);
}
.newsletter-copy { display: flex; gap: 1.1rem; align-items: center; }
.newsletter-icon {
  width: 56px; height: 56px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--green);
  color: #f2ecd9;
}
.newsletter-copy h2 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); }
.newsletter-copy p { color: var(--ink-muted); font-size: 0.92rem; margin-top: 0.2rem; }
.newsletter-form { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.newsletter-form input {
  min-width: min(280px, 100%);
  padding: 0.85rem 1.1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  color: var(--ink);
  font: inherit;
}
.newsletter-form input::placeholder { color: var(--ink-muted); }
.newsletter-form input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.form-note { width: 100%; font-size: 0.85rem; color: var(--gold-bright); display: none; }
.form-note.show { display: block; }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  border-top: 1px solid var(--border);
  isolation: isolate;
  overflow: hidden;
}
.site-footer::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background-image: url("../assets/img/FooterBackground.jpg");
  background-size: cover;
  background-position: right bottom;
}
.site-footer::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, color-mix(in srgb, var(--bg) 96%, transparent) 40%, color-mix(in srgb, var(--bg) 78%, transparent));
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(2, 1fr);
  gap: var(--space-4);
  padding-block: var(--space-5) var(--space-4);
}
.footer-brand { display: grid; gap: 1rem; justify-items: start; align-content: start; }
.footer-brand p { color: var(--ink-muted); font-size: 0.92rem; max-width: 30ch; }
.footer-social { display: flex; gap: 0.6rem; }
.footer-social a {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--ink-soft);
  transition: color 0.2s, border-color 0.2s;
}
.footer-social a:hover { color: var(--gold-bright); border-color: var(--gold); }
.footer-col h3 {
  font-family: var(--font-body);
  font-size: 0.82rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.footer-col a { color: var(--ink-soft); font-size: 0.93rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--gold-bright); }
.footer-bottom {
  border-top: 1px solid var(--border-soft);
  padding-block: 1.2rem;
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.85rem;
}
@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: var(--btn-primary-bg);
  color: var(--btn-primary-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  z-index: 55;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
