/* FinePrint marketing site — calm, premium, Apple-native.
   Mobile-first. Light only (intentional, premium document feel). */

:root {
  --ink: #1A2B48;
  --ink-90: #243756;
  --ink-70: #3A4F70;
  --ink-50: #6B7A93;
  --mint: #48C9B0;
  --mint-dark: #2FA493;     /* button hover, not for body text on light bg */
  --mint-text: #0F8472;     /* WCAG-AA-safe mint for text on parchment/white */
  --amber: #F39C12;
  --parchment: #F9F9F7;
  --ghost: #F2F2F7;
  --line: #E6E6EA;
  --line-soft: #EFEFF2;
  --surface: #FFFFFF;
  --text: #1A2B48;
  --text-soft: #4B5A75;
  --text-muted: #5E6B89;
  --shadow-sm: 0 1px 2px rgba(26, 43, 72, 0.04), 0 1px 1px rgba(26, 43, 72, 0.03);
  --shadow-md: 0 8px 24px -10px rgba(26, 43, 72, 0.18), 0 2px 6px rgba(26, 43, 72, 0.05);
  --shadow-lg: 0 24px 60px -20px rgba(26, 43, 72, 0.22), 0 8px 24px -8px rgba(26, 43, 72, 0.08);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --container: 1120px;
  --container-narrow: 760px;
  --grad-hero: radial-gradient(1200px 600px at 80% -10%, rgba(72, 201, 176, 0.10), transparent 60%),
               radial-gradient(900px 500px at -10% 30%, rgba(26, 43, 72, 0.06), transparent 60%),
               linear-gradient(180deg, #FBFBF8 0%, #F4F5F1 100%);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; } }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background: var(--parchment);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: var(--ink); text-decoration: none; }
a:hover, a:focus-visible { color: var(--mint-text); }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--mint-text);
  outline-offset: 3px;
  border-radius: 6px;
}

img { max-width: 100%; height: auto; display: block; }

/* Grid/flex items must allow shrinking below intrinsic content width
   so images don't push containers past the viewport. */
.docs__item, .feature, .step, .problem-card, .trust__item, .hero__copy, .hero__art, .contact-meta__item { min-width: 0; }

h1, h2, h3, h4 { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif; letter-spacing: -0.012em; color: var(--ink); margin: 0 0 0.5rem; overflow-wrap: break-word; }
h1 { font-size: clamp(1.75rem, 4.5vw + 0.7rem, 3.4rem); line-height: 1.08; letter-spacing: -0.022em; font-weight: 700; text-wrap: balance; }
h2 { font-size: clamp(1.45rem, 2.4vw + 0.7rem, 2.3rem); line-height: 1.18; font-weight: 650; text-wrap: balance; }
h3 { font-size: 1.1rem; line-height: 1.3; font-weight: 600; }
p { margin: 0 0 1rem; color: var(--text-soft); }
p.lead { font-size: 1.125rem; color: var(--text-soft); max-width: 60ch; }
small { color: var(--text-muted); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.container--narrow { max-width: var(--container-narrow); }
.section { padding: 72px 0; }
.section--tight { padding: 48px 0; }
.section--alt { background: var(--ghost); }
.section--ink { background: var(--ink); color: #fff; }
.section--ink h2, .section--ink h3, .section--ink p { color: #fff; }
.section--ink p { color: rgba(255,255,255,0.78); }
.eyebrow { display: inline-block; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mint-text); font-weight: 600; margin-bottom: 12px; }
.section--ink .eyebrow { color: var(--mint); }

/* Skip link */
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 0 0 10px 0; z-index: 100; }
.skip-link:focus { left: 0; color: #fff; }

/* Header / nav */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(249, 249, 247, 0.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav__brand { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink); font-size: 1.02rem; }
.nav__brand img { width: 28px; height: 28px; }
.nav__links { display: none; gap: 28px; align-items: center; }
.nav__links a { color: var(--text-soft); font-size: 0.96rem; }
.nav__links a:hover, .nav__links a:focus-visible { color: var(--ink); }
.nav__cta { display: inline-flex; }
.nav__menu-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: transparent; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); cursor: pointer; }
.nav__menu-btn[aria-expanded="true"] { background: var(--ghost); }
.nav__menu-btn svg { width: 20px; height: 20px; }

.mobile-menu { display: none; padding: 16px 20px 24px; border-top: 1px solid var(--line); background: var(--parchment); }
.mobile-menu.is-open { display: block; }
.mobile-menu a { display: block; padding: 12px 4px; font-size: 1.04rem; color: var(--text); border-bottom: 1px solid var(--line-soft); }
.mobile-menu a:last-child { border-bottom: 0; }
.mobile-menu .btn { display: block; text-align: center; margin-top: 16px; }

@media (min-width: 860px) {
  .nav__links { display: flex; }
  .nav__menu-btn { display: none; }
  .mobile-menu { display: none !important; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px;
  font-weight: 600; font-size: 0.98rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  text-decoration: none;
  line-height: 1.2;
  white-space: nowrap;
}
.btn--primary { background: var(--ink); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover, .btn--primary:focus-visible { background: var(--ink-90); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn--accent { background: var(--mint); color: var(--ink); }
.btn--accent:hover, .btn--accent:focus-visible { background: var(--mint-dark); color: #fff; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover, .btn--ghost:focus-visible { border-color: var(--ink); color: var(--ink); background: var(--ghost); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover, .btn--light:focus-visible { background: rgba(255,255,255,0.92); color: var(--ink); }
.btn--lg { padding: 14px 26px; font-size: 1rem; }
.btn--block { display: flex; width: 100%; }

/* Hero */
.hero { background: var(--grad-hero); padding: 56px 0 24px; overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1fr; gap: 36px; align-items: center; }
.hero__copy h1 { margin-bottom: 18px; }
.hero__copy p.lead { font-size: 1.18rem; margin-bottom: 24px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.hero__meta { display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-size: 0.92rem; }
.hero__meta svg { width: 16px; height: 16px; color: var(--mint-text); flex-shrink: 0; }
.hero__art { position: relative; }
.phone-mock {
  position: relative;
  background: var(--ink);
  border-radius: 44px;
  padding: 10px;
  box-shadow: var(--shadow-lg);
  max-width: 320px;
  margin: 0 auto;
  border: 1px solid rgba(255,255,255,0.06);
}
.phone-mock::before {
  content: ""; position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 28px; background: #000; border-radius: 999px; z-index: 2;
}
.phone-mock img { border-radius: 36px; width: 100%; display: block; }
.hero__art-glow {
  position: absolute; inset: -10% -20% -10% -10%; z-index: -1;
  background: radial-gradient(circle at 50% 40%, rgba(72, 201, 176, 0.22), transparent 60%);
  filter: blur(20px);
}

@media (min-width: 860px) {
  .hero { padding: 88px 0 40px; }
  .hero__grid { grid-template-columns: 1.05fr 0.95fr; gap: 56px; }
  .phone-mock { max-width: 360px; }
}

/* Problem section */
.problem__grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 32px; }
.problem-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 22px; box-shadow: var(--shadow-sm); }
.problem-card h3 { margin-bottom: 6px; }
.problem-card p { margin: 0; color: var(--text-muted); font-size: 0.98rem; }
@media (min-width: 720px) { .problem__grid { grid-template-columns: repeat(3, 1fr); } }

/* How it works */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr; gap: 28px; margin-top: 32px; counter-reset: step; }
.step { position: relative; padding: 24px 22px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); display: flex; flex-direction: column; }
.step__num { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 600; font-size: 0.9rem; margin-bottom: 12px; }
.step h3 { margin-bottom: 6px; }
.step p { margin: 0; font-size: 0.98rem; }
.step__phone {
  position: relative;
  background: var(--ink);
  border-radius: 26px;
  padding: 6px;
  margin: 0 auto 20px;
  width: 100%;
  max-width: 220px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255,255,255,0.06);
  aspect-ratio: 9 / 19.5;
  overflow: hidden;
}
.step__phone img {
  border-radius: 20px;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
}
@media (min-width: 860px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .step__phone { max-width: 200px; }
}

/* Features */
.features { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 32px; }
.feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.feature:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #d8dae0; }
.feature__icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(72, 201, 176, 0.18), rgba(26, 43, 72, 0.10));
  color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.feature__icon svg { width: 22px; height: 22px; }
.feature h3 { margin-bottom: 4px; }
.feature p { margin: 0; color: var(--text-muted); font-size: 0.97rem; }
@media (min-width: 720px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .features { grid-template-columns: repeat(4, 1fr); } }

/* Supported documents */
.docs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 32px; }
.docs__item {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.96rem;
  color: var(--text);
}
.docs__item svg { width: 18px; height: 18px; color: var(--mint-text); flex-shrink: 0; }
@media (min-width: 720px) { .docs { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .docs { grid-template-columns: repeat(3, 1fr); } }

/* Trust / privacy */
.trust { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 28px; }
.trust__item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 20px; display: flex; gap: 14px; align-items: flex-start; }
.trust__item svg { width: 22px; height: 22px; color: var(--mint-text); flex-shrink: 0; margin-top: 2px; }
.trust__item p { margin: 0; color: var(--text-soft); font-size: 0.98rem; }
@media (min-width: 720px) { .trust { grid-template-columns: repeat(3, 1fr); } }

/* Beta CTA */
.beta {
  position: relative;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 48px 24px;
  text-align: center;
  overflow: hidden;
  margin: 40px 0;
}
.beta::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(600px 300px at 80% 0%, rgba(72, 201, 176, 0.22), transparent 60%),
              radial-gradient(500px 300px at 0% 100%, rgba(72, 201, 176, 0.10), transparent 70%);
  pointer-events: none;
}
.beta__inner { position: relative; max-width: 600px; margin: 0 auto; }
.beta h2 { color: #fff; margin-bottom: 10px; }
.beta p { color: rgba(255,255,255,0.78); margin-bottom: 24px; }
.beta .btn--accent { color: var(--ink); }
.beta__note { margin-top: 14px; font-size: 0.86rem; color: rgba(255,255,255,0.6); }
@media (min-width: 720px) { .beta { padding: 64px 32px; } }

/* Footer */
.footer { padding: 40px 0 56px; background: var(--parchment); border-top: 1px solid var(--line); }
.footer__row { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.footer__brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; }
.footer__brand img { width: 26px; height: 26px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 18px 22px; }
.footer__links a { color: var(--text-soft); font-size: 0.94rem; }
.footer__disclaimer { color: var(--text-muted); font-size: 0.86rem; margin: 0; max-width: 56ch; }
.footer__copy { color: var(--text-muted); font-size: 0.86rem; margin: 0; }
@media (min-width: 720px) {
  .footer__row { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* Contact page */
.contact-hero { padding: 48px 0 24px; background: var(--grad-hero); }
.contact-hero h1 { font-size: clamp(1.6rem, 1.5vw + 1.1rem, 2.3rem); margin-bottom: 12px; }
.contact-hero p.lead { font-size: 1.05rem; max-width: 52ch; }
@media (min-width: 720px) { .contact-hero { padding: 64px 0 32px; } }
.contact-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-md); margin: 16px 0 64px; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 600; font-size: 0.94rem; color: var(--ink); }
.field .hint { color: var(--text-muted); font-size: 0.84rem; }
.input, .textarea, .select {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--mint-text); box-shadow: 0 0 0 4px rgba(72, 201, 176, 0.18); }
.textarea { min-height: 140px; resize: vertical; }
.select { background: var(--surface) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236E7A92' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") no-repeat right 14px center; -webkit-appearance: none; appearance: none; padding-right: 38px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 8px; }
.form-note { font-size: 0.86rem; color: var(--text-muted); margin: 0; }
.form-status { padding: 12px 14px; border-radius: 12px; font-size: 0.94rem; margin-bottom: 16px; display: none; }
.form-status.is-visible { display: block; }
.form-status.is-success { background: rgba(72, 201, 176, 0.12); color: var(--ink); border: 1px solid rgba(72, 201, 176, 0.45); }
.form-status.is-error { background: rgba(243, 156, 18, 0.10); color: var(--ink); border: 1px solid rgba(243, 156, 18, 0.45); }

.contact-meta { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 8px 0 20px; }
.contact-meta__item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px 16px; }
.contact-meta__item h2, .contact-meta__item h3 { margin: 0 0 2px; font-size: 0.92rem; font-weight: 600; line-height: 1.3; color: var(--ink); }
.contact-meta__item p { margin: 0; font-size: 0.86rem; }
.contact-meta__item a { color: var(--text-soft); text-decoration: none; overflow-wrap: anywhere; }
.contact-meta__item a:hover, .contact-meta__item a:focus-visible { color: var(--mint-text); text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 720px) { .contact-meta { grid-template-columns: repeat(3, 1fr); gap: 10px; } }

/* Reveal-on-scroll — progressive enhancement: only hide elements once JS
   marks the document ready, so JS-less / crawler / pre-paint states show
   the content normally. */
.js-ready .reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.5s ease, transform 0.5s ease; }
.js-ready .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js-ready .reveal { opacity: 1; transform: none; transition: none; } }

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

/* Section heading layout */
.section__head { max-width: 64ch; }
.section__head--center { margin: 0 auto; text-align: center; }
.section__head p.lead { margin-bottom: 0; }
