/* DocBindr — docbindr.com
   Tokens are ported from DocBindr/Utils/DesignSystem.swift so the site and the
   app cannot drift. If a colour changes there, change it here.

   House style (see design_ref/ref_1): calm fintech. Plain typography carries the
   hierarchy — headline numbers and statements are set in type, not wrapped in
   decorated cards. Blue brand only; never purple. */

:root {
  /* Brand.blue / Brand.blueDeep / Brand.danger */
  --blue: #2979ff;
  --blue-deep: #1d5bd6;
  --danger: #e8354f;

  /* Brand sky wash (ref_8 gradient) */
  --sky-mint: #c8ece6;
  --sky-aqua: #b0deec;
  --sky-pale: #a8cff2;
  --sky-blue: #77adec;

  --ink: #0f172a;
  --ink-muted: #4a5768;
  --surface: #ffffff;
  --surface-sunken: #f4f6fb;
  --hairline: rgba(15, 23, 42, 0.09);

  /* Radius — app tokens: card 32, pill 28, sheet 24, chip 10 */
  --r-card: 32px;
  --r-pill: 28px;
  --r-sheet: 24px;
  --r-chip: 10px;

  /* Spacing — the app's 4/8/12/16/24/32 scale */
  --s-xs: 4px;
  --s-sm: 8px;
  --s-md: 12px;
  --s-lg: 16px;
  --s-xl: 24px;
  --s-xxl: 32px;

  --measure: 66ch; /* 60–75 chars on desktop */
  --shell: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Dark uses the app's desaturated tonal variants, not inverted colours. */
    --blue: #5b8def;
    --blue-deep: #1b47a0;
    --danger: #ff5f72;
    --sky-mint: #1f3b38;
    --sky-aqua: #1d3646;
    --sky-pale: #1f415f;
    --sky-blue: #25507c;

    --ink: #f1f5f9;
    --ink-muted: #a3b0c2;
    --surface: #0f1115;
    --surface-sunken: #171a21;
    --hairline: rgba(255, 255, 255, 0.12);
  }
}

*,
*::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: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
    Helvetica, Arial, sans-serif;
  font-size: 17px;            /* ≥16px so iOS never auto-zooms */
  line-height: 1.65;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-deep); }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--s-xl);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: var(--s-sm);
  background: var(--surface);
  padding: var(--s-md) var(--s-lg);
  border-radius: var(--r-chip);
  z-index: 100;
}
.skip-link:focus { left: var(--s-lg); }

/* ---------- Nav ---------- */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-lg);
  padding-block: var(--s-lg);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--s-md);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.wordmark img { width: 34px; height: 34px; border-radius: 9px; }

.nav-links {
  display: flex;
  gap: var(--s-xl);
  font-size: 0.98rem;
  font-weight: 500;
}
.nav-links a { color: var(--ink-muted); text-decoration: none; }
.nav-links a:hover { color: var(--ink); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(180deg,
      var(--sky-blue) 0%,
      var(--sky-pale) 26%,
      var(--sky-aqua) 46%,
      var(--surface) 88%);
  padding-bottom: clamp(48px, 8vw, 96px);
}

.hero > .shell { position: relative; z-index: 1; }

/* ---------- Containment field ----------
   The hero's motion has to argue the page's claim: documents come in and stay
   in. So the rings travel *inward*, contracting onto the device and fading as
   they reach it. Rings radiating outward would have read as broadcasting —
   precisely the opposite promise.

   Their shape is the phone's, not a circle: a rounded rectangle on the app's
   own curvature, so it reads as the boundary of a device rather than a radar
   sweep. Six elements, no JavaScript — the site ships a CSP with no script-src
   at all, and decoration is no reason to loosen it. Only transform and opacity
   animate, so it stays on the compositor. */

.sky {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Bottom lift, above the field, so the copy sits on a clean surface — the same
   trick the app uses beneath its splash. */
.sky::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 40%;
  background: linear-gradient(180deg, transparent 0%, var(--surface) 94%);
}

.ring {
  position: absolute;
  /* Anchored on the device, not on the hero. Stacked mobile puts the phone low,
     and centring the field on the hero ran the rings straight through the
     paragraph. */
  top: 74%;
  left: 50%;
  width: min(340px, 80vw);
  aspect-ratio: 1 / 1.9;          /* a phone's proportions, not a circle */
  border: 2px solid var(--blue-deep);
  border-radius: 46px;
  /* A blue hairline on a blue sky is inherently low contrast. The white
     outer glow separates the ring from the wash so it reads as a defined
     edge rather than a smudge. */
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35), 0 2px 10px rgba(29, 91, 214, 0.18);
  opacity: 0;
  will-change: transform, opacity;
  animation: converge cubic-bezier(.33, 0, .3, 1) infinite;
  animation-duration: 19s;
}

/* Contracting onto the device, brightest mid-flight, gone as it arrives.
   The outer bound stays modest so the rings never reach the copy column. */
@keyframes converge {
  0%   { transform: translate(-50%, -50%) scale(1.95); opacity: 0; }
  20%  { opacity: .62; }
  76%  { opacity: .34; }
  100% { transform: translate(-50%, -50%) scale(.84);  opacity: 0; }
}

/* Negative delays stagger the rings so the field is already in flight on first
   paint, instead of starting empty and filling in. */
.ring:nth-child(1) { animation-delay:  -1s; }
.ring:nth-child(2) { animation-delay:  -5s; }
.ring:nth-child(3) { animation-delay:  -9s; }
.ring:nth-child(4) { animation-delay: -13s; }
.ring:nth-child(5) { animation-delay: -16s; }

/* A steady boundary the rings settle into: the field's resting edge. */
.ring--anchor {
  animation: none;
  opacity: .42;
  transform: translate(-50%, -50%) scale(.86);
  border-width: 2px;
}

/* On desktop the field belongs around the device shot, not the whole hero. */
@media (min-width: 768px) {
  .ring { left: 74%; top: 54%; }
}

@media (prefers-color-scheme: dark) {
  /* --sky-blue is a dark tonal variant; on the dark wash it all but vanished.
     The lifted brand blue reads, and the glow becomes a soft halo. */
  .ring {
    border-color: var(--blue);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 2px 14px rgba(91, 141, 239, 0.30);
  }
  .ring--anchor { opacity: .5; }
}

@media (prefers-reduced-motion: reduce) {
  /* The blanket `animation: none` above would freeze every ring at its opening
     keyframe — fully transparent, an empty hero. Show the field at rest
     instead: a few concentric boundaries, no motion. */
  .ring { opacity: .34; }
  .ring:nth-child(1) { transform: translate(-50%, -50%) scale(1.55); }
  .ring:nth-child(2) { transform: translate(-50%, -50%) scale(1.30); }
  .ring:nth-child(3) { transform: translate(-50%, -50%) scale(1.08); }
  .ring:nth-child(4) { opacity: 0; }
  .ring:nth-child(5) { opacity: 0; }
}

.hero-grid {
  display: grid;
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
  padding-top: clamp(28px, 5vw, 56px);
}

.hero h1 {
  font-size: clamp(2.35rem, 6.2vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0 0 var(--s-lg);
  text-wrap: balance;
}

.hero .lede {
  font-size: clamp(1.08rem, 2.2vw, 1.3rem);
  color: var(--ink-muted);
  margin: 0 0 var(--s-xl);
  max-width: 46ch;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-sm);
  background: var(--ink);
  color: var(--surface);
  border-radius: var(--r-pill);
  padding: 14px var(--s-xl);
  font-weight: 600;
  font-size: 1rem;
  min-height: 48px;              /* ≥44pt touch target */
}
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #34d399; }

.hero .note {
  margin: var(--s-md) 0 0;
  font-size: 0.92rem;
  color: var(--ink-muted);
}

/* ---------- iPhone mockup ----------
   Screens are shown in a device, not as bare rectangles: a titanium bezel, the
   Dynamic Island and a side button. Built in CSS rather than baked into the
   images so one frame serves every screenshot and the shots can be re-exported
   from the simulator without re-compositing anything.

   The captures already include the iOS status bar, whose centre gap is exactly
   where the island belongs — so it lands over empty space, not over content. */

.phone {
  --bezel: 11px;
  justify-self: center;
  position: relative;
  width: min(300px, 78vw);
  padding: var(--bezel);
  border-radius: 56px;
  /* Brushed titanium: a light top-left edge falling to a dark bottom-right. */
  background: linear-gradient(150deg, #d8dbe2 0%, #8f95a3 18%, #3b4049 52%, #23262c 78%, #4a4f59 100%);
  box-shadow:
    0 32px 70px rgba(15, 23, 42, 0.30),
    0 6px 16px rgba(15, 23, 42, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.phone-screen {
  position: relative;
  border-radius: 45px;
  overflow: hidden;
  background: #000;
  display: block;
  /* Keeps the screen edge from looking pasted onto the bezel. */
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.55);
}

.phone-screen img {
  display: block;
  width: 100%;
  border-radius: inherit;
}

/* Dynamic Island */
.phone::before {
  content: "";
  position: absolute;
  top: calc(var(--bezel) + 9px);
  left: 50%;
  transform: translateX(-50%);
  width: 31%;
  height: 22px;
  border-radius: 12px;
  background: #05070a;
  z-index: 2;
}

/* Side button */
.phone::after {
  content: "";
  position: absolute;
  right: -2px;
  top: 27%;
  width: 3px;
  height: 62px;
  border-radius: 2px;
  background: linear-gradient(180deg, #9aa0ad, #5c626d);
}

@media (min-width: 768px) {
  .phone { width: min(320px, 34vw); }
}

/* ---------- Sections ---------- */

section { padding-block: clamp(56px, 9vw, 104px); }
.section-sunken { background: var(--surface-sunken); }

h2 {
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.022em;
  font-weight: 700;
  margin: 0 0 var(--s-lg);
  text-wrap: balance;
}

h3 {
  font-size: 1.28rem;
  line-height: 1.3;
  letter-spacing: -0.012em;
  font-weight: 650;
  margin: 0 0 var(--s-sm);
}

p { max-width: var(--measure); }
.muted { color: var(--ink-muted); }
.lead { font-size: 1.12rem; color: var(--ink-muted); }

/* ---------- Feature rows ---------- */

.feature {
  display: grid;
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}
.feature + .feature { margin-top: clamp(56px, 9vw, 104px); }

.feature .phone { width: min(272px, 74vw); }

/* The exported report is paper, not a screen — it stays a document. */
.feature img.paper {
  justify-self: center;
  width: min(400px, 84vw);
  border-radius: var(--r-chip);
  border: 1px solid var(--hairline);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.14);
}

.eyebrow {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: var(--s-sm);
}

/* ---------- Plain-typography lists (no decorated cards) ---------- */

.points {
  list-style: none;
  margin: var(--s-xl) 0 0;
  padding: 0;
  display: grid;
  gap: var(--s-xl);
}
.points li { padding-top: var(--s-lg); border-top: 1px solid var(--hairline); }
.points strong { display: block; font-size: 1.05rem; margin-bottom: 2px; }
.points span { color: var(--ink-muted); }

/* ---------- Pricing ---------- */

.tiers {
  display: grid;
  gap: var(--s-xl);
  margin-top: var(--s-xxl);
}

.tier {
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: clamp(24px, 4vw, 40px);
  background: var(--surface);
}
.tier.is-pro { border-color: var(--blue); }

.tier .price {
  font-size: clamp(2rem, 5vw, 2.9rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: var(--s-sm) 0 var(--s-xs);
  font-variant-numeric: tabular-nums;
}
.tier .price small { font-size: 0.94rem; font-weight: 500; color: var(--ink-muted); letter-spacing: 0; }

.tier ul { list-style: none; margin: var(--s-lg) 0 0; padding: 0; display: grid; gap: var(--s-md); }
.tier li { display: flex; gap: var(--s-md); align-items: flex-start; color: var(--ink-muted); }
.tier li::before {
  content: "";
  flex: 0 0 auto;
  width: 18px; height: 18px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--blue);
  /* Checkmark drawn in the mask so meaning never rests on colour alone. */
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'><path d='M4 9.4l3.2 3.2L14 5.8' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/><circle cx='9' cy='9' r='8.4' fill='none' stroke='black' stroke-width='1.4'/></svg>") center/contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'><path d='M4 9.4l3.2 3.2L14 5.8' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/><circle cx='9' cy='9' r='8.4' fill='none' stroke='black' stroke-width='1.4'/></svg>") center/contain no-repeat;
}

/* ---------- Prose pages (privacy, support) ---------- */

.prose { padding-block: clamp(40px, 7vw, 80px); }
.prose h1 { font-size: clamp(2rem, 5vw, 2.9rem); letter-spacing: -0.028em; margin: 0 0 var(--s-sm); }
.prose h2 { font-size: 1.35rem; margin-top: var(--s-xxl); }
.prose h3 { font-size: 1.08rem; margin-top: var(--s-xl); }
.prose ul { max-width: var(--measure); padding-left: 1.15rem; }
.prose li { margin-bottom: var(--s-sm); }
.prose .updated { color: var(--ink-muted); font-size: 0.94rem; margin-bottom: var(--s-xxl); }

.callout {
  border-left: 3px solid var(--blue);
  padding: var(--s-md) 0 var(--s-md) var(--s-xl);
  margin: var(--s-xl) 0;
  color: var(--ink-muted);
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--hairline);
  padding-block: var(--s-xxl);
  color: var(--ink-muted);
  font-size: 0.94rem;
}
.footer-inner { display: flex; flex-wrap: wrap; gap: var(--s-lg); justify-content: space-between; }
.footer nav { display: flex; flex-wrap: wrap; gap: var(--s-xl); }
.footer a { color: var(--ink-muted); text-decoration: none; }
.footer a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Responsive: mobile-first, up at 768 ---------- */

@media (min-width: 768px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; }
  .feature { grid-template-columns: 1fr 1fr; }
  .feature:nth-child(even) .feature-copy { order: 2; }
  .tiers { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .nav-links { gap: var(--s-lg); font-size: 0.92rem; }
  .footer-inner { flex-direction: column; }
}
