:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f6f2e9;
  color: #14211d;
  --ink: #14211d;
  --muted: #66736d;
  --line: rgba(20, 33, 29, 0.16);
  --paper: #f6f2e9;
  --white: #fffdf8;
  --accent: #087f71;
  --blue: #2563c9;
  --amber: #b65f1f;
  --warm: #c5752f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

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

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px clamp(20px, 5vw, 64px);
  color: #fffaf0;
}

.brand {
  font-size: 22px;
  font-weight: 800;
}

nav {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: clamp(12px, 2.2vw, 24px);
  font-size: 14px;
  font-weight: 650;
}

nav a {
  padding: 6px 0;
}

.nav-action {
  min-height: 34px;
  border: 1px solid rgba(255, 250, 240, 0.36);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(255, 250, 240, 0.1);
  color: #fffaf0;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.hero {
  position: relative;
  min-height: 92svh;
  display: flex;
  align-items: flex-end;
  padding: 120px clamp(20px, 7vw, 84px) 72px;
  overflow: hidden;
  color: #fffaf0;
  background:
    linear-gradient(90deg, rgba(4, 21, 17, 0.82), rgba(4, 21, 17, 0.44) 44%, rgba(4, 21, 17, 0.08)),
    url("https://images.unsplash.com/photo-1542838132-92c53300491e?auto=format&fit=crop&w=2200&q=82") center / cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 22vh;
  background: linear-gradient(transparent, var(--paper));
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  animation: enter 620ms ease-out both;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--warm);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #f5c278;
}

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

h1 {
  margin-bottom: 18px;
  font-size: clamp(68px, 13vw, 156px);
  line-height: 0.86;
  letter-spacing: 0;
}

.dek {
  max-width: 580px;
  margin-bottom: 28px;
  font-size: clamp(19px, 2.3vw, 27px);
  line-height: 1.28;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 18px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--accent);
  color: white;
}

.button.ghost {
  border-color: rgba(255, 250, 240, 0.45);
  color: #fffaf0;
}

.how-it-works {
  overflow: hidden;
  padding: 108px clamp(20px, 7vw, 84px) 116px;
  background: var(--white);
}

.how-copy {
  max-width: 760px;
  margin-bottom: 56px;
}

.how-copy p:not(.eyebrow) {
  max-width: 660px;
  color: #4f5f59;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.45;
}

.scan-map {
  position: relative;
  display: grid;
  grid-template-columns: minmax(250px, 0.86fr) minmax(280px, 1fr);
  gap: clamp(34px, 7vw, 96px);
  align-items: center;
  min-height: 620px;
}

.phone-shell {
  position: relative;
  width: min(100%, 350px);
  aspect-ratio: 0.49;
  justify-self: center;
  border: 12px solid #111614;
  border-radius: 48px;
  padding: 14px;
  background: #111614;
  box-shadow: 0 34px 90px rgba(12, 21, 18, 0.28);
  animation: phone-rise 720ms ease-out both;
}

.phone-speaker {
  position: absolute;
  top: 18px;
  left: 50%;
  width: 78px;
  height: 6px;
  border-radius: 999px;
  background: #2c3431;
  transform: translateX(-50%);
  z-index: 2;
}

.phone-screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 34px;
  padding: 54px 22px 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 38%),
    #eef4ef;
}

.camera-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 34px;
  color: #41514b;
  font-size: 13px;
  font-weight: 800;
}

.camera-bar span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(8, 127, 113, 0.12);
}

.camera-bar p,
.ingredient-label p,
.result-card p,
.result-pill p {
  margin-bottom: 0;
}

.ingredient-label {
  position: relative;
  min-height: 438px;
  border-radius: 18px;
  padding: 14px;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0) 42%),
    #f8f0dc;
  color: #17221e;
  box-shadow: inset 0 0 0 1px rgba(20, 33, 29, 0.1);
}

.package-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 2px solid rgba(20, 33, 29, 0.72);
  padding-bottom: 9px;
  color: #1a251f;
}

.package-top span {
  max-width: 116px;
  font-size: 14px;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.package-top strong {
  color: #6b4b27;
  font-size: 10px;
  text-transform: uppercase;
  white-space: nowrap;
}

.ingredients-panel {
  margin-top: 12px;
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 253, 248, 0.78);
}

.label-title {
  margin-bottom: 7px;
  color: #25322d;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.ingredients-panel p:last-child {
  color: #18231f;
  font-size: 11px;
  line-height: 1.35;
}

.facts-card {
  margin-top: 11px;
  border: 2px solid rgba(20, 33, 29, 0.82);
  border-radius: 6px;
  padding: 8px 10px 6px;
  background: #fffefa;
}

.facts-title {
  border-bottom: 4px solid #17211d;
  padding-bottom: 2px;
  color: #121a17;
  font-size: 19px;
  font-weight: 950;
  line-height: 1;
}

.serving-size {
  border-bottom: 2px solid #17211d;
  padding: 5px 0;
  color: #17211d;
  font-size: 10px;
  font-weight: 850;
}

.nutrition-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid rgba(20, 33, 29, 0.2);
  padding: 5px 0;
  font-size: 10px;
}

.nutrition-row strong {
  font-size: 10px;
}

.barcode-strip {
  display: flex;
  align-items: stretch;
  gap: 3px;
  width: 110px;
  height: 28px;
  margin: 11px auto 0;
  opacity: 0.82;
}

.barcode-strip span {
  display: block;
  width: 2px;
  background: #1c2520;
}

.barcode-strip span:nth-child(2n) {
  width: 5px;
}

.barcode-strip span:nth-child(3n) {
  width: 1px;
}

.scan-frame {
  position: absolute;
  left: 36px;
  right: 36px;
  top: 218px;
  height: 292px;
  border: 2px solid rgba(37, 99, 201, 0.72);
  border-radius: 22px;
  box-shadow: 0 0 0 999px rgba(13, 22, 19, 0.16);
}

.scan-beam {
  position: absolute;
  left: 46px;
  right: 46px;
  top: 236px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #2c7df0, transparent);
  animation: scan-pass 2.6s ease-in-out infinite;
}

.map-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.line {
  position: absolute;
  height: 2px;
  width: clamp(120px, 15vw, 230px);
  background: linear-gradient(90deg, rgba(37, 99, 201, 0.06), rgba(37, 99, 201, 0.72));
  transform-origin: left center;
}

.line::after {
  content: "";
  position: absolute;
  right: -5px;
  top: -4px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--blue);
}

.line-one {
  left: 31%;
  top: 30%;
  transform: rotate(-11deg);
}

.line-two {
  left: 32%;
  top: 48%;
  transform: rotate(2deg);
}

.line-three {
  left: 31%;
  top: 66%;
  transform: rotate(14deg);
}

.result-stack {
  display: grid;
  gap: 18px;
  max-width: 560px;
}

.result-pill,
.result-card {
  position: relative;
  border: 1px solid rgba(20, 33, 29, 0.11);
  background: rgba(255, 253, 248, 0.82);
  backdrop-filter: blur(18px);
}

.result-pill {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  align-items: center;
  border-radius: 22px;
  padding: 18px 20px;
  color: #42524c;
  box-shadow: 0 18px 50px rgba(20, 33, 29, 0.08);
}

.result-pill span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(8, 127, 113, 0.11);
  color: var(--accent);
  font-weight: 900;
}

.result-card {
  border-radius: 30px;
  padding: clamp(26px, 4vw, 38px);
  color: #15211d;
  box-shadow: 0 28px 80px rgba(20, 33, 29, 0.16);
}

.result-label {
  color: var(--amber);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.result-status {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 10px 0 16px;
  flex-wrap: wrap;
}

.result-status strong {
  color: var(--amber);
  font-size: clamp(48px, 8vw, 86px);
  line-height: 0.92;
  letter-spacing: 0;
}

.result-status span {
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(182, 95, 31, 0.11);
  color: #7b421b;
  font-weight: 850;
}

.result-card > p:last-child {
  max-width: 430px;
  color: #53645e;
  font-size: 18px;
  line-height: 1.45;
}

.workflow,
.privacy-band {
  padding: 92px clamp(20px, 7vw, 84px);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
  align-items: end;
  gap: 48px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 28px;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 0.98;
  letter-spacing: 0;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin-top: 44px;
}

.steps div {
  border-top: 3px solid var(--ink);
  padding-top: 18px;
}

.steps span {
  display: block;
  margin-bottom: 28px;
  color: var(--accent);
  font-weight: 900;
}

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

.steps p,
.profile-band p,
.privacy-band p {
  color: var(--muted);
  line-height: 1.55;
}

.profile-band,
.privacy-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 560px);
  gap: 48px;
  align-items: center;
  padding: 72px clamp(20px, 7vw, 84px);
}

.profile-band {
  background: #e7ddd0;
}

.privacy-band {
  background: #14211d;
  color: #fffaf0;
}

.privacy-band p {
  max-width: 620px;
  color: rgba(255, 250, 240, 0.72);
}

.auth-dialog {
  width: min(92vw, 520px);
  border: 0;
  border-radius: 28px;
  padding: 0;
  background: transparent;
  color: var(--ink);
}

.auth-dialog::backdrop {
  background: rgba(4, 21, 17, 0.52);
  backdrop-filter: blur(10px);
}

.auth-modal {
  position: relative;
  padding: clamp(28px, 6vw, 44px);
  border: 1px solid rgba(20, 33, 29, 0.11);
  border-radius: 28px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: 0 32px 120px rgba(4, 21, 17, 0.26);
}

.auth-modal h2 {
  max-width: 380px;
  font-size: clamp(34px, 6vw, 52px);
}

.auth-copy {
  max-width: 410px;
  margin: 18px 0 28px;
  color: #51615b;
  font-size: 18px;
  line-height: 1.48;
}

.auth-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: rgba(20, 33, 29, 0.08);
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.auth-actions {
  display: grid;
  gap: 12px;
}

.provider-button {
  min-height: 54px;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid rgba(20, 33, 29, 0.18);
  border-radius: 999px;
  padding: 0 18px;
  background: #fffefa;
  color: #17211d;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.provider-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.provider-button span:first-child {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(20, 33, 29, 0.08);
  font-weight: 950;
}

#google-button-host {
  min-height: 44px;
}

.auth-status {
  min-height: 42px;
  margin: 18px 0 0;
  color: #63716c;
  font-size: 14px;
  line-height: 1.45;
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes phone-rise {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes scan-pass {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.34;
  }
  50% {
    transform: translateY(220px);
    opacity: 1;
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
  }

  .brand {
    font-size: 16px;
  }

  nav {
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px 10px;
    max-width: 310px;
    font-size: 12px;
    line-height: 1.2;
  }

  .nav-action {
    min-height: 28px;
    padding-inline: 10px;
  }

  .hero {
    min-height: 88svh;
    padding-top: 104px;
  }

  .how-it-works {
    padding-block: 78px;
  }

  .how-copy {
    margin-bottom: 38px;
  }

  .scan-map {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .phone-shell {
    width: min(100%, 300px);
  }

  .map-lines {
    display: none;
  }

  .result-stack {
    max-width: none;
  }

  .section-heading,
  .profile-band,
  .privacy-band,
  .steps {
    grid-template-columns: 1fr;
  }

  .workflow,
  .privacy-band {
    padding-block: 64px;
  }

  .auth-dialog {
    width: calc(100vw - 28px);
  }
}
