/* ==========================================================================
   Docaza — marketing site stylesheet
   Static site: no build step, no framework. Hand-written CSS only.
   Palette values are taken verbatim from the app design system.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand palette (exact values from the app design system) */
  --brand:            #056D6C; /* deep pine teal, sampled from logo */
  --brand-deep:       #04524F; /* darker step for hover on brand surfaces */
  --accent:           #14B8A6; /* accent teal — highlights, rules, icons */
  --accent-dark:      #0D9488; /* accent teal dark */
  --bg:               #F7F9FA; /* page background */
  --surface:          #FFFFFF; /* cards */
  --text:             #1A2733; /* text primary */
  --text-muted:       #5C6B77; /* text secondary */
  --warning:          #F59E0B; /* expiry soon */
  --urgent:           #DC2626; /* expiry imminent */

  /* Derived tints — kept close to the palette, used for soft fills only */
  --brand-tint:       #E6F2F1;
  --brand-tint-2:     #CFE7E5;
  --warning-tint:     #FEF3C7;
  --warning-ink:      #92400E;
  --urgent-tint:      #FEE2E2;
  --urgent-ink:       #991B1B;
  --neutral-tint:     #EEF1F3;

  --border:           #E2E8EC;
  --border-strong:    #CBD5DB;

  /* Radii — brief calls for 12–16px */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-pill: 999px;

  /* Spacing scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;

  --maxw: 1120px;
  --maxw-prose: 720px;

  --font: "Inter", "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI",
          Helvetica, Arial, sans-serif;
}

/* --------------------------------------------------------------------------
   2. Reset / base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px; /* clears the sticky header on anchor jumps */
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  margin: 0 0 var(--s-3);
  line-height: 1.18;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--text);
}

h1 { font-size: clamp(2.1rem, 5.2vw, 3.3rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.25rem); }
h3 { font-size: 1.14rem; letter-spacing: -0.01em; }

p { margin: 0 0 var(--s-4); }

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

ul, ol { margin: 0 0 var(--s-4); padding-left: 1.25em; }
li { margin-bottom: var(--s-2); }

strong { font-weight: 650; }

/* Visible focus for keyboard users everywhere */
:focus-visible {
  outline: 3px solid var(--accent-dark);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: #fff;
  padding: var(--s-3) var(--s-4);
  z-index: 100;
  border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus { left: 0; color: #fff; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   3. Layout helpers
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--s-5);
}

section { padding-block: var(--s-8); }
@media (min-width: 800px) { section { padding-block: var(--s-9); } }

.section-head { max-width: 640px; margin-bottom: var(--s-6); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--text-muted); margin-bottom: 0; font-size: 1.05rem; }

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

.lede { font-size: 1.14rem; color: var(--text-muted); }

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 14px var(--s-5);
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

/* White on --brand = 6.16:1 — passes WCAG AA for normal text */
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-deep); color: #fff; }

.btn-secondary {
  background: var(--surface);
  color: var(--brand);
  border-color: var(--border-strong);
}
.btn-secondary:hover { border-color: var(--brand); background: var(--brand-tint); color: var(--brand-deep); }

.btn-ghost-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}
.btn-ghost-light:hover { background: rgba(255, 255, 255, 0.12); color: #fff; border-color: #fff; }

.btn-block { width: 100%; }

/* --------------------------------------------------------------------------
   5. Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 249, 250, 0.9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  min-height: 72px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.22rem;
  letter-spacing: -0.02em;
}
/* The real horizontal lockup already contains the wordmark, so the lockup is a
   single image sized by height. Width/height are also set on the <img> itself so
   the header doesn't shift while the image loads. */
.brand-lockup img { height: 30px; width: auto; }
.brand-lockup:hover { color: var(--text); }
.brand-lockup:hover img { opacity: 0.85; }

.nav { display: flex; align-items: center; gap: var(--s-5); }
.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.97rem;
  font-weight: 550;
}
.nav a:hover { color: var(--brand); }

/* The .nav a rule above out-specifies .btn-primary, so restate the button
   colours here — otherwise the header CTA loses its white label. */
.nav a.btn { padding: 10px 18px; font-size: 0.95rem; }
.nav a.btn-primary { color: #fff; }
.nav a.btn-primary:hover { color: #fff; background: var(--brand-deep); }

/* Links collapse on small screens; the CTA stays. No JS menu needed. */
@media (max-width: 860px) { .nav .nav-link { display: none; } }

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */
.hero {
  padding-block: var(--s-7) var(--s-8);
  background:
    radial-gradient(1100px 520px at 12% -8%, var(--brand-tint) 0%, rgba(230, 242, 241, 0) 62%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  gap: var(--s-7);
  align-items: center;
}
@media (min-width: 900px) {
  .hero { padding-block: var(--s-9); }
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: var(--s-8); }
}

.hero h1 { margin-bottom: var(--s-4); max-width: 18ch; }
.hero .lede { max-width: 46ch; margin-bottom: var(--s-5); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 6px 14px 6px 10px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--brand);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: var(--s-5);
}
.pill .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); flex: none;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-5);
  margin-top: var(--s-5);
  padding: 0;
  list-style: none;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.trust-row li { display: flex; align-items: center; gap: 8px; margin: 0; }
.trust-row svg { width: 16px; height: 16px; flex: none; color: var(--brand); }

/* --------------------------------------------------------------------------
   7. Early-access form
   -------------------------------------------------------------------------- */
.signup {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-5);
  max-width: 480px;
}
.signup h2, .signup h3 { font-size: 1.05rem; margin-bottom: var(--s-2); }
.signup .help { font-size: 0.9rem; color: var(--text-muted); margin: 0; }

.field-row { display: grid; gap: var(--s-3); margin-bottom: var(--s-3); }
@media (min-width: 520px) { .field-row { grid-template-columns: 1fr auto; } }

label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 6px; }

input[type="email"], input[type="text"], textarea, select {
  width: 100%;
  padding: 13px var(--s-4);
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
}
input::placeholder, textarea::placeholder { color: #67757F; }
input:focus, textarea:focus, select:focus { border-color: var(--accent-dark); }

.form-status {
  margin: var(--s-3) 0 0;
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--brand);
}
.form-status[data-state="error"] { color: var(--urgent-ink); }
.form-status:empty { display: none; }

.signup-dark {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.24);
}
.signup-dark label, .signup-dark h3 { color: #fff; }
.signup-dark .help { color: var(--brand-tint-2); }
.signup-dark .form-status { color: #fff; }
.signup-dark input[type="email"] { border-color: rgba(255, 255, 255, 0.4); }

/* --------------------------------------------------------------------------
   8. Phone mockup (hand-coded; fictional placeholder documents only)
   -------------------------------------------------------------------------- */
.phone-stage { display: flex; justify-content: center; }

.phone {
  width: 100%;
  max-width: 336px;
  background: #0E1D24;
  border-radius: 40px;
  padding: 10px;
  border: 1px solid #223038;
  box-shadow: 0 24px 60px -28px rgba(5, 109, 108, 0.55);
}

.phone-screen {
  background: var(--bg);
  border-radius: 32px;
  overflow: hidden;
}

.phone-topbar {
  background: var(--brand);
  color: #fff;
  padding: 14px var(--s-4) var(--s-4);
}
.phone-statusline {
  display: flex; justify-content: space-between;
  font-size: 0.68rem; opacity: 0.85; margin-bottom: 10px;
}
.phone-title { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; }
.phone-sub { font-size: 0.78rem; opacity: 0.9; }

.phone-search {
  margin: var(--s-3) var(--s-4) 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 9px 14px;
  color: #67757F;
  font-size: 0.8rem;
  display: flex; align-items: center; gap: 8px;
}

.doc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: var(--s-3) var(--s-4) var(--s-5);
}

.doc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  min-height: 104px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.doc-cat {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
}
.doc-name { font-size: 0.78rem; font-weight: 650; line-height: 1.3; }
.doc-provider { font-size: 0.68rem; color: var(--text-muted); margin-top: -2px; }

.badge {
  align-self: flex-start;
  margin-top: auto;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  white-space: nowrap;
}
.badge-warning { background: var(--warning-tint); color: var(--warning-ink); }
.badge-urgent  { background: var(--urgent-tint);  color: var(--urgent-ink); }
.badge-neutral { background: var(--neutral-tint);  color: var(--text-muted); }
.badge-ok      { background: var(--brand-tint);    color: var(--brand); }

.phone-fab {
  margin: 0 var(--s-4) var(--s-4);
  background: var(--brand);
  color: #fff;
  border-radius: var(--r-pill);
  padding: 11px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 650;
}

/* --------------------------------------------------------------------------
   9. Cards / grids
   -------------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-5);
}
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--text-muted); }

.grid { display: grid; gap: var(--s-4); }
.grid-3 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: 1fr; }
@media (min-width: 700px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }
  .grid-2 { grid-template-columns: repeat(2, 1fr); gap: var(--s-5); }
}

.features { grid-template-columns: 1fr; }
@media (min-width: 620px) { .features { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .features { grid-template-columns: repeat(4, 1fr); } }

.icon-tile {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--brand-tint);
  color: var(--brand);
  margin-bottom: var(--s-4);
}
.icon-tile svg { width: 22px; height: 22px; }

.step-n {
  display: inline-grid; place-items: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: var(--s-3);
}

/* --------------------------------------------------------------------------
   10. Dark teal panel (security & privacy, closing CTA)
   -------------------------------------------------------------------------- */
.panel-dark {
  background: var(--brand);
  color: #fff;
}
.panel-dark h2, .panel-dark h3 { color: #fff; }
.panel-dark p { color: var(--brand-tint-2); }
.panel-dark .eyebrow { color: #fff; }
.panel-dark .section-head p { color: var(--brand-tint-2); }
.panel-dark .card {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.2);
}
.panel-dark .card p { color: var(--brand-tint-2); }
.panel-dark .icon-tile {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.panel-dark a { color: #fff; }

.note-line {
  font-size: 0.9rem;
  color: var(--brand-tint-2);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: var(--s-4);
  margin-top: var(--s-6);
}

/* --------------------------------------------------------------------------
   11. Pricing
   -------------------------------------------------------------------------- */
.price-grid { display: grid; gap: var(--s-4); max-width: 800px; margin-inline: auto; }
@media (min-width: 720px) { .price-grid { grid-template-columns: 1fr 1fr; gap: var(--s-5); } }

.plan { display: flex; flex-direction: column; }
.plan.featured { border-color: var(--brand); border-width: 2px; }
.plan-tag {
  align-self: flex-start;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.07em;
  text-transform: uppercase;
  background: var(--brand-tint); color: var(--brand);
  padding: 4px 10px; border-radius: var(--r-pill);
  margin-bottom: var(--s-3);
}
.plan-price {
  display: flex; align-items: baseline; gap: 6px;
  margin: var(--s-2) 0 var(--s-4);
}
.plan-price .amount { font-size: 2.4rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.plan-price .period { color: var(--text-muted); font-size: 0.95rem; }

.check-list { list-style: none; padding: 0; margin: 0 0 var(--s-5); }
.check-list li {
  display: flex; gap: 10px; align-items: flex-start;
  color: var(--text-muted); font-size: 0.97rem;
}
.check-list svg { width: 18px; height: 18px; flex: none; margin-top: 4px; color: var(--accent-dark); }
.plan .btn { margin-top: auto; }

/* --------------------------------------------------------------------------
   12. FAQ
   -------------------------------------------------------------------------- */
.faq { max-width: var(--maxw-prose); margin-inline: auto; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-4) var(--s-5);
  margin-bottom: var(--s-3);
}
.faq details[open] { border-color: var(--border-strong); }
.faq summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 1.02rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--brand);
  flex: none;
}
.faq details[open] summary::after { content: "\2013"; }
.faq details p { margin: var(--s-3) 0 0; color: var(--text-muted); }
.faq details p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-block: var(--s-7) var(--s-5);
  font-size: 0.94rem;
}
.footer-grid {
  display: grid;
  gap: var(--s-6);
  margin-bottom: var(--s-6);
}
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: var(--s-7); } }

.site-footer h2 {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--s-3);
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: var(--s-2); }
.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--brand); text-decoration: underline; }
.site-footer .about { color: var(--text-muted); max-width: 34ch; margin-bottom: 0; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: var(--s-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3) var(--s-5);
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* --------------------------------------------------------------------------
   14. Legal / support document pages
   -------------------------------------------------------------------------- */
.page-head {
  background: var(--brand);
  color: #fff;
  padding-block: var(--s-7);
}
.page-head h1 { color: #fff; font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: var(--s-2); }
.page-head p { color: var(--brand-tint-2); margin: 0; }

/* The teal page head already provides the breathing room above content */
.page-head + main > section:first-child { padding-top: var(--s-6); }

.doc {
  max-width: var(--maxw-prose);
  margin-inline: auto;
}
.doc h2 {
  font-size: 1.3rem;
  margin-top: var(--s-7);
  padding-top: var(--s-5);
  border-top: 1px solid var(--border);
}
.doc h2:first-of-type { margin-top: var(--s-5); }
.doc h3 { margin-top: var(--s-5); font-size: 1.05rem; }
.doc p, .doc li { color: #33414D; }
.doc .toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-5);
  margin-bottom: var(--s-6);
}
.doc .toc h2 { margin: 0 0 var(--s-3); border: 0; padding: 0; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.doc .toc ol { margin: 0; padding-left: 1.2em; }
.doc .toc li { margin-bottom: 6px; }

.callout {
  background: var(--warning-tint);
  border: 1px solid var(--warning);
  border-radius: var(--r-md);
  padding: var(--s-4) var(--s-5);
  margin-bottom: var(--s-6);
}
.callout p { margin: 0; color: var(--warning-ink); font-size: 0.95rem; }
.callout strong { color: var(--warning-ink); }

.callout-info {
  background: var(--brand-tint);
  border-color: var(--brand-tint-2);
}
.callout-info p { color: #124E4C; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--s-5);
  font-size: 0.95rem;
}
.data-table th, .data-table td {
  text-align: left;
  padding: var(--s-3);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.data-table th { font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; text-decoration: none;
  margin-bottom: var(--s-5);
}
.back-link:hover { text-decoration: underline; }

/* Support page bits */
.support-grid { margin-bottom: var(--s-6); }
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--r-md);
  padding: var(--s-5);
}
.contact-card .email {
  font-size: 1.14rem;
  font-weight: 700;
  word-break: break-all;
}

/* Error page */
.center-stage {
  min-height: 62vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding-block: var(--s-8);
}
.center-stage .code {
  font-size: 3.4rem; font-weight: 700; color: var(--brand);
  letter-spacing: -0.04em; line-height: 1; margin-bottom: var(--s-3);
}
