/* ==========================================================================
   Tapioca Markets — mobile-first stylesheet
   No build step, no dependencies. Edit directly.
   ========================================================================== */

:root {
  --yellow: #ffc72c;
  --yellow-deep: #f2b300;
  --yellow-soft: #fff2cc;
  --ink: #141210;
  --ink-soft: #4a433c;
  --muted: #756c62;
  --cream: #fffaf0;
  --white: #ffffff;
  --green: #00873e;
  --line: #e8ddc8;

  --radius: 14px;
  --radius-lg: 24px;
  --shadow: 0 2px 4px rgba(20, 18, 16, .06), 0 12px 28px rgba(20, 18, 16, .08);
  --shadow-sm: 0 1px 2px rgba(20, 18, 16, .08), 0 4px 12px rgba(20, 18, 16, .06);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;

  --wrap: 1080px;
  --gutter: 20px;
}

/* --- reset ---------------------------------------------------------------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3 {
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 .5em;
  font-weight: 800;
}

h1 { font-size: clamp(2.1rem, 7.5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 5.5vw, 2.4rem); }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- layout helpers ------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--narrow { max-width: 720px; }

section { padding-block: clamp(48px, 9vw, 88px); }

.section-yellow { background: var(--yellow); }
.section-white  { background: var(--white); }
.section-ink    { background: var(--ink); color: var(--cream); }
.section-ink h2 { color: var(--white); }

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .9em;
}

.section-ink .eyebrow { color: var(--yellow); }
.section-yellow .eyebrow { color: rgba(20, 18, 16, .62); }

.lead {
  font-size: 1.13rem;
  color: var(--ink-soft);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--white);
  padding: 12px 18px;
  z-index: 200;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* --- header / nav --------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--yellow);
  border-bottom: 3px solid var(--ink);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 66px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
  padding-block: 8px;
}

.brand img { width: 42px; height: 42px; flex: none; }

.brand__name { line-height: 1.05; }
.brand__name small {
  display: block;
  font-size: .58rem;
  letter-spacing: .12em;
  font-weight: 800;
  text-transform: uppercase;
  opacity: .72;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-size: .85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  background: var(--ink);
  color: var(--yellow);
  border: 0;
  border-radius: 999px;
  padding: 14px 16px;
  cursor: pointer;
}

.nav-toggle__bars {
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  position: relative;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: currentColor;
}
.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after  { top: 5px; }

.site-nav {
  display: none;
  padding-bottom: 14px;
}
.site-nav[data-open="true"] { display: block; }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.site-nav a {
  display: block;
  text-decoration: none;
  font-weight: 700;
  padding: 11px 12px;
  border-radius: 10px;
}

.site-nav a:hover { background: rgba(20, 18, 16, .09); }

.site-nav a[aria-current="page"] {
  background: var(--ink);
  color: var(--yellow);
}

@media (min-width: 800px) {
  .nav-toggle { display: none; }

  /* Brand and nav share one row instead of stacking. */
  .site-header > .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
  }
  .site-header__bar { flex: 0 1 auto; min-height: 78px; }
  .brand { font-size: 1.15rem; }
  .brand img { width: 50px; height: 50px; }
  .site-nav {
    display: block !important;
    padding-bottom: 0;
  }
  .site-nav ul { flex-direction: row; gap: 4px; }
  .site-nav a { padding: 9px 14px; }
}

/* --- buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.01em;
  padding: 15px 26px;
  border-radius: 999px;
  border: 3px solid var(--ink);
  background: var(--ink);
  color: var(--yellow);
  transition: transform .12s ease;
  min-height: 52px;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
}

.section-ink .btn--ghost { color: var(--cream); border-color: var(--cream); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

/* --- hero ----------------------------------------------------------------- */

.hero {
  background: var(--yellow);
  padding-block: clamp(36px, 8vw, 72px) 0;
  overflow: hidden;
}

.hero__grid {
  display: grid;
  gap: 32px;
}

.hero h1 { margin-bottom: .35em; }

.hero__lead {
  font-size: 1.15rem;
  max-width: 34ch;
  color: rgba(20, 18, 16, .8);
}

.hero__figure {
  position: relative;
  margin: 0;
}

.hero__figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border: 3px solid var(--ink);
  border-bottom: 0;
}

/* Must outspecify `.hero__figure img` above, hence the doubled selector. */
.hero__figure img.hero__stamp {
  position: absolute;
  z-index: 2;
  top: -20px;
  right: 6px;
  width: 88px;
  height: 88px;
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  transform: rotate(-9deg);
  filter: drop-shadow(0 6px 14px rgba(20, 18, 16, .25));
}

@media (min-width: 860px) {
  .hero__grid {
    grid-template-columns: 1fr 1fr;
    align-items: end;
    gap: 48px;
  }
  .hero__copy { padding-bottom: 72px; }
  .hero__figure img.hero__stamp { width: 118px; height: 118px; top: -30px; right: -16px; }
}

/* --- credential cards ----------------------------------------------------- */

.cards {
  display: grid;
  gap: 16px;
  margin-top: 34px;
}

@media (min-width: 720px) {
  .cards { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .cards--2 { grid-template-columns: repeat(2, 1fr); }
}

.card {
  background: var(--white);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px;
  box-shadow: var(--shadow-sm);
}

.section-ink .card {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .16);
  box-shadow: none;
}

.card__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--yellow);
  margin-bottom: 14px;
}

.card__icon svg { width: 23px; height: 23px; display: block; }

.card p {
  color: var(--ink-soft);
  font-size: .98rem;
}

.section-ink .card p { color: rgba(255, 250, 240, .78); }

/* --- celiac callout ------------------------------------------------------- */

.callout {
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow);
}

.callout__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green);
  color: var(--white);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.callout ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.callout li {
  padding-left: 30px;
  position: relative;
  color: var(--ink-soft);
}

.callout li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .42em;
  width: 18px;
  height: 10px;
  border-left: 3px solid var(--green);
  border-bottom: 3px solid var(--green);
  transform: rotate(-45deg);
}

@media (min-width: 720px) {
  .callout { padding: 40px 38px; }
}

/* --- stat ----------------------------------------------------------------- */

.stat {
  text-align: center;
  max-width: 620px;
  margin-inline: auto;
}

.stat__number {
  display: block;
  font-size: clamp(3.6rem, 17vw, 6.5rem);
  font-weight: 900;
  line-height: .95;
  letter-spacing: -0.045em;
  color: var(--yellow);
}

.stat__label {
  font-size: 1.15rem;
  color: rgba(255, 250, 240, .85);
  margin-top: .4em;
}

/* --- menu ----------------------------------------------------------------- */

.menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--line);
}

.menu-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  align-items: baseline;
  padding: 20px 0;
  border-bottom: 2px solid var(--line);
}

.menu-item__name {
  font-size: 1.16rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin: 0;
}

.menu-item__price {
  font-size: 1.16rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.menu-item__desc {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: .97rem;
}

.tag {
  display: inline-block;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 8px;
  position: relative;
  top: -2px;
}

.tag--signature { background: var(--yellow); color: var(--ink); }
.tag--vegan     { background: var(--green); color: var(--white); }
.tag--veg       { background: var(--yellow-soft); color: var(--ink); border: 1px solid var(--line); }
.tag--nuts      { background: #b3261e; color: var(--white); }

.menu-group-head {
  margin: 52px 0 0;
  padding-top: 8px;
}

.menu-group-head h2 { margin-bottom: .2em; }
.menu-group-head p { color: var(--muted); font-size: .98rem; }

/* --- markets -------------------------------------------------------------- */

.market {
  background: var(--white);
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.market__body { padding: 26px 24px; }

.market__day {
  display: inline-block;
  background: var(--ink);
  color: var(--yellow);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.market__meta {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: grid;
  gap: 8px;
  color: var(--ink-soft);
  font-size: .98rem;
}

.market__note {
  display: block;
  margin-top: 4px;
  font-size: .88rem;
  color: var(--muted);
}

.market__meta strong {
  display: block;
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 800;
}

/* Directions strip. Deliberately links out to the phone's native maps app
   rather than embedding an iframe — no third-party payload, nothing to break. */
.market__links {
  display: flex;
  border-top: 2px solid var(--line);
}

.market__links a {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 60px;
  padding: 14px 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: .95rem;
  background: var(--yellow-soft);
  transition: background .12s ease;
}

.market__links a + a { border-left: 2px solid var(--line); }
.market__links a:hover { background: var(--yellow); }
.market__links svg { width: 18px; height: 18px; flex: none; }

.markets-grid { display: grid; gap: 22px; }

@media (min-width: 800px) {
  .markets-grid { grid-template-columns: 1fr 1fr; }
}

/* --- story ---------------------------------------------------------------- */

.story {
  display: grid;
  gap: 30px;
}

.story__figure { margin: 0; }

.story__figure img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 3px solid var(--ink);
}

.story__figure figcaption {
  margin-top: 10px;
  font-size: .88rem;
  color: var(--muted);
}

.prose p { color: var(--ink-soft); }

.prose h2 { margin-top: 1.4em; }
.prose h2:first-child { margin-top: 0; }

.pull {
  border-left: 5px solid var(--yellow-deep);
  padding: 6px 0 6px 20px;
  margin: 28px 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
}

@media (min-width: 860px) {
  .story {
    grid-template-columns: 400px 1fr;
    gap: 52px;
    align-items: start;
  }
  .story__figure { position: sticky; top: 100px; }
}

/* --- contact -------------------------------------------------------------- */

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--white);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform .12s ease, border-color .12s ease;
}

.contact-card:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
}

.contact-card__icon {
  width: 46px;
  height: 46px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--yellow);
}

.contact-card__icon svg { width: 24px; height: 24px; }

.contact-card strong { display: block; font-size: 1.03rem; }
.contact-card span { color: var(--muted); font-size: .93rem; }

/* --- footer --------------------------------------------------------------- */

.site-footer {
  background: var(--ink);
  color: rgba(255, 250, 240, .72);
  padding-block: 48px 36px;
  font-size: .93rem;
}

.site-footer a { color: var(--yellow); }

.site-footer__grid {
  display: grid;
  gap: 28px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}

.site-footer h3 {
  color: var(--white);
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: .9em;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.site-footer__legal {
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: space-between;
  font-size: .85rem;
  color: rgba(255, 250, 240, .5);
}

@media (min-width: 720px) {
  .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
}

/* --- page header ---------------------------------------------------------- */

.page-head {
  background: var(--yellow);
  padding-block: clamp(34px, 7vw, 62px);
  border-bottom: 3px solid var(--ink);
}

.page-head p {
  max-width: 46ch;
  font-size: 1.1rem;
  color: rgba(20, 18, 16, .78);
}

/* --- faq ------------------------------------------------------------------ */

.faq {
  display: grid;
  gap: 0;
  margin-top: 30px;
}

.faq__item {
  border-top: 2px solid var(--line);
  padding: 20px 0 4px;
}

.faq__q {
  font-size: 1.08rem;
  font-weight: 800;
  margin: 0 0 .35em;
}

.faq__a {
  margin: 0;
  color: var(--ink-soft);
  font-size: .99rem;
}

@media (min-width: 800px) {
  .faq { grid-template-columns: 1fr 1fr; column-gap: 44px; }
}

/* --- full-width photo band ------------------------------------------------ */

.band {
  margin: 30px 0 0;
}

.band img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 3px solid var(--ink);
}

.band figcaption {
  margin-top: 10px;
  font-size: .88rem;
  color: var(--muted);
}

/* --- misc ----------------------------------------------------------------- */

.note {
  font-size: .92rem;
  color: var(--muted);
  margin-top: 18px;
}

.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;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
