:root {
  --bg: #F9F7F2;
  --surface: #FFFFFF;
  --surface-warm: #F3EFE6;
  --border: #EBE6DC;
  --border-strong: #D5CFC2;
  --red: #B9382B;
  --red-dark: #9A2C21;
  --text: #1F1C19;
  --muted: #5C5446;
  --subtle: #6B6358;
  --amber-bg: #FFF8E1;
  --amber-text: #92400E;
  --green-bg: #ECFDF5;
  --green-text: #166534;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

a {
  color: inherit;
}

.container {
  max-width: 1020px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Global Header Component */
site-header {
  display: block;
  min-height: 71px;
}

.site-header {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.5px;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
  font-weight: 600;
  color: var(--subtle);
}

.nav-links a {
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--text);
}

.nav-cta {
  background: var(--red);
  color: #fff !important;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
}

.nav-cta:hover {
  background: var(--red-dark);
}

/* Shared Buttons & Cards */
.play-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--text);
  color: #fff;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 12px;
  transition: background 0.15s ease;
}

.play-btn:hover {
  background: #332E29;
}

.play-btn svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.play-btn-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.play-btn-small {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  opacity: 0.8;
}

.play-btn-main {
  font-size: 16px;
  font-weight: 700;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
}

.card-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  background: var(--surface-warm);
  padding: 4px 9px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.card p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

/* Homepage Hero */
.hero {
  padding: 56px 0 64px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 44px;
  align-items: center;
}

.platform-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-warm);
  border: 1px solid #E2DDD2;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 8px;
  margin-bottom: 18px;
}

.platform-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2E7D32;
}

h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 4.4vw, 46px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -1.2px;
}

.lead {
  margin: 0 0 28px;
  font-size: 17px;
  color: var(--muted);
  max-width: 48ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.secondary-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--red);
  text-decoration: none;
  padding: 10px 6px;
}

.secondary-link:hover {
  text-decoration: underline;
}

.hero-note {
  font-size: 13px;
  color: var(--subtle);
  margin: 0;
}

/* Interactive App Preview */
.phone-frame {
  background: var(--bg);
  border: 8px solid #26221E;
  border-radius: 28px;
  padding: 16px;
  box-shadow: 0 18px 40px rgba(31, 28, 25, 0.08);
  max-width: 390px;
  width: 100%;
  margin-left: auto;
}

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.app-topbar-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.4px;
}

.app-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--amber-bg);
  color: var(--amber-text);
  border: 1px solid #FDE68A;
}

.weight-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.weight-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--subtle);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.weight-pills {
  display: flex;
  gap: 6px;
}

.weight-pill {
  flex: 1;
  border: 1px solid var(--border-strong);
  background: var(--surface-warm);
  color: var(--text);
  border-radius: 8px;
  padding: 7px 0;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.weight-pill.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.ing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 10px;
}

.ing-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}

.ing-row:last-child {
  border-bottom: none;
}

.ing-amt {
  font-weight: 700;
  color: var(--red);
  font-variant-numeric: tabular-nums;
}

.taste-mini {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
}

.taste-mini-head {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

.taste-mini-verdict {
  color: var(--green-text);
  background: var(--green-bg);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
}

.slider-line {
  margin-bottom: 7px;
}

.slider-line:last-child {
  margin-bottom: 0;
}

.slider-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--subtle);
  margin-bottom: 3px;
}

.slider-meta strong {
  color: var(--red);
}

.bar-track {
  height: 6px;
  background: var(--surface-warm);
  border-radius: 99px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--red);
  border-radius: 99px;
}

/* Homepage Sections */
.section {
  padding: 56px 0;
  border-top: 1px solid var(--border);
}

.section-head {
  margin-bottom: 28px;
  max-width: 560px;
}

.section-head h2 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.6px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.cards-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.step {
  background: var(--surface-warm);
  border: 1px solid #E2DDD2;
  border-radius: 14px;
  padding: 20px;
}

.step-num {
  font-size: 12px;
  font-weight: 800;
  color: var(--red);
  margin-bottom: 6px;
}

.step h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 800;
}

.step p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.note-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.note-box h3 {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.note-box p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  max-width: 58ch;
}

/* Secondary Pages (Privacy, Terms, Support, Guides, etc.) */
.page-shell {
  padding: 44px 0 64px;
}

.page-header {
  max-width: 720px;
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: clamp(28px, 3.8vw, 38px);
  margin-bottom: 10px;
}

.page-meta {
  font-size: 13px;
  color: var(--subtle);
  margin: 0;
}

.prose-card {
  max-width: 720px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
}

.prose-card h2 {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin: 26px 0 8px;
}

.prose-card h2:first-child {
  margin-top: 0;
}

.prose-card p,
.prose-card li {
  font-size: 15px;
  color: var(--muted);
}

.prose-card ul {
  padding-left: 20px;
  margin: 8px 0 14px;
}

.prose-card li {
  margin-bottom: 6px;
}

.prose-card a {
  color: var(--red);
  font-weight: 600;
}

/* Global Footer Component */
site-footer {
  display: block;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 40px;
  font-size: 13px;
  color: var(--subtle);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-links a {
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a.is-active {
  color: var(--text);
  text-decoration: underline;
}

@media (max-width: 820px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .phone-frame {
    margin: 0 auto;
  }

  .cards-2,
  .steps {
    grid-template-columns: 1fr;
  }

  .nav-links a:not(.nav-cta) {
    display: none;
  }

  .prose-card {
    padding: 20px;
  }
}