/*
 * PantryPulse marketing site stylesheet.
 *
 * Isolated from the mobile app's styles (public/styles.css). Edit freely
 * here without affecting Android/iOS builds.
 */

:root {
  --bg: #f7fbf9;
  --bg-soft: #eef8f3;
  --ink: #12312a;
  --muted: #5d746e;
  --green: #0f7b5f;
  --green-dark: #095742;
  --green-bright: #14aa7a;
  --mint: #d8f5e9;
  --teal: #1179a8;
  --amber: #f2a83b;
  --orange: #ef7b45;
  --rose: #e86565;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(13, 70, 55, 0.12);
  --shadow-soft: 0 8px 24px rgba(13, 70, 55, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    "Inter",
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, #e2fff1 0, transparent 30%),
    radial-gradient(circle at top right, #e7f7ff 0, transparent 28%),
    var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

/* ---------- Layout containers ---------- */

.site-header,
.hero,
.section,
.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.section {
  padding: 64px 0;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 16px 0;
  background: rgba(247, 251, 249, 0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(15, 123, 95, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 850;
  letter-spacing: -0.03em;
  font-size: 1.05rem;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--green), #25c58f);
  color: #fff;
  font-weight: 900;
  font-size: 1.1rem;
  box-shadow: 0 8px 18px rgba(15, 123, 95, 0.25);
}

.site-nav {
  display: flex;
  gap: 22px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.site-nav a:hover {
  color: var(--green-dark);
}

/* ---------- Buttons ---------- */

.btn,
.store-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 13px 20px;
  font-weight: 800;
  font-size: 0.98rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

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

.btn-primary {
  background: var(--green);
  color: var(--white);
  box-shadow: 0 12px 24px rgba(15, 123, 95, 0.22);
}

.btn-primary:hover {
  background: var(--green-dark);
}

.btn-secondary {
  background: var(--white);
  color: var(--green-dark);
  border-color: rgba(15, 123, 95, 0.15);
}

.btn-secondary:hover {
  border-color: rgba(15, 123, 95, 0.4);
}

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

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  padding: 72px 0 56px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  color: var(--green-dark);
  background: var(--mint);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 850;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.section-kicker.on-dark {
  color: var(--mint);
  background: rgba(255, 255, 255, 0.12);
}

h1 {
  font-size: clamp(2.5rem, 5.4vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  margin: 18px 0 22px;
}

h2 {
  font-size: clamp(1.85rem, 3.4vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin: 12px 0 16px;
}

h3 {
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

.lede,
.section-lede {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 60ch;
}

.section p,
.hero p {
  color: var(--muted);
}

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

/* ---------- Phone preview card ---------- */

.phone-preview {
  display: flex;
  justify-content: center;
}

.phone-card {
  background: var(--white);
  border: 1px solid rgba(15, 123, 95, 0.1);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 22px;
  width: 100%;
  max-width: 440px;
}

.scan-panel {
  background: linear-gradient(150deg, #0f7b5f, #14aa7a);
  color: white;
  border-radius: 24px;
  padding: 22px;
  margin-bottom: 16px;
}

.scan-panel .mini-label {
  margin: 0 0 6px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

.scan-panel h2 {
  color: white;
  font-size: 1.4rem;
  line-height: 1.15;
  margin: 0 0 14px;
}

.barcode-box {
  height: 110px;
  border: 2px dashed rgba(255, 255, 255, 0.6);
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-weight: 900;
  letter-spacing: 0.18em;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.88);
}

.metric-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr);
}

.metric {
  background: var(--bg-soft);
  border-radius: 16px;
  padding: 14px;
}

.metric span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.metric strong {
  display: block;
  margin-top: 4px;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.info-note {
  margin-top: 14px;
  background: #eaf8f1;
  color: var(--green-dark);
  border-radius: 18px;
  padding: 14px 16px;
}

.info-note strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.info-note p {
  margin: 0;
  color: var(--green-dark);
  font-size: 0.92rem;
}

/* ---------- Card grids ---------- */

.card-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 28px;
}

.card-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.info-card {
  background: var(--white);
  border: 1px solid rgba(15, 123, 95, 0.1);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  padding: 24px;
}

.info-card p {
  margin: 0;
  font-size: 0.98rem;
}

.icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--mint);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}

/* ---------- Dark section (carbs/sugar/fiber) ---------- */

.dark-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
  background: linear-gradient(160deg, #0f3a30 0%, #102d26 100%);
  color: white;
  border-radius: 34px;
  padding: 40px;
  box-shadow: var(--shadow);
}

.dark-section h2 {
  color: white;
}

.dark-section p {
  color: rgba(255, 255, 255, 0.82);
}

.disclaimer.on-dark {
  color: rgba(255, 255, 255, 0.65);
}

.flow-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 26px;
  padding: 22px;
}

.flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  text-align: center;
}

.flow span {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 14px 10px;
  font-weight: 800;
  font-size: 0.92rem;
}

.flow b {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.4rem;
}

.fiber-note {
  margin-top: 16px;
  background: rgba(216, 245, 233, 0.15);
  border-radius: 18px;
  padding: 14px 16px;
}

.fiber-note strong {
  display: block;
  color: white;
  margin-bottom: 4px;
}

.fiber-note p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.95rem;
}

/* ---------- Density grid ---------- */

.density-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 28px;
}

.density-card {
  background: var(--white);
  border: 1px solid rgba(15, 123, 95, 0.1);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.density-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.density-card h3 {
  font-size: 2rem;
  letter-spacing: -0.04em;
  margin: 0;
}

.density-card p {
  margin: 4px 0 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.density-card.low {
  border-top: 6px solid #20a86b;
}
.density-card.low .density-tag {
  background: rgba(32, 168, 107, 0.14);
  color: #1b8a58;
}

.density-card.medium {
  border-top: 6px solid var(--amber);
}
.density-card.medium .density-tag {
  background: rgba(242, 168, 59, 0.18);
  color: #b8771a;
}

.density-card.high {
  border-top: 6px solid var(--orange);
}
.density-card.high .density-tag {
  background: rgba(239, 123, 69, 0.18);
  color: #b8561e;
}

.density-card.very-high {
  border-top: 6px solid var(--rose);
}
.density-card.very-high .density-tag {
  background: rgba(232, 101, 101, 0.18);
  color: #b03d3d;
}

/* ---------- Marker grid ---------- */

.marker-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(5, 1fr);
  margin-top: 28px;
}

.marker-card {
  background: var(--white);
  border: 1px solid rgba(15, 123, 95, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.marker-icon {
  font-size: 1.6rem;
  margin-bottom: 4px;
}

.marker-card strong {
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.marker-card span:not(.marker-icon) {
  color: var(--muted);
  font-size: 0.92rem;
}

.callout {
  margin-top: 28px;
  background: var(--bg-soft);
  border: 1px solid rgba(15, 123, 95, 0.12);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
}

.callout strong {
  display: block;
  color: var(--green-dark);
  margin-bottom: 6px;
}

.callout p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.small-note,
.disclaimer {
  font-size: 0.92rem;
  color: var(--muted);
  margin-top: 16px;
  max-width: 70ch;
}

/* ---------- Download pages (/download, /download/ios, /download/android) ---------- */

.download-main {
  padding-top: 8px;
}

.download-hero {
  padding-top: 32px;
}

.download-secondary {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
}

.download-secondary a {
  color: white;
  font-weight: 800;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  padding-bottom: 1px;
}

.download-secondary a:hover {
  border-bottom-color: white;
}

/* ---------- Download section ---------- */

.download-section {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  background: linear-gradient(140deg, #0f7b5f, #0d9e76);
  color: white;
  border-radius: 36px;
  padding: 44px;
  box-shadow: var(--shadow);
}

.download-section h2 {
  color: white;
}

.download-section p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 56ch;
}

.download-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.store-button {
  background: #0c1f1a;
  color: white;
  padding: 12px 22px;
  border-radius: 14px;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 170px;
}

/* Official App Store / Google Play badge links (image-based). */
.store-badge-link {
  display: inline-flex;
  align-items: center;
  border-radius: 9px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.store-badge-link:hover {
  transform: translateY(-1px);
}

.store-badge-link img {
  display: block;
  height: 46px;
  width: auto;
}

.store-button .store-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

.store-button .store-name {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.qr-placeholder {
  background: white;
  color: var(--ink);
  border-radius: 24px;
  padding: 20px;
  text-align: center;
  min-width: 200px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.qr-placeholder strong {
  display: block;
  margin-top: 8px;
  font-size: 0.95rem;
}

.qr-placeholder span {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 4px;
}

.qr-code {
  display: block;
  width: 150px;
  height: 150px;
  margin: 0 auto;
  border-radius: 12px;
}

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

.site-footer {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px 32px;
  align-items: start;
  border-top: 1px solid rgba(15, 123, 95, 0.12);
  padding: 36px 0 56px;
  margin-top: 56px;
  color: var(--muted);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand strong {
  display: block;
  color: var(--ink);
  font-size: 1.05rem;
}

.footer-brand p {
  margin: 2px 0 0;
  font-size: 0.9rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  justify-self: end;
  align-self: center;
  font-size: 0.95rem;
}

.site-footer nav a:hover {
  color: var(--green-dark);
}

.footer-disclaimer {
  grid-column: 1 / -1;
  font-size: 0.85rem;
  max-width: 80ch;
  margin: 4px 0 0;
}

/* ---------- Legal pages (privacy / terms) ---------- */

.legal-section {
  max-width: 820px;
}

.legal-section h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
  margin: 8px 0 6px;
}

.legal-updated {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 8px;
}

.legal-card {
  background: var(--white);
  border: 1px solid rgba(15, 123, 95, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 24px 26px;
  margin-top: 18px;
}

.legal-card h2 {
  font-size: 1.2rem;
  margin: 0 0 10px;
  color: var(--green-dark);
}

.legal-card h3 {
  font-size: 1rem;
  margin: 18px 0 6px;
  color: var(--ink);
}

.legal-card p {
  margin: 0 0 12px;
  color: var(--ink);
}

.legal-card p:last-child {
  margin-bottom: 0;
}

.legal-card ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

.legal-card li {
  margin: 0 0 6px;
}

.legal-card a {
  color: var(--green);
  text-decoration: underline;
}

.legal-card a:hover {
  color: var(--green-dark);
}

.legal-related {
  font-size: 0.92rem;
  color: var(--muted);
}

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

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

  .header-cta {
    padding: 10px 16px;
    font-size: 0.92rem;
  }

  .hero,
  .dark-section,
  .download-section {
    grid-template-columns: 1fr;
  }

  .card-grid,
  .card-grid-4,
  .density-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .site-footer {
    grid-template-columns: 1fr;
  }

  .site-footer nav {
    justify-self: start;
  }
}

@media (max-width: 560px) {
  .site-header,
  .hero,
  .section,
  .site-footer {
    width: min(100% - 22px, 1180px);
  }

  .hero {
    padding: 36px 0 28px;
  }

  .section {
    padding: 44px 0;
  }

  .card-grid,
  .card-grid-4,
  .density-grid,
  .marker-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .download-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .btn,
  .store-button {
    width: 100%;
  }

  .store-button {
    align-items: center;
  }

  .flow {
    grid-template-columns: 1fr;
  }

  .flow b {
    transform: rotate(90deg);
  }

  .dark-section,
  .download-section {
    padding: 26px;
    border-radius: 26px;
  }

  .qr-placeholder {
    margin: 0 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn,
  .store-button {
    transition: none;
  }
}
