:root {
  color-scheme: light;
  /* Surfaces — pulled from EasyDMG SettingsTheme.swift (light) */
  --bg: #faf7f3;
  --bg-strong: #fdf8ec;
  --surface: #f2ece4;
  --surface-muted: #ece2d2;
  --hero-bg: #fdf8ec;

  /* Ink */
  --text: #231a12;
  --text-muted: #7d6a58;
  --border: #ddd4c8;

  /* Brand accents (shared between modes) */
  --amber: #d28438;
  --gold: #e9a440;
  --dark-amber: #b8621a;
  --sand: #f1cb9c;
  --walnut: #643e26;
  --navy: #2d5487;
  --success: #2f7d32;

  /* Derived */
  --accent: var(--amber);
  --accent-strong: var(--dark-amber);
  --accent-soft: color-mix(in srgb, var(--sand) 70%, transparent);
  --on-accent: #2b1709;

  --shadow-sm: 0 4px 14px rgba(80, 45, 15, 0.08);
  --shadow-md: 0 18px 40px rgba(80, 45, 15, 0.12);
  --shadow-lg: 0 28px 70px rgba(80, 45, 15, 0.18);
  --glow: 0 30px 80px color-mix(in srgb, var(--gold) 35%, transparent);

  --max-width: 1160px;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #1a100a;
    --bg-strong: #1f140e;
    --surface: #251812;
    --surface-muted: #2c1d15;
    --hero-bg: #1f140e;

    --text: #f2eadd;
    --text-muted: #a89685;
    --border: #3a271c;

    --success: #9bcb6a;

    --accent: var(--gold);
    --accent-strong: var(--sand);
    --accent-soft: color-mix(in srgb, var(--amber) 28%, transparent);
    --on-accent: #1a0e06;

    --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 18px 40px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 28px 70px rgba(0, 0, 0, 0.6);
    --glow: 0 30px 80px color-mix(in srgb, var(--gold) 22%, transparent);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Helvetica Neue", system-ui, ui-sans-serif, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Warm ambient wash — gold glow at top, fading out */
body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(
      ellipse 60rem 32rem at 50% -10rem,
      color-mix(in srgb, var(--gold) 22%, transparent),
      transparent 70%
    ),
    linear-gradient(180deg, var(--bg-strong), transparent 28rem);
}

main {
  display: flex;
  flex-direction: column;
  gap: clamp(3.5rem, 7vw, 5.25rem);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 160ms ease;
}

a:hover {
  color: var(--accent-strong);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  width: min(100% - 2rem, var(--max-width));
  min-height: 4.5rem;
  margin: 0 auto;
  color: var(--text);
}

.site-header::before {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: -1;
  height: 4.5rem;
  content: "";
  background: color-mix(in srgb, var(--bg-strong) 82%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  backdrop-filter: saturate(140%) blur(18px);
  -webkit-backdrop-filter: saturate(140%) blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  width: fit-content;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand img {
  width: 2.125rem;
  height: 2.125rem;
  border-radius: 9px;
  box-shadow: var(--shadow-sm);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 3vw, 2rem);
  color: var(--text-muted);
  font-size: 0.94rem;
  font-weight: 600;
}

.nav-links a {
  position: relative;
  padding: 0.25rem 0;
}

.nav-external {
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
}

.external-arrow {
  font-size: 0.78em;
  line-height: 1;
  transform: translateY(-0.08em);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 200ms ease;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.header-download {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0 1.1rem;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--gold), var(--amber));
  color: var(--on-accent);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  box-shadow:
    0 1px 0 color-mix(in srgb, #fff 22%, transparent) inset,
    0 4px 10px color-mix(in srgb, var(--amber) 18%, transparent);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.header-download:hover {
  color: var(--on-accent);
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 color-mix(in srgb, #fff 22%, transparent) inset,
    0 6px 14px color-mix(in srgb, var(--amber) 25%, transparent);
}

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

.hero {
  position: relative;
  width: min(100% - 2rem, var(--max-width));
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 4rem) 0 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.8fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: center;
}

.hero-content {
  max-width: 44rem;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 1.25rem;
  font-size: clamp(3.25rem, 8.5vw, 6.5rem);
  line-height: 0.92;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text);
}

h1 .accent {
  background: linear-gradient(
    100deg,
    var(--gold) 0%,
    var(--amber) 50%,
    var(--dark-amber) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (prefers-color-scheme: dark) {
  h1 .accent {
    background: linear-gradient(
      100deg,
      var(--sand) 0%,
      var(--gold) 50%,
      var(--amber) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
  }
}

.hero-copy {
  max-width: 38rem;
  margin-bottom: 2rem;
  color: var(--text-muted);
  font-size: clamp(1.12rem, 1.5vw, 1.35rem);
  line-height: 1.45;
  letter-spacing: -0.005em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
  justify-content: center;
  max-width: 38rem;
}

.hero-note {
  margin: 1.25rem 0 0;
  max-width: 38rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  text-align: center;
}

/* Mascot — image already has its own rounded box, so just a soft glow behind it */
.hero-art-frame {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 22rem;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}

.hero-art-frame::before {
  content: "";
  position: absolute;
  inset: -10%;
  background: radial-gradient(
    circle at 50% 50%,
    color-mix(in srgb, var(--gold) 32%, transparent) 0%,
    color-mix(in srgb, var(--gold) 14%, transparent) 35%,
    transparent 70%
  );
  z-index: 0;
  pointer-events: none;
}

@media (prefers-color-scheme: dark) {
  .hero-art-frame::before {
    background: radial-gradient(
      circle at 50% 50%,
      color-mix(in srgb, var(--amber) 26%, transparent) 0%,
      color-mix(in srgb, var(--amber) 10%, transparent) 35%,
      transparent 70%
    );
  }
}

.hero-art-frame img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  border-radius: 22%;
  box-shadow: 0 14px 28px rgba(40, 18, 4, 0.28);
}

@media (prefers-color-scheme: dark) {
  .hero-art-frame img {
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.55);
  }
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 1.4rem;
  border-radius: var(--radius);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  border: 1px solid color-mix(in srgb, var(--dark-amber) 55%, transparent);
  background: linear-gradient(180deg, var(--gold), var(--amber));
  color: var(--on-accent);
  box-shadow:
    0 1px 0 color-mix(in srgb, #fff 28%, transparent) inset,
    0 6px 14px color-mix(in srgb, var(--amber) 22%, transparent);
}

.button.primary:hover {
  color: var(--on-accent);
  box-shadow:
    0 1px 0 color-mix(in srgb, #fff 28%, transparent) inset,
    0 8px 18px color-mix(in srgb, var(--amber) 32%, transparent);
}

.button.secondary {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.button.secondary:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--amber) 45%, var(--border));
}

/* ---------- Bands & sections ---------- */

.intro-band,
.download-band,
.callout-band {
  width: min(100% - 2rem, var(--max-width));
  margin: 0 auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.intro-band {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--sand) 25%, var(--surface)),
      var(--surface)
    );
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(1rem, 4vw, 3rem);
  align-items: center;
}

.intro-grid > article:first-child {
  text-align: right;
  padding-right: clamp(1rem, 3vw, 2.5rem);
}

.intro-grid h2,
.download-band h2,
.section-heading h2 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  line-height: 1.02;
  letter-spacing: -0.028em;
  font-weight: 800;
  color: var(--text);
}

.intro-grid p,
.download-band p,
.section-heading p,
.callout-copy p {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  line-height: 1.55;
}

.intro-emphasis {
  color: var(--walnut);
}

@media (prefers-color-scheme: dark) {
  .intro-emphasis {
    color: #ffffff;
  }
}

/* ---------- Spite block: the summoned hamster ---------- */

.intro-mascot {
  display: flex;
  justify-content: center;
}

/* Neutralize the right-aligned heading rule for the mascot column. */
.intro-grid > article.intro-mascot {
  padding-right: 0;
  text-align: center;
}

.summon {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding: clamp(0.5rem, 1.5vw, 1rem);
}

/* Glowing summoning portal behind the hamster. */
.summon-portal {
  position: absolute;
  top: 46%;
  left: 50%;
  width: clamp(180px, 26vw, 280px);
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--amber) 50%, transparent) 0%,
    color-mix(in srgb, var(--sand) 35%, transparent) 40%,
    transparent 72%
  );
  filter: blur(10px);
  opacity: 0.5;
  z-index: 0;
  animation: summon-portal-pulse 6s ease-in-out infinite;
}

.summon-hamster {
  position: relative;
  z-index: 1;
  width: clamp(180px, 28vw, 300px);
  height: auto;
  transform-origin: 50% 90%;
  filter: drop-shadow(0 12px 18px color-mix(in srgb, var(--walnut) 35%, transparent));
}

/* The disk image the hamster is casting his spell on — floats gently. */
.summon-disk {
  position: absolute;
  z-index: 2;
  bottom: 14%;
  right: -2%;
  width: clamp(70px, 12vw, 120px);
  height: auto;
  filter: drop-shadow(0 8px 14px color-mix(in srgb, var(--walnut) 30%, transparent));
  /* In phase with the portal glow — they rise and fall together. */
  animation: summon-float 6s ease-in-out infinite;
}

.summon-spark {
  position: absolute;
  z-index: 1;
  color: var(--amber);
  font-size: clamp(0.85rem, 1.6vw, 1.3rem);
  opacity: 0;
  pointer-events: none;
  animation: summon-twinkle 3s ease-in-out infinite;
}

/* Cluster of sparks bursting from the wand tip (upper-right of the hamster). */
.summon-spark--4 {
  top: 4%;
  right: 17%;
  font-size: 1.15em;
  animation-delay: 0s;
}

.summon-spark--5 {
  top: 12%;
  right: 30%;
  font-size: 0.7em;
  animation-delay: 2.4s;
}

.summon-spark--6 {
  top: 20%;
  right: 14%;
  font-size: 0.85em;
  animation-delay: 1.2s;
}

.summon-spark--7 {
  top: 12%;
  right: 11%;
  font-size: 0.6em;
  animation-delay: 0.6s;
}

.summon-spark--8 {
  top: 19%;
  right: 28%;
  font-size: 0.65em;
  animation-delay: 1.8s;
}

.summon-caption {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* The word the section is named after. */
.spite-word {
  position: relative;
  display: inline-block;
  color: var(--amber);
}

@keyframes summon-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

@keyframes summon-portal-pulse {
  0%, 100% { opacity: 0.38; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.05); }
}

@keyframes summon-twinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.7); }
  50% { opacity: 1; transform: scale(1); }
}

code {
  padding: 0.1em 0.4em;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: color-mix(in srgb, var(--sand) 18%, var(--surface));
  color: var(--accent-strong);
  font-family:
    ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
}

.section {
  width: min(100% - 2rem, var(--max-width));
  margin: 0 auto;
  padding: 0;
}

.section-heading {
  max-width: 46rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.section-heading::before {
  content: "";
  display: block;
  width: 2.5rem;
  height: 3px;
  margin-bottom: 1.1rem;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), var(--amber));
}

/* ---------- Step cards ---------- */

.privacy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}

.privacy-grid article {
  position: relative;
  min-height: 15rem;
  padding: 1.6rem 1.5rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition:
    transform 200ms ease,
    box-shadow 200ms ease,
    border-color 200ms ease;
}

.privacy-grid article:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--amber) 35%, var(--border));
  box-shadow: var(--shadow-md);
}

.privacy-icon {
  display: block;
  width: 64px;
  height: 64px;
  margin: 0 auto 0.9rem;
  transition: transform 200ms ease;
}

.privacy-icon[src*="wizard-shield"] {
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 45%,
    color-mix(in srgb, var(--gold) 22%, transparent),
    transparent 70%
  );
}

.privacy-grid article:hover .privacy-icon {
  transform: scale(1.06) rotate(-2deg);
}

.step-grid {
  width: min(100%, 46rem);
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(1.75rem, 3.5vw, 2.5rem);
}

.step-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 1.25rem;
  align-items: start;
}

.privacy-grid a,
.callout-copy a {
  color: var(--accent-strong);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.18em;
}

.privacy-grid a:hover,
.callout-copy a:hover {
  color: var(--accent);
}

.step-number {
  grid-row: 1 / span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  margin-top: 0.1rem;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--gold) 30%, var(--surface)),
    color-mix(in srgb, var(--sand) 60%, var(--surface))
  );
  color: var(--accent-strong);
  font-weight: 800;
  font-size: 1rem;
  border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--border));
  box-shadow: 0 4px 12px color-mix(in srgb, var(--gold) 22%, transparent);
}

.step-card h3,
.privacy-grid h3 {
  margin-bottom: 0.55rem;
  font-size: 1.22rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
  font-weight: 700;
}

.step-card p,
.privacy-grid p {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.5;
}

/* ---------- Features ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.feature-card {
  position: relative;
  padding: 1.5rem 1.5rem 1.6rem 2.6rem;
  border: 1px solid color-mix(in srgb, var(--amber) 38%, var(--border));
  border-radius: var(--radius-lg);
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--gold) 10%, var(--bg-strong)),
    var(--bg-strong) 70%
  );
  box-shadow:
    0 1px 2px rgba(80, 45, 15, 0.12),
    0 10px 16px -8px rgba(80, 45, 15, 0.28),
    inset 0 1px 0 color-mix(in srgb, var(--gold) 30%, transparent);
  transition:
    border-color 200ms ease,
    box-shadow 200ms ease,
    transform 200ms ease;
}

.feature-card:hover {
  border-color: color-mix(in srgb, var(--amber) 55%, var(--border));
  box-shadow:
    0 2px 4px rgba(80, 45, 15, 0.14),
    0 18px 26px -12px rgba(80, 45, 15, 0.34),
    inset 0 1px 0 color-mix(in srgb, var(--gold) 30%, transparent);
  transform: translateY(-2px);
}

@media (prefers-color-scheme: dark) {
  .feature-card {
    border-color: color-mix(in srgb, #fff 28%, transparent);
    box-shadow:
      0 1px 2px rgba(0, 0, 0, 0.5),
      0 10px 16px -8px rgba(0, 0, 0, 0.6),
      0 8px 18px -10px color-mix(in srgb, var(--gold) 32%, transparent),
      inset 0 1px 0 color-mix(in srgb, var(--gold) 30%, transparent);
  }

  .feature-card:hover {
    border-color: color-mix(in srgb, #fff 50%, transparent);
    box-shadow:
      0 2px 4px rgba(0, 0, 0, 0.55),
      0 18px 26px -12px rgba(0, 0, 0, 0.65),
      0 14px 26px -12px color-mix(in srgb, var(--gold) 42%, transparent),
      inset 0 1px 0 color-mix(in srgb, var(--gold) 30%, transparent);
  }
}

.feature-dot {
  position: absolute;
  top: 1.95rem;
  left: 1.4rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--gold) 75%, #fff);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 18%, transparent);
}

.feature-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--text);
}

.feature-card p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text-muted);
}

/* ---------- Progress bar demo ---------- */

.demo-band {
  width: min(100% - 2rem, var(--max-width));
  margin: 0 auto;
  padding: 0;
}

.demo-copy {
  max-width: 38rem;
  margin: 0 auto clamp(1.5rem, 3vw, 2.25rem);
  text-align: center;
}

.demo-copy h2 {
  margin-bottom: 0.65rem;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  line-height: 1.02;
  letter-spacing: -0.028em;
  font-weight: 800;
  color: var(--text);
}

.demo-copy p {
  margin: 0 auto;
  color: var(--text-muted);
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  line-height: 1.55;
}

.demo-window {
  position: relative;
  width: 100%;
  max-width: 56rem;
  margin: 0 auto;
  aspect-ratio: 1354 / 186;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: #ffffff;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.demo-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  animation: demo-cycle 12s steps(1) infinite;
}

.demo-frame-1 { animation-delay: 0s; }
.demo-frame-2 { animation-delay: 1.5s; }
.demo-frame-3 { animation-delay: 3s; }
.demo-frame-4 { animation-delay: 4.5s; }
.demo-frame-5 { animation-delay: 6s; }
.demo-frame-6 { animation-delay: 7.5s; }
.demo-frame-7 { animation-delay: 9s; }
.demo-frame-8 { animation-delay: 10.5s; }

@keyframes demo-cycle {
  0%, 12.49% {
    opacity: 1;
  }
  12.5%, 100% {
    opacity: 0;
  }
}

/* ---------- Appearance showcase ---------- */

.appearance-section {
  /* spacing handled by main's gap */
}

.appearance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
}

.appearance-figure {
  margin: 0;
}

.appearance-figure img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.appearance-figure figcaption {
  margin-top: 0.85rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
}

/* ---------- Privacy, Callout & Download ---------- */

.privacy-section {
  /* spacing handled by main's gap */
}

.callout-band {
  padding: clamp(2rem, 4vw, 3rem);
  border-color: color-mix(in srgb, var(--amber) 38%, var(--border));
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--gold) 10%, var(--bg-strong)),
      var(--bg-strong) 70%
    );
  box-shadow:
    var(--shadow-md),
    inset 0 1px 0 color-mix(in srgb, var(--gold) 30%, transparent);
}

.callout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(1.25rem, 4vw, 3rem);
  align-items: center;
}

.callout-copy h2 {
  margin-bottom: 0.6rem;
  font-size: clamp(1.55rem, 3.5vw, 2.25rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 800;
  color: var(--text);
}

.callout-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

.callout-actions .button {
  min-height: 2.75rem;
}

.download-band {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
  padding: clamp(2rem, 4vw, 3rem);
  background:
    radial-gradient(
      ellipse at 0% 0%,
      color-mix(in srgb, var(--gold) 25%, transparent),
      transparent 60%
    ),
    linear-gradient(135deg, var(--walnut), #3a2110 60%, var(--walnut));
  border-color: color-mix(in srgb, var(--gold) 25%, var(--walnut));
  color: #faf2e2;
  box-shadow: var(--shadow-lg), var(--glow);
}

.download-band h2 {
  color: #faf2e2;
}

.download-band p {
  color: color-mix(in srgb, #faf2e2 80%, transparent);
}

.download-band div {
  max-width: 42rem;
}

/* ---------- FAQ ---------- */

.faq-section {
  /* spacing handled by main's gap */
}

.faq-list {
  display: grid;
  gap: 0.75rem;
  max-width: 52rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition:
    border-color 200ms ease,
    box-shadow 200ms ease,
    background-color 200ms ease;
}

.faq-item:hover {
  border-color: color-mix(in srgb, var(--amber) 35%, var(--border));
  box-shadow: var(--shadow-md);
}

.faq-item[open] {
  background: color-mix(in srgb, var(--sand) 12%, var(--surface));
  border-color: color-mix(in srgb, var(--amber) 40%, var(--border));
}

.faq-item > summary {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 3.25rem 1.1rem 1.5rem;
  cursor: pointer;
  list-style: none;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.35;
  user-select: none;
}

.faq-item > summary::-webkit-details-marker {
  display: none;
}

.faq-item > summary::after {
  content: "";
  position: absolute;
  right: 1.4rem;
  top: 50%;
  width: 0.7rem;
  height: 0.7rem;
  border-right: 2px solid var(--accent-strong);
  border-bottom: 2px solid var(--accent-strong);
  transform: translateY(-65%) rotate(45deg);
  transition: transform 220ms ease;
}

.faq-item[open] > summary::after {
  transform: translateY(-25%) rotate(-135deg);
}

.faq-item > summary:hover {
  color: var(--accent-strong);
}

.faq-answer {
  padding: 0 1.5rem 1.25rem;
  color: var(--text-muted);
}

.faq-answer p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
}

.faq-answer p + p {
  margin-top: 0.75rem;
}

.faq-answer a {
  color: var(--accent-strong);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
  text-underline-offset: 3px;
  font-weight: 600;
}

.faq-answer a:hover {
  text-decoration-color: var(--accent-strong);
}

@media (prefers-reduced-motion: no-preference) {
  .faq-item[open] .faq-answer {
    animation: faq-fade 240ms ease both;
  }
}

@keyframes faq-fade {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 760px) {
  .faq-item > summary {
    font-size: 1rem;
    padding: 1rem 2.75rem 1rem 1.15rem;
  }

  .faq-answer {
    padding: 0 1.15rem 1.1rem;
  }
}

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

.site-footer {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 2rem, var(--max-width));
  margin: 0 auto;
  padding: 2.25rem 0 3rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.site-footer p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: flex-end;
  margin-left: auto;
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--accent-strong);
}

/* ---------- Focus & motion ---------- */

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--gold) 70%, white);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-color-scheme: dark) {
  :focus-visible {
    outline-color: color-mix(in srgb, var(--gold) 80%, black);
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 920px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    min-height: auto;
  }

  .hero-art-frame {
    order: -1;
    max-width: 20rem;
  }
}

@media (max-width: 760px) {
  .site-header {
    grid-template-columns: 1fr auto;
    min-height: 4.25rem;
  }

  .site-header::before {
    height: 4.25rem;
  }

  .nav-links {
    display: none;
  }

  .header-download {
    min-height: 2.35rem;
  }

  .hero {
    padding: 3rem 0 0;
  }

  h1 {
    font-size: clamp(3rem, 13vw, 4.75rem);
  }

  .hero-copy {
    font-size: 1.12rem;
  }

  .button {
    width: 100%;
  }

  .intro-grid,
  .step-grid,
  .privacy-grid,
  .callout-grid,
  .appearance-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }


  .intro-grid > article:first-child {
    text-align: left;
    padding-right: 0;
    border-right: none;
  }

  .callout-actions {
    justify-content: flex-start;
  }

  .download-band,
  .site-footer {
    align-items: stretch;
  }

  .download-band,
  .site-footer {
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-end;
  }
}

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

  /* Cycling demo collapses to a single static frame */
  .demo-frame {
    animation: none !important;
    opacity: 0 !important;
  }

  .demo-frame-1 {
    opacity: 1 !important;
  }
}

/* ---------- Markdown Container (Privacy Policy) ---------- */

.markdown-container {
  max-width: 48rem;
  margin: 0 auto;
  padding: 2.5rem clamp(1.5rem, 4vw, 3rem);
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  color: var(--text-muted);
}

.doc-source {
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
  margin-top: 2rem;
  border-radius: var(--radius-sm, 0.5rem);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border: 1px solid var(--border);
}

.markdown-container h1,
.markdown-container h2,
.markdown-container h3,
.markdown-container h4 {
  color: var(--text);
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.markdown-container h1 {
  font-size: clamp(2rem, 5vw, 2.5rem);
  letter-spacing: -0.025em;
  margin-top: 0;
  margin-bottom: 1.5rem;
}

.markdown-container h2 {
  font-size: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  margin-top: 2.5rem;
}

.markdown-container p {
  margin-bottom: 1.2rem;
  font-size: 1.05rem;
  line-height: 1.6;
}

.markdown-container a {
  color: var(--accent-strong);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
  text-underline-offset: 3px;
  font-weight: 500;
}

.markdown-container a:hover {
  text-decoration-color: var(--accent-strong);
}

.markdown-container ul,
.markdown-container ol {
  margin-bottom: 1.2rem;
  padding-left: 1.5rem;
  font-size: 1.05rem;
  line-height: 1.6;
}

.markdown-container li {
  margin-bottom: 0.5rem;
}

.markdown-container code {
  font-size: 0.9em;
}

.demo-frame[data-demo-frame] {
  opacity: 1;
  animation: none;
}

/*
  DEBUG-SPARKS — temporary helper for positioning the wand sparks.
  The sparks fade in/out, so a normal screenshot catches them at random
  opacities. Uncomment to force every spark fully visible and color-code
  each one (so a screenshot can map each ✦ to its CSS rule), reposition,
  then comment out again. Colors: 4=red 5=green 6=blue 7=yellow 8=pink.

  .summon-spark { opacity: 1 !important; animation: none !important; }
  .summon-spark--4 { color: #ff3b30 !important; }
  .summon-spark--5 { color: #34c759 !important; }
  .summon-spark--6 { color: #0a84ff !important; }
  .summon-spark--7 { color: #ffd60a !important; }
  .summon-spark--8 { color: #ff2d92 !important; }
*/
