/* ==========================================================================
   INKPACT — design system
   Concept: a freelancer's desk. Paper, ink, a rubber approval stamp,
   carbon-copy edges, and contract "clauses" used as the structural device
   because the content genuinely is a numbered set of terms.
   ========================================================================== */

:root {
  /* --- color: named + hex, 6 tokens + 2 tints --- */
  --paper:        #FAF6EA;   /* base background — warm, not the cliché cream */
  --paper-alt:    #F1E9D4;   /* secondary panel bg */
  --line:         #DCCEA6;   /* ledger-line borders */
  --ink:          #232A26;   /* primary text — near-black, green-blue cast */
  --ink-soft:     #4E584F;   /* secondary text */
  --navy:         #2B3A55;   /* headers, nav, structure */
  --navy-deep:    #1C2536;   /* footer bg */
  --stamp:        #B23A2E;   /* rubber-stamp red — muted brick, not vermilion */
  --stamp-deep:   #8A2C22;
  --sage:         #6E8B6B;   /* approval green — secondary accent */
  --sage-deep:    #4F6B4D;
  --shadow:       rgba(35, 42, 38, 0.14);

  --font-display: "Fraunces", Georgia, serif;
  --font-body:    "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --wrap: 1120px;
}

/* --- reset --- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0 0 0.5em; color: var(--navy); }
p { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.25em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
:focus-visible { outline: 3px solid var(--sage); outline-offset: 3px; border-radius: 3px; }

/* --- eyebrow / mono labels (used for genuine metadata: clause numbers, tags, dates) --- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--stamp-deep);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--stamp-deep); display: inline-block; }

/* --- signature underline: a hand-drawn-feeling stroke under emphasized words --- */
.signed {
  position: relative;
  white-space: nowrap;
}
.signed::after {
  content: "";
  position: absolute;
  left: -2%; right: -2%; bottom: -0.08em;
  height: 0.3em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'%3E%3Cpath d='M2 9 C 30 2, 60 12, 90 6 S 150 2, 198 8' fill='none' stroke='%23B23A2E' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  z-index: -1;
}

/* --- header / nav --- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: 21px;
  color: var(--navy); text-decoration: none;
}
.brand-mark {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--stamp); color: var(--paper);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 13px; font-weight: 600;
  transform: rotate(-8deg);
  flex-shrink: 0;
}
.nav-links {
  display: flex; align-items: center; gap: 28px;
  list-style: none; margin: 0; padding: 0;
  font-size: 15px; font-weight: 500;
}
.nav-links a { text-decoration: none; color: var(--ink-soft); }
.nav-links a:hover { color: var(--navy); }
.nav-cta {
  background: var(--navy); color: var(--paper) !important;
  padding: 9px 18px; border-radius: 999px; font-weight: 600 !important;
}
.nav-cta:hover { background: var(--navy-deep); }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: 8px;
  width: 42px; height: 38px; cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 18px; height: 2px; background: var(--ink); margin: 0 auto; position: relative;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: flex-start; gap: 4px;
    padding: 10px 24px 20px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 0; width: 100%; }
  .nav-cta { width: 100%; text-align: center; padding: 12px 18px; }
}

/* --- buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 16px;
  padding: 14px 26px; border-radius: 999px; text-decoration: none;
  border: 2px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--stamp); color: var(--paper); box-shadow: 0 6px 0 var(--stamp-deep); }
.btn-primary:hover { box-shadow: 0 4px 0 var(--stamp-deep); transform: translateY(1px); }
.btn-primary:active { box-shadow: 0 1px 0 var(--stamp-deep); transform: translateY(4px); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: var(--paper); }
.btn-lg { padding: 17px 34px; font-size: 17px; }

/* --- stamp badge, the signature element --- */
.stamp-badge {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  width: 108px; height: 108px; border-radius: 50%;
  border: 3px solid var(--stamp);
  color: var(--stamp); font-family: var(--font-mono);
  text-transform: uppercase; letter-spacing: 0.04em; text-align: center;
  transform: rotate(-9deg);
  font-size: 12px; line-height: 1.35; font-weight: 600;
  flex-shrink: 0;
  position: relative;
}
.stamp-badge::before {
  content: ""; position: absolute; inset: 6px; border: 1px solid var(--stamp); border-radius: 50%; opacity: .6;
}
.stamp-badge strong { font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: 0; text-transform: none; }

/* --- hero --- */
.hero {
  padding: 64px 0 72px;
  background:
    radial-gradient(circle at 85% 8%, rgba(178,58,46,0.08), transparent 40%),
    var(--paper);
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center;
}
.hero h1 { font-size: clamp(2.1rem, 4.2vw, 3.35rem); margin-bottom: 20px; }
.hero-lede { font-size: 19px; color: var(--ink-soft); max-width: 46ch; margin-bottom: 30px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-bottom: 22px; }
.hero-trust { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; color: var(--ink-soft); font-family: var(--font-mono); }
.hero-trust span { display: flex; align-items: center; gap: 6px; }
.hero-trust svg { flex-shrink: 0; }

/* document mockup card */
.doc-card {
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px -18px var(--shadow), 0 2px 0 var(--line);
  padding: 34px 32px; position: relative;
  transform: rotate(2.2deg);
  border: 1px solid var(--line);
}
.doc-card::before {
  content: ""; position: absolute; inset: 10px; border: 1px dashed var(--line); border-radius: 12px; pointer-events: none;
}
.doc-card .doc-title { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); margin-bottom: 14px; }
.doc-card h3 { font-size: 20px; margin-bottom: 18px; }
.doc-line { height: 9px; background: var(--paper-alt); border-radius: 3px; margin-bottom: 10px; }
.doc-line.w-90 { width: 90%; } .doc-line.w-75 { width: 75%; } .doc-line.w-60 { width: 60%; } .doc-line.w-40 { width: 40%; }
.doc-highlight {
  background: rgba(178,58,46,.08); border-left: 3px solid var(--stamp);
  padding: 10px 14px; border-radius: 0 8px 8px 0; margin: 16px 0;
  font-size: 14px; color: var(--stamp-deep); font-family: var(--font-mono);
}
.doc-sign { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--line); }
.doc-sign .sig { font-family: var(--font-display); font-style: italic; font-size: 22px; color: var(--navy); }
.doc-sign .stamp-mini {
  width: 54px; height: 54px; border-radius: 50%; border: 2px solid var(--sage);
  color: var(--sage-deep); display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 9px; font-weight: 700; text-align: center; transform: rotate(8deg);
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .doc-card { transform: rotate(0); max-width: 420px; margin: 0 auto; }
}

/* --- sections --- */
.section { padding: 76px 0; }
.section-alt { background: var(--paper-alt); }
.section-head { max-width: 640px; margin: 0 auto 44px; text-align: center; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.section-head p { color: var(--ink-soft); font-size: 17px; }

/* --- clause list: numbered because these ARE contract clauses --- */
.clauses { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.clause {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 26px 26px 24px; position: relative;
}
.clause .clause-no {
  font-family: var(--font-mono); font-size: 13px; color: var(--stamp-deep);
  display: block; margin-bottom: 10px; letter-spacing: .04em;
}
.clause h3 { font-size: 19px; margin-bottom: 8px; }
.clause p { color: var(--ink-soft); font-size: 15.5px; margin-bottom: 0; }
@media (max-width: 720px) { .clauses { grid-template-columns: 1fr; } }

/* --- steps (real sequence: pick, fill, sign) --- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: step; }
.step { text-align: left; position: relative; padding-left: 0; }
.step .step-no {
  width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: var(--paper);
  display: flex; align-items: center; justify-content: center; font-family: var(--font-mono);
  font-weight: 600; font-size: 16px; margin-bottom: 16px;
}
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { color: var(--ink-soft); font-size: 15.5px; }
@media (max-width: 780px) { .steps { grid-template-columns: 1fr; } }

/* --- cards / trust blurbs --- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 24px; box-shadow: 0 10px 30px -18px var(--shadow);
}
.card .quote { font-size: 15.5px; color: var(--ink-soft); margin-bottom: 14px; }
.card .who { font-family: var(--font-mono); font-size: 13px; color: var(--navy); }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }

/* --- FAQ --- */
.faq { max-width: 760px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 20px 0; font-family: var(--font-body); font-weight: 600; font-size: 16.5px; color: var(--navy);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq-q .plus { font-family: var(--font-mono); font-size: 20px; color: var(--stamp); transition: transform .2s ease; flex-shrink: 0; }
.faq-item[open] .plus { transform: rotate(45deg); }
.faq-a { padding: 0 0 20px; color: var(--ink-soft); font-size: 15.5px; }
.faq-q::-webkit-details-marker { display: none; }

/* --- article / blog --- */
.article-hero { padding: 52px 0 20px; border-bottom: 1px solid var(--line); }
.article-meta { font-family: var(--font-mono); font-size: 13px; color: var(--ink-soft); display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.article-body { max-width: 700px; margin: 0 auto; padding: 48px 0; }
.article-body h2 { font-size: 26px; margin-top: 1.6em; }
.article-body h3 { font-size: 20px; margin-top: 1.4em; }
.article-body p, .article-body li { font-size: 17px; color: var(--ink); }
.article-body ul, .article-body ol { color: var(--ink); }
.callout {
  background: var(--paper-alt); border-radius: var(--radius-md); border: 1px solid var(--line);
  padding: 22px 24px; margin: 28px 0; font-size: 15.5px;
}
.callout strong { color: var(--navy); }
.related-links {
  background: var(--paper-alt); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 22px 24px; margin: 30px 0;
}
.related-links h3 { font-size: 16px; margin-bottom: 10px; }
.related-links a { color: var(--stamp-deep); text-decoration: underline; text-underline-offset: 3px; }

/* pinterest pin block inside articles */
.pin-block { display: flex; gap: 24px; align-items: center; background: var(--navy); border-radius: var(--radius-lg); padding: 26px; margin: 34px 0; color: var(--paper); }
.pin-block img { width: 130px; border-radius: 10px; flex-shrink: 0; }
.pin-block p { color: #cfd8e6; font-size: 14.5px; margin-bottom: 12px; }
.pin-block .btn-ghost { border-color: var(--paper); color: var(--paper); }
.pin-block .btn-ghost:hover { background: var(--paper); color: var(--navy); }
@media (max-width: 600px) { .pin-block { flex-direction: column; text-align: center; } }

/* --- download page --- */
.download-hero { padding: 56px 0 24px; text-align: center; }
.download-hero .stamp-badge { margin: 0 auto 22px; }
.unlock-panel {
  max-width: 640px; margin: 40px auto 0; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px -20px var(--shadow); overflow: hidden;
}
.unlock-panel-head { background: var(--navy); color: var(--paper); padding: 22px 28px; }
.unlock-panel-head .eyebrow { color: #cfd8e6; }
.unlock-panel-head .eyebrow::before { background: #cfd8e6; }
.unlock-panel-head h2 { color: var(--paper); font-size: 22px; margin-bottom: 4px; }
.unlock-panel-head p { color: #cfd8e6; margin: 0; font-size: 14.5px; }
.unlock-steps { display: flex; justify-content: space-between; padding: 22px 28px 0; gap: 8px; }
.unlock-steps .u-step { flex: 1; text-align: center; font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-soft); }
.unlock-steps .u-step .dot { width: 26px; height: 26px; border-radius: 50%; background: var(--paper-alt); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; margin: 0 auto 8px; font-weight: 600; color: var(--navy); }
.unlock-steps .u-step.active .dot { background: var(--stamp); border-color: var(--stamp); color: var(--paper); }
#cpa-locker {
  margin: 26px 28px 30px; min-height: 220px; border: 2px dashed var(--stamp);
  border-radius: var(--radius-md); background: var(--paper-alt);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 30px 20px; color: var(--ink-soft); font-size: 14px; gap: 10px;
}
#cpa-locker .locker-note { font-family: var(--font-mono); font-size: 12.5px; color: var(--stamp-deep); }
.whats-inside { max-width: 700px; margin: 60px auto 0; }
.whats-inside ul { list-style: none; padding: 0; display: grid; gap: 14px; }
.whats-inside li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; }
.whats-inside li svg { flex-shrink: 0; margin-top: 3px; }

/* --- footer --- */
.site-footer { background: var(--navy-deep); color: #cfd8e6; padding: 56px 0 28px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand { font-family: var(--font-display); font-size: 20px; color: var(--paper); margin-bottom: 10px; }
.footer-desc { font-size: 14.5px; color: #a9b4c6; max-width: 34ch; }
.footer-col h4 { font-family: var(--font-mono); font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: #a9b4c6; margin-bottom: 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-col a { color: #cfd8e6; text-decoration: none; font-size: 14.5px; }
.footer-col a:hover { color: var(--paper); text-decoration: underline; }
.footer-bottom { border-top: 1px solid #34405a; padding-top: 22px; font-size: 13px; color: #8896ac; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand-col { grid-column: 1 / -1; } }

/* --- legal pages --- */
.legal-body { max-width: 720px; margin: 0 auto; padding: 50px 0 70px; }
.legal-body h2 { font-size: 21px; margin-top: 1.6em; }
.legal-body p, .legal-body li { color: var(--ink-soft); font-size: 15.5px; }

/* --- scroll reveal --- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* --- utility --- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
