/* ============================================================
   YOU, INC.
   "Federal Bureau of Self-Incorporation" meets a friend
   who's too good at making websites sending you a link
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,700;1,6..72,400;1,6..72,500&family=Outfit:wght@300;400;500;600;700&family=Fira+Mono:wght@400;500&display=swap');

:root {
  /* Warm paper palette — government form printed on nice stock */
  --paper: #FDFBF7;
  --paper-warm: #F5F0EA;
  --surface: #EDE8E0;
  --border: #DDD6CB;
  --border-light: #EAE5DC;

  --ink: #1C1917;
  --ink-soft: #44403C;
  --ink-muted: #78716C;
  --ink-faint: #A8A29E;
  --ink-ghost: #D6D3D1;

  /* Action green — official, governmental */
  --green: #15803D;
  --green-dark: #14532D;
  --green-light: #DCFCE7;
  --green-muted: #166534;

  /* Seal gold */
  --gold: #A16207;
  --gold-light: #FEF3C7;
  --gold-bright: #CA8A04;
  --gold-dark: #854D0E;

  /* Alert / contrast */
  --red-muted: #991B1B;
  --red-light: #FEE2E2;

  /* Campaign (bottom CTA only) */
  --campaign-bg: #0F0A1E;
  --campaign-pink: #E91E63;
  --campaign-orange: #FF6D3F;
  --campaign-cream: #FFF8F0;

  /* Type scale */
  --font-display: 'Newsreader', 'Georgia', serif;
  --font-body: 'Outfit', 'Helvetica Neue', sans-serif;
  --font-mono: 'Fira Mono', 'SF Mono', monospace;

  /* Spacing */
  --s1: 0.25rem;
  --s2: 0.5rem;
  --s3: 0.75rem;
  --s4: 1rem;
  --s5: 1.5rem;
  --s6: 2rem;
  --s7: 3rem;
  --s8: 4rem;
  --s9: 6rem;

  --radius: 6px;
  --max-w: 640px;
}

/* ============================================================
   Reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

a { color: var(--green); }
a:hover { color: var(--green-dark); }
img { max-width: 100%; display: block; }

::selection {
  background: var(--gold-light);
  color: var(--ink);
}

/* ============================================================
   Topnav — minimal, stays out of the way
   ============================================================ */
.topnav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--s3) var(--s5);
  border-bottom: 1px solid var(--border-light);
}

.topnav__brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.topnav__links {
  display: flex;
  gap: var(--s5);
  font-size: 0.82rem;
  font-weight: 500;
}

.topnav__links a {
  color: var(--ink-muted);
  text-decoration: none;
}

.topnav__links a:hover {
  color: var(--ink);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.65rem 1.4rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  line-height: 1.3;
}

.btn:hover { text-decoration: none; }

.btn--fill {
  background: var(--green);
  color: #fff;
}
.btn--fill:hover {
  background: var(--green-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(21, 128, 61, 0.2);
}

.btn--large {
  font-size: 1.05rem;
  padding: 0.8rem 1.8rem;
}

.btn--outline {
  background: transparent;
  color: var(--ink-soft);
  border: 1.5px solid var(--border);
}
.btn--outline:hover {
  border-color: var(--ink-muted);
  color: var(--ink);
}

.btn:disabled, .btn.rendering {
  opacity: 0.45;
  pointer-events: none;
}

/* ============================================================
   Wizard — fast, one-at-a-time, government-form DNA
   ============================================================ */
.wizard-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}

.wizard-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s7) var(--s5);
}

.wizard {
  width: 100%;
  max-width: 480px;
}

/* Progress */
.wizard__progress {
  display: flex;
  gap: 6px;
  margin-bottom: var(--s7);
}

.wizard__progress-pip {
  flex: 1;
  height: 3px;
  background: var(--surface);
  border-radius: 2px;
  transition: background 0.3s ease;
}

.wizard__progress-pip.filled {
  background: var(--green);
}

/* Steps */
.wizard__step {
  display: none;
}

.wizard__step.active {
  display: block;
  animation: stepIn 0.28s ease;
}

@keyframes stepIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.wizard__q {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: var(--s2);
  letter-spacing: -0.01em;
}

.wizard__helper {
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-bottom: var(--s5);
  line-height: 1.5;
}

.wizard__options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wizard__opt {
  display: flex;
  align-items: center;
  gap: var(--s3);
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  padding: var(--s3) var(--s4);
  background: var(--paper);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--ink-soft);
  transition: all 0.12s ease;
}

.wizard__opt:hover {
  border-color: var(--green);
  color: var(--ink);
}

.wizard__opt.selected {
  border-color: var(--green);
  background: var(--green-light);
  color: var(--green-dark);
}

/* Radio circle */
.wizard__opt::before {
  content: '';
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border);
  transition: all 0.12s ease;
}

.wizard__opt.selected::before {
  border-color: var(--green);
  background: var(--green);
  box-shadow: inset 0 0 0 3px #fff;
}

/* Checkbox variant */
.wizard__opt--check::before {
  border-radius: 3px;
}

.wizard__opt--check.selected::before {
  border-radius: 3px;
  background: var(--green);
  box-shadow: inset 0 0 0 2px #fff;
}

/* Select */
.wizard__select {
  display: block;
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  padding: var(--s3) var(--s4);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink-soft);
  cursor: pointer;
  appearance: none;
  outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 5 5-5' stroke='%2378716C' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}

.wizard__select:focus {
  border-color: var(--green);
}

/* Text input */
.wizard__input {
  display: block;
  width: 100%;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  padding: var(--s3) var(--s4);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  outline: none;
  letter-spacing: -0.01em;
}

.wizard__input:focus {
  border-color: var(--green);
}

.wizard__input::placeholder {
  color: var(--ink-ghost);
  font-weight: 400;
}

.wizard__aside {
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin-top: var(--s2);
}

.wizard__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--s6);
}

.wizard__back {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  background: none;
  border: none;
  color: var(--ink-muted);
  cursor: pointer;
  padding: 0.4rem 0;
}

.wizard__back:hover { color: var(--ink); }

/* ============================================================
   Certificate — the whole point
   ============================================================ */
.cert-shell {
  min-height: 100vh;
  background: var(--paper-warm);
  padding: var(--s7) var(--s5) var(--s8);
}

.cert-intro {
  text-align: center;
  max-width: 400px;
  margin: 0 auto var(--s6);
}

.cert-intro__hed {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: var(--s1);
}

.cert-intro__sub {
  font-size: 0.85rem;
  color: var(--ink-muted);
}

/* The certificate itself — fixed dimensions for consistent PNG export */
.cert {
  background: #FFFEF9;
  width: 620px;
  margin: 0 auto;
  padding: 48px 40px;
  text-align: center;
  position: relative;
  /* Double border effect */
  border: 2px solid var(--gold-bright);
  box-shadow:
    inset 0 0 0 6px #FFFEF9,
    inset 0 0 0 7px var(--gold-light),
    0 2px 20px rgba(0,0,0,0.06);
}

/* Corner flourishes */
.cert::before,
.cert::after {
  content: '';
  position: absolute;
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--gold-bright);
  opacity: 0.5;
}
.cert::before { top: 14px; left: 14px; border-right: none; border-bottom: none; }
.cert::after { top: 14px; right: 14px; border-left: none; border-bottom: none; }

.cert__corner-bl,
.cert__corner-br {
  position: absolute;
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--gold-bright);
  opacity: 0.5;
}
.cert__corner-bl { bottom: 14px; left: 14px; border-right: none; border-top: none; }
.cert__corner-br { bottom: 14px; right: 14px; border-left: none; border-top: none; }

.cert__state {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--gold);
  margin-bottom: var(--s5);
}

.cert__heading {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: var(--s5);
}

.cert__rule {
  width: 80px;
  height: 1px;
  background: var(--gold-bright);
  margin: 0 auto var(--s5);
  opacity: 0.5;
}

.cert__name {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: var(--s3);
  word-break: break-word;
  letter-spacing: -0.02em;
}

.cert__date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-muted);
  margin-bottom: var(--s6);
}

.cert__body {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--ink-soft);
  line-height: 1.6;
  margin-bottom: var(--s6);
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

/* Benefits table inside cert */
.cert__benefits {
  text-align: left;
  margin: var(--s5) auto;
  max-width: 400px;
  border-top: 1px solid var(--border-light);
}

.cert__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.88rem;
  gap: var(--s4);
}

.cert__row-label {
  color: var(--ink-muted);
  font-weight: 400;
}

.cert__row-value {
  font-weight: 600;
  color: var(--ink);
  text-align: right;
}

/* Seal — absolute positioning for reliable html2canvas rendering */
.cert__seal {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 2.5px solid var(--gold-bright);
  margin: var(--s7) auto var(--s4);
  position: relative;
}

.cert__seal-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 108px;
  height: 108px;
  border-radius: 50%;
  border: 1px solid var(--gold-light);
}

.cert__seal-star {
  position: absolute;
  top: 22px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 20px;
  color: var(--gold);
  line-height: 1;
}

.cert__seal-txt {
  position: absolute;
  top: 48px;
  left: 0;
  right: 0;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.04em;
  color: var(--gold);
  text-align: center;
  line-height: 1.4;
}

.cert__fine {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--ink-faint);
  margin-top: var(--s4);
  letter-spacing: 0.02em;
}

.cert__disclaimer {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin-top: var(--s5);
  line-height: 1.5;
}

/* On mobile, scale the fixed-width cert to fit viewport */
.cert-scale-wrap {
  overflow: visible;
}

@media (max-width: 660px) {
  .cert-scale-wrap {
    display: flex;
    justify-content: center;
  }
  .cert {
    transform-origin: top center;
    /* JS sets the exact scale factor */
  }
}

/* Cert actions */
.cert-actions {
  display: flex;
  gap: var(--s3);
  justify-content: center;
  margin-top: var(--s6);
  flex-wrap: wrap;
}

/* ============================================================
   Comparison Section — "What you're getting vs. what you'd
   get as a human" — below the certificate
   ============================================================ */
.comparison {
  max-width: 620px;
  margin: var(--s8) auto 0;
}

.comparison__hed {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--ink);
  text-align: center;
  margin-bottom: var(--s2);
}

.comparison__sub {
  font-size: 0.85rem;
  color: var(--ink-muted);
  text-align: center;
  margin-bottom: var(--s6);
}

.comp-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: var(--s4);
}

.comp-card__header {
  padding: var(--s3) var(--s4);
  background: var(--paper-warm);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.comp-card__title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink);
}

.comp-card__tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 99px;
}

.comp-card__tag--inc {
  background: var(--green-light);
  color: var(--green-dark);
}

.comp-card__tag--you {
  background: var(--red-light);
  color: var(--red-muted);
}

.comp-card__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.comp-card__col {
  padding: var(--s4);
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.comp-card__col:first-child {
  border-right: 1px solid var(--border-light);
  background: var(--green-light);
}

.comp-card__col-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--s2);
}

.comp-card__col:first-child .comp-card__col-label {
  color: var(--green-muted);
}

.comp-card__col:last-child .comp-card__col-label {
  color: var(--ink-muted);
}

.comp-card__source {
  padding: var(--s2) var(--s4);
  border-top: 1px solid var(--border-light);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--ink-faint);
}

.comp-card__source a {
  color: var(--ink-faint);
  text-decoration: underline;
}

@media (max-width: 540px) {
  .comp-card__body {
    grid-template-columns: 1fr;
  }
  .comp-card__col:first-child {
    border-right: none;
    border-bottom: 1px solid var(--border-light);
  }
}

/* ============================================================
   Knowledge Base (Absurd / Learn More)
   ============================================================ */
.kb-hero {
  padding: var(--s7) var(--s5) var(--s5);
  max-width: var(--max-w);
  margin: 0 auto;
}

.kb-hero__hed {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: var(--s2);
}

.kb-hero__sub {
  font-size: 0.9rem;
  color: var(--ink-muted);
  line-height: 1.6;
}

.kb-hero__meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-faint);
  margin-top: var(--s3);
}

.kb-body {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--s5) var(--s7);
}

.kb-hint {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--ink-faint);
  text-align: center;
  margin-bottom: var(--s4);
  letter-spacing: 0.02em;
}

/* Collapsible section */
.kb-section {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: var(--s4);
  background: var(--paper);
}

.kb-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s4) var(--s5);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.kb-section summary::-webkit-details-marker { display: none; }

.kb-section__hed {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 0;
}

.kb-section__count {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.kb-section__arrow {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-left: var(--s3);
  color: var(--ink-faint);
  transition: transform 0.2s ease;
}

.kb-section[open] .kb-section__arrow {
  transform: rotate(180deg);
}

.kb-section__body {
  padding: 0 var(--s5) var(--s5);
  border-top: 1px solid var(--border-light);
}

.kb-item {
  padding: var(--s5) 0;
}

.kb-item + .kb-item {
  border-top: 1px solid var(--border-light);
}

.kb-item__claim {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  color: var(--green-dark);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: var(--s2);
}

.kb-item__detail {
  font-size: 0.85rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

.kb-item__cite {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--ink-faint);
  margin-top: 3px;
}

.kb-item__cite a {
  color: var(--ink-faint);
  text-decoration: underline;
}

/* ============================================================
   Receipts (collapsible sources)
   ============================================================ */
details.receipts {
  border-top: 1px solid var(--border-light);
  margin-top: var(--s6);
}

.receipts summary {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: var(--s3) 0;
  cursor: pointer;
  color: var(--ink-faint);
  list-style: none;
}

.receipts summary::-webkit-details-marker { display: none; }
.receipts summary::before { content: '+ '; }
.receipts[open] summary::before { content: '\2212  '; }

.receipts__entry {
  margin-bottom: var(--s3);
  padding-left: var(--s3);
  border-left: 2px solid var(--border-light);
  font-size: 0.78rem;
  line-height: 1.5;
}

.receipts__entry strong {
  display: block;
  font-weight: 600;
  color: var(--ink-soft);
}

.receipts__entry .src {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-faint);
}

.receipts__entry a {
  color: var(--ink-faint);
  text-decoration: underline;
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

/* ============================================================
   Campaign CTA (only place campaign branding lives)
   ============================================================ */
.cta {
  background: var(--campaign-bg);
  padding: var(--s8) var(--s5);
  text-align: center;
  color: var(--campaign-cream);
}

.cta__voice {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 540px;
  margin: 0 auto var(--s6);
  color: rgba(255, 248, 240, 0.8);
}

.cta__buttons {
  display: flex;
  justify-content: center;
  gap: var(--s3);
  flex-wrap: wrap;
  margin-bottom: var(--s6);
}

.cta .btn--pink {
  background: var(--campaign-pink);
  color: #fff;
  font-weight: 700;
}
.cta .btn--pink:hover { background: #c2185b; color: #fff; }

.cta .btn--orange {
  background: var(--campaign-orange);
  color: #fff;
  font-weight: 700;
}
.cta .btn--orange:hover { background: #e55a2b; color: #fff; }


/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  padding: var(--s5) var(--s5) var(--s4);
  text-align: center;
  border-top: 1px solid var(--border-light);
  font-size: 0.72rem;
  color: var(--ink-faint);
}

.site-footer__legal {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--ink-ghost);
  margin-top: 2px;
}

/* ============================================================
   Toast
   ============================================================ */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(70px);
  background: var(--ink);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius);
  z-index: 1000;
  transition: transform 0.25s ease;
  pointer-events: none;
}
.toast.visible { transform: translateX(-50%) translateY(0); }

/* ============================================================
   Scroll reveal
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 600px) {
  .cta__buttons { flex-direction: column; align-items: center; }
  .topnav__links { gap: var(--s3); font-size: 0.78rem; }
}
