/* Light palette: cream, tomato red and basil green. Same as the book reader (docs/books/wine-and-glasses). */
:root {
  --brand: #C8322B;
  --brand-dark: #A2241E;
  --brand-hover: #A2241E;
  --brand-50: #FAE6E0;
  --on-brand: #FFFFFF;

  --bar: #3B1E1C;
  --bar-text: #F6E9DF;
  --bar-line: #5A3532;

  --bg: #FFF4EA;
  --bg-gradient: linear-gradient(180deg, #FFF4EA, #FFECD9, #FDDCB9, #F4CBA1);
  --surface: #FFF4E9;
  --surface-2: #F9F1E6;
  --line: #E6D8C5;
  --text: #2E211C;
  --text-soft: #6A574C;
  --text-muted: #75624F;

  --amber: #8E5A0B;
  --amber-50: #FBEFD8;
  --green: #3D7350;

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --shadow: 0 1px 2px rgba(59, 30, 28, 0.06), 0 4px 14px rgba(59, 30, 28, 0.05);
  color-scheme: light;
}

/* Dark palette: espresso and burgundy. */
:root[data-theme="dark"] {
  --brand: #C93A31;
  --brand-dark: #F08A80;
  --brand-50: #3A1D1B;

  --bar: #120C0B;
  --bar-text: #F6E9DF;
  --bar-line: #3A2A27;

  --bg: #323131;
  --bg-gradient: linear-gradient(180deg, #323131, #463939, #594141, #6D4A4A);
  --surface: #241B18;
  --surface-2: #2B211D;
  --line: #3A2D27;
  --text: #F1E6DA;
  --text-soft: #C4B2A3;
  --text-muted: #A8927F;

  --amber: #E8B04F;
  --amber-50: #33281A;
  --green: #8FCB9E;

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 14px rgba(0, 0, 0, 0.2);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg) var(--bg-gradient) fixed;
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--sans);
}

a { color: inherit; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.wrap {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Top bar */

.top {
  background: var(--bar);
  color: var(--bar-text);
}

.top-in {
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo { display: block; line-height: 0; }

.brand-logo img {
  height: 1.375rem;
  width: auto;
  mix-blend-mode: screen; /* the PNG's black background disappears on the bar */
}

.theme-btn {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  border: 1px solid var(--bar-line);
  background: transparent;
  color: var(--bar-text);
  cursor: pointer;
}

.theme-btn:hover { background: var(--bar-line); }
.theme-btn .moon,
:root[data-theme="dark"] .theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .moon { display: block; }

/* Hero */

.hero {
  padding: clamp(3.5rem, 10vw, 7rem) 0 clamp(3rem, 8vw, 5.5rem);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-dark);
  background: var(--brand-50);
  padding: 0.375rem 0.875rem;
  border-radius: 2rem;
  margin-bottom: 1.5rem;
}

.dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--brand);
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero h1 {
  font-size: clamp(2.25rem, 6.5vw, 4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  max-width: 16ch;
  margin: 0 0 1.5rem;
}

.lede {
  font-size: clamp(1.125rem, 2.2vw, 1.3125rem);
  line-height: 1.6;
  color: var(--text-soft);
  max-width: 38rem;
  margin: 0 0 2rem;
}

.cta {
  display: inline-block;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  background: var(--brand);
  color: var(--on-brand);
  padding: 0.9375rem 1.5rem;
  border-radius: 0.625rem;
  transition: background 0.2s ease;
}

.cta:hover { background: var(--brand-hover); }

/* Sections */

.section {
  padding: clamp(3rem, 8vw, 5rem) 0;
  border-top: 1px solid var(--line);
}


.section h2 {
  font-size: clamp(1.625rem, 3.5vw, 2.125rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 0 0 0.5rem;
}

.intro {
  color: var(--text-soft);
  margin: 0 0 2rem;
}

.alt h2 { margin-bottom: 2rem; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
}

.card,
.item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.875rem;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card h3,
.item h3 {
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 0.5rem;
}

.card h3 { margin-top: 1rem; }

.card p,
.item p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.96875rem;
}

.pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.25rem 0.625rem;
  border-radius: 2rem;
}

.pill.red { color: var(--brand-dark); background: var(--brand-50); }
.pill.amber { color: var(--amber); background: var(--amber-50); }
.pill.gray { color: var(--text-muted); background: var(--surface-2); border: 1px solid var(--line); }

/* Footer */

.footer {
  background: var(--bar);
  color: var(--bar-text);
  padding: 2.5rem 0;
  font-size: 0.9375rem;
}

.footer p { margin: 0; }

.footer a:focus-visible { outline-color: var(--bar-text); }

@media (prefers-reduced-motion: reduce) {
  .dot { animation: none; }
  .cta { transition: none; }
}
