/* ------------------------------------------------------------------
 * doctorvisit.plus — Visit+
 *
 * One stylesheet for the whole site: the one-pager and the three plain
 * pages under it (privacy, terms, support).
 *
 * The colours are the app's own. VisitDesign.swift calls the filled teal
 * `tealFill` (#1C7387 in light, a lighter ink in dark) and the app sits on
 * warm paper with white cards floating on it, so the site does too. No
 * webfont is fetched: Avenir Next is on every Apple device, which is where
 * the app runs, and the page that promises no tracking should not open a
 * connection to a font host to say so.
 * ------------------------------------------------------------------ */

:root {
  color-scheme: light dark;

  --paper:        #f4f2ec;
  --paper-deep:   #ece9e0;
  --card:         #ffffff;
  --ink:          #1c1c1e;
  --ink-soft:     #55555c;
  --ink-faint:    #8a8a90;
  --rule:         rgba(0, 0, 0, 0.10);

  --teal:         #1c7387;   /* tealFill: white type can stand on it */
  --teal-ink:     #175f6b;   /* teal words on paper */
  --teal-wash:    #e4f0f2;
  --coral:        #e2615c;   /* the recording dot, and nothing else */

  --shadow:       0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);
  --shadow-lift:  0 2px 4px rgba(0,0,0,.05), 0 18px 44px rgba(0,0,0,.10);
  --radius:       16px;
  --maxw:         1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:      #121212;
    --paper-deep: #0c0c0c;
    --card:       #1b1b1d;
    --ink:        #ececec;
    --ink-soft:   #b2b2b8;
    --ink-faint:  #85858b;
    --rule:       rgba(255, 255, 255, 0.12);

    --teal:       #2d93aa;
    --teal-ink:   #6bc7d9;
    --teal-wash:  #15303a;
    --coral:      #f0817c;

    --shadow:      0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.45);
    --shadow-lift: 0 2px 4px rgba(0,0,0,.45), 0 18px 44px rgba(0,0,0,.6);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: "Avenir Next", "Avenir", -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  background-image: url("/images/paper.jpg");
  background-size: 900px 1273px;
  background-repeat: repeat;
  overflow-x: hidden;
}
@media (prefers-color-scheme: dark) {
  /* The app ships two papers in one imageset; this is the dark one. */
  body { background-image: url("/images/paper-dark.jpg"); }
}

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

a { color: var(--teal-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { opacity: .78; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: 34px; }
h2 { font-size: 27px; }
h3 { font-size: 19px; }
p  { margin: 0 0 16px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--teal-ink);
  margin: 0 0 14px;
}

/* ---------------------------------------------------------- nav */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--rule);
}
.site-nav .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 58px;
}
.nav-home { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.nav-icon { width: 30px; height: 30px; border-radius: 8px; box-shadow: var(--shadow); }
.nav-brand { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.nav-links a { font-size: 15px; color: var(--ink-soft); text-decoration: none; }
.nav-links a:hover { color: var(--ink); opacity: 1; }
@media (max-width: 620px) { .nav-links .hide-s { display: none; } }

/* Inside the app's web view the app draws its own chrome, and the reader
   already has Visit+, so every download call-to-action goes too. */
html.in-app .site-nav,
html.in-app .site-footer,
html.in-app .cta-row,
html.in-app .cta-note,
html.in-app .closing { display: none; }

/* ---------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, opacity .12s ease;
}
.btn:hover { opacity: .9; transform: translateY(-1px); }
.btn-primary { background: var(--teal); color: #fff; box-shadow: var(--shadow); }
.btn-ghost   { background: transparent; color: var(--ink); border-color: var(--rule); }

/* The store badge only exists once the app is on the store. Until then the
   page says so, in the same spot, and nothing links to a dead listing.
   Flip <html data-release="live"> to swap them. See README. */
.cta-live { display: none; }
html[data-release="live"] .cta-live { display: inline-flex; }
html[data-release="live"] .cta-soon { display: none; }
.cta-soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 999px;
  background: var(--teal-wash);
  color: var(--teal-ink);
  font-size: 15px;
  font-weight: 600;
}
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 26px 0 12px; }
.cta-note { font-size: 14px; color: var(--ink-faint); margin: 0; }

/* ---------------------------------------------------------- hero */

.hero { padding: 56px 0 24px; }
.hero-grid { display: grid; gap: 34px; align-items: center; }
.hero h1 { font-size: 38px; margin-bottom: 16px; }
.hero-lede { font-size: 19px; color: var(--ink-soft); max-width: 34em; }
.hero-art {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
  background: var(--card);
}

@media (min-width: 860px) {
  .hero { padding: 76px 0 36px; }
  .hero h1 { font-size: 50px; }
  .hero-grid { grid-template-columns: 1fr 1fr; gap: 54px; }
}

/* ---------------------------------------------------------- steps */

.section { padding: 46px 0; }
.section-head { max-width: 40em; margin-bottom: 34px; }
.section-head p { color: var(--ink-soft); margin: 0; }

.step { padding: 30px 0; }
.step + .step { border-top: 1px solid var(--rule); }
.step-grid { display: grid; gap: 26px; align-items: center; }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
}
.step h3 { font-size: 25px; margin-bottom: 10px; }
.step p { color: var(--ink-soft); }
.step-art {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--card);
}

@media (min-width: 860px) {
  .step { padding: 44px 0; }
  .step-grid { grid-template-columns: 1fr 1.1fr; gap: 54px; }
  .step:nth-child(even) .step-copy { order: 2; }
}

/* A real screen from the app, in a frame, beside the drawing. */
.step-shot {
  margin-top: 22px;
  display: flex;
  align-items: flex-start;
  gap: 18px;
}
.phone {
  flex: 0 0 150px;
  border-radius: 22px;
  overflow: hidden;
  border: 5px solid #1d1d1f;
  background: #1d1d1f;
  box-shadow: var(--shadow-lift);
}
.phone img { border-radius: 17px; }
.step-shot figcaption {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-faint);
  align-self: center;
}
@media (max-width: 520px) { .phone { flex-basis: 124px; } }

/* ---------------------------------------------------------- privacy band */

.band {
  background: var(--teal);
  color: #fff;
  padding: 52px 0;
  margin: 30px 0;
}
.band h2 { color: #fff; }
.band p { color: rgba(255,255,255,.88); }
.band a { color: #fff; }
.band .eyebrow { color: rgba(255,255,255,.72); }
.band-grid { display: grid; gap: 22px; margin-top: 30px; }
.band-item {
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.band-item h3 { color: #fff; font-size: 17px; margin-bottom: 6px; }
.band-item p { margin: 0; font-size: 15px; }
@media (min-width: 760px) { .band-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------------------------------------------------------- cards */

.cards { display: grid; gap: 16px; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 940px) { .cards { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card h3 { font-size: 17px; margin-bottom: 6px; }
.card p { margin: 0; font-size: 15px; color: var(--ink-soft); }

.note-card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--coral);
  border-radius: var(--radius);
  padding: 24px 26px;
  box-shadow: var(--shadow);
  max-width: 44em;
}
.note-card h2 { font-size: 21px; }
.note-card p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------- faq */

.faq { max-width: 44em; }
.faq details {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 2px 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  padding: 16px 28px 16px 0;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 2px; top: 50%;
  transform: translateY(-50%);
  font-size: 21px;
  font-weight: 400;
  color: var(--teal-ink);
}
.faq details[open] summary::after { content: "\2212"; }
.faq details > p { color: var(--ink-soft); margin: 0 0 16px; font-size: 16px; }

/* ---------------------------------------------------------- closing + footer */

.closing { text-align: center; padding: 60px 0 20px; }
.closing .cta-row { justify-content: center; }
.closing-icon { width: 76px; height: 76px; border-radius: 18px; margin: 0 auto 20px; box-shadow: var(--shadow-lift); }

.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: 50px;
  padding: 30px 0 46px;
  font-size: 14px;
  color: var(--ink-faint);
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.site-footer a { color: var(--ink-faint); text-decoration: none; }
.site-footer a:hover { color: var(--ink); opacity: 1; }
.site-footer .spacer { margin-left: auto; }

/* ---------------------------------------------------------- plain pages */

.doc { max-width: 680px; margin: 0 auto; padding: 44px 20px 72px; }
.doc h1 { font-size: 30px; margin-bottom: 8px; }
.doc h2 { font-size: 20px; margin: 34px 0 10px; }
.doc h3 { font-size: 17px; margin: 24px 0 8px; }
.doc ul, .doc ol { padding-left: 22px; margin: 0 0 16px; }
.doc li { margin-bottom: 7px; }
.doc .meta { color: var(--ink-soft); font-size: 15px; margin-bottom: 26px; }
.doc .meta p { margin: 0 0 4px; }
.doc table { border-collapse: collapse; width: 100%; margin: 0 0 18px; font-size: 15px; }
.doc th, .doc td { border: 1px solid var(--rule); padding: 9px 11px; text-align: left; vertical-align: top; }
.doc th { background: var(--paper-deep); font-weight: 600; }
.doc .scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.doc hr { border: 0; border-top: 1px solid var(--rule); margin: 32px 0; }

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

.skip-link {
  position: absolute; left: -9999px;
  background: var(--teal); color: #fff;
  padding: 10px 16px; border-radius: 0 0 10px 0; z-index: 50;
}
.skip-link:focus { left: 0; top: 0; }
