/* ===========================================================
   isaacrcarter.com — shared look and feel
   Change colours here and every page changes at once.
   =========================================================== */

:root {
  /* This site is dark by design. Saying so stops phone browsers from
     "helpfully" inverting it, which wrecks the parchment panels and the map. */
  color-scheme: dark;

  /* --- colours --- */
  --ink:        #0b0a10;   /* deepest background      */
  --stone:      #15131d;   /* panel background        */
  --stone-2:    #1e1b29;   /* raised panel            */
  --border:     #342f45;   /* panel edges             */
  --gold:       #e8b84b;   /* headings, highlights    */
  --gold-soft:  #f3d894;
  --ember:      #d2552f;   /* danger / red team       */
  --emerald:    #3fae7f;   /* success / blue team     */
  --arcane:     #8b7bd8;   /* magic accents           */
  --parchment:  #f2e4c6;   /* light panels            */
  --text:       #e9e4f2;
  --muted:      #a49cba;

  /* --- shape + motion --- */
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  --ring: 0 0 0 2px rgba(232, 184, 75, 0.55);
  --maxw: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 700px at 15% -10%, #241f36 0%, transparent 60%),
    radial-gradient(900px 600px at 100% 0%, #2a1a2e 0%, transparent 55%),
    var(--ink);
  color: var(--text);
  font-family: Spectral, Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: Cinzel, Georgia, serif;
  letter-spacing: 0.01em;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--gold);
}

h1 { font-size: clamp(2rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.4rem, 3.4vw, 2.1rem); }
h3 { font-size: 1.15rem; color: var(--gold-soft); }

p { margin: 0 0 1em; }

a { color: var(--gold-soft); text-decoration-color: rgba(232, 184, 75, 0.4); }
a:hover { color: #fff; }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }

/* ---------- layout ---------- */

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.section { padding: clamp(40px, 7vw, 86px) 0; }

.grid { display: grid; gap: 18px; }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- site header ---------- */

.topbar {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(11, 10, 16, 0.82);
  border-bottom: 1px solid var(--border);
}
.topbar .wrap {
  display: flex; align-items: center; gap: 18px;
  min-height: 62px; flex-wrap: wrap;
}
.brand {
  font-family: Cinzel, serif; font-weight: 700; font-size: 1.02rem;
  color: var(--gold); text-decoration: none; letter-spacing: 0.08em;
  text-transform: uppercase; white-space: nowrap;
}
.brand span { color: var(--muted); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.nav a {
  padding: 7px 12px; border-radius: 999px; font-size: 0.88rem;
  text-decoration: none; color: var(--muted); font-family: Cinzel, serif;
  letter-spacing: 0.04em; white-space: nowrap;
}
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav a[aria-current="page"] {
  color: var(--ink); background: var(--gold); font-weight: 600;
}

/* ---------- panels + cards ---------- */

.panel {
  background: linear-gradient(180deg, var(--stone-2), var(--stone));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(18px, 3vw, 28px);
  box-shadow: var(--shadow);
}

.panel-parchment {
  background:
    radial-gradient(600px 300px at 20% 0%, #fff8e6 0%, transparent 70%),
    var(--parchment);
  color: #33240f;
  border-color: #c9ab75;
}
.panel-parchment h1, .panel-parchment h2, .panel-parchment h3 { color: #5d3a12; }
.panel-parchment a { color: #8a4b12; }

.card {
  display: block;
  background: linear-gradient(180deg, var(--stone-2), var(--stone));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(232, 184, 75, 0.55);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.5);
}
.card .rune { font-size: 1.9rem; line-height: 1; display: block; margin-bottom: 10px; }
.card h3 { margin-bottom: 6px; }
.card p { color: var(--muted); margin: 0; font-size: 0.95rem; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px; cursor: pointer;
  font-family: Cinzel, serif; font-size: 0.95rem; font-weight: 600;
  letter-spacing: 0.03em; text-decoration: none;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  color: #2a1c05; border: 1px solid #b98f28;
  transition: transform 0.14s ease, filter 0.14s ease;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.06); color: #2a1c05; }
.btn:active { transform: translateY(0); }
.btn-ghost {
  background: transparent; color: var(--gold-soft);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: #fff; border-color: var(--gold); }
.btn-sm { padding: 7px 14px; font-size: 0.85rem; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

/* ---------- small pieces ---------- */

.eyebrow {
  font-family: Cinzel, serif; text-transform: uppercase;
  letter-spacing: 0.22em; font-size: 0.76rem; color: var(--arcane);
  margin: 0 0 14px;
}
.lede { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--text); }
.muted { color: var(--muted); }

.tag {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--border); font-size: 0.76rem;
  color: var(--muted); font-family: Cinzel, serif; letter-spacing: 0.06em;
}

.divider {
  height: 1px; border: 0; margin: 28px 0;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

input, select, textarea {
  font-family: inherit; font-size: 1rem;
  background: #100e18; color: var(--text);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 9px 12px; width: 100%;
}
label { display: block; font-size: 0.82rem; color: var(--muted);
  font-family: Cinzel, serif; letter-spacing: 0.06em; margin-bottom: 5px; }

/* ---------- footer ---------- */

.site-foot {
  border-top: 1px solid var(--border);
  padding: 34px 0 54px;
  color: var(--muted); font-size: 0.9rem;
}
.site-foot .wrap { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }

/* ---------- motion ---------- */

@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.rise { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.d1 { animation-delay: 0.12s; } .d2 { animation-delay: 0.24s; }
.d3 { animation-delay: 0.36s; } .d4 { animation-delay: 0.48s; }

@keyframes flicker {
  0%, 100% { opacity: 1; }
  45% { opacity: 0.86; }
  70% { opacity: 0.95; }
}
.flicker { animation: flicker 3.6s ease-in-out infinite; }

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

/* ---------- phones: keep the menu to two tidy lines ---------- */
@media (max-width: 640px) {
  .topbar .wrap { gap: 10px; padding-top: 8px; padding-bottom: 8px; }
  .nav { margin-left: 0; width: 100%; gap: 3px; }
  .nav a { padding: 6px 10px; font-size: .8rem; }
  .brand { font-size: .92rem; }
}
