:root {
  --ink: #171f1d;
  --muted: #66736d;
  --paper: #fbf8f1;
  --card: #ffffff;
  --line: #ded8ca;
  --green: #536f3d;
  --wine: #7b2631;
  --gold: #bf7d2b;
  --blue: #345e72;
  --shadow: 0 20px 60px rgba(23, 31, 29, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 248, 241, 0.94);
  padding: 14px clamp(18px, 4vw, 52px);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 9px;
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.1;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: flex;
  gap: 6px;
}

.nav a,
.primary,
.secondary,
.restaurant-cta a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 800;
}

.primary,
.secondary {
  min-height: 48px;
  padding: 0 18px;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.nav a {
  color: var(--muted);
}

.nav a:hover {
  background: #efe9dc;
  color: var(--ink);
}

main {
  width: calc(100% - 32px);
  max-width: 1180px;
  margin: 0 auto;
  overflow: hidden;
}

.hero {
  display: grid;
  min-height: calc(100vh - 72px);
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
  gap: 28px;
  align-items: center;
  padding: 42px 0 34px;
}

.scan-page main {
  max-width: 1100px;
}

.scan-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.86fr);
  gap: 28px;
  align-items: center;
  padding: 42px 0 34px;
}

.hero > img {
  width: 100%;
  min-height: 560px;
  max-height: 680px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.scan-hero > img {
  width: 100%;
  min-height: 500px;
  max-height: 640px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.scan-dishes {
  padding-top: 62px;
}

.scan-producers {
  padding-top: 40px;
}

.scan-trust {
  padding-top: 34px;
}

.hero-copy {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  padding: clamp(24px, 4vw, 48px);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(44px, 6vw, 78px);
  line-height: 0.98;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(31px, 4.4vw, 54px);
  line-height: 1;
}

h3 {
  margin-bottom: 10px;
  font-size: 19px;
}

.hero-copy > p:not(.eyebrow),
.section-heading p,
.dish-copy > p,
.qr-demo p,
.restaurant-cta p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.value-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.value-strip span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border: 1px solid rgba(83, 111, 61, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 850;
}

.primary {
  border: 1px solid rgba(20, 32, 30, 0.84);
  background: linear-gradient(135deg, var(--ink), #283c31 72%, #9b6a32 155%);
  color: white;
  box-shadow: 0 16px 30px rgba(20, 32, 30, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.secondary {
  border: 1px solid rgba(156, 109, 55, 0.34);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(246, 239, 226, 0.94));
  color: var(--ink);
  box-shadow: 0 10px 22px rgba(20, 32, 30, 0.08);
}

.primary:hover,
.secondary:hover {
  transform: translateY(-1px);
}

.primary:hover {
  box-shadow: 0 20px 34px rgba(20, 32, 30, 0.24), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}

.secondary:hover {
  border-color: rgba(156, 109, 55, 0.5);
  box-shadow: 0 14px 26px rgba(20, 32, 30, 0.11);
}

.intro-strip,
.section-grid,
.dish-section,
.trust-section,
.qr-demo,
.restaurant-cta {
  scroll-margin-top: 92px;
}

.intro-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}

.intro-strip div {
  border-radius: 8px;
  background: #fff;
  padding: 18px;
}

.intro-strip strong,
.intro-strip span {
  display: block;
}

.intro-strip strong {
  margin-bottom: 6px;
}

.intro-strip span {
  color: var(--muted);
  line-height: 1.45;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(2, minmax(0, 0.75fr));
  gap: 16px;
  padding: 70px 0;
}

.section-heading {
  grid-row: span 2;
  align-self: center;
  padding-right: 24px;
}

.map-card,
.producer-card,
.trust-grid article,
.qr-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  padding: 22px;
}

.map-card {
  grid-column: span 2;
}

.territory-map {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border-radius: 8px;
  background:
    radial-gradient(circle at 34% 56%, rgba(83, 111, 61, 0.16) 0 18px, transparent 19px),
    radial-gradient(circle at 58% 42%, rgba(123, 38, 49, 0.15) 0 18px, transparent 19px),
    linear-gradient(135deg, #eee5d7, #f9f4e9);
}

.territory-map::before {
  content: "";
  position: absolute;
  inset: 42px 104px 48px 82px;
  border: 3px solid rgba(23, 31, 29, 0.22);
  border-radius: 46% 54% 50% 50%;
  transform: rotate(-18deg);
}

.territory-map::after {
  content: "";
  position: absolute;
  right: 78px;
  bottom: 44px;
  width: 110px;
  height: 48px;
  border-radius: 50%;
  background: rgba(52, 94, 114, 0.12);
}

.pin {
  position: absolute;
  z-index: 1;
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 2px solid white;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  padding: 0 10px;
  box-shadow: 0 8px 18px rgba(23, 31, 29, 0.18);
  font-size: 12px;
}

.pin-oil {
  left: 26%;
  top: 48%;
  background: var(--green);
}

.pin-meat {
  left: 52%;
  top: 38%;
  background: var(--wine);
}

.pin-wine {
  left: 63%;
  top: 58%;
  background: var(--gold);
}

.pin-cheese {
  left: 36%;
  top: 66%;
  background: var(--blue);
}

.tag {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}

.declared {
  background: #f4e5d1;
  color: #71430c;
}

.documented {
  background: #dfe8d8;
  color: #31501f;
}

.verified {
  background: #dceaf0;
  color: #214c62;
}

.producer-card p,
.producer-card small,
.trust-grid p,
.dish-list p,
.dish-list li {
  color: var(--muted);
  line-height: 1.45;
}

.producer-card small {
  display: block;
  font-size: 12px;
}

.dish-section {
  border-top: 1px solid var(--line);
  padding: 70px 0;
}

.dish-copy {
  max-width: 960px;
  margin: 0 auto;
}

.dish-list {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.dish-list article {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 16px;
}

.dish-photo {
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
  border-radius: 8px;
}

.dish-detail {
  min-width: 0;
  padding: 4px 4px 4px 0;
}

.dish-title span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  background: #ead08a;
  color: #5b3a00;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.dish-title h3 {
  margin: 12px 0 8px;
}

.ingredient-grid {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.ingredient-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbf8f1;
  padding: 13px;
}

.ingredient-grid strong,
.ingredient-grid span,
.ingredient-grid em {
  display: block;
}

.ingredient-grid strong {
  margin-bottom: 5px;
  color: var(--ink);
}

.ingredient-grid span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.ingredient-grid em {
  width: fit-content;
  margin-top: 10px;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.ingredient-grid em.chip-provided {
  background: #f4e5d1;
  color: #71430c;
}

.ingredient-grid em.chip-attested {
  background: #dfe8d8;
  color: #31501f;
}

.trust-section {
  border-top: 1px solid var(--line);
  padding: 70px 0;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.trust-ease-note {
  max-width: 940px;
  margin: 18px auto 0;
  border: 1px solid rgba(98, 127, 56, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  padding: 16px 18px;
  font-size: 16px;
  line-height: 1.5;
}

.qr-demo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 70px 0;
}

.qr-card {
  text-align: center;
}

.qr-card img {
  display: block;
  width: 210px;
  height: auto;
  margin: 0 auto 14px;
}

.qr-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.restaurant-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 64px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  padding: clamp(24px, 4vw, 44px);
}

.restaurant-cta p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.76);
}

.restaurant-cta a {
  flex: 0 0 auto;
  background: white;
  color: var(--ink);
}

.footer {
  display: flex;
  width: calc(100% - 32px);
  max-width: 1180px;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 18px;
  border-top: 1px solid var(--line);
  margin: 0 auto;
  padding: 22px clamp(18px, 4vw, 52px);
  color: var(--muted);
  font-size: 13px;
}

.footer a {
  color: var(--ink);
  font-weight: 800;
}

.footer span {
  display: block;
}

@media (max-width: 920px) {
  .hero,
  .scan-hero,
  .qr-demo {
    grid-template-columns: 1fr;
  }

  .hero > img {
    min-height: 380px;
  }

  .scan-hero > img {
    min-height: 320px;
    max-height: 420px;
  }

  .section-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-heading {
    grid-column: 1 / -1;
    grid-row: auto;
  }
}

@media (max-width: 640px) {
  .topbar {
    gap: 10px;
    padding: 12px 16px;
  }

  .nav {
    flex: 0 0 auto;
    gap: 2px;
  }

  .nav a {
    min-width: 0;
    min-height: 36px;
    padding: 0 9px;
    background: #efe9dc;
    font-size: 12px;
  }

  .brand {
    flex: 1 1 auto;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand strong {
    font-size: 15px;
  }

  .brand small {
    display: none;
  }

  h1 {
    max-width: 360px;
    font-size: 37px;
    line-height: 1;
    overflow-wrap: anywhere;
  }

  h2 {
    max-width: 320px;
    font-size: 31px;
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

  .hero {
    display: flex;
    flex-direction: column;
    padding-top: 24px;
    padding-bottom: 28px;
  }

  .hero > img {
    order: 2;
    min-height: 260px;
    max-height: 330px;
  }

  .scan-hero {
    display: flex;
    flex-direction: column;
    padding-top: 24px;
    padding-bottom: 28px;
  }

  .scan-hero > img {
    order: 1;
    min-height: 260px;
    max-height: 330px;
  }

  .hero-copy {
    order: 1;
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    padding: 22px;
  }

  .hero-copy > p:not(.eyebrow),
  .section-heading p,
  .dish-copy > p,
  .qr-demo p,
  .restaurant-cta p {
    max-width: 320px;
    font-size: 16px;
    line-height: 1.48;
  }

  .value-strip span {
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
    min-height: 32px;
    padding: 0 10px;
    font-size: 12px;
  }

  .hero-actions a,
  .restaurant-cta a {
    width: 100%;
    min-height: 46px;
  }

  .intro-strip,
  .section-grid,
  .trust-grid {
    grid-template-columns: 1fr;
  }

  .map-card {
    grid-column: auto;
  }

  .territory-map {
    min-height: 220px;
  }

  .intro-strip,
  .section-grid,
  .dish-section,
  .trust-section,
  .qr-demo {
    padding: 38px 0;
  }

  .dish-copy {
    max-width: none;
  }

  .dish-list article {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .dish-photo {
    aspect-ratio: 16 / 10;
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .dish-detail {
    padding: 0;
  }

  .dish-title h3 {
    margin-top: 12px;
    font-size: 27px;
    line-height: 1.08;
  }

  .dish-title p {
    font-size: 16px;
    line-height: 1.48;
  }

  .map-card,
  .producer-card,
  .trust-grid article,
  .qr-card,
  .dish-list article {
    padding: 18px;
  }

  .qr-card img {
    width: 174px;
  }

  .restaurant-cta {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 42px;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding-right: 0;
    padding-left: 0;
  }

  .footer span {
    width: 100%;
    text-align: left;
  }
}

@media (max-width: 390px) {
  main {
    width: calc(100% - 24px);
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .nav {
    width: 100%;
  }

  .nav a {
    flex: 1;
    padding: 0 4px;
  }

  h1 {
    font-size: 34px;
  }

  .value-strip span {
    flex-basis: 100%;
  }

  .hero-copy {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
  }
}
