/* MedTapp customer website — design tokens + layout
 *
 * Palette from .plan/mvp_launch_plan.md §8.1:
 *   teal #0D9488 (primary), amber #F59E0B (accent), ink #0F172A (text),
 *   surface #F8FAFC (backgrounds).
 *
 * Contrast notes (WCAG AA): #0D9488 on white is only ~4:1, so it is used for
 * large text and decoration; interactive text/buttons use --teal-deep
 * (#0F766E, ~5.9:1 on white). Body copy uses --ink/--muted.
 *
 * Inter is self-hosted (see assets/fonts) — no third-party font CDN, so a page
 * view sends zero requests anywhere except medtapp.com.
 */

@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/InterVariable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --teal: #0d9488;
  --teal-deep: #0f766e;
  --teal-tint: #f0fdfa;
  --amber: #f59e0b;
  --ink: #0f172a;
  --surface: #f8fafc;
  --muted: #475569;
  --line: #e2e8f0;
  --danger: #b91c1c;
  --max-w: 68rem;
  --radius: 0.75rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3 {
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
}

a {
  color: var(--teal-deep);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ------------------------------------------------------------------ header */

.site-header {
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.brand img {
  display: block;
  height: 2rem;
  width: auto;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--teal-deep);
}

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

.hero {
  padding: 4rem 0 3rem;
  background: linear-gradient(180deg, var(--surface) 0%, #fff 100%);
}

.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  margin: 0 0 0.5rem;
}

.hero .tagline {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 600;
  color: var(--teal-deep);
  margin: 0 0 1.25rem;
}

.hero .lead {
  color: var(--muted);
  max-width: 34rem;
  margin: 0 0 1.75rem;
}

.store-note {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--teal-tint);
  border: 1px solid var(--teal);
  color: var(--teal-deep);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
}

.hero-art {
  text-align: center;
}

.hero-art img {
  max-height: 22rem;
}

/* ---------------------------------------------------------------- sections */

section {
  padding: 3.5rem 0;
}

section h2 {
  font-size: clamp(1.6rem, 3vw, 2rem);
  margin: 0 0 0.75rem;
}

.section-lead {
  color: var(--muted);
  max-width: 44rem;
  margin: 0 0 2rem;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.split img {
  width: 100%;
  max-height: 20rem;
  object-fit: contain;
}

/* ------------------------------------------------------------ how it works */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}

.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.step .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.step h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

/* Feature cards below the how-it-works steps. */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.feature {
  background: #fff;
  border: 1px solid var(--teal);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.feature h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  color: var(--teal-deep);
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

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

.privacy-section {
  background: var(--teal-tint);
}

.privacy-points {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.privacy-points li {
  padding-left: 1.75rem;
  position: relative;
}

.privacy-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--teal);
}

/* ---------------------------------------------------------------- contact */

.contact-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 40rem;
}

.field {
  margin-bottom: 1.1rem;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}

.field input,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.6rem 0.75rem;
}

.field textarea {
  min-height: 8rem;
  resize: vertical;
}

/* Honeypot: visually hidden, still present in the DOM for bots. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.button {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--teal-deep);
  border: none;
  border-radius: 0.5rem;
  padding: 0.7rem 1.6rem;
  cursor: pointer;
  text-decoration: none;
}

.button:hover {
  background: var(--teal);
}

.form-error {
  background: #fef2f2;
  border: 1px solid var(--danger);
  color: var(--danger);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

/* ------------------------------------------------------------------ footer */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 2.5rem 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.site-footer .container {
  display: grid;
  gap: 0.5rem;
}

.site-footer nav {
  display: flex;
  gap: 1.5rem;
}

.site-footer a {
  color: var(--teal-deep);
}

.disclaimer {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ------------------------------------------------------------------- prose */

.prose {
  max-width: 46rem;
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
}

.prose h1 {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.prose .effective {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 2rem;
}

.prose h2 {
  font-size: 1.25rem;
  margin: 2rem 0 0.5rem;
}

.prose p,
.prose li {
  color: var(--ink);
}

/* ------------------------------------------------------- help page pieces */

.help-toc ul {
  columns: 2;
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.help-toc li {
  margin-bottom: 0.35rem;
}

/* The single-source iOS-vs-Android callout: shown at the top of the help page
   and repeated inside every tap-related section. Amber left border + surface
   background so it reads as "important note", not body text. */
.platform-callout {
  background: var(--surface, #f8fafc);
  border-left: 4px solid var(--amber, #f59e0b);
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
}

.platform-callout p {
  margin: 0.4rem 0;
}

/* FAQ items: <details> toggles, so they work with zero client-side JS. */
.help-section details {
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin: 0.6rem 0;
}

.help-section summary {
  cursor: pointer;
  font-weight: 600;
}

.help-section details > * + summary {
  margin-top: 0;
}

.help-section details p {
  margin: 0.5rem 0 0.25rem;
}

.help-section img {
  max-width: 320px;
  width: 100%;
  height: auto;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 0.75rem;
  margin: 0.75rem 0;
}

/* ------------------------------------------------------------------- misc */

.center-page {
  text-align: center;
  padding: 5rem 1.25rem;
}

.center-page h1 {
  font-size: 2rem;
}

@media (max-width: 48rem) {
  .hero .container,
  .split {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .features {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 2.5rem 0 2rem;
  }

  .site-header .container {
    flex-wrap: wrap;
  }
}
