:root {
  color-scheme: light;
  --ink: #171717;
  --muted: #66645d;
  --paper: #f8f2e8;
  --panel: #fffaf2;
  --line: #d8cab5;
  --accent: #2f6b57;
  --accent-dark: #1d4638;
  --gold: #b8812f;
  --shadow: 0 24px 60px rgba(40, 31, 20, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(120deg, rgba(47, 107, 87, 0.12), transparent 34%),
    var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

a {
  color: inherit;
}

.page,
.deck-page {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
}

.hero {
  min-height: 88vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 440px);
  align-items: center;
  gap: 56px;
  padding: 56px 0 36px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4rem, 12vw, 8.8rem);
  line-height: 0.84;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.lede {
  max-width: 620px;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 3vw, 2.25rem);
  line-height: 1.18;
}

.actions,
.deck-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

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

.button:focus-visible,
.flip-card:focus-visible,
.link:focus-visible {
  outline: 3px solid rgba(47, 107, 87, 0.3);
  outline-offset: 3px;
}

.button--primary {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.button--secondary,
.button--ghost {
  background: rgba(255, 250, 242, 0.72);
}

.button--ghost {
  color: var(--muted);
}

.note {
  max-width: 520px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.sample {
  position: relative;
  min-height: 520px;
}

.card,
.flip-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(255, 250, 242, 0.95)),
    var(--panel);
  box-shadow: var(--shadow);
}

.card {
  position: absolute;
  width: min(340px, 86vw);
  min-height: 450px;
  padding: 28px;
}

.card span,
.flip-card span {
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.card p,
.flip-card strong {
  display: block;
  margin-top: 96px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.85rem;
  font-weight: 500;
  line-height: 1.12;
}

.card--top {
  right: 0;
  top: 0;
  transform: rotate(5deg);
}

.card--middle {
  left: 24px;
  top: 46px;
  transform: rotate(-7deg);
}

.card--bottom {
  left: 76px;
  top: 96px;
  transform: rotate(1deg);
}

.details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding: 0 0 56px;
}

.details > div {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.details p {
  color: var(--muted);
  line-height: 1.55;
}

.deck-page {
  padding: 32px 0 48px;
}

.deck-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
}

.deck-header h1 {
  margin-bottom: 0;
  font-size: clamp(3rem, 9vw, 7rem);
}

.link {
  color: var(--accent-dark);
  font-weight: 800;
}

.deck-shell {
  display: grid;
  place-items: center;
  min-height: 68vh;
}

.status {
  min-height: 24px;
  margin-bottom: 14px;
  color: var(--muted);
  font-weight: 700;
}

.flip-card {
  width: min(420px, 92vw);
  min-height: 560px;
  padding: 34px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.flip-card strong {
  margin-top: 118px;
  font-size: clamp(2rem, 6vw, 3.4rem);
}

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

  .button:hover,
  .button:focus-visible {
    transform: none;
  }
}

@media (max-width: 820px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 40px;
  }

  .sample {
    min-height: 430px;
  }

  .card {
    min-height: 360px;
  }

  .card p {
    margin-top: 72px;
    font-size: 1.45rem;
  }

  .details {
    grid-template-columns: 1fr;
  }

  .deck-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .actions,
  .deck-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .card {
    left: 50%;
    width: 82vw;
  }

  .card--top {
    transform: translateX(-50%) rotate(4deg);
  }

  .card--middle {
    transform: translateX(-54%) rotate(-6deg);
  }

  .card--bottom {
    transform: translateX(-46%) rotate(1deg);
  }

  .flip-card {
    min-height: 480px;
  }
}
