/* TearDoc pre-launch site. One stylesheet, no JavaScript.
   Colours and type follow the TearDoc brand guide (Canva "TearDoc logo redesign"),
   which wins over the app's DESIGN.md for this site.
   Contrast (WCAG 2.2): #E10B17 on #FFFFFF = 4.93:1 (AA pass for text and for white-on-red).
   #E10B17 on light tints (#F4F4F5, #FFF1F0) is only 4.48:1, so red TEXT sits on white or on the
   hero/page-band gradient (worst point #FFF6F6 = 4.64:1), never on the grey or pink tints.
   Red graphics on tints are fine (non-text needs 3:1).
   Navy #131B2D on white = 17.2:1. Muted #5D6270 on white = 6.2:1, on #F5F6F8 = 5.7:1.
   White on navy = 17.2:1. #C4C9D4 on navy = 10.35:1.
   All motion lives inside prefers-reduced-motion: no-preference, so the default is still. */

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('/assets/fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('/assets/fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/fonts/inter-latin-700-normal.woff2') format('woff2'); }

:root {
  color-scheme: light;
  --red: #E10B17;        /* brand primary */
  --red-dark: #B40A0E;   /* hover / pressed, from the logo's folded corner */
  --navy: #131B2D;       /* brand secondary, used as ink */
  --bg: #FFFFFF;         /* brand background */
  --muted: #5D6270;
  --body: #333A4A;
  --tint: #F5F6F8;
  --pink: #FFF1F0;
  --line: #E2E4E9;
  --on-navy-muted: #C4C9D4;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --shadow: 0 1px 2px rgba(19, 27, 45, .06), 0 8px 24px rgba(19, 27, 45, .08);
  --gutter: 16px;
  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
@media (min-width: 640px) { :root { --gutter: 24px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 16px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--navy);
  font-family: var(--font);
  font-size: 16px;
  line-height: 24px;      /* Body: Inter Regular 16/24 */
  overflow-wrap: break-word;
}

/* Headline: Inter Bold 40/48 (32/40 on narrow phones so long titles don't break badly) */
h1 { font-size: 32px; line-height: 40px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 16px; }
@media (min-width: 480px) { h1 { font-size: 40px; line-height: 48px; } }
/* Section title: Inter Medium 20/28 */
h2 { font-size: 20px; line-height: 28px; font-weight: 500; margin: 32px 0 8px; }
h3 { font-size: 16px; line-height: 24px; font-weight: 600; margin: 20px 0 4px; }
p, ul, ol { margin: 0 0 12px; }
ul, ol { padding-inline-start: 1.25rem; }
li { margin-bottom: 4px; }
strong { font-weight: 600; }
img, svg { max-width: 100%; }

/* Subheadline: Inter Semi Bold 28/36 */
.subheadline { font-size: 28px; line-height: 36px; font-weight: 600; letter-spacing: -0.01em; }
/* Label: Inter Medium 12/16 */
.label { font-size: 12px; line-height: 16px; font-weight: 500; }

a { color: var(--red); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; border-radius: 2px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }

/* Skip link: off-screen until focused. */
.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  background: var(--navy);
  color: var(--bg);
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
}
.skip-link:focus { top: 8px; }
.skip-link:focus-visible { outline-color: var(--red); }

/* ---------- Header: icon + wordmark + nav, per the brand guide's website header ---------- */
.site-header { position: relative; z-index: 2; background: var(--bg); border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 72px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 2px 0;
  color: var(--navy);
  text-decoration: none;
}
.brand img { flex: none; display: block; }
.wordmark { font-size: 24px; line-height: 28px; font-weight: 700; letter-spacing: -0.02em; }

.header-nav { display: flex; align-items: center; gap: 4px; }
.header-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 12px;
  color: var(--navy);
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius-md);
}
.header-nav a:hover { background: var(--tint); }
.header-nav a[aria-current="page"] { color: var(--red); text-decoration: underline; text-underline-offset: 6px; }
/* Section links only matter on wide screens; on phones the page is one scroll. */
.header-nav .nav-extra { display: none; }
@media (min-width: 640px) { .header-nav .nav-extra { display: inline-flex; } }

/* ---------- Main ---------- */
main { flex: 1; }
main:focus { outline: none; }

.prose { max-width: 70ch; }
.lead { font-size: 18px; line-height: 28px; }
.updated { color: var(--muted); margin: 0; }

/* Buttons (links styled as buttons: there are no forms on this site) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .15s, border-color .15s, transform .15s;
}
.btn svg { flex: none; }
.btn-primary { background: var(--red); color: #FFFFFF; }
.btn-primary:hover { background: var(--red-dark); }
.btn-secondary { background: var(--bg); color: var(--navy); border-color: #C9CDD6; }
.btn-secondary:hover { border-color: var(--navy); }
.btn-light { background: #FFFFFF; color: var(--navy); }
.btn-light:hover { background: var(--pink); }
.btn-light:focus-visible { outline-color: #FFFFFF; }
@media (prefers-reduced-motion: no-preference) { .btn:hover { transform: translateY(-1px); } }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 12px;
  margin: 0 0 20px;
  border: 1px solid #F6C3C6;
  border-radius: 9999px;
  background: var(--bg);
  color: var(--red);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}
.pill-dot { position: relative; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
@media (prefers-reduced-motion: no-preference) {
  .pill-dot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--red);
    animation: ping 2s cubic-bezier(0, 0, .2, 1) infinite;
  }
}
@keyframes ping { 0% { transform: scale(1); opacity: .6; } 80%, 100% { transform: scale(2.8); opacity: 0; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 40px 0 56px;
  background:
    radial-gradient(circle at 1px 1px, rgba(19, 27, 45, .09) 1px, transparent 0) 0 0 / 22px 22px,
    linear-gradient(180deg, #FFFFFF 0%, #FFF6F6 100%);
}
.hero .wrap { position: relative; display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) {
  .hero { padding: 72px 0 88px; }
  .hero .wrap { grid-template-columns: 1.05fr 1fr; gap: 48px; }
}
.hero h1 { font-size: 36px; line-height: 44px; max-width: 15ch; }
@media (min-width: 480px) { .hero h1 { font-size: 48px; line-height: 56px; } }
@media (min-width: 1024px) { .hero h1 { font-size: 56px; line-height: 64px; } }
.hero h1 .accent { color: var(--red); }
.hero .lead { max-width: 52ch; color: var(--body); margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; padding: 0; margin: 0; }
.facts li { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; font-size: 15px; }
.facts svg { flex: none; }

.hero-art { position: relative; width: 100%; max-width: 560px; margin: 0 auto; }
.hero-art svg { display: block; width: 100%; height: auto; }

/* Illustration parts (inline SVG, styled here so the CSP needs no inline styles) */
.ill-text { font-family: var(--font); font-weight: 600; fill: var(--navy); }
.ill-text-sm { font-family: var(--font); font-weight: 500; fill: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  .sig-draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.2s .5s ease-in-out forwards; }
  .pen-move { animation: pen-in 2.2s .5s ease-in-out both; }
  .float-a, .float-b, .float-c { animation: float 6s ease-in-out infinite alternate; }
  .float-b { animation-delay: -2s; animation-duration: 7s; }
  .float-c { animation-delay: -4s; animation-duration: 5.5s; }
  .pop-in { transform-box: fill-box; transform-origin: center; animation: pop .5s 2.6s cubic-bezier(.2, .9, .3, 1.4) both; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pen-in { 0% { transform: translate(-150px, 12px); } 100% { transform: translate(0, 0); } }
@keyframes float { from { transform: translateY(0); } to { transform: translateY(-8px); } }
@keyframes pop { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
@media (min-width: 900px) { .section { padding: 88px 0; } }
.section-alt { background: var(--tint); }
.section-head { max-width: 640px; margin: 0 0 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow { display: block; margin: 0 0 8px; color: var(--red); font-size: 13px; line-height: 16px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.section-alt .eyebrow { color: var(--navy); } /* red text stays on white only */
.section h2 { font-size: 28px; line-height: 36px; font-weight: 700; letter-spacing: -0.015em; margin: 0 0 12px; }
@media (min-width: 640px) { .section h2 { font-size: 36px; line-height: 44px; } }
.section-head p { color: var(--muted); font-size: 18px; line-height: 28px; margin: 0; }

/* Tools grid */
.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 16px; list-style: none; padding: 0; margin: 0; }
.tool {
  margin: 0;
  padding: 24px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.tool:hover { border-color: #F2B8BC; box-shadow: var(--shadow); }
@media (prefers-reduced-motion: no-preference) { .tool:hover { transform: translateY(-3px); } }
.tool h3 { margin: 16px 0 4px; font-size: 18px; line-height: 26px; }
.tool p { margin: 0; color: var(--muted); }
.tool-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--pink);
}
.ico { width: 28px; height: 28px; fill: none; stroke: var(--navy); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ico .a { stroke: var(--red); }
.ico .af { fill: var(--red); stroke: none; }

/* How it works */
.steps { position: relative; display: grid; gap: 20px; list-style: none; padding: 0; margin: 0; }
@media (min-width: 820px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .steps::before {
    content: "";
    position: absolute;
    top: 84px;
    left: 18%;
    right: 18%;
    border-top: 2px dashed #E7B9BC;
  }
}
.step {
  position: relative;
  margin: 0;
  padding: 28px 24px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  text-align: center;
}
.step-art { display: block; width: 140px; height: 112px; margin: 0 auto 12px; }
.step-num {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: var(--navy);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 14px;
}
.step h3 { margin: 0 0 6px; font-size: 18px; line-height: 26px; }
.step p { margin: 0 auto; max-width: 32ch; color: var(--muted); }

/* Privacy */
.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 64px; } }
.split-art { max-width: 460px; width: 100%; margin: 0 auto; }
.split-art svg { display: block; width: 100%; height: auto; }
.split p { color: var(--body); }
.checks { list-style: none; padding: 0; margin: 20px 0 0; }
.checks li { position: relative; padding-left: 36px; margin-bottom: 14px; }
/* CSS-drawn check mark: no image request, no inline style. */
.checks li::before,
.plan li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--pink);
}
.checks li::after,
.plan li::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 5px;
  width: 6px;
  height: 11px;
  border: solid var(--red);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

/* Pricing teaser */
.teaser {
  display: grid;
  gap: 20px;
  align-items: center;
  padding: 28px;
  border-radius: var(--radius-xl);
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
@media (min-width: 820px) { .teaser { grid-template-columns: auto 1fr auto; padding: 40px 48px; gap: 32px; } }
.teaser-art { display: block; width: 88px; height: 88px; }
.teaser h2 { margin: 0 0 6px; font-size: 24px; line-height: 32px; }
@media (min-width: 640px) { .teaser h2 { font-size: 28px; line-height: 36px; } }
.teaser p { margin: 0; color: var(--muted); }
.price-red { color: var(--red); }

/* Navy call to action */
.cta {
  position: relative;
  overflow: hidden;
  padding: 64px 0;
  background: var(--navy);
  color: #FFFFFF;
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .08) 1px, transparent 0) 0 0 / 22px 22px;
}
.cta .wrap { position: relative; display: grid; gap: 28px; align-items: center; }
@media (min-width: 820px) { .cta .wrap { grid-template-columns: 1fr auto; } }
.cta h2 { margin: 0 0 8px; font-size: 28px; line-height: 36px; font-weight: 700; letter-spacing: -0.015em; }
@media (min-width: 640px) { .cta h2 { font-size: 36px; line-height: 44px; } }
.cta p { margin: 0; color: var(--on-navy-muted); font-size: 18px; line-height: 28px; max-width: 56ch; }
.cta .address { color: #FFFFFF; font-weight: 600; }

/* ---------- Page title band (pricing, legal, 404) ---------- */
.page-band {
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 1px 1px, rgba(19, 27, 45, .08) 1px, transparent 0) 0 0 / 22px 22px,
    linear-gradient(180deg, #FFFFFF 0%, #FFF6F6 100%);
}
.page-band .wrap { display: flex; align-items: center; gap: 20px; }
.page-band-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.page-band-icon .ico { width: 32px; height: 32px; }
@media (max-width: 479px) { .page-band-icon { display: none; } }
.page-band h1 { margin: 0 0 4px; }
.page-band .lead { margin: 0; color: var(--body); }
.page-body { padding-top: 40px; padding-bottom: 72px; }
.page-body.pricing-body { padding-top: 56px; }

/* ---------- Pricing ---------- */
.plans { display: grid; gap: 28px 20px; margin: 0 0 48px; align-items: stretch; }
@media (min-width: 880px) { .plans { grid-template-columns: repeat(3, 1fr); } }
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: 0 1px 2px rgba(19, 27, 45, .05);
}
.plan h2 { margin: 0 0 16px; font-size: 20px; line-height: 28px; font-weight: 600; }
.plan .price { margin: 0; font-size: 40px; line-height: 48px; font-weight: 700; letter-spacing: -0.02em; }
.plan .price .per { font-size: 18px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.plan .price-note { color: var(--muted); margin: 4px 0 20px; }
@media (min-width: 880px) { .plan .price-note { min-height: 48px; } }
.plan ul { list-style: none; padding: 20px 0 0; margin: 0; border-top: 1px solid var(--line); }
.plan li { position: relative; padding-left: 36px; margin-bottom: 14px; }
.plan-tag {
  position: absolute;
  top: -14px;
  left: 28px;
  margin: 0;
  padding: 4px 12px;
  border-radius: 9999px;
  background: var(--red);
  color: #FFFFFF;
  font-size: 13px;
  line-height: 20px;
  font-weight: 600;
}
.plan.featured { background: var(--navy); border-color: var(--navy); color: #FFFFFF; box-shadow: 0 20px 40px rgba(19, 27, 45, .22); }
@media (min-width: 880px) { .plan.featured { transform: translateY(-12px); } }
.plan.featured .price-note { color: var(--on-navy-muted); }
.plan.featured ul { border-top-color: rgba(255, 255, 255, .16); }
.plan.featured li::before { background: var(--red); }
.plan.featured li::after { border-color: #FFFFFF; }
.plan.featured a { color: #FFFFFF; }
.plan.featured a:focus-visible { outline-color: #FFFFFF; }
.plan.soon { background: var(--tint); }
.plan.soon li::before { background: var(--bg); }

.plans-note { margin: -24px 0 0; font-size: 14px; line-height: 20px; color: var(--muted); }
.plans-note a { color: inherit; }

/* ---------- Footer ---------- */
.site-footer { background: var(--tint); border-top: 1px solid var(--line); padding: 40px 0 16px; color: var(--navy); }
.footer-grid { display: grid; gap: 24px; }
@media (min-width: 820px) { .footer-grid { grid-template-columns: 1.1fr 1.4fr auto; gap: 40px; } }
.footer-brand .wordmark { font-size: 20px; line-height: 24px; }
.footer-brand p { color: var(--muted); margin: 4px 0 0; max-width: 32ch; }
.site-footer address { font-style: normal; margin: 0; }
.site-footer .company { font-weight: 600; }
.site-footer address a { color: var(--navy); display: inline-flex; align-items: center; min-height: 44px; }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 0 4px; list-style: none; padding: 0; margin: 0 0 0 -12px; }
@media (min-width: 820px) { .footer-nav ul { flex-direction: column; margin: -10px 0 0 -12px; } }
.footer-nav li { margin: 0; }
.footer-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--navy); }
.footer-nav a[aria-current="page"] { font-weight: 600; }
.footer-base { margin-top: 24px; }
.footer-base p { margin: 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

@media (max-width: 359px) {
  .site-header .wrap { gap: 4px; }
  .header-nav a { padding: 0 6px; }
  .teaser { padding: 24px 20px; }
  .plan { padding: 24px 20px; }
}

/* Phones: tool cards go icon-beside-text so the list stays short. */
@media (max-width: 559px) {
  .tools { gap: 12px; }
  .tool { display: grid; grid-template-columns: 52px 1fr; column-gap: 16px; padding: 18px; }
  .tool .tool-icon { grid-row: span 2; }
  .tool h3 { margin: 0 0 2px; }
}
