/* styles.css
 *
 * Shared stylesheet for the So Dental marketing website (landing page +
 * privacy / terms / support pages).
 *
 * Brand tokens are taken straight from the app's design system
 * (global.css / lib/theme.ts, ledger.md §16):
 *   primary orange  #D85A30   ink  #1a1a1a   cream/warm backgrounds
 * The display face is the Didot-style serif used in the "so dental"
 * app icon and the marketing posters; body copy uses the same system
 * font stack the app ships with. No web fonts are loaded, so the site
 * is fast, self-contained, and renders the real Didot on Apple devices.
 */

/* ------------------------------------------------------------------ */
/* Design tokens                                                       */
/* ------------------------------------------------------------------ */
:root {
  --orange: #d85a30; /* primary / CTA */
  --orange-dark: #b8431f; /* hover */
  --orange-deep: #4a1b0c; /* deep text on warm backgrounds */
  --rust: #ae4038; /* poster accent, used sparingly */

  --ink: #1a1a1a; /* foreground */
  --ink-soft: #55504c; /* secondary text */
  --muted: #8a8580; /* tertiary / captions */

  --white: #ffffff;
  --cream: #f3eee6; /* warm section background */
  --peach: #faece7; /* accent / hero wash */
  --warm: #f1efe8; /* soft secondary background */
  --off: #fafafa; /* near-white background */
  --border: #e7e3dd; /* warm hairline */
  --border-cool: #e5e5e5; /* neutral hairline */

  --green-bg: #e1f5ee; /* NHS / success */
  --green-text: #085041;

  --font-serif: 'Didot', 'Bodoni 72', 'Hoefler Text', Garamond, 'Times New Roman', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1120px;
  --shadow: 0 18px 50px -20px rgba(74, 27, 12, 0.28);
  --shadow-sm: 0 6px 20px -10px rgba(26, 26, 26, 0.18);
}

/* ------------------------------------------------------------------ */
/* Reset & base                                                        */
/* ------------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--orange);
  text-decoration: none;
}
a:hover {
  color: var(--orange-dark);
}

/* Serif display face for headings & the wordmark */
h1,
h2,
h3,
.serif {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.08;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rust);
}

/* ------------------------------------------------------------------ */
/* Buttons                                                             */
/* ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    background 0.15s ease,
    color 0.15s ease;
  white-space: nowrap;
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--orange);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--orange-dark);
  color: var(--white);
}
.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-outline:hover {
  background: var(--ink);
  color: var(--white);
}

/* ------------------------------------------------------------------ */
/* Wordmark & store badges                                             */
/* ------------------------------------------------------------------ */
.wordmark {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1;
}
.wordmark .so {
  font-style: italic;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--orange);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 7px 14px;
  border-radius: 999px;
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: var(--white);
  border-radius: 12px;
  padding: 10px 18px;
  font-family: var(--font-sans);
  min-width: 168px;
}
.store-badge:hover {
  color: var(--white);
  background: #000;
}
.store-badge svg {
  flex-shrink: 0;
}
.store-badge .top {
  font-size: 11px;
  letter-spacing: 0.04em;
  opacity: 0.85;
  line-height: 1.1;
}
.store-badge .bottom {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.15;
}
.badge-note {
  font-size: 13px;
  color: var(--muted);
  margin-top: 10px;
}

/* ------------------------------------------------------------------ */
/* Top navigation                                                      */
/* ------------------------------------------------------------------ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
}
.nav-links a {
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 500;
}
.nav-links a:hover {
  color: var(--orange);
}
.nav-cta {
  display: flex;
  align-items: center;
  gap: 14px;
}
.nav-toggle {
  display: none;
}

/* ------------------------------------------------------------------ */
/* Hero                                                                */
/* ------------------------------------------------------------------ */
.hero {
  background: linear-gradient(170deg, var(--peach) 0%, #fdf6f1 55%, var(--white) 100%);
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  padding: 72px 0 84px;
}
.hero-copy .brand-pill {
  margin-bottom: 26px;
}
.hero h1 {
  font-size: 64px;
  line-height: 1.02;
  margin-bottom: 22px;
}
.hero .lede {
  font-size: 21px;
  color: var(--ink-soft);
  max-width: 30ch;
  margin-bottom: 18px;
}
.hero .sub {
  font-size: 16px;
  color: var(--muted);
  max-width: 42ch;
  margin-bottom: 32px;
}
.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}
.hero-visual img {
  width: 100%;
  max-width: 360px;
  filter: drop-shadow(0 30px 60px rgba(74, 27, 12, 0.22));
}

/* ------------------------------------------------------------------ */
/* Generic section                                                     */
/* ------------------------------------------------------------------ */
.section {
  padding: 88px 0;
}
.section-cream {
  background: var(--cream);
}
.section-warm {
  background: var(--warm);
}
.section-head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}
.section-head.left {
  margin-left: 0;
  text-align: left;
}
.section-head .eyebrow {
  display: block;
  margin-bottom: 16px;
}
.section-head h2 {
  font-size: 44px;
  margin-bottom: 18px;
}
.section-head p {
  font-size: 18px;
  color: var(--ink-soft);
}

/* ------------------------------------------------------------------ */
/* "Who it's for" cards                                                */
/* ------------------------------------------------------------------ */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.audience-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow-sm);
}
.audience-card .ico {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--peach);
  color: var(--orange-deep);
  margin-bottom: 20px;
}
.audience-card h3 {
  font-size: 26px;
  margin-bottom: 12px;
}
.audience-card p {
  color: var(--ink-soft);
  font-size: 16px;
}

/* ------------------------------------------------------------------ */
/* Features grid                                                       */
/* ------------------------------------------------------------------ */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.feature {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}
.feature:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}
.feature .ico {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--peach);
  color: var(--orange);
  margin-bottom: 18px;
}
.feature h3 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0;
  margin-bottom: 8px;
}
.feature .tagline {
  font-family: var(--font-serif);
  font-size: 19px;
  color: var(--orange-deep);
  margin-bottom: 10px;
}
.feature p {
  color: var(--ink-soft);
  font-size: 15px;
}

/* ------------------------------------------------------------------ */
/* Screenshot showcase                                                 */
/* ------------------------------------------------------------------ */
.shots {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 8px 4px 24px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.shots::-webkit-scrollbar {
  height: 8px;
}
.shots::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 999px;
}
.shot {
  flex: 0 0 auto;
  width: 260px;
  scroll-snap-align: center;
}
.shot img {
  width: 100%;
  border-radius: 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* Branded poster gallery (orange "So Dental" ad mockups) */
.poster-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  max-width: 980px;
  margin: 0 auto;
}
.poster-grid img {
  width: 100%;
  border-radius: 18px;
  box-shadow: var(--shadow);
  display: block;
}
@media (max-width: 620px) {
  .poster-grid {
    grid-template-columns: 1fr;
    max-width: 380px;
    gap: 20px;
  }
}

/* ------------------------------------------------------------------ */
/* Trust / safety section                                              */
/* ------------------------------------------------------------------ */
.trust {
  background: var(--ink);
  color: #f4f1ee;
}
.trust .section-head h2,
.trust .wordmark {
  color: var(--white);
}
.trust .section-head .eyebrow {
  color: #f0a583;
}
.trust .section-head p {
  color: #c9c3bd;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.trust-card {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: 30px;
  background: rgba(255, 255, 255, 0.03);
}
.trust-card .ico {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(216, 90, 48, 0.18);
  color: #f0a583;
  margin-bottom: 18px;
}
.trust-card h3 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 18px;
  color: var(--white);
  margin-bottom: 10px;
}
.trust-card p {
  color: #c4beb8;
  font-size: 15px;
}

/* ------------------------------------------------------------------ */
/* FAQ                                                                 */
/* ------------------------------------------------------------------ */
.faq {
  max-width: 760px;
  margin: 0 auto;
}
.faq details {
  border-bottom: 1px solid var(--border);
  padding: 22px 4px;
}
.faq summary {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 18px;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  color: var(--ink);
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  font-size: 26px;
  color: var(--orange);
  font-weight: 400;
  line-height: 1;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after {
  transform: rotate(45deg);
}
.faq details p {
  color: var(--ink-soft);
  font-size: 16px;
  margin-top: 14px;
}

/* ------------------------------------------------------------------ */
/* CTA band                                                            */
/* ------------------------------------------------------------------ */
.cta-band {
  background: var(--orange);
  color: var(--white);
  text-align: center;
}
.cta-band h2 {
  color: var(--white);
  font-size: 46px;
  margin-bottom: 16px;
}
.cta-band p {
  font-size: 19px;
  color: rgba(255, 255, 255, 0.9);
  max-width: 46ch;
  margin: 0 auto 30px;
}
.cta-band .store-badge {
  background: var(--white);
  color: var(--ink);
}
.cta-band .store-badge:hover {
  background: #fff5ef;
  color: var(--ink);
}
.cta-band .store-badges {
  justify-content: center;
}
.cta-band .badge-note {
  color: rgba(255, 255, 255, 0.85);
}

/* ------------------------------------------------------------------ */
/* Footer                                                              */
/* ------------------------------------------------------------------ */
.footer {
  background: var(--ink);
  color: #c4beb8;
  padding: 60px 0 40px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.footer .wordmark {
  color: var(--white);
  margin-bottom: 14px;
}
.footer-blurb {
  max-width: 34ch;
  font-size: 15px;
  color: #a39d97;
}
.footer h4 {
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8a8580;
  margin-bottom: 16px;
}
.footer ul {
  list-style: none;
}
.footer ul li {
  margin-bottom: 10px;
}
.footer ul a {
  color: #d8d3ce;
  font-size: 15px;
}
.footer ul a:hover {
  color: var(--white);
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 28px;
  font-size: 13px;
  color: #8a8580;
}

/* ------------------------------------------------------------------ */
/* Legal / prose pages (privacy, terms, support)                       */
/* ------------------------------------------------------------------ */
.legal-hero {
  background: linear-gradient(170deg, var(--peach) 0%, #fdf6f1 70%, var(--white) 100%);
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--border);
}
.legal-hero .eyebrow {
  display: block;
  margin-bottom: 14px;
}
.legal-hero h1 {
  font-size: 50px;
  margin-bottom: 12px;
}
.legal-hero .updated {
  color: var(--muted);
  font-size: 15px;
}

.prose {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}
.prose > p,
.prose > ul,
.prose > ol,
.prose > table,
.prose > blockquote {
  margin-bottom: 20px;
}
.prose p {
  color: var(--ink-soft);
  font-size: 17px;
}
.prose h2 {
  font-size: 30px;
  margin: 48px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 90px;
}
.prose h3 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 20px;
  color: var(--ink);
  margin: 30px 0 12px;
}
.prose ul,
.prose ol {
  padding-left: 24px;
  color: var(--ink-soft);
}
.prose li {
  margin-bottom: 8px;
  font-size: 17px;
}
.prose strong {
  color: var(--ink);
}
.prose a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.prose th,
.prose td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.prose th {
  background: var(--warm);
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--ink);
}
.prose tr:last-child td,
.prose tbody tr:last-child td {
  border-bottom: none;
}
.prose .lead {
  font-size: 19px;
  color: var(--ink);
}

/* Inline contact / callout boxes on legal pages */
.callout {
  background: var(--peach);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 28px 0;
}
.callout p {
  color: var(--orange-deep);
}

/* Support contact cards */
.support-contacts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 8px 0 12px;
}
.support-contacts .card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 22px;
}
.support-contacts .card .label {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 4px;
}
.support-contacts .card a {
  font-size: 16px;
}

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */
@media (max-width: 880px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 48px 0 56px;
    text-align: center;
  }
  .hero .lede,
  .hero .sub {
    max-width: 100%;
  }
  .hero-actions {
    align-items: center;
  }
  .hero h1 {
    font-size: 46px;
  }
  .hero-visual {
    order: -1;
  }
  .hero-visual img {
    max-width: 260px;
  }
  .features,
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .audience-grid {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  .nav-links {
    display: none;
  }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 8px 24px 16px;
  }
  .nav-links.open li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--white);
    cursor: pointer;
  }
  .nav-cta .btn {
    display: none;
  }
  .section-head h2 {
    font-size: 34px;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }
  .container {
    padding: 0 18px;
  }
  .hero h1 {
    font-size: 38px;
  }
  .section {
    padding: 60px 0;
  }
  .features,
  .trust-grid,
  .footer-top,
  .support-contacts {
    grid-template-columns: 1fr;
  }
  .legal-hero h1 {
    font-size: 36px;
  }
  .cta-band h2 {
    font-size: 34px;
  }
  .section-head h2 {
    font-size: 30px;
  }
}
