/* DietBuddy landing page. Colours follow the app's tokens (src/theme/tokens.ts, global.css). */

@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/inter-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/inter-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/inter-800.woff2') format('woff2');
  font-weight: 800;
  font-display: swap;
}

:root {
  --bg: #f9f7f4;
  --bg-tint: #fdf3e2;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #5f6673;
  --primary: #f59e0b;
  --primary-dark: #d97706;
  --primary-text: #a34a08;
  --accent: #fef3c7;
  --border: rgba(0, 0, 0, 0.08);
  --shadow: 0 10px 30px rgba(31, 41, 55, 0.08);
  --ink: #1a1a2e;
  --radius: 16px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f172a;
    --bg-tint: #131d33;
    --card: #1e293b;
    --text: #f9fafb;
    --muted: #94a3b8;
    --primary-text: #fbbf24;
    --accent: #2d1a00;
    --border: rgba(255, 255, 255, 0.08);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --ink: #020617;
    color-scheme: dark;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary-text);
}

h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  font-weight: 800;
}

h3 {
  font-size: 1.15rem;
  font-weight: 600;
}

p {
  margin: 0;
}

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

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

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  padding: 10px 16px;
  background: var(--card);
  border-radius: 10px;
  z-index: 100;
}
.skip:focus {
  top: 12px;
}

.container {
  width: min(1120px, 100% - 32px);
  margin-inline: auto;
}
.narrow {
  width: min(760px, 100% - 32px);
}

.eyebrow {
  color: var(--primary-text);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.lead {
  color: var(--muted);
  font-size: 1.15rem;
  margin-top: 16px;
}

.accent {
  color: var(--primary-text);
}

.fine {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 16px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.brand-tile {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}
.brand-tile svg {
  fill: none;
  stroke: #fff;
  stroke-width: 2.2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.brand-word {
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}
.brand-word span {
  color: var(--primary-text);
}
.nav-links {
  display: flex;
  gap: 28px;
}
.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.nav-links a:hover {
  color: var(--primary-text);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}
.btn-primary {
  color: var(--ink);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.35);
}
.btn-small {
  font-size: 0.95rem;
}

.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.store-buttons.centered {
  justify-content: center;
}
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 8px 20px 8px 16px;
  border-radius: 14px;
  background: #0b0b0f;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.2s ease;
}
.store-btn:hover {
  transform: translateY(-2px);
}
.store-btn svg {
  width: 24px;
  height: 24px;
  fill: #fff;
  stroke: none;
}
.store-btn small {
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
  opacity: 0.85;
}
.store-btn.soon {
  opacity: 0.75;
}
.store-btn-light {
  background: #fff;
  color: #0b0b0f;
}
.store-btn-light svg {
  fill: #0b0b0f;
}

/* Hero */
.hero {
  padding: 64px 0 72px;
  background:
    radial-gradient(
      900px 480px at 85% 10%,
      color-mix(in srgb, var(--primary) 22%, transparent),
      transparent 70%
    ),
    var(--bg);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero-copy .lead {
  max-width: 34em;
}
.hero-visual {
  position: relative;
  justify-self: center;
}
.phone {
  margin: 0;
  width: min(320px, 72vw);
  padding: 10px;
  border-radius: 46px;
  background: #0b0b0f;
  box-shadow:
    0 30px 60px rgba(31, 41, 55, 0.25),
    inset 0 0 0 2px #2b2b33;
}
.phone img {
  border-radius: 36px;
}
.chip {
  position: absolute;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: var(--shadow);
  white-space: nowrap;
  animation: float 6s ease-in-out infinite;
}
.chip-a {
  top: 14%;
  left: -64px;
}
.chip-b {
  top: 48%;
  right: -56px;
  animation-delay: -2s;
}
.chip-c {
  bottom: 10%;
  left: -40px;
  animation-delay: -4s;
}
@keyframes float {
  50% {
    transform: translateY(-8px);
  }
}

/* Highlights */
.highlights {
  border-block: 1px solid var(--border);
  background: var(--card);
}
.highlight-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 24px 0;
}
.highlight-row p {
  display: flex;
  flex-direction: column;
  text-align: center;
}
.highlight-row strong {
  font-weight: 800;
  font-size: 1.05rem;
}
.highlight-row span {
  color: var(--muted);
  font-size: 0.92rem;
}

/* Sections */
.section {
  padding: 88px 0;
}
.section-tint {
  background: var(--bg-tint);
}
.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.card .icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent);
  font-size: 1.5rem;
  margin-bottom: 16px;
}
.card p {
  color: var(--muted);
  font-size: 0.96rem;
  margin-top: 8px;
}

/* Screenshots */
.screens {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 8px max(16px, calc((100% - 1120px) / 2)) 24px;
}
.screens li {
  flex: 0 0 auto;
  width: 240px;
  scroll-snap-align: center;
  text-align: center;
}
.screens img {
  border-radius: 28px;
  border: 6px solid #0b0b0f;
  box-shadow: var(--shadow);
}
.screens p {
  margin-top: 14px;
  font-weight: 600;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  counter-reset: none;
}
.steps li {
  text-align: center;
  padding: 8px 16px;
}
.step-num {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--ink);
  font-weight: 800;
  font-size: 1.3rem;
  margin-bottom: 16px;
}
.steps p {
  color: var(--muted);
  margin-top: 8px;
}

/* Plans */
.plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
.plan {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--shadow);
}
.plan-premium {
  background: #1a1a2e;
  color: #f1f5f9;
  border-color: rgba(245, 158, 11, 0.45);
}
.plan-premium h3 {
  color: #fcd34d;
}
.plan-sub {
  color: var(--muted);
  margin: 6px 0 20px;
}
.plan-premium .plan-sub,
.plan-premium .plan-note {
  color: #cbd5e1;
}
.badge {
  position: absolute;
  top: -14px;
  right: 24px;
  padding: 4px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #1a1a2e;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.checks li {
  position: relative;
  padding-left: 30px;
  margin: 10px 0;
}
.checks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #10b981
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E")
    center / 11px no-repeat;
}
.plan-note {
  margin-top: 20px;
  font-size: 0.9rem;
}

/* Trust */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.trust-grid li {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.trust-grid p {
  color: var(--muted);
  font-size: 0.96rem;
  margin-top: 8px;
}
.disclaimer {
  margin: 32px auto 0;
  max-width: 760px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

/* FAQ */
.faq details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 12px;
}
.faq summary {
  cursor: pointer;
  padding: 18px 52px 18px 22px;
  font-weight: 600;
  list-style: none;
  position: relative;
  min-height: 44px;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: var(--primary-text);
}
.faq details[open] summary::after {
  content: '−';
}
.faq details p {
  padding: 0 22px 20px;
  color: var(--muted);
}

/* Download */
.download {
  padding: 88px 0;
  background: linear-gradient(135deg, #1a1a2e, #2d1a00);
  color: #fff;
  text-align: center;
}
.download p {
  color: #e2e8f0;
  margin-top: 12px;
  font-size: 1.1rem;
}
.download .fine {
  color: #cbd5e1;
  font-size: 0.9rem;
}

/* Footer */
.site-footer {
  padding: 36px 0;
  border-top: 1px solid var(--border);
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  display: inline-block;
  padding: 10px 0;
}
.footer-links a:hover {
  color: var(--primary-text);
  text-decoration: underline;
}
.copyright {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Legal pages */
.legal {
  padding: 56px 0 80px;
}
.legal h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
}
.legal h2 {
  font-size: 1.3rem;
  margin: 40px 0 12px;
}
.legal p,
.legal ul {
  margin: 12px 0;
}
.legal ul {
  list-style: disc;
  padding-left: 24px;
}
.legal li {
  margin: 6px 0;
}
.legal-updated {
  color: var(--muted);
  font-size: 0.95rem;
}
.legal-back {
  margin-top: 48px !important;
  font-weight: 600;
}
.footer-links a[aria-current='page'] {
  color: var(--primary-text);
}

/* Responsive */
@media (max-width: 1000px) {
  .feature-grid,
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .nav-links {
    display: none;
  }
  .hero {
    padding-top: 40px;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-copy .lead {
    margin-inline: auto;
  }
  .hero .store-buttons {
    justify-content: center;
  }
  .chip-a {
    left: -24px;
  }
  .chip-b {
    right: -24px;
  }
  .chip-c {
    left: -12px;
  }
  .highlight-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .steps,
  .plans {
    grid-template-columns: 1fr;
  }
  .section {
    padding: 64px 0;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }
  .feature-grid,
  .trust-grid {
    grid-template-columns: 1fr;
  }
  .store-btn {
    flex: 1 1 100%;
    justify-content: center;
  }
  .chip {
    font-size: 0.85rem;
    padding: 8px 12px;
  }
  .chip-a,
  .chip-c {
    left: -8px;
  }
  .chip-b {
    right: -8px;
  }
  .plan {
    padding: 28px 22px;
  }
  .footer-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

/* 404 page */
.not-found {
  text-align: center;
  padding-top: 40px;
}
.not-found h1 {
  margin-top: 40px;
}
.not-found .btn {
  margin-top: 24px;
}
