/* =================================================================
   South Slope Cheese Club — site stylesheet
   Translated from the Claude Design React prototype:
   docs/design/export/signup-page.html

   Brand tokens (DM Serif Display / DM Sans, #F2C500 accent) confirmed
   against the rendered prototype.
   ================================================================= */

:root {
  /* Color */
  --color-bg: #FFFFFF;
  --color-bg-alt: #FAFAFA;
  --color-bg-cream: #F4F1EA;
  --color-text: #111111;
  --color-text-soft: #333333;
  --color-text-muted: #7A7A7A;
  --color-border: #E5E5E5;
  --color-border-soft: #ECECEC;
  --color-accent: #F2C500;             /* South Slope golden-yellow */
  --color-accent-ink: #111111;
  --color-accent-soft: rgba(242, 197, 0, 0.10);
  --color-deluxe-bg: #111111;
  --color-deluxe-text: #FFFFFF;
  --color-deluxe-muted: #B8B8B8;
  --color-error: #B00020;

  /* Type */
  --font-serif: "DM Serif Display", "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans:  "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;

  /* Radii + shadow */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.08);

  /* Layout */
  --content-max: 480px;
  --sticky-bar-h: 84px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; }
ol, ul { list-style: none; padding: 0; margin: 0; }

/* ---------- Base ---------- */
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-bottom: calc(var(--sticky-bar-h) + env(safe-area-inset-bottom, 0));
}

h1, h2, h3 {
  font-family: var(--font-serif);
  color: var(--color-text);
  font-weight: 400;          /* DM Serif Display ships as a single weight */
  letter-spacing: -0.005em;
  margin: 0 0 var(--space-4);
}
h1 { font-size: clamp(2.5rem, 9vw, 2.875rem); line-height: 1.05; }
h2 { font-size: clamp(1.75rem, 6vw, 2rem);   line-height: 1.1; }
h3 { font-size: 1.0625rem;  line-height: 1.3; font-weight: 600; font-family: var(--font-sans); }

p { margin: 0 0 var(--space-4); color: var(--color-text-soft); }
a { color: inherit; }

.lede { color: var(--color-text-soft); margin-bottom: var(--space-5); }
.muted { color: var(--color-text-muted); }
.small { font-size: 0.875rem; }

/* ---------- Layout ---------- */
.page {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--space-5);
}
.section {
  padding: var(--space-7) 0;
  border-bottom: 1px solid var(--color-border-soft);
}
.section:last-of-type { border-bottom: none; }
.section--hero { padding-top: var(--space-5); }

/* ---------- Hero meta row ---------- */
.hero-meta {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-3);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding-bottom: var(--space-6);
}
.hero-meta__est { justify-self: start; }
.hero-meta__wordmark { text-align: center; }
.hero-meta__brand {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--color-text);
  line-height: 1;
}
.hero-meta__brand-sub {
  display: block;
  font-size: 0.625rem;
  letter-spacing: 0.18em;
  margin-top: 2px;
}
.hero-meta__reviews { justify-self: end; text-align: right; }
.hero-meta__reviews .stars { color: var(--color-accent); letter-spacing: 0; font-size: 0.875rem; }
.hero-meta__rating { color: var(--color-text); font-weight: 600; margin-left: 4px; }
.hero-meta__count { display: block; font-size: 0.625rem; margin-top: 2px; }

/* ---------- Section markers ---------- */
.section-marker {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-soft);
  margin-bottom: var(--space-4);
}
.section-marker::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--color-accent);
}

/* ---------- Hero image placeholder (yellow stripe) ---------- */
.image-placeholder {
  position: relative;
  border-radius: var(--radius-lg);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  margin: var(--space-5) 0 var(--space-3);
}
.image-placeholder--stripe {
  background:
    repeating-linear-gradient(
      135deg,
      #F2C500 0 18px,
      #FFE16E 18px 36px
    );
}
.image-placeholder--owners {
  background:
    repeating-linear-gradient(
      135deg,
      #1a1a1a 0 18px,
      #2a2a2a 18px 36px
    );
}
.image-placeholder__caption {
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  padding: var(--space-3) var(--space-4);
  background: linear-gradient(to top, rgba(0,0,0,0.35), transparent);
  width: 100%;
  text-align: center;
}
.image-placeholder--stripe .image-placeholder__caption { color: #5a4500; background: none; }

/* ---------- Edition strip ---------- */
.edition-strip {
  display: flex;
  justify-content: space-between;
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding-top: var(--space-3);
}

/* ---------- Steps (How it works) ---------- */
.steps { display: flex; flex-direction: column; gap: var(--space-5); margin-top: var(--space-5); }
.steps li { display: flex; gap: var(--space-4); align-items: flex-start; }
.steps__num {
  flex-shrink: 0;
  width: 32px; height: 32px;
  background: var(--color-accent);
  color: var(--color-accent-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8125rem;
  border-radius: 4px;
  letter-spacing: 0.04em;
}
.steps__title { margin-bottom: 4px; font-size: 1rem; font-weight: 600; }

/* ---------- Attribution line ---------- */
.attribution {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.6875rem;
  margin-top: var(--space-5);
}

/* ---------- Plan cards ---------- */
.plan-grid {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-5);
}
.plan-card {
  position: relative;
  background: var(--color-bg);
  color: var(--color-text);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  text-align: left;
  width: 100%;
  display: block;
  transition: border-color 120ms ease;
}
.plan-card:hover { border-color: var(--color-text-soft); }
.plan-card[aria-pressed="true"] {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}
.plan-card.is-deluxe {
  background: var(--color-deluxe-bg);
  color: var(--color-deluxe-text);
  border-color: var(--color-deluxe-bg);
}
.plan-card.is-deluxe[aria-pressed="true"] {
  border-color: var(--color-accent);
  background: var(--color-deluxe-bg);
}
.plan-card.is-deluxe p,
.plan-card.is-deluxe .plan-card__bullets { color: var(--color-deluxe-muted); }

/* "Selected" banner: top-right corner, hidden by default, shown only on the
   active card. Absolutely-positioned at its own top — toggling its display
   never moves the radio (which sits BELOW it at its own fixed top). */
.plan-card__selected-badge {
  display: none;
  position: absolute;
  top: var(--space-4); right: var(--space-4);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent-ink);
  background: var(--color-accent);
  padding: 4px 10px;
  border-radius: 4px;
}
.plan-card[aria-pressed="true"] .plan-card__selected-badge { display: inline-block; }

/* Radio ring: ALWAYS visible, ALWAYS at the same top — the "Selected"
   banner sits above at top: var(--space-4) (16px) with ~24px of height,
   so 52px keeps the ring clear of the banner without overlap, regardless
   of selection state. */
.plan-card__radio {
  position: absolute;
  top: 52px; right: var(--space-5);
  width: 18px; height: 18px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  opacity: 0.4;
  transition: opacity 120ms ease, background 120ms ease;
}
.plan-card[aria-pressed="true"] .plan-card__radio {
  opacity: 1;
  background: var(--color-accent);
  border-color: var(--color-accent);
  box-shadow: inset 0 0 0 4px var(--color-bg);
}
.plan-card.is-deluxe[aria-pressed="true"] .plan-card__radio { box-shadow: inset 0 0 0 4px var(--color-deluxe-bg); }

.plan-card__eyebrow {
  font-size: 0.625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}
.plan-card.is-deluxe .plan-card__eyebrow { color: var(--color-deluxe-muted); }

.plan-card__name {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  line-height: 1.15;
  margin-bottom: var(--space-3);
}
.plan-card__price {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.plan-card__amount {
  font-family: var(--font-serif);
  font-size: 2rem;
  line-height: 1;
}
.plan-card__unit { color: var(--color-text-muted); font-size: 0.875rem; }
.plan-card.is-deluxe .plan-card__unit { color: var(--color-deluxe-muted); }

.plan-card__desc { font-size: 0.9375rem; margin-bottom: var(--space-4); }

.plan-card__bullets { font-size: 0.875rem; display: flex; flex-direction: column; gap: var(--space-2); }
.plan-card__bullets li { position: relative; padding-left: 18px; }
.plan-card__bullets li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 6px; height: 6px;
  background: var(--color-accent);
  border-radius: 50%;
}

/* ---------- Wine pairing card ---------- */
.section--wine { padding: var(--space-5) 0; border-bottom: none; }
.wine-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg);
}
.wine-card__icon { color: var(--color-text); padding-top: 4px; }
.wine-card__body { flex: 1; min-width: 0; }
.wine-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-1);
}
.wine-card__title { font-weight: 600; font-size: 0.9375rem; }
.wine-card__price { color: var(--color-text-muted); font-size: 0.8125rem; white-space: nowrap; }
.wine-card__desc { color: var(--color-text-muted); font-size: 0.8125rem; margin: 0; line-height: 1.4; }

/* iOS-style toggle */
.ios-toggle { position: relative; flex-shrink: 0; align-self: center; }
.ios-toggle input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.ios-toggle__track {
  display: block;
  width: 48px; height: 28px;
  background: #D1D1D6;
  border-radius: 999px;
  position: relative;
  transition: background 160ms ease;
}
.ios-toggle__thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 24px; height: 24px;
  background: #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 160ms ease;
}
.ios-toggle input:checked + .ios-toggle__track { background: var(--color-accent); }
.ios-toggle input:checked + .ios-toggle__track .ios-toggle__thumb { transform: translateX(20px); }
.ios-toggle input:focus-visible + .ios-toggle__track { box-shadow: 0 0 0 3px rgba(242,197,0,0.35); }

/* ---------- Perks ---------- */
.perks { display: flex; flex-direction: column; gap: var(--space-5); margin-top: var(--space-5); }
.perks li {
  border-left: 3px solid var(--color-accent);
  padding: var(--space-1) 0 var(--space-1) var(--space-4);
}
.perks__title { margin-bottom: 4px; font-size: 0.9375rem; font-weight: 600; }
.perks li p { font-size: 0.875rem; color: var(--color-text-muted); margin: 0; }

/* ---------- Testimonial ---------- */
.testimonial { margin: 0; }
.testimonial p {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}
.testimonial__source {
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  display: flex;
  gap: var(--space-3);
  align-items: center;
}
.testimonial__divider { color: var(--color-border); }

/* ---------- Form fields ---------- */
.field { margin-bottom: var(--space-4); }
.field__label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}
.field__input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color 120ms ease;
}
.field__input::placeholder { color: var(--color-text-muted); }
.field__input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}
.field__help { display: block; margin-top: var(--space-2); font-size: 0.75rem; color: var(--color-text-muted); }
.field__error { display: block; margin-top: var(--space-2); font-size: 0.8125rem; color: var(--color-error); }

/* Square Web Payments card container */
#card-container {
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  min-height: 56px;
  display: flex;
  align-items: center;
  background: var(--color-bg);
}

/* ---------- Callout (yellow-bordered note) ---------- */
.callout {
  border-left: 3px solid var(--color-accent);
  background: var(--color-bg-alt);
  padding: var(--space-4);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 0.875rem;
  color: var(--color-text-soft);
  margin-top: var(--space-4);
}
.callout strong { color: var(--color-text); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-weight: 700;
  letter-spacing: 0.06em;
  border-radius: var(--radius-md);
  border: none;
  padding: var(--space-3) var(--space-5);
  min-height: 48px;
  cursor: pointer;
  transition: transform 80ms ease, box-shadow 120ms ease, background 120ms ease;
}
.btn-primary {
  background: var(--color-accent);
  color: var(--color-accent-ink);
  text-transform: uppercase;
  font-size: 0.8125rem;
}
.btn-primary:hover { box-shadow: var(--shadow-md); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }

/* ---------- Closing ---------- */
.section--closing { text-align: center; }
.dot-divider { display: flex; justify-content: center; padding: var(--space-3) 0 var(--space-5); }
.dot-divider span { width: 6px; height: 6px; background: var(--color-accent); border-radius: 50%; }
.closing-line { max-width: 320px; margin: 0 auto var(--space-3); }
.closing-address {
  font-style: normal;
  font-weight: 600;
  color: var(--color-text);
  font-size: 0.9375rem;
  margin-bottom: var(--space-6);
}
.dash-marker {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-soft);
}
.dash-marker span { width: 24px; height: 2px; background: var(--color-accent); display: inline-block; }

/* ---------- Sticky bar ---------- */
.sticky-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding: var(--space-3) var(--space-5);
  padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom, 0));
  display: flex;
  align-items: center;
  gap: var(--space-4);
  z-index: 50;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.04);
  max-width: var(--content-max);
  margin: 0 auto;
}
.sticky-bar__summary { flex: 1; min-width: 0; }
.sticky-bar__plan {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 2px;
}
.sticky-bar__total { display: flex; align-items: baseline; gap: 4px; }
.sticky-bar__amount {
  font-family: var(--font-serif);
  font-size: 1.625rem;
  line-height: 1;
  color: var(--color-text);
}
.sticky-bar__unit { color: var(--color-text-muted); font-size: 0.8125rem; }
.sticky-bar .btn { flex-shrink: 0; padding: var(--space-3) var(--space-4); }

/* ---------- Confirmation page (used by confirmation.html) ---------- */
.confirmation-card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin: var(--space-5) 0;
}
.confirmation-card dt {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: var(--space-3);
}
.confirmation-card dt:first-of-type { margin-top: 0; }
.confirmation-card dd { margin: 0; font-size: 1rem; color: var(--color-text); }

/* ---------- Gift checkout: address row ---------- */
.field--row {
  display: flex;
  gap: var(--space-3);
}
.field--row .field__input { min-width: 0; }

/* ---------- Billing term selector (prepaid) ---------- */
.term-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-top: var(--space-5);
}
.term-card {
  position: relative;
  background: var(--color-bg);
  color: var(--color-text);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  text-align: left;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: border-color 120ms ease, background 120ms ease;
}
.term-card:hover { border-color: var(--color-text-soft); }
.term-card[aria-pressed="true"] {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}
.term-card__radio {
  position: absolute;
  top: var(--space-4); right: var(--space-4);
  width: 16px; height: 16px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  opacity: 0.35;
  transition: opacity 120ms ease, background 120ms ease;
}
.term-card[aria-pressed="true"] .term-card__radio {
  opacity: 1;
  background: var(--color-accent);
  border-color: var(--color-accent);
  box-shadow: inset 0 0 0 3px var(--color-bg);
}
.term-card__label { font-weight: 600; }
.term-card__discount {
  align-self: flex-start;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-ink);
  background: var(--color-accent);
  padding: 2px 8px;
  border-radius: 4px;
  margin: 2px 0;
}
.term-card__total { font-size: 1.25rem; font-family: var(--font-serif); }
.term-card__permonth { color: var(--color-text-muted); }

.consent {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  margin-top: var(--space-4);
  font-size: 0.875rem;
  color: var(--color-text-soft);
}
.consent input { margin-top: 3px; flex: 0 0 auto; }

/* ---------- Utility ---------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Admin fulfillment prep (Phase 2D-1) ---------- */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-3) 0 var(--space-5);
  font-size: 0.9rem;
}
.admin-table th,
.admin-table td {
  text-align: left;
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}
.admin-table th { color: var(--color-text-soft); font-weight: 600; }

.month-picker {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-4) 0;
}
.month-picker input { padding: var(--space-2) var(--space-3); }

.callout.error { border-left-color: #b3261e; }

.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: var(--radius-sm, 4px);
  background: var(--color-accent);
  color: var(--color-accent-ink);
}

/* Printable pick-list: drop chrome, controls, and color so the shop team gets
   a clean black-on-white sheet. */
@media print {
  .no-print { display: none !important; }
  body, .page { background: #fff; color: #000; }
  .section { padding: 0; }
  .admin-table th, .admin-table td { border-bottom: 1px solid #000; }
  .callout { border-left: 2px solid #000; background: #fff; color: #000; }
  .tag { border: 1px solid #000; background: #fff; color: #000; }
  h3, h4 { page-break-after: avoid; }
  table { page-break-inside: auto; }
  tr { page-break-inside: avoid; }
}
