/* ==========================================================================
   CleanEats - the app's page on laserboy.com

   Colors are drawn from the app's icon and SwiftUI system palette.
   The app uses the system font; the web page does too - nothing loads
   from anywhere except the beancounter analytics script.
   ========================================================================== */

:root {
  color-scheme: dark;

  /* Brand */
  --charcoal:       #252525;
  --charcoal-raised:#2E2E2E;
  --charcoal-high:  #383838;
  --charcoal-line:  #3D3D3D;
  --green:          #43B047;
  --green-deep:     #358A37;
  --green-pale:     #9BD69C;
  --green-glow:     rgba(67, 176, 71, 0.18);
  --red:            #E84343;
  --white:          #F2F2F2;
  --muted:          #9A9A9A;

  /* Shape */
  --r-card:   24px;
  --r-button: 16px;
  --r-chip:   10px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--charcoal);
  color: var(--white);
  font-family: var(--font);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Subtle green glow behind the hero */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 55% 38% at 68% 8%, rgba(67, 176, 71, 0.09), transparent 65%);
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: var(--green);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--green-pale);
}

:focus-visible {
  outline: 3px solid var(--green-pale);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

main {
  overflow-x: clip;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 20;
  padding: 10px 16px;
  border-radius: var(--r-chip);
  background: var(--green);
  color: #111;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
  color: #111;
}

/* ---- Header ---- */

.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.brand:hover {
  color: var(--green-pale);
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  box-shadow:
    0 0 0 1px rgba(67, 176, 71, 0.35),
    0 6px 14px -6px rgba(0, 0, 0, 0.7);
}

.brand-studio img {
  width: auto;
  height: clamp(38px, 2.2vw + 30px, 46px);
  border-radius: 0;
  box-shadow: none;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 2px;
}

.site-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--r-chip);
  color: var(--muted);
  font-size: 0.975rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover {
  background: rgba(67, 176, 71, 0.14);
  color: var(--white);
}

/* ---- Shared type ---- */

.eyebrow {
  margin-bottom: 10px;
  color: var(--green);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.3;
  text-transform: uppercase;
}

h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  text-wrap: balance;
}

h3 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
}

.section {
  padding-block: clamp(56px, 8vw, 104px);
}

.section-head {
  max-width: 44rem;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.section-head p:not(.eyebrow) {
  margin-top: 14px;
  color: var(--muted);
  font-size: 1.125rem;
}

/* The app's two verdicts */
.eat  { color: var(--green); font-weight: 700; }
.skip { color: var(--red);   font-weight: 700; }

/* ---- Button ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border: 0;
  border-radius: var(--r-button);
  background: var(--green);
  box-shadow: 0 4px 0 var(--green-deep);
  color: #111;
  font-family: inherit;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.btn:hover {
  background: #4EC852;
  color: #111;
}

.btn:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 var(--green-deep);
}

/* ---- The phone bezel ---- */

.phone {
  --w: 280px;
  flex: none;
  width: var(--w);
  padding: calc(var(--w) * 0.034);
  border-radius: calc(var(--w) * 0.175);
  background: linear-gradient(145deg, #3A3A3A 0%, #191919 22%, #191919 78%, #2E2E2E 100%);
  box-shadow:
    inset 0 0 0 1px rgba(67, 176, 71, 0.14),
    0 0 0 1px #090909,
    0 34px 60px -28px rgba(0, 0, 0, 0.9),
    0 0 80px -16px rgba(67, 176, 71, 0.18);
}

.phone img {
  width: 100%;
  aspect-ratio: 1206 / 2622;
  border-radius: calc(var(--w) * 0.141);
  background: #1A1A1A;
  display: block;
}

/* ---- Store badges - live links since the app is in both stores ---- */

.store-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.store-badges .apple {
  width: 144px;
  height: 48px;
}

.store-badges .google {
  width: 184px;
  height: 71px;
  max-width: none;
  margin: -11.5px -11.5px;
}

/* ---- Hero ---- */

.hero {
  padding-block: clamp(20px, 4vw, 48px) clamp(56px, 8vw, 96px);
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(14px, 2vw, 22px);
}

.hero-brand img {
  width: clamp(52px, 7vw, 70px);
  height: clamp(52px, 7vw, 70px);
  border-radius: clamp(14px, 1.8vw, 18px);
  box-shadow:
    0 0 0 1px rgba(67, 176, 71, 0.35),
    0 12px 24px -8px rgba(0, 0, 0, 0.7);
}

.hero-brand-name {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

.tagline {
  font-size: clamp(2rem, 4.4vw, 3.125rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.lede {
  max-width: 30rem;
  margin-top: 16px;
  color: var(--muted);
  font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
  line-height: 1.55;
  text-wrap: balance;
}

.hero-actions {
  margin-top: 24px;
}

.stores {
  margin-top: 28px;
}

.stage {
  position: relative;
  display: flex;
  justify-content: flex-end;
  width: min(100%, 420px);
  margin-inline: auto;
}

.stage::before {
  content: "";
  position: absolute;
  inset: 6% -4%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(67, 176, 71, 0.2), rgba(67, 176, 71, 0));
}

.stage .phone {
  --w: clamp(236px, 26vw, 290px);
}

/* ---- How it works ---- */

.how-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.step {
  padding: clamp(22px, 2.6vw, 30px);
  border: 1px solid var(--charcoal-line);
  border-radius: var(--r-card);
  background: var(--charcoal-raised);
}

.step-num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: rgba(67, 176, 71, 0.15);
  border: 1px solid rgba(67, 176, 71, 0.4);
  color: var(--green);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

.step h3 {
  font-size: 1.125rem;
}

.step p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.975rem;
  line-height: 1.55;
}

/* ---- Bento grid ---- */

.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
}

.card {
  position: relative;
  grid-column: span 4;
  padding: clamp(22px, 2.6vw, 30px);
  border: 1px solid var(--charcoal-line);
  border-radius: var(--r-card);
  background: var(--charcoal-raised);
  overflow: hidden;
}

.card.is-green {
  border-color: rgba(67, 176, 71, 0.5);
  box-shadow:
    0 0 0 1px rgba(67, 176, 71, 0.08),
    0 24px 60px -40px rgba(67, 176, 71, 0.4);
}

.card.span-5  { grid-column: span 5; }
.card.span-7  { grid-column: span 7; }
.card.span-12 { grid-column: span 12; }

.card > p,
.card-copy > p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.975rem;
  line-height: 1.55;
}

.card-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: rgba(67, 176, 71, 0.13);
  box-shadow: inset 0 0 0 1px rgba(67, 176, 71, 0.4);
}

.card-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--green);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Stats strip inside a card */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.5vw, 32px);
  text-align: center;
}

.stat-num {
  font-size: clamp(2.25rem, 4.4vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--green);
  line-height: 1;
}

.stat-label {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
}

/* Map card: screenshot floats to the bottom */
.card.map-card {
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
}

.card.map-card .card-copy {
  margin-bottom: 20px;
}

/* Detail card: shot crop floats to the bottom */
.card.detail-card {
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
}

.card.detail-card .card-copy {
  margin-bottom: 20px;
}

/* The top of a screen, anchored to the bottom of its card; the two cards share a row and a height. */
.shot-crop {
  margin: auto auto 0;
  width: min(100%, 300px);
  height: 420px;
  border: 4px solid #101010;
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 0 0 1px rgba(67, 176, 71, 0.14);
  overflow: hidden;
  background: #1A1A1A;
}

.shot-crop img {
  width: 100%;
  aspect-ratio: 1206 / 2622;
  display: block;
}

/* EAT / SKIP verdict pills */
.verdict-pills {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.pill {
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.pill-eat {
  background: rgba(67, 176, 71, 0.18);
  border: 1px solid rgba(67, 176, 71, 0.5);
  color: var(--green);
}

.pill-skip {
  background: rgba(232, 67, 67, 0.14);
  border: 1px solid rgba(232, 67, 67, 0.4);
  color: var(--red);
}

/* Filter chip list inside a card */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}

.filter-chips li {
  padding: 5px 13px;
  border-radius: var(--r-chip);
  background: rgba(67, 176, 71, 0.1);
  border: 1px solid rgba(67, 176, 71, 0.28);
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
}

/* Promise card */
.card.promise {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  align-items: center;
  gap: 12px clamp(24px, 4vw, 56px);
  background:
    radial-gradient(80% 160% at 0% 50%, rgba(67, 176, 71, 0.16), rgba(67, 176, 71, 0) 70%),
    var(--charcoal-raised);
}

.card.promise h3 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  line-height: 1.1;
}

.card.promise p {
  margin-top: 0;
  font-size: 1.0625rem;
}

/* Quick facts row inside a card */
.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px 28px;
}

.facts h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.0625rem;
}

.facts h3 svg {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--green);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.facts p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* ---- Gallery ---- */

.gallery .section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  max-width: none;
}

.strip-nav {
  display: flex;
  flex: none;
  gap: 10px;
}

.strip-nav[hidden] {
  display: none;
}

.strip-nav button {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--charcoal-line);
  border-radius: 50%;
  background: var(--charcoal-raised);
  color: var(--white);
  cursor: pointer;
}

.strip-nav button:hover {
  border-color: var(--green);
  background: rgba(67, 176, 71, 0.14);
}

.strip-nav svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.strip {
  display: flex;
  gap: clamp(18px, 2.4vw, 28px);
  padding-block: 8px 26px;
  padding-inline: max(var(--gutter), calc((100% - var(--wrap)) / 2));
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: max(var(--gutter), calc((100% - var(--wrap)) / 2));
  scrollbar-width: thin;
  scrollbar-color: var(--charcoal-line) transparent;
  -webkit-overflow-scrolling: touch;
}

.strip::-webkit-scrollbar {
  height: 8px;
}

.strip::-webkit-scrollbar-thumb {
  border-radius: 8px;
  background: var(--charcoal-line);
}

.strip figure {
  flex: none;
  scroll-snap-align: start;
}

.strip .phone {
  --w: clamp(208px, 22vw, 244px);
  box-shadow:
    inset 0 0 0 1px rgba(67, 176, 71, 0.12),
    0 0 0 1px #090909,
    0 22px 30px -22px rgba(0, 0, 0, 0.9);
}

.strip figcaption {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 500;
  text-align: center;
}

/* ---- Closing CTA ---- */

.closing .wrap {
  display: grid;
  justify-items: center;
  text-align: center;
}

.closing h2 {
  margin-top: 0;
}

.closing .lede {
  margin-inline: auto;
  margin-top: 14px;
}

.closing .store-badges,
.closing .stores {
  justify-content: center;
}

.closing .stores {
  margin-top: 24px;
}

/* ---- Footer ---- */

.site-foot {
  margin-top: clamp(24px, 4vw, 48px);
  padding-block: 36px 44px;
  border-top: 1px solid var(--charcoal-line);
  color: var(--muted);
  font-size: 0.9375rem;
  text-align: center;
}

.site-foot ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 6px;
}

.site-foot li a {
  display: block;
  padding: 6px 10px;
  border-radius: var(--r-chip);
  color: var(--white);
  font-weight: 500;
  text-decoration: none;
}

.site-foot li a:hover {
  background: rgba(67, 176, 71, 0.14);
  color: var(--green-pale);
}

.site-foot .copyright {
  margin-top: 14px;
}

.site-foot .copyright a {
  color: var(--muted);
}

.site-foot .copyright a:hover {
  color: var(--white);
}

/* ---- Responsive ---- */

@media (max-width: 1000px) {
  .card,
  .card.span-5,
  .card.span-7 {
    grid-column: span 6;
  }

  .card.span-12,
  .card:has(.filter-chips) {
    grid-column: span 12;
  }

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

@media (max-width: 820px) {
  .hero .wrap {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    text-align: center;
  }

  .lede,
  .store-badges,
  .hero-brand {
    margin-inline: auto;
    justify-content: center;
  }

  .stage {
    width: min(100%, 300px);
    justify-content: center;
    margin-top: 8px;
    text-align: left;
  }

  .stage .phone {
    --w: 220px;
  }
}

@media (max-width: 680px) {
  .card,
  .card.span-5,
  .card.span-7 {
    grid-column: span 12;
  }

  .card.promise {
    grid-template-columns: minmax(0, 1fr);
  }

  .how-steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .stats-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 500px) {
  .stats-row {
    grid-template-columns: minmax(0, 1fr);
    text-align: left;
  }

  .site-nav .optional {
    display: none;
  }
}

@media (max-width: 374px) {
  .site-nav .optional-sm {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn {
    transition: none;
  }
}

@media print {
  body::before {
    display: none;
  }
}
