/* ==========================================================
   Sapid Spice — blood & gold
   ========================================================== */

:root {
  --blood-950: #140304;
  --blood-900: #1f0507;
  --blood-800: #33090c;
  --blood-700: #4a0e12;
  --blood-600: #6b1a1c;
  --blood-500: #8c2a22;

  --gold-300: #f6e2a6;
  --gold-400: #e8c66a;
  --gold-500: #c9a24a;
  --gold-600: #9c7a32;

  --parchment: #f3e6c8;
  --parchment-dim: #cdb995;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;

  --radius: 18px;
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--parchment);
  background-color: var(--blood-900);
  background-image:
    radial-gradient(ellipse 80% 60% at 85% -10%, rgba(201, 162, 74, .18), transparent 60%),
    radial-gradient(ellipse 70% 50% at 0% 30%, rgba(140, 42, 34, .45), transparent 65%),
    radial-gradient(ellipse 90% 70% at 50% 120%, rgba(74, 14, 18, .9), transparent 70%),
    linear-gradient(180deg, var(--blood-900), var(--blood-950));
  background-attachment: fixed;
  overflow-x: hidden;
}

/* subtle film grain for an earthy, handmade texture */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .09;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

main, .site-header, .site-footer { position: relative; z-index: 1; }

a { color: var(--gold-400); }
a:hover { color: var(--gold-300); }

:focus-visible {
  outline: 2px solid var(--gold-400);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.1;
  margin: 0;
  color: var(--parchment);
}

em { font-style: italic; color: var(--gold-400); }

.eyebrow {
  font-family: var(--sans);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold-500);
  margin: 0 0 .9rem;
}

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

.site-header {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--parchment);
}
.wordmark:hover { color: var(--gold-300); }
.wordmark-glyph { width: 30px; height: 30px; color: var(--gold-500); }

.site-nav { display: flex; gap: clamp(12px, 3vw, 28px); align-items: center; flex-wrap: wrap; }
.site-nav a {
  text-decoration: none;
  font-size: .9rem;
  letter-spacing: .08em;
  color: var(--parchment-dim);
}
.site-nav a:hover { color: var(--gold-300); }
.site-nav .nav-latte {
  color: var(--gold-400);
  border: 1px solid rgba(201, 162, 74, .45);
  padding: .35rem .9rem;
  border-radius: 999px;
}

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

.button {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 500;
  font-size: .95rem;
  letter-spacing: .06em;
  text-decoration: none;
  padding: .85rem 1.6rem;
  border-radius: 999px;
  color: var(--blood-900);
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  box-shadow: 0 8px 30px -10px rgba(232, 198, 106, .55);
  transition: transform .2s ease, box-shadow .2s ease;
}
.button:hover {
  color: var(--blood-900);
  transform: translateY(-2px);
  box-shadow: 0 12px 36px -10px rgba(232, 198, 106, .75);
}
.button[aria-disabled="true"] { opacity: .65; cursor: default; }
.button[aria-disabled="true"]:hover { transform: none; }

/* ---------- hero ---------- */

.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(32px, 8vw, 96px) var(--gutter) clamp(48px, 10vw, 120px);
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.8rem, 7.5vw, 5.4rem);
  letter-spacing: -.01em;
  margin-bottom: 1.4rem;
}

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--parchment-dim);
  max-width: 34ch;
  margin: 0 0 2rem;
}

/* ---------- sky card ---------- */

.sky-card {
  text-align: center;
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, rgba(107, 26, 28, .55), rgba(31, 5, 7, .75));
  border: 1px solid rgba(201, 162, 74, .28);
  box-shadow:
    inset 0 1px 0 rgba(246, 226, 166, .08),
    0 30px 80px -30px rgba(0, 0, 0, .8);
  backdrop-filter: blur(6px);
}

.moon {
  width: min(180px, 50vw);
  height: auto;
  display: block;
  margin: 0 auto .8rem;
  animation: breathe 7s ease-in-out infinite;
}
.moon-dark { fill: var(--blood-800); stroke: rgba(201, 162, 74, .25); stroke-width: 1; }

@keyframes breathe {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(232, 198, 106, .25)); }
  50%      { transform: scale(1.025); filter: drop-shadow(0 0 22px rgba(232, 198, 106, .45)); }
}

.sky-phase {
  font-family: var(--serif);
  font-size: 1.8rem;
  margin: 0;
  color: var(--parchment);
}
.sky-meta {
  margin: .2rem 0 1.4rem;
  font-size: .9rem;
  color: var(--parchment-dim);
  letter-spacing: .04em;
}

.prompt {
  margin: 0;
  padding-top: 1.3rem;
  border-top: 1px solid rgba(201, 162, 74, .2);
}
.prompt .eyebrow { margin-bottom: .5rem; }
.prompt blockquote {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.35;
  color: var(--gold-300);
}

/* ---------- tools ---------- */

.tools,
.definition,
.latte {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) var(--gutter);
}

.tools h2,
.latte h2 { font-size: clamp(2.2rem, 5vw, 3.4rem); }

.section-lede { color: var(--parchment-dim); margin: .4rem 0 2.5rem; }

.tool-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.5vw, 28px);
}

.tool {
  position: relative;
  padding: 2rem 1.7rem 1.8rem;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(74, 14, 18, .6), rgba(31, 5, 7, .4));
  border: 1px solid rgba(201, 162, 74, .18);
  transition: border-color .25s ease, transform .25s ease;
  display: flex;
  flex-direction: column;
}
.tool:hover { border-color: rgba(201, 162, 74, .5); transform: translateY(-3px); }

.tool-num {
  font-family: var(--serif);
  font-size: 2.6rem;
  line-height: 1;
  color: var(--gold-500);
  opacity: .7;
  margin-bottom: 1rem;
}
.tool h3 { font-size: 1.75rem; margin-bottom: .6rem; }
.tool p { color: var(--parchment-dim); margin: 0 0 1.4rem; flex: 1; }

.status {
  align-self: flex-start;
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold-400);
  border: 1px solid rgba(201, 162, 74, .4);
  padding: .3rem .75rem;
  border-radius: 999px;
}
.tool:first-child .status {
  color: var(--blood-900);
  background: var(--gold-400);
  border-color: var(--gold-400);
}

/* ---------- definition ---------- */

.definition {
  text-align: center;
  max-width: 760px;
}
.def-word {
  font-size: clamp(3.2rem, 9vw, 5.5rem);
  font-weight: 500;
}
.def-pron {
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--parchment-dim);
  letter-spacing: .05em;
  vertical-align: middle;
}
.def-pos { margin: .4rem 0 1.4rem; color: var(--parchment-dim); }
.def-pos em { color: var(--parchment-dim); }
.def-senses {
  text-align: left;
  display: inline-block;
  margin: 0 0 2rem;
  padding-left: 1.4rem;
  font-family: var(--serif);
  font-size: 1.4rem;
  line-height: 1.5;
}
.def-senses li::marker { color: var(--gold-500); font-family: var(--sans); font-size: .9rem; }
.def-note {
  color: var(--parchment-dim);
  font-size: 1rem;
  max-width: 46ch;
  margin: 0 auto;
}

/* ---------- latte ---------- */

.latte {
  text-align: center;
  max-width: 720px;
}
.latte p { color: var(--parchment-dim); margin: 1rem auto 2rem; max-width: 46ch; }
.latte .fineprint { font-size: .85rem; margin-top: 1rem; opacity: .75; }

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

.site-footer {
  text-align: center;
  padding: 48px var(--gutter) 56px;
  color: var(--parchment-dim);
  font-size: .88rem;
  border-top: 1px solid rgba(201, 162, 74, .14);
  max-width: var(--maxw);
  margin: 0 auto;
}
.footer-glyph { width: 26px; height: 26px; color: var(--gold-600); }
.site-footer p { margin: .4rem 0 0; }

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .tool-list { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .site-nav a:not(.nav-latte) { display: none; }
  .def-senses { font-size: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .moon { animation: none; }
  .tool, .button { transition: none; }
}
