/* ═══════════════════════════════════════════════════════════════════════
   VERSO STOREFRONT — Cloudflare Pages
   Design tokens + full styles. No framework dependencies.
   Fonts: Fraunces (display), Lora (body) — per Prism spec.
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── Tokens ─────────────────────────────────────────────────────────── */
:root {
  /* Colour — warm neutrals, editorial feel. NO purple/blue gradients. */
  --ink:           #1A1A1A;
  --ink-light:     #4A4A4A;
  --ink-muted:     #8A8A8A;
  --surface:       #F5F0EB;
  --surface-alt:   #EDE8E2;
  --card:          #FFFFFF;
  --border:        #E8E6E1;
  --accent:        #C45D3E;   /* Verso terracotta */
  --accent-hover:  #A84B30;
  --accent-light:  #C45D3E12;
  --green:         #7A8C6E;   /* Verso sage */
  --green-light:   #7A8C6E10;

  /* Typography scale — 1.25 ratio */
  --font-display:  'Fraunces', Georgia, serif;
  --font-body:     'Lora', Georgia, serif;
  --text-xs:       0.75rem;
  --text-sm:       0.875rem;
  --text-base:     1rem;
  --text-lg:       1.125rem;
  --text-xl:       1.25rem;
  --text-2xl:      1.5rem;
  --text-3xl:      1.875rem;
  --text-4xl:      2.25rem;
  --text-5xl:      3rem;
  --text-6xl:      3.75rem;

  /* Spacing — 8pt base */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Misc */
  --radius-sm:  0.375rem;
  --radius-md:  0.5rem;
  --radius-lg:  0.75rem;
  --radius-xl:  1rem;
  --radius-2xl: 1.5rem;
  --shadow-sm:  0 1px 2px rgba(0,0,0,0.05);
  --shadow-md:  0 4px 6px rgba(0,0,0,0.07);
  --shadow-lg:  0 10px 25px rgba(0,0,0,0.1);
  --shadow-xl:  0 20px 40px rgba(0,0,0,0.12);
  --max-w:      72rem;
  --max-w-narrow: 48rem;
}

/* ─── Reset ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

/* ─── Layout ─────────────────────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--space-6); }
.container--narrow { max-width: var(--max-w-narrow); }
.section { padding: var(--space-16) 0; }
.section--alt { background: var(--surface-alt); }
.section__header { text-align: center; max-width: 40rem; margin: 0 auto var(--space-12); }
.section__title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
}
.section__title--left { text-align: left; }
.section__subtitle {
  margin-top: var(--space-4);
  font-size: var(--text-lg);
  color: var(--ink-light);
  line-height: 1.6;
}
.section__subtitle--left { text-align: left; }

@media (min-width: 768px) {
  .section { padding: var(--space-24) 0; }
  .section__title { font-size: var(--text-4xl); }
}

/* ─── Nav ────────────────────────────────────────────────────────────── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--space-5) var(--space-6);
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-xl);
}
.nav__logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-md);
  background: var(--ink);
  color: var(--surface);
  font-size: var(--text-sm);
  font-weight: 700;
}
.nav__links {
  display: flex;
  gap: var(--space-8);
  font-size: var(--text-sm);
  color: var(--ink-light);
}
.nav__links a:hover { color: var(--ink); }

/* ─── Hero ───────────────────────────────────────────────────────────── */
.hero {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
}
.hero__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 48rem;
  margin: 0 auto;
  padding: var(--space-12) var(--space-6) var(--space-16);
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: 100px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: var(--text-sm);
  font-weight: 500;
  margin-bottom: var(--space-8);
}
.hero__badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.hero__title-accent { color: var(--accent); }
.hero__subtitle {
  margin-top: var(--space-6);
  font-size: var(--text-lg);
  color: var(--ink-light);
  max-width: 36rem;
  line-height: 1.7;
}
.hero__ctas {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-top: var(--space-8);
  width: 100%;
  max-width: 28rem;
}
.hero__social-proof {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

@media (min-width: 768px) {
  .hero__title { font-size: var(--text-6xl); }
  .hero__subtitle { font-size: var(--text-xl); }
  .hero__ctas { flex-direction: row; max-width: none; width: auto; }
}

/* ─── Buttons ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-xl);
  font-weight: 500;
  font-size: var(--text-base);
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn--primary {
  background: var(--ink);
  color: var(--surface);
  box-shadow: var(--shadow-md);
}
.btn--primary:hover {
  background: var(--ink-light);
  box-shadow: var(--shadow-lg);
}
.btn--accent {
  background: var(--accent);
  color: white;
  box-shadow: var(--shadow-md);
}
.btn--accent:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-lg);
}
.btn--lg { padding: var(--space-4) var(--space-8); font-size: var(--text-lg); }
.btn--xl { padding: var(--space-5) var(--space-10); font-size: var(--text-xl); }
.btn--full { width: 100%; }

/* ─── Trust Bar ──────────────────────────────────────────────────────── */
.trust-bar {
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: var(--space-5) 0;
  overflow-x: auto;
}
.trust-bar__inner {
  display: flex;
  justify-content: center;
  gap: var(--space-8);
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-6);
}
.trust-bar__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--ink-muted);
  white-space: nowrap;
}
.trust-bar__item svg { color: var(--green); flex-shrink: 0; }

/* ─── Template Cards ─────────────────────────────────────────────────── */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: var(--space-6);
}
.template-card {
  position: relative;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}
.template-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.template-card__badge {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  z-index: 2;
  padding: var(--space-1) var(--space-3);
  border-radius: 100px;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.template-card__badge--free { background: var(--green); color: white; }
.template-card__badge--pro { background: var(--accent); color: white; }
.template-card__preview {
  aspect-ratio: 3/4;
  position: relative;
  overflow: hidden;
}
.template-card__mockup {
  position: absolute;
  inset: 1rem;
  display: flex;
  flex-direction: column;
}
.template-card__info {
  padding: var(--space-5);
}
.template-card__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
}
.template-card__desc {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  margin-top: var(--space-1);
}

/* ─── Mockup Elements ────────────────────────────────────────────────── */
.mockup__header { display: flex; justify-content: space-between; align-items: flex-start; }
.mockup__circle { width: 2rem; height: 2rem; border-radius: 50%; }
.mockup__dots { display: flex; gap: 3px; }
.mockup__dots span { width: 5px; height: 5px; border-radius: 50%; background: var(--ink); opacity: 0.3; }
.mockup__body { margin-top: auto; }
.mockup__rule { height: 3px; width: 3rem; border-radius: 2px; margin-bottom: var(--space-3); }
.mockup__headline {
  height: 1.5rem;
  width: 75%;
  border-radius: var(--radius-sm);
  background: var(--ink);
  opacity: 0.12;
  margin-bottom: var(--space-2);
}
.mockup__headline--short { width: 50%; }
.mockup__columns { display: flex; gap: var(--space-2); margin: var(--space-4) 0; }
.mockup__img { height: 6rem; flex: 1; border-radius: var(--radius-lg); background: var(--ink); opacity: 0.08; }
.mockup__lines { margin-top: var(--space-3); }
.mockup__line {
  height: 4px;
  border-radius: 2px;
  background: var(--ink);
  opacity: 0.08;
  margin-bottom: var(--space-2);
}
.mockup__line--short { width: 60%; }

/* Portfolio mockup */
.mockup__grid-layout { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); flex: 1; }
.mockup__img-wide { grid-column: span 2; border-radius: var(--radius-lg); min-height: 7rem; }
.mockup__img-half { border-radius: var(--radius-lg); background: var(--ink); }
.mockup__caption { margin-top: var(--space-3); }

/* Minimal mockup */
.mockup__center { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; text-align: center; }
.mockup__icon { width: 4rem; height: 4rem; border-radius: var(--radius-xl); transform: rotate(12deg); margin-bottom: var(--space-6); }
.mockup__row { display: flex; gap: var(--space-3); margin-top: var(--space-6); }
.mockup__circle-sm { width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--ink); }

/* Visual mockup */
.template-card__mockup--visual .mockup__body { display: flex; gap: var(--space-3); height: 100%; }
.mockup__img-tall { flex: 1; border-radius: var(--radius-lg); background: var(--ink); }
.mockup__aside { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; }

/* Structured mockup */
.mockup__data-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); margin: var(--space-3) 0; }
.mockup__data-cell { height: 2rem; border-radius: var(--radius-sm); background: var(--ink); opacity: 0.05; }

/* ─── Split Layout ───────────────────────────────────────────────────── */
.split { display: grid; gap: var(--space-12); align-items: center; }
.split__text { order: 2; }
.split__visual { order: 1; }
@media (min-width: 768px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split__text { order: 1; }
  .split__visual { order: 2; }
}

/* ─── Pills ──────────────────────────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border-radius: 100px;
  font-size: var(--text-sm);
  font-weight: 500;
  margin-bottom: var(--space-4);
}
.pill--green { background: var(--green-light); color: var(--green); }

/* ─── Checklist ──────────────────────────────────────────────────────── */
.check-list { margin-top: var(--space-6); }
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  color: var(--ink-light);
  line-height: 1.5;
}
.check-list li::before {
  content: '';
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 2px;
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%237A8C6E' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}
.check-list--accent li::before {
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23C45D3E' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
}

/* ─── CTA Group ──────────────────────────────────────────────────────── */
.cta-group { margin-top: var(--space-8); }
.cta-note {
  display: block;
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

/* ─── Preview Stack ──────────────────────────────────────────────────── */
.preview-stack {
  position: relative;
  max-width: 20rem;
  margin: 0 auto;
}
.preview-page {
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.preview-page--back {
  position: absolute;
  top: 1rem;
  left: 1.5rem;
  right: -0.5rem;
  bottom: -1rem;
  opacity: 0.5;
  transform: rotate(3deg);
}
.preview-page--front { position: relative; z-index: 1; }
.preview-page__inner { aspect-ratio: 3/4; padding: 2rem; }

.preview-cover {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.preview-cover__rule {
  height: 3px;
  width: 2.5rem;
  border-radius: 2px;
  margin-bottom: var(--space-3);
}
.preview-cover__title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ink);
  line-height: 1;
}
.preview-cover__issue {
  font-size: var(--text-xs);
  color: var(--ink-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: var(--space-2);
}
.preview-cover__feature {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--ink-light);
  margin-top: var(--space-6);
  line-height: 1.3;
}
.preview-cover__bar {
  height: 4px;
  width: 100%;
  border-radius: 2px;
  margin-top: auto;
}

.preview-badge {
  position: absolute;
  bottom: -0.75rem;
  right: -0.75rem;
  z-index: 2;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-xl);
  background: var(--green);
  color: white;
  font-size: var(--text-sm);
  font-weight: 600;
  box-shadow: var(--shadow-lg);
}

/* ─── Countdown Banner ───────────────────────────────────────────────── */
.countdown-banner {
  background: var(--accent);
  color: white;
  text-align: center;
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
}
.countdown-banner__price {
  font-size: var(--text-lg);
  font-weight: 600;
}
.countdown-banner__original {
  text-decoration: line-through;
  opacity: 0.65;
  margin-left: var(--space-2);
}
.countdown-banner__timer {
  font-size: var(--text-sm);
  opacity: 0.9;
  margin-top: var(--space-1);
}

/* ─── Pro Card ───────────────────────────────────────────────────────── */
.pro-card {
  border: 2px solid var(--accent);
  border-radius: var(--radius-2xl);
  background: var(--card);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}
.pro-card__grid { padding: var(--space-8); }
.pro-card__heading {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-6);
}
.pro-card__cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: var(--space-8);
}
.pro-card__price { margin-bottom: var(--space-2); }
.pro-card__price-original {
  font-size: var(--text-2xl);
  color: var(--ink-muted);
  text-decoration: line-through;
  margin-right: var(--space-2);
}
.pro-card__price-current {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: 700;
  color: var(--ink);
}
.pro-card__price-note {
  color: var(--ink-muted);
  margin-bottom: var(--space-8);
}
.pro-card__trust {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-6);
  font-size: var(--text-sm);
  color: var(--ink-muted);
}
.pro-card__trust span {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

@media (min-width: 768px) {
  .pro-card__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-10); padding: var(--space-12); }
  .pro-card__cta { padding-top: 0; justify-content: center; }
}

/* ─── Differentiation Grid ───────────────────────────────────────────── */
.diff-grid {
  display: grid;
  gap: var(--space-6);
}
.diff-card {
  padding: var(--space-8);
  border-radius: var(--radius-2xl);
  background: var(--card);
  border: 1px solid var(--border);
}
.diff-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-5);
}
.diff-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: var(--space-3);
}
.diff-card p {
  color: var(--ink-light);
  line-height: 1.7;
}
@media (min-width: 768px) {
  .diff-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ─── FAQ ────────────────────────────────────────────────────────────── */
.faq-list { display: flex; flex-direction: column; gap: var(--space-4); }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--card);
  overflow: hidden;
}
.faq-item__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-lg);
  cursor: pointer;
  list-style: none;
}
.faq-item__q::-webkit-details-marker { display: none; }
.faq-item__q::after {
  content: '+';
  font-size: var(--text-xl);
  color: var(--ink-muted);
  transition: transform 0.2s ease;
}
.faq-item[open] .faq-item__q::after {
  content: '\2212'; /* minus */
}
.faq-item__a {
  padding: 0 var(--space-6) var(--space-5);
  color: var(--ink-light);
  line-height: 1.7;
}

/* ─── Footer ─────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--space-10) 0;
}
.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: var(--ink-muted);
  text-align: center;
}
.footer__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: 100px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  font-size: var(--text-xs);
}
@media (min-width: 768px) {
  .footer__inner { flex-direction: row; justify-content: space-between; }
}

/* ─── Polar Checkout Overlay Customization ───────────────────────────── */
/* Polar's embed creates an overlay — these selectors style the trigger states */
[data-polar-checkout] {
  cursor: pointer;
}
