:root {
  --primary: #0E3A3A;
  --accent: #F0A830;
  --background: #F4EBD8;
  --paper: #FFF8EA;
  --paper-2: #EADCC1;
  --dark: #1C1611;
  --muted: #6C5A45;
  --line: rgba(28, 22, 17, 0.16);
  --success: #23965b;
  --danger: #B42318;
  --radius: 1.25rem;
  --radius-lg: 1.75rem;
  --shadow: 0 18px 50px rgba(28, 22, 17, 0.11);
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Archivo', system-ui, sans-serif;
  background: var(--background);
  color: var(--dark);
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='1' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.25em; }

.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem clamp(1rem, 4vw, 4rem);
  border-bottom: 1px solid var(--line);
  background: rgba(244, 235, 216, 0.92);
  backdrop-filter: blur(10px);
}
.brand-mark { font-size: 1.1rem; font-weight: 900; letter-spacing: -0.04em; white-space: nowrap; }
.site-nav nav { display: flex; align-items: center; gap: clamp(0.9rem, 2vw, 1.5rem); font-size: 0.95rem; color: var(--muted); }

.eyebrow, .plan-pill {
  display: inline-flex;
  margin: 0 0 0.9rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

.checkout-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: end;
  padding: clamp(3.5rem, 8vw, 7rem) clamp(1rem, 6vw, 6rem) clamp(2rem, 5vw, 4rem);
  background:
    radial-gradient(circle at 90% 10%, rgba(240, 168, 48, 0.18), transparent 32%),
    linear-gradient(180deg, #fff4de 0%, var(--background) 100%);
}
.hero-copy { max-width: 780px; }
.hero-copy h1 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(3.2rem, 8.5vw, 7.4rem);
  line-height: 0.9;
  letter-spacing: -0.085em;
}
.hero-copy p:not(.eyebrow) {
  max-width: 660px;
  margin: 1.3rem 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.52;
}
.hero-note {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 248, 234, 0.82);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}
.hero-note strong { display: block; margin-bottom: 0.45rem; color: var(--primary); font-size: 1.2rem; }
.hero-note span { color: var(--muted); line-height: 1.5; }

.checkout-shell { padding: 0 clamp(1rem, 6vw, 6rem) clamp(4rem, 7vw, 6rem); }
.checkout-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1.15fr);
  gap: 1rem;
  max-width: 1120px;
  margin: 0 auto;
  align-items: start;
}
.order-summary, .checkout-form-card, .handoff-list li {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 248, 234, 0.84);
  box-shadow: var(--shadow);
}
.order-summary { position: sticky; top: 88px; padding: clamp(1.15rem, 3vw, 1.5rem); }
.checkout-form-card { padding: clamp(1.15rem, 3vw, 1.65rem); }
.card-heading h2, .section-heading h2 {
  margin: 0;
  color: var(--dark);
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 0.98;
  letter-spacing: -0.07em;
}
.card-heading p:not(.eyebrow) { margin: 0.75rem 0 0; color: var(--muted); line-height: 1.55; }

.plan-selector { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; margin: 1.2rem 0; padding: 0.35rem; border: 1px solid var(--line); border-radius: 999px; background: rgba(234, 220, 193, 0.6); }
.plan-tab { min-height: 2.6rem; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-weight: 900; cursor: pointer; }
.plan-tab.active { background: var(--paper); color: var(--primary); box-shadow: 0 6px 18px rgba(28, 22, 17, 0.1); }
.plan-tab:focus-visible, input:focus-visible, .button:focus-visible, .payment-method-option:focus-within { outline: 3px solid rgba(240, 168, 48, 0.55); outline-offset: 3px; }

.plan-details h3 { margin: 0; font-size: 1.6rem; letter-spacing: -0.045em; }
.price-lockup { margin-top: 1rem; display: grid; gap: 0.3rem; }
.monthly-price { color: var(--primary); font-size: clamp(3rem, 6vw, 4.8rem); line-height: 0.9; font-weight: 900; letter-spacing: -0.085em; }
.monthly-price small { color: var(--muted); font-size: 1rem; letter-spacing: 0; }
.annual-note { color: var(--muted); line-height: 1.5; }
.price-breakdown { margin-top: 1.25rem; display: grid; gap: 0.7rem; }
.price-row { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: 0.7rem; border-bottom: 1px solid var(--line); color: var(--muted); }
.price-row strong { color: var(--dark); }
.price-row.total { color: var(--dark); font-weight: 900; }
.price-row.total strong { color: var(--primary); }
.plan-features { margin-top: 1.25rem; }
.plan-features h4 { margin: 0 0 0.75rem; }
.plan-features ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.65rem; }
.plan-features li::before { content: '✓'; color: var(--success); font-weight: 900; margin-right: 0.5rem; }
.trust-badges { display: grid; gap: 0.6rem; margin-top: 1.2rem; }
.trust-badge { display: flex; align-items: center; gap: 0.55rem; color: var(--muted); }
.trust-badge span:first-child { color: var(--success); font-weight: 900; }

form { margin-top: 1.5rem; }
.form-section { padding-top: 1.4rem; margin-top: 1.4rem; border-top: 1px solid var(--line); }
.form-section:first-of-type { padding-top: 0; margin-top: 0; border-top: 0; }
.form-section h3 { margin: 0 0 0.9rem; font-size: 1.25rem; letter-spacing: -0.035em; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; }
.form-group { display: grid; gap: 0.42rem; margin-bottom: 0.85rem; }
label { font-weight: 800; color: var(--dark); }
input[type="text"], input[type="email"] {
  width: 100%;
  min-height: 3.05rem;
  border: 1px solid rgba(28, 22, 17, 0.2);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.62);
  color: var(--dark);
  padding: 0 0.95rem;
  font: inherit;
}
small { color: var(--muted); line-height: 1.4; }
.payment-methods { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
.payment-methods.single-method { grid-template-columns: 1fr; max-width: 320px; }
.payment-method-option { display: flex; align-items: center; justify-content: center; min-height: 3.15rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(255, 255, 255, 0.42); cursor: pointer; }
.payment-method-option input { position: absolute; opacity: 0; pointer-events: none; }
.payment-method-option.active { border-color: var(--accent); background: var(--paper); color: var(--primary); box-shadow: 0 8px 20px rgba(28, 22, 17, 0.08); }
.payment-method-label { font-weight: 900; }
.payment-form-section { margin-top: 0.8rem; border-radius: var(--radius); background: rgba(234, 220, 193, 0.55); padding: 0.9rem 1rem; color: var(--muted); line-height: 1.5; }
.payment-form-section p { margin: 0; }
.terms-note { color: var(--muted); line-height: 1.5; }
.terms-note a { color: var(--primary); font-weight: 800; }

.button {
  display: inline-flex;
  width: 100%;
  min-height: 3.4rem;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.8rem 1.2rem;
  border: 1px solid rgba(28, 22, 17, 0.14);
  border-radius: 999px;
  background: var(--accent);
  color: var(--dark);
  font: inherit;
  font-weight: 900;
  box-shadow: 0 10px 26px rgba(28, 22, 17, 0.14);
  cursor: pointer;
  transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}
.button:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 14px 30px rgba(28, 22, 17, 0.18); }
.button:disabled { cursor: wait; opacity: 0.7; transform: none; }
.button-subtext { font-family: 'DM Mono', monospace; font-size: 0.74rem; color: rgba(28, 22, 17, 0.68); }
.checkout-submit { margin-top: 1.3rem; }
.checkout-reassurance, .loading-indicator { text-align: center; color: var(--muted); line-height: 1.45; }
.checkout-reassurance a { color: var(--primary); font-weight: 800; text-decoration: underline; }
.checkout-reassurance.secure-note { margin-top: 1rem; color: var(--primary); font-weight: 800; }
.error-message, .success-message { padding: 0.9rem 1rem; border-radius: var(--radius); line-height: 1.45; }
.error-message { color: var(--danger); background: rgba(180, 35, 24, 0.08); border: 1px solid rgba(180, 35, 24, 0.2); }
.success-message { color: var(--success); background: rgba(35, 150, 91, 0.08); border: 1px solid rgba(35, 150, 91, 0.2); }

.post-checkout-section { padding: clamp(3.5rem, 7vw, 6rem) clamp(1rem, 6vw, 6rem); background: #eadcc1; }
.section-heading { max-width: 760px; margin: 0 auto 2rem; text-align: center; }
.handoff-list { list-style: none; padding: 0; max-width: 980px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.handoff-list li { padding: 1.25rem; box-shadow: none; }
.handoff-list span { display: inline-flex; width: 2rem; height: 2rem; align-items: center; justify-content: center; border-radius: 999px; background: var(--primary); color: #fff8ea; font-weight: 900; margin-bottom: 1rem; }
.handoff-list strong { display: block; margin-bottom: 0.45rem; font-size: 1.25rem; letter-spacing: -0.035em; }
.handoff-list p { margin: 0; color: var(--muted); line-height: 1.6; }

.site-footer {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2rem;
  padding: clamp(3rem, 6vw, 5rem) clamp(1rem, 6vw, 6rem);
  background: var(--primary);
  color: #fff8ea;
}
.site-footer h2 { margin: 0; font-size: 2.4rem; letter-spacing: -0.07em; }
.site-footer p { max-width: 440px; color: rgba(255, 248, 234, 0.76); line-height: 1.6; }
.site-footer nav { display: grid; gap: 0.7rem; }
.site-footer .footer-address { margin-top: 1.25rem; font-style: normal; font-size: 0.9rem; color: rgba(255, 248, 234, 0.76); line-height: 1.6; }
.site-footer .footer-entity { margin: 1.25rem 0 0; font-size: 0.9rem; color: rgba(255, 248, 234, 0.76); line-height: 1.6; }
.site-footer .footer-entity + .footer-address { margin-top: 0.15rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}

@media (max-width: 920px) {
  .site-nav nav { display: none; }
  .checkout-hero, .checkout-grid, .form-row, .handoff-list, .site-footer { grid-template-columns: 1fr; }
  .checkout-hero { padding-top: 3rem; }
  .hero-copy h1 { font-size: clamp(3rem, 15vw, 5.2rem); }
  .order-summary { position: static; order: 1; }
  .checkout-form-card { order: 2; }
  .payment-methods { grid-template-columns: 1fr; }
}

/* pay.html: Stripe's embedded form beside a compact order summary. */
.pay-shell { padding-top: clamp(1.25rem, 3vw, 2.5rem); }
.pay-title { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.04em; line-height: 1.1; }
.pay-form-card { padding: clamp(0.5rem, 2vw, 1rem); }
.pay-form-card #checkout { min-height: 420px; }
.pay-form-card .loading-indicator { padding: 3rem 1rem; }
.pay-switch { margin: 1.1rem 0 0; font-size: 0.95rem; }
.pay-switch a { color: var(--primary); font-weight: 800; text-decoration: underline; text-underline-offset: 0.2em; }
@media (max-width: 920px) {
  /* On a phone the price and guarantee come first, then the form. */
  .pay-page .order-summary { order: 0; }
  .pay-page .plan-features { display: none; }
}
