@font-face {
  font-family: "Geist";
  src: url("../assets/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Newsreader";
  src: url("../assets/Newsreader-Variable.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal italic;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: "Geist", system-ui, sans-serif;
  color: #27231f;
  background: #f1ece4;
  --ink: #27231f;
  --muted: #6d665e;
  --copper: #a95f3f;
  --copper-dark: #7c402a;
  --paper: rgba(255, 252, 247, 0.86);
  --line: rgba(72, 60, 48, 0.16);
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 78% 10%, rgba(202, 145, 111, 0.20), transparent 34rem),
    radial-gradient(circle at 16% 72%, rgba(204, 181, 139, 0.20), transparent 28rem),
    #f1ece4;
}

button, a { font: inherit; }
button { cursor: pointer; }

.skip-link {
  position: fixed;
  z-index: 10;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  color: white;
  background: var(--ink);
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 1.25rem 0;
}

.brand { display: inline-flex; align-items: center; gap: 0.7rem; }
.brand img:first-child { width: 2.55rem; height: 2.55rem; object-fit: contain; }
.brand .wordmark { width: 6.75rem; height: auto; }

.account-actions { display: flex; align-items: center; gap: 0.35rem; }
.text-button {
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 0.85rem;
  color: var(--muted);
  background: transparent;
}
.text-button:hover, .text-button:focus-visible { color: var(--ink); background: rgba(255,255,255,.5); }

main {
  width: min(1040px, calc(100% - 2.5rem));
  margin: 4.5rem auto 0;
  padding-bottom: 4rem;
}

.intro { max-width: 780px; }
.eyebrow, .card-kicker {
  margin: 0 0 0.9rem;
  color: var(--copper-dark);
  font-size: 0.76rem;
  font-weight: 720;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1, h2, p { text-wrap: pretty; }
h1 {
  max-width: 820px;
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(3.2rem, 8vw, 6.8rem);
  font-weight: 390;
  line-height: 0.93;
  letter-spacing: -0.045em;
}
h1 em { color: var(--copper); font-weight: 360; }
.lede {
  max-width: 680px;
  margin: 1.55rem 0 0;
  color: var(--muted);
  font-size: clamp(1.03rem, 1.8vw, 1.28rem);
  line-height: 1.6;
}

.membership-card {
  min-height: 280px;
  margin-top: 3rem;
  padding: clamp(1.4rem, 4vw, 2.6rem);
  border: 1px solid var(--line);
  border-radius: 1.6rem;
  background: var(--paper);
  box-shadow: 0 28px 80px rgba(66, 49, 34, 0.10);
  backdrop-filter: blur(18px);
}

.loading-state, .signed-out-state, .error-state {
  display: grid;
  justify-items: start;
  align-content: center;
  min-height: 220px;
}
.loading-state { justify-items: center; color: var(--muted); }
.spinner {
  width: 1.7rem;
  height: 1.7rem;
  border: 2px solid rgba(169,95,63,.2);
  border-top-color: var(--copper);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

h2 {
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.35rem);
  font-weight: 430;
  line-height: 1;
}
.signed-out-state > p:not(.card-kicker), .error-state > p:not(.card-kicker) {
  max-width: 580px;
  margin: 1rem 0 1.4rem;
  color: var(--muted);
  line-height: 1.6;
}

.primary-button, .secondary-button, .offer-button {
  min-height: 2.85rem;
  border-radius: 999px;
  padding: 0.78rem 1.2rem;
  font-weight: 700;
}
.primary-button, .offer-button {
  border: 1px solid var(--copper-dark);
  color: #fffaf5;
  background: var(--copper-dark);
}
.primary-button:hover, .offer-button:hover { background: #653220; }
.secondary-button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255,255,255,.55);
}
.secondary-button:hover { border-color: rgba(72,60,48,.34); background: white; }
button:focus-visible, a:focus-visible { outline: 3px solid rgba(169,95,63,.32); outline-offset: 3px; }
button:disabled { cursor: wait; opacity: .62; }

.member-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; }
.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1rem;
  margin-top: 2rem;
}
.plan-card {
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: rgba(255,255,255,.48);
}
.plan-card h3 { margin: 0; font-family: "Newsreader", Georgia, serif; font-size: 2rem; font-weight: 480; }
.plan-description { min-height: 3.4rem; margin: .65rem 0 1.5rem; color: var(--muted); line-height: 1.5; }
.offer-list { display: grid; gap: .7rem; margin-top: auto; }
.offer-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 1rem; }
.offer-price { display: flex; flex-direction: column; }
.offer-price strong { font-size: 1.15rem; }
.offer-price span { color: var(--muted); font-size: .82rem; }
.empty-catalog {
  grid-column: 1 / -1;
  padding: 2rem 0 .5rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}
.empty-catalog strong { display: block; margin-bottom: .35rem; color: var(--ink); font-size: 1.2rem; }
.checkout-note {
  margin-top: 1.4rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(169,95,63,.24);
  border-radius: .95rem;
  color: #69432f;
  background: rgba(202,145,111,.12);
  line-height: 1.5;
}
.quiet-proof { max-width: 700px; margin: 1.2rem auto 0; color: var(--muted); font-size: .86rem; line-height: 1.5; text-align: center; }

[hidden] { display: none !important; }

@media (max-width: 640px) {
  .site-header, main { width: min(100% - 1.3rem, 1040px); }
  .site-header { padding-top: .85rem; }
  main { margin-top: 2.7rem; }
  h1 { font-size: clamp(3.15rem, 17vw, 5rem); }
  .membership-card { margin-top: 2rem; border-radius: 1.2rem; }
  .member-heading { display: grid; }
  .member-heading .secondary-button { justify-self: start; }
  .offer-row { align-items: stretch; grid-template-columns: 1fr; }
  .offer-button { width: 100%; }
  .account-actions { gap: 0; }
  .text-button { padding-inline: .6rem; }
}

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2s; }
  *, *::before, *::after { scroll-behavior: auto !important; }
}
