/* =========================================================
   Third — theme layer (demo)
   Loaded AFTER styles.css so [data-theme] overrides :root.
   Layout lives in Third_files/styles.css; this file only
   swaps the palette + heading type per theme, plus the
   floating theme switcher used to preview directions.
   ========================================================= */

/* ---- Theme switcher UI (demo control, remove for real launch) ---- */
.theme-switcher {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(18, 18, 18, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.3);
  font-family: "DM Sans", system-ui, sans-serif;
}

.theme-switcher__label {
  color: #cfcabf;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0 8px;
}

.theme-switcher button {
  border: 0;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 999px;
  background: transparent;
  color: #efeae0;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  transition: background 140ms ease, color 140ms ease;
}

.theme-switcher button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.theme-switcher button.is-active {
  background: #fff;
  color: #1a1a1a;
}

@media (max-width: 640px) {
  .theme-switcher {
    flex-wrap: wrap;
    justify-content: center;
    width: calc(100% - 24px);
    border-radius: 18px;
  }
  .theme-switcher__label {
    width: 100%;
    text-align: center;
    padding-bottom: 2px;
  }
}

/* ---- Palettes ---- */

/* Warm Study — cozy, literary, "third place / reading room" (default) */
[data-theme="warm"] {
  --bg: #f4f1e8;
  --surface: #fffdf8;
  --surface-soft: #f3f0e4;
  --ink: #102018;
  --muted: #48554d;
  --green: #163d2b;
  --green-2: #285b3b;
  --line: #d9d4c7;
  --shadow: 0 18px 50px rgba(24, 39, 31, 0.12);
}

/* Dusk Calm — dark, warm, intimate evening feel */
[data-theme="dusk"] {
  --bg: #16130f;
  --surface: #1f1b16;
  --surface-soft: #272019;
  --ink: #f2ebde;
  --muted: #b3a893;
  --green: #7a4f2e;
  --green-2: #e0a45e;
  --line: #3a3229;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

/* Soft Daylight — airy, clean, approachable sage */
[data-theme="daylight"] {
  --bg: #edf1ec;
  --surface: #ffffff;
  --surface-soft: #e5ece4;
  --ink: #1c2a24;
  --muted: #5c6b62;
  --green: #4f7a63;
  --green-2: #6a9a80;
  --line: #d5ddd4;
  --shadow: 0 18px 45px rgba(40, 70, 55, 0.12);
}

/* Editorial Ink — high-contrast, sharp, design-forward */
[data-theme="ink"] {
  --bg: #f7f4ee;
  --surface: #ffffff;
  --surface-soft: #efece4;
  --ink: #0b0b0b;
  --muted: #55524a;
  --green: #111111;
  --green-2: #b4472e;
  --line: #e2ddd2;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.14);
}

/* ---- Per-theme heading type ---- */
[data-theme="dusk"] .brand,
[data-theme="dusk"] h1,
[data-theme="dusk"] h2 {
  font-family: "Fraunces", Georgia, serif;
}

[data-theme="dusk"] .button:hover {
  color: #1a140c; /* keep hover label readable on amber */
}

[data-theme="daylight"] .brand,
[data-theme="daylight"] h1,
[data-theme="daylight"] h2 {
  font-family: "DM Sans", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

[data-theme="ink"] .brand,
[data-theme="ink"] h1,
[data-theme="ink"] h2 {
  font-family: "Space Grotesk", system-ui, sans-serif;
  letter-spacing: -0.03em;
}

/* ---- Top page nav (shared across pages) ---- */
.nav-wrap {
  width: min(1180px, 100%);
  margin: 0 auto 18px;
  display: flex;
  justify-content: center;
}

.site-nav {
  display: inline-flex;
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.site-nav a {
  padding: 9px 22px;
  border-radius: 999px;
  font-family: "DM Sans", system-ui, sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
  transition: background 140ms ease, color 140ms ease;
}

.site-nav a:hover {
  color: var(--ink);
}

.site-nav a.is-active {
  background: var(--green);
  color: #fff;
}

/* room for the fixed theme switcher at the bottom */
body {
  padding-bottom: 104px;
}
