/* Elsie marketing site — shared styles.
 * Tokens follow the Elsie Brand Guide v1.0: the "good china cabinet" palette
 * (Cream, Mahogany, Celadon, Gold, Cranberry, Heritage Teal) and its type
 * pairing (PT Serif + Source Sans 3). Everything else here is derived.
 * Every page loads this; page-specific rules stay in the page's <style>.
 */

:root {
  /* Palette — "the good china cabinet" */
  --cream: #F7F0E4;
  --card: #FFFCF7;
  --ink: #4A2E27;           /* the guide has no separate ink: Mahogany is "Text / grounding" */
  --muted: #6E655D;
  --line: #E6DBC8;
  --line-strong: #D4C5AC;
  --celadon: #9CAF98;
  --celadon-ink: #233421;
  --gold: #B98D3E;
  --gold-ink: #7A5A22;      /* gold as *text* on cream: 5.6:1 (raw gold is 2.7:1) */
  --gold-bright: #D8B25E;   /* gold as text/button on the mahogany bands: 6.1:1 */
  --cranberry: #8E3B3F;
  --mahogany: #4A2E27;
  --mahogany-hover: #5C3A30;
  --on-mahogany: #F7F0E4;
  --on-mahogany-muted: #D9C8B2;
  --accent-soft: #F1E7D6;
  --success: #3F6B3A;

  /* Semantic roles — components use these, not raw colors */
  --heading: var(--mahogany);
  --btn-bg: var(--mahogany);
  --btn-bg-hover: var(--mahogany-hover);
  --btn-fg: var(--on-mahogany);
  --deep: var(--mahogany);             /* dark bands: final CTA, footer, about card */
  --on-deep: var(--on-mahogany);
  --on-deep-muted: var(--on-mahogany-muted);
  --nav-bg: rgba(247, 240, 228, .9);
  --placeholder: #9A8F84;

  /* Heritage tile colors used in the phone mockup and feature icons */
  --t-phone: #4E6E3E;
  --t-text: #3A6488;
  --t-camera: #2C6E62;
  --t-photos: #7A4A64;
  --t-allapps: #5A5470;
  --t-contacts: #565989;   /* slate = Contacts; cranberry is Favorites/people */
  --t-meds: #2E6A86;
  --t-web: #3B6E4A;

  /* Type */
  --serif: "PT Serif", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Spacing scale (8px base). Use these — never ad-hoc pixel values. */
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;

  /* Layout */
  --wrap: 1140px;
  --wrap-narrow: 760px;
  --gutter: var(--s-6);
  --section: var(--s-9);
  --radius: 20px;
  --radius-sm: 12px;
  --nav-h: 76px;
  --shadow-lg: 0 28px 60px rgba(42, 30, 25, .22);
  --shadow-sm: 0 6px 18px rgba(42, 30, 25, .08);
}

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

/* Light only, by decision: the cream palette is the brand; the mahogany bands
 * (footer, final CTA, contact card) are the site's only dark surfaces. */
html { scroll-behavior: smooth; color-scheme: light; -webkit-text-size-adjust: 100%; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.wrap-narrow { max-width: var(--wrap-narrow); }

.skip {
  position: absolute; left: var(--s-4); top: -100px; z-index: 100;
  background: var(--btn-bg); color: var(--btn-fg);
  padding: var(--s-3) var(--s-4); border-radius: var(--radius-sm); text-decoration: none; font-weight: 700;
}
.skip:focus { top: var(--s-4); }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 700; color: var(--heading); letter-spacing: -.015em; }
h1 { font-size: clamp(40px, 5.6vw, 60px); line-height: 1.08; }
h2 { font-size: clamp(30px, 3.6vw, 40px); line-height: 1.15; }
h3 { font-size: 20px; line-height: 1.3; }
.lede { font-size: 19px; color: var(--muted); max-width: 34em; }
h1 + .lede, h2 + .lede { margin-top: var(--s-5); }
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: 0 var(--s-5); border-radius: 999px; border: 1.5px solid transparent;
  background: var(--btn-bg); color: var(--btn-fg);
  font: 700 16px/1 var(--sans); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { background: var(--btn-bg-hover); }
.btn:active { transform: scale(.98); }
.btn:disabled { cursor: default; opacity: .9; }
.btn-ghost { background: transparent; color: var(--heading); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--accent-soft); border-color: var(--heading); }
.btn-gold { background: var(--gold-bright); color: var(--mahogany); }
.btn-gold:hover { background: #E4C070; }
.btn-sm { min-height: 40px; padding: 0 var(--s-4); font-size: 15px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); height: var(--nav-h); }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 44px; width: auto; }
.nav-links { display: flex; gap: var(--s-6); font-size: 16px; font-weight: 600; color: var(--muted); }
.nav-links a { text-decoration: none; }
.nav-links a:hover { color: var(--heading); }

/* ---------- sections ---------- */
.section { padding-top: var(--section); padding-bottom: var(--section); }
.band { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band + .band { border-top: 0; }
.section-head { max-width: 640px; }
.section-head.center { margin-left: auto; margin-right: auto; }
.section-head + * { margin-top: var(--s-8); }

/* ---------- footer (single row) ---------- */
.footer { background: var(--deep); color: var(--on-deep-muted); padding: var(--s-6) 0; font-size: 15px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4) var(--s-6); flex-wrap: wrap; }
.footer .brand img { height: 28px; }
.footer-links { display: flex; gap: var(--s-5); flex-wrap: wrap; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--on-deep); }
.footer-copy { font-size: 14px; opacity: .8; text-decoration: none; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: var(--s-2); }
.field label { font-weight: 600; font-size: 15px; }
.field input, .field textarea {
  width: 100%; min-height: 48px; padding: var(--s-3) var(--s-4); border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
  font: 16px/1.5 var(--sans); background: var(--card); color: var(--ink);
}
.field input::placeholder, .field textarea::placeholder { color: var(--placeholder); }
.field textarea { min-height: 160px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 3px solid var(--gold); outline-offset: 0; border-color: transparent; }
.field input:disabled, .field textarea:disabled { opacity: .7; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.status { display: block; font-size: 15px; margin-top: var(--s-3); min-height: 1.4em; font-weight: 600; }
.status[data-tone="ok"] { color: var(--success); }
.status[data-tone="error"] { color: var(--cranberry); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  :root { --section: var(--s-8); --nav-h: 68px; }
  .nav-links { display: none; }
  .section-head + * { margin-top: var(--s-7); }
}
@media (max-width: 600px) {
  :root { --gutter: 20px; --section: var(--s-7); }
  body { font-size: 16px; }
  .lede { font-size: 17px; }
  .brand img { height: 37px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- reCAPTCHA ---------- */
/* Google permits hiding the floating badge only when the attribution text is
   shown in the user flow instead; every form carries .recaptcha-note for that. */
.grecaptcha-badge { visibility: hidden; }
.recaptcha-note { font-size: 13px; color: var(--muted); margin-top: var(--s-3); }
.recaptcha-note a { color: inherit; }
