/* MyTaste website — one shared stylesheet.
   Design system "Refined Warm" (PROJECT-NOTES §7, §12 build-spec item 9).
   Mobile first; no JavaScript anywhere on the site. */

:root {
  --cream: #FFF9F2;
  --ink: #33241F;
  --ink-soft: #7E6A5C;     /* 4.8:1 on cream */
  --ember: #D8452A;        /* button fills; white text passes AA at large/bold size */
  --coral: #FF6B4A;        /* decoration only, never text */
  --coral-text: #C93A20;   /* 4.79:1 on cream */
  --gold: #E8A020;         /* rare accent, decoration only */
  --gold-text: #8F6300;    /* 4.98:1 on cream */
  --hairline: #F0E2D6;
  --tile: #FFF6E3;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --measure: 35rem;   /* ≈ 595px → about 70 characters of 17px Inter per line */
  --gutter: 20px;
  --radius: 18px;
}

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

html {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 1.0625rem;   /* 17px body — above the 16px floor */
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01";
}

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

a {
  color: var(--coral-text);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.15em;
}
a:hover { color: var(--ink); }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--ember);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Layout ---------- */

.wrap {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

main { flex: 1 0 auto; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--hairline);
  background: rgba(255, 249, 242, 0.96);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* Anchored sections and headings stop below the sticky header, not under it. */
.section, .doc h2 { scroll-margin-top: 112px; }
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}
.brand .mark { width: 42px; height: 42px; }
.wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.875rem;
  letter-spacing: -0.01em;
  line-height: 1;
}
.wordmark .taste { color: var(--coral-text); }

.site-nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 18px;
  font-weight: 600;
  font-size: 1rem;
  white-space: nowrap;
}
.site-nav a { color: var(--ink-soft); text-decoration: none; padding: 6px 0; }
.site-nav a:hover { color: var(--ink); text-decoration: underline; }

/* Narrow phones: the brand and the three links don't share a row, so the nav
   drops to its own single line under the brand instead of wrapping mid-list. */
@media (max-width: 539px) {
  .site-header .wrap { flex-wrap: wrap; row-gap: 0; padding-bottom: 6px; }
  .brand { padding-top: 2px; }
  .site-nav { flex-basis: 100%; justify-content: flex-start; }
}

/* ---------- Hero ---------- */

.hero {
  padding: 56px 0 40px;
}
.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.25rem, 8vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  max-width: 12ch;
}
.hero .sub {
  font-size: 1.1875rem;
  line-height: 1.55;
  color: var(--ink);
  margin: 0 0 28px;
  max-width: 34rem;
}
.hero .note {
  margin: 14px 0 0;
  font-size: 1rem;
  color: var(--ink-soft);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 14px 24px;
  border-radius: 999px;
  background: var(--ember);
  color: #FFFFFF;
  font-family: var(--ui);
  font-weight: 700;
  font-size: 1.1875rem;   /* 19px bold = WCAG "large text"; white on ember is 4.30:1 */
  line-height: 1.2;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(216, 69, 42, 0.22);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.btn:hover { color: #FFFFFF; transform: translateY(-1px); box-shadow: 0 8px 22px rgba(216, 69, 42, 0.28); }
.btn:active { transform: translateY(0); }
.btn svg { width: 22px; height: 22px; flex-shrink: 0; }

/* ---------- Sections ---------- */

.section {
  padding: 40px 0;
  border-top: 1px solid var(--hairline);
}
.section h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.75rem, 5.5vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 16px;
}
.eyebrow {
  display: block;
  font-size: 0.8125rem;   /* 13px, uppercase label — above the 11px floor */
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coral-text);
  margin-bottom: 10px;
}
.section p { margin: 0 0 16px; max-width: 36rem; }
.section p:last-child { margin-bottom: 0; }
.section .btn { margin-top: 8px; }

/* How it works */

.steps {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 18px;
}
.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  align-items: start;
}
.step .icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--tile);
  display: grid;
  place-items: center;
  color: var(--coral-text);
}
.step .icon svg { width: 28px; height: 28px; }
.step h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.375rem;
  margin: 4px 0 6px;
  line-height: 1.2;
}
.step p { margin: 0; }

/* Private by default */

.promise {
  margin: 0 0 18px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--tile);
  border: 1px solid var(--hairline);
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.375rem;
  line-height: 1.3;
}
.promise .lock { color: var(--gold-text); margin-right: 6px; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 28px 0 40px;
  color: var(--ink-soft);
  font-size: 1rem;
}
.site-footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}
.site-footer a { color: var(--ink-soft); }
.site-footer a:hover { color: var(--ink); }

/* ---------- Legal pages ---------- */

.doc {
  padding: 24px var(--gutter) 56px;   /* keeps .wrap's side gutter (same specificity, later rule) */
}
.doc .back {
  display: inline-block;
  font-weight: 600;
  margin-bottom: 24px;
}
.doc h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 7vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.doc h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.625rem;
  line-height: 1.2;
  margin: 44px 0 12px;
}
.doc h2 a.anchor { color: inherit; text-decoration: none; }
.doc h2 a.anchor:hover { text-decoration: underline; text-decoration-color: var(--coral); }
.doc h3 {
  font-family: var(--ui);
  font-weight: 700;
  font-size: 1.125rem;
  margin: 28px 0 8px;
}
.doc p, .doc li { max-width: var(--measure); }
.doc p { margin: 0 0 16px; }
.doc ul, .doc ol { padding-left: 1.4em; margin: 0 0 16px; }
.doc li { margin: 0 0 8px; }
.doc strong { font-weight: 700; }
.doc hr { border: 0; border-top: 1px solid var(--hairline); margin: 32px 0; }
.doc blockquote {
  margin: 0 0 16px;
  padding: 2px 0 2px 18px;
  border-left: 3px solid var(--coral);
  color: var(--ink-soft);
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 calc(-1 * var(--gutter)) 20px;
  padding: 0 var(--gutter);
}
.doc table {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px;
  font-size: 1rem;
  line-height: 1.5;
}
.doc th, .doc td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--hairline);
}
.doc th {
  font-weight: 700;
  background: var(--tile);
  border-bottom: 2px solid var(--hairline);
}
.doc td:first-child { font-weight: 600; min-width: 8.5rem; }
.doc td:nth-child(2) { min-width: 15rem; }

/* ---------- 404 ---------- */

.lost {
  padding: 72px 0;
  text-align: left;
}
.lost h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 8vw, 3rem);
  margin: 0 0 12px;
}
.lost p { margin: 0 0 24px; color: var(--ink-soft); max-width: 32rem; }

/* ---------- Wider screens ---------- */

@media (min-width: 540px) {
  .section, .doc h2 { scroll-margin-top: 84px; }   /* single-row header is shorter */
}

@media (min-width: 640px) {
  :root { --gutter: 32px; }
  .hero { padding: 80px 0 56px; }
  .section { padding: 56px 0; }
  .steps { gap: 24px; }
  .step { grid-template-columns: 64px 1fr; gap: 20px; }
  .step .icon { width: 64px; height: 64px; }
  .site-footer .wrap { flex-direction: row; justify-content: space-between; align-items: center; }
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .btn:hover { transform: none; }
}

/* ---------- Print ---------- */

@media print {
  html, body { background: #fff; color: #000; }
  .site-header, .site-footer, .doc .back { display: none; }
  .wrap { max-width: none; padding: 0; }
  .doc { padding: 0; }
  .doc h1 { font-size: 24pt; }
  .doc h2 { font-size: 16pt; page-break-after: avoid; }
  .doc p, .doc li { max-width: none; font-size: 11pt; }
  a { color: #000; text-decoration: none; }
  .doc a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
  .table-wrap { overflow: visible; margin: 0 0 12pt; padding: 0; }
  .doc table { min-width: 0; font-size: 9.5pt; page-break-inside: auto; }
  .doc td:first-child { white-space: normal; }
  .doc tr { page-break-inside: avoid; }
  .doc th { background: #eee; }
}
