/* ==========================================================================
   Got Pho — gotpho.com
   Shared stylesheet. No build step, no dependencies.
   ========================================================================== */

/* --- Design tokens ------------------------------------------------------ */
:root {
  /* Palette: pulled from a bowl of phở — broth, charred onion, chili, herbs */
  --bone:        #FBF7F0;   /* page background, rice-noodle white */
  --bone-2:      #F3ECE0;   /* alternating band */
  --broth:       #2E1D14;   /* deep simmered brown — primary ink */
  --broth-soft:  #5A4536;   /* body text on light */
  --cinnamon:    #8C4A22;
  --chili:       #C1361F;   /* primary accent */
  --chili-dark:  #9A2916;
  --herb:        #3F6B45;   /* Thai basil */
  --gold:        #D9A036;   /* star anise / fat drops */
  --line:        rgba(46, 29, 20, 0.14);

  /* Type */
  --display: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Rhythm */
  --wrap: 1120px;
  --wrap-narrow: 720px;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(4rem, 9vw, 7.5rem);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(46,29,20,.06), 0 12px 32px -12px rgba(46,29,20,.22);
}

/* --- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bone);
  color: var(--broth-soft);
  font-family: var(--body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--chili); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--chili-dark); }
h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--broth);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 .6em;
  font-weight: 600;
}
h1 { font-size: clamp(2.6rem, 1.6rem + 4.4vw, 5.25rem); }
h2 { font-size: clamp(1.9rem, 1.35rem + 2.2vw, 3rem); }
h3 { font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem); }
p  { margin: 0 0 1.15em; }
ul, ol { margin: 0 0 1.15em; padding-left: 1.15em; }
li { margin-bottom: .45em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

/* --- Layout helpers ----------------------------------------------------- */
.wrap { width: min(100% - (var(--pad) * 2), var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - (var(--pad) * 2), var(--wrap-narrow)); margin-inline: auto; }
.section { padding-block: var(--section-y); }
.section--tint { background: var(--bone-2); }
.section--dark { background: var(--broth); color: rgba(251,247,240,.78); }
.section--dark h2, .section--dark h3 { color: var(--bone); }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }

.eyebrow {
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--cinnamon);
  margin: 0 0 1rem;
}
.section--dark .eyebrow { color: var(--gold); }

.lede { font-size: clamp(1.08rem, 1rem + 0.5vw, 1.3rem); color: var(--broth-soft); }
.section--dark .lede { color: rgba(251,247,240,.82); }

.rule {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: clamp(2.5rem, 6vw, 4rem) 0;
}

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 1.6rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-family: var(--body);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--chili); color: #fff; }
.btn--primary:hover { background: var(--chili-dark); color: #fff; }
.btn--ghost { border-color: var(--line); color: var(--broth); background: transparent; }
.btn--ghost:hover { border-color: var(--broth); color: var(--broth); background: rgba(46,29,20,.04); }
.section--dark .btn--ghost { border-color: rgba(251,247,240,.35); color: var(--bone); }
.section--dark .btn--ghost:hover { border-color: var(--bone); background: rgba(251,247,240,.08); }

/* --- Header / nav ------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251,247,240,.86);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: .9rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--broth);
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.brand svg { width: 30px; height: 30px; flex: none; }
.brand em { font-style: normal; color: var(--chili); }

.nav-links { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2rem); }
.nav-links a {
  color: var(--broth-soft);
  text-decoration: none;
  font-size: .93rem;
  font-weight: 500;
  padding-block: .25rem;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--broth); border-bottom-color: var(--chili); }
.nav-links a[aria-current="page"] { color: var(--broth); border-bottom-color: var(--chili); }
.nav-links .btn { padding: .55rem 1.1rem; font-size: .88rem; }
.nav-links .btn:hover { border-bottom-color: transparent; }

@media (max-width: 680px) {
  .nav { flex-direction: column; align-items: flex-start; gap: .5rem; }
  .nav-links { flex-wrap: wrap; gap: 1rem; }
}

/* --- Hero --------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3rem, 7vw, 6rem) clamp(3rem, 7vw, 5rem);
  background:
    radial-gradient(900px 480px at 78% 18%, rgba(217,160,54,.20), transparent 62%),
    radial-gradient(700px 420px at 8% 82%, rgba(193,54,31,.10), transparent 60%),
    var(--bone);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero h1 { margin-bottom: .35em; }
.hero h1 .accent { color: var(--chili); font-style: italic; }
.hero-sub { max-width: 46ch; font-size: clamp(1.08rem, 1rem + 0.5vw, 1.28rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.9rem; }
.hero-meta {
  margin-top: 2.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.hero-meta div { min-width: 90px; }
.hero-meta strong {
  display: block;
  font-family: var(--display);
  font-size: 1.65rem;
  color: var(--broth);
  line-height: 1;
}
.hero-meta span { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--cinnamon); }

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 380px; margin-inline: auto; }
}

/* Steam animation on the bowl illustration */
.steam { animation: rise 4.5s ease-in-out infinite; transform-origin: center bottom; }
.steam--2 { animation-delay: -1.5s; }
.steam--3 { animation-delay: -3s; }
@keyframes rise {
  0%   { opacity: 0;   transform: translateY(6px) scaleY(.92); }
  25%  { opacity: .55; }
  60%  { opacity: .3;  }
  100% { opacity: 0;   transform: translateY(-26px) scaleY(1.12); }
}
@media (prefers-reduced-motion: reduce) {
  .steam { animation: none; opacity: .35; }
  html { scroll-behavior: auto; }
}

/* --- Cards -------------------------------------------------------------- */
.grid { display: grid; gap: clamp(1rem, 2.4vw, 1.75rem); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 2.6vw, 2rem);
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .5rem; }
.card p:last-child { margin-bottom: 0; }
.card__tag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--herb);
  margin-bottom: .7rem;
}
.card__num {
  font-family: var(--display);
  font-size: 2.2rem;
  color: var(--gold);
  line-height: 1;
  display: block;
  margin-bottom: .5rem;
}

/* Region cards get a colored spine */
.card--region { border-left: 4px solid var(--chili); }
.card--region.is-south { border-left-color: var(--herb); }
.card--region.is-central { border-left-color: var(--gold); }

/* --- Definition rows (bowl anatomy) ------------------------------------- */
.rows { border-top: 1px solid var(--line); }
.row {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
}
.row dt {
  font-family: var(--display);
  font-size: 1.25rem;
  color: var(--broth);
  font-weight: 600;
}
.row dt small { display: block; font-family: var(--body); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--cinnamon); font-weight: 600; margin-top: .25rem; }
.row dd { margin: 0; }
@media (max-width: 640px) { .row { grid-template-columns: 1fr; gap: .5rem; } }

/* --- Pull quote --------------------------------------------------------- */
.quote {
  font-family: var(--display);
  font-size: clamp(1.4rem, 1.05rem + 1.5vw, 2.15rem);
  line-height: 1.28;
  color: var(--broth);
  border-left: 4px solid var(--gold);
  padding-left: clamp(1rem, 3vw, 2rem);
  margin: 0;
}
.section--dark .quote { color: var(--bone); }
.quote cite {
  display: block;
  font-family: var(--body);
  font-style: normal;
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cinnamon);
  margin-top: 1.1rem;
}
.section--dark .quote cite { color: var(--gold); }

/* --- Signup ------------------------------------------------------------- */
.signup {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  margin-top: 1.75rem;
}
.signup input[type="email"] {
  flex: 1 1 260px;
  min-width: 0;
  padding: .85rem 1.15rem;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: #fff;
  font-family: var(--body);
  font-size: .98rem;
  color: var(--broth);
}
.section--dark .signup input[type="email"] {
  background: rgba(251,247,240,.07);
  border-color: rgba(251,247,240,.28);
  color: var(--bone);
}
.section--dark .signup input::placeholder { color: rgba(251,247,240,.5); }
.signup input:focus { border-color: var(--gold); outline: none; }
.form-note { font-size: .82rem; margin-top: .9rem; opacity: .75; }
.form-status { font-size: .92rem; margin-top: .9rem; font-weight: 600; color: var(--gold); min-height: 1.4em; }

/* --- Footer ------------------------------------------------------------- */
.site-footer {
  background: var(--broth);
  color: rgba(251,247,240,.6);
  padding-block: clamp(2.5rem, 5vw, 4rem) 2rem;
  font-size: .9rem;
}
.site-footer a { color: rgba(251,247,240,.82); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(2, minmax(140px, .8fr));
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(251,247,240,.16);
}
.footer-grid h4 {
  color: var(--bone);
  font-family: var(--body);
  font-size: .74rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-bottom: .9rem;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: .55rem; }
.footer-brand .brand { color: var(--bone); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.5rem;
  font-size: .82rem;
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* --- Page header (interior pages) --------------------------------------- */
.page-head {
  padding-block: clamp(3rem, 6vw, 5rem) clamp(2rem, 4vw, 3rem);
  background:
    radial-gradient(700px 380px at 85% 10%, rgba(217,160,54,.18), transparent 60%),
    var(--bone);
  border-bottom: 1px solid var(--line);
}
.page-head p.lede { max-width: 62ch; }

/* --- Prose -------------------------------------------------------------- */
.prose { max-width: 68ch; }
.prose h2 { margin-top: 2.4em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.8em; }

/* --- Utility ------------------------------------------------------------ */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--broth); color: var(--bone);
  padding: .75rem 1.25rem; z-index: 100; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }
