/* =========================================================
   Tino Market — Design tokens & base styles
   ========================================================= */

:root {
  /* Color */
  --color-bg: #fbf6ee;            /* warm cream off-white */
  --color-bg-2: #f4e7d2;          /* light cream surface */
  --color-bg-card: #ffffff;
  --color-ink: #2a1a12;           /* dark brown body text */
  --color-ink-soft: #5c3d2e;
  --color-muted: #8a6a5a;
  --color-brand: #b7472a;         /* terracotta — primary */
  --color-brand-dark: #8c3520;
  --color-brand-soft: #e07a5f;    /* lighter terracotta accent */
  --color-cream: #f5dcb6;
  --color-leaf: #5a7a4e;          /* sage — "real food" accent */
  --color-mustard: #d6a740;
  --color-line: rgba(92, 61, 46, .14);

  /* Typography */
  --font-display: "Instrument Serif", "Cormorant Garamond", Georgia, serif;
  --font-ui: "Bricolage Grotesque", "Inter Tight", system-ui, sans-serif;
  --font-script: "Caveat", "Brush Script MT", cursive;

  /* Radii */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 36px;
  --r-pill: 999px;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(92, 61, 46, .07);
  --shadow-md: 0 10px 30px -10px rgba(92, 61, 46, .22);
  --shadow-lg: 0 30px 70px -24px rgba(92, 61, 46, .32);

  /* Layout */
  --maxw: 1240px;
  --gutter: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  color: var(--color-ink);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ============ Typography ============ */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.display em {
  font-style: italic;
  color: var(--color-brand);
}
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
h1 { font-size: clamp(40px, 6vw, 84px); }
h2 { font-size: clamp(30px, 4.4vw, 56px); }
h3 { font-size: clamp(22px, 2.4vw, 30px); }

.eyebrow {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-brand);
}

.script {
  font-family: var(--font-script);
  font-weight: 500;
  color: var(--color-brand);
  line-height: 1;
}

p { margin: 0 0 1em; text-wrap: pretty; }
.lead { font-size: clamp(18px, 1.6vw, 22px); color: var(--color-ink-soft); }

/* ============ Layout ============ */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.wrap--narrow { max-width: 880px; }
.section { padding: clamp(64px, 9vw, 128px) 0; }
.section--tight { padding: clamp(40px, 6vw, 80px) 0; }
.section--cream { background: var(--color-bg-2); }
.section--ink {
  background: var(--color-ink);
  color: var(--color-bg);
}
.section--ink .eyebrow { color: var(--color-cream); }
.section--ink .display em { color: var(--color-brand-soft); }
.section--terracotta {
  background: var(--color-brand);
  color: #fff5e7;
}
.section--terracotta .eyebrow { color: var(--color-cream); }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: var(--r-pill);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 16px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, color .15s ease, border-color .15s ease;
  white-space: nowrap;
  line-height: 1;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary {
  background: var(--color-brand);
  color: #fff5e7;
}
.btn--primary:hover { background: var(--color-brand-dark); }
.btn--ink {
  background: var(--color-ink);
  color: #fff5e7;
}
.btn--ink:hover { background: #1a0e08; }
.btn--ghost {
  background: transparent;
  color: var(--color-ink);
  border-color: var(--color-line);
}
.btn--ghost:hover { border-color: var(--color-ink); }
.btn--cream {
  background: var(--color-cream);
  color: var(--color-ink);
}
.btn--cream:hover { background: #ecc88e; }
.btn .arr {
  display: inline-block;
  transition: transform .15s ease;
}
.btn:hover .arr { transform: translateX(3px); }

/* ============ Header / Nav ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 246, 238, 0.88);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--color-line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 16px var(--gutter);
  max-width: var(--maxw);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: -0.01em;
  color: var(--color-ink);
}
.brand img { width: 44px; height: 44px; object-fit: contain; }
.brand b { font-weight: 400; }
.brand small {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-brand);
  display: block;
  line-height: 1;
  margin-top: 2px;
}
.brand-stack {
  display: flex;
  flex-direction: column;
  line-height: 0.95;
}
.brand-stack span:first-child { font-family: var(--font-script); font-size: 30px; color: var(--color-brand); line-height: 1; }
.brand-stack span:last-child { font-weight: 800; font-size: 16px; letter-spacing: 0.22em; }

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
  font-size: 15px;
  font-weight: 500;
}
.nav a {
  position: relative;
  color: var(--color-ink-soft);
  padding: 6px 2px;
  transition: color .15s ease;
}
.nav a:hover { color: var(--color-ink); }
.nav a.is-active {
  color: var(--color-brand);
}
.nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--color-brand);
  border-radius: 2px;
}
.nav-cta { margin-left: 8px; }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1.5px solid var(--color-line);
  border-radius: var(--r-pill);
  padding: 10px 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 980px) {
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--color-bg); padding: 12px var(--gutter) 24px; border-bottom: 1px solid var(--color-line); }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--color-line); }
  .nav-cta { margin: 12px 0 0; }
  .nav-toggle { display: inline-flex; }
}

/* ============ Dropdown nav ============ */
.has-dropdown {
  position: relative;
}
/* Invisible bridge — keeps :hover alive while crossing gap to the panel */
.has-dropdown::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: -8px;
  right: -8px;
  height: 10px;
  z-index: 51;
}
.caret {
  font-size: 10px;
  display: inline-block;
  margin-left: 3px;
  vertical-align: middle;
  opacity: .55;
  transition: transform .2s ease, opacity .2s ease;
}
.has-dropdown:hover .caret { transform: rotate(180deg); opacity: 1; }

.nav-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 100;
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}
.has-dropdown:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear 0s;
}
.nav-dropdown a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-ink-soft);
  border-bottom: none;
  white-space: nowrap;
  transition: background .12s ease, color .12s ease;
}
.nav-dropdown a:hover { background: var(--color-bg-2); color: var(--color-ink); }
.nav-dropdown a.is-active { color: var(--color-brand); font-weight: 600; }
.nav-dropdown a.is-active::after { display: none; }

@media (max-width: 980px) {
  .has-dropdown::after { display: none; }
  .has-dropdown > a { display: flex; justify-content: space-between; align-items: center; }
  .nav-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
    background: transparent;
    padding: 0 0 0 16px;
    pointer-events: auto;
    display: none;
    min-width: 0;
    z-index: auto;
    transition: none;
  }
  .has-dropdown.is-open .nav-dropdown { display: block; }
  .has-dropdown.is-open .caret { transform: rotate(180deg); opacity: 1; }
  .nav-dropdown a {
    padding: 10px 0;
    border-bottom: 1px solid var(--color-line);
    border-radius: 0;
    white-space: normal;
  }
}

/* ============ Footer ============ */
.site-footer {
  background: var(--color-ink);
  color: #d8c4b5;
  padding: 80px 0 32px;
}
.site-footer a { color: #d8c4b5; transition: color .15s; }
.site-footer a:hover { color: var(--color-cream); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(245, 220, 182, .12);
}
.footer-grid h4 {
  font-family: var(--font-ui);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-cream);
  margin-bottom: 18px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 15px; }
.footer-tag {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1.1;
  color: #fff5e7;
  margin: 12px 0 16px;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  font-size: 13px;
  color: #a08775;
  flex-wrap: wrap;
  gap: 12px;
}
@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ============ Forms ============ */
.form {
  background: var(--color-bg-card);
  border: 1px solid var(--color-line);
  border-radius: var(--r-lg);
  padding: clamp(24px, 4vw, 48px);
  box-shadow: var(--shadow-md);
}
.field { display: grid; gap: 8px; margin-bottom: 20px; }
.field label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-ink-soft);
}
.field label .req { color: var(--color-brand); }
.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: 16px;
  color: var(--color-ink);
  background: var(--color-bg);
  border: 1.5px solid var(--color-line);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  width: 100%;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.field textarea { min-height: 120px; resize: vertical; font-family: var(--font-ui); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-brand);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(183, 71, 42, .12);
}
.field .help { font-size: 13px; color: var(--color-muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }

.alert {
  padding: 16px 20px;
  border-radius: var(--r-md);
  margin-bottom: 24px;
  font-weight: 500;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.alert--success { background: rgba(90, 122, 78, .12); color: #3a5732; border: 1px solid rgba(90, 122, 78, .3); }
.alert--error { background: rgba(183, 71, 42, .10); color: var(--color-brand-dark); border: 1px solid rgba(183, 71, 42, .3); }

.radio-group { display: grid; gap: 10px; }
.radio-tile {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 16px;
  border: 1.5px solid var(--color-line);
  border-radius: var(--r-sm);
  cursor: pointer;
  background: var(--color-bg);
  transition: border-color .15s, background .15s;
}
.radio-tile:has(input:checked) {
  border-color: var(--color-brand);
  background: rgba(183, 71, 42, .06);
}
.radio-tile input { margin-top: 4px; accent-color: var(--color-brand); }
.radio-tile strong { display: block; font-size: 15px; }
.radio-tile span { font-size: 13px; color: var(--color-muted); }

/* ============ Generic page hero ============ */
.page-hero {
  padding: clamp(80px, 12vw, 160px) 0 clamp(48px, 6vw, 80px);
  text-align: left;
}
.page-hero .display { margin-bottom: 24px; }
.page-hero .lead { max-width: 720px; }
.page-hero .eyebrow { margin-bottom: 24px; display: inline-block; }

/* ============ Cards ============ */
.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-line);
  border-radius: var(--r-lg);
  padding: clamp(24px, 3vw, 36px);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card h3 { margin-bottom: 12px; font-family: var(--font-display); font-weight: 400; }

/* ============ Tag ============ */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(183, 71, 42, .1);
  color: var(--color-brand-dark);
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.tag--leaf { background: rgba(90, 122, 78, .14); color: #3a5732; }
.tag--mustard { background: rgba(214, 167, 64, .18); color: #7a5d18; }

/* ============ Marquee ============ */
.marquee {
  background: var(--color-brand);
  color: var(--color-cream);
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: clamp(22px, 3vw, 32px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 18px 0;
  overflow: hidden;
  white-space: nowrap;
  border-top: 1px solid rgba(255,255,255,.15);
  border-bottom: 1px solid rgba(255,255,255,.15);
}
.marquee__track {
  display: inline-flex;
  gap: 48px;
  animation: marquee 28s linear infinite;
  padding-right: 48px;
}
.marquee__track span { display: inline-flex; align-items: center; gap: 48px; }
.marquee__track span::after {
  content: "★";
  font-size: 14px;
  color: var(--color-cream);
  opacity: .7;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============ Stat ============ */
.stat__num {
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 80px);
  line-height: 1;
  color: var(--color-brand);
}
.stat__label {
  font-size: 14px;
  color: var(--color-ink-soft);
  margin-top: 8px;
}

/* ============ Utility ============ */
.text-center { text-align: center; }
.muted { color: var(--color-muted); }
.divider { height: 1px; background: var(--color-line); border: 0; margin: 0; }
