/* ===== Landing Page Styles ===== */

/* -- Reveal animation -- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* -- Header -- */
.site-header {
  justify-content: space-between;
}
.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-hand);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  background: var(--primary);
  border: 2px solid var(--ink);
  border-radius: var(--sketch-radius);
  box-shadow: var(--sketch-shadow-hard);
  padding: 0.5rem 1.4rem;
  text-decoration: none;
  transition: transform 0.1s, box-shadow 0.1s;
}
.header-cta:hover {
  text-decoration: none;
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0px 0px rgba(26, 29, 30, 1);
}
.header-cta:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px 0px var(--ink);
}

/* -- Section common -- */
.section {
  max-width: 960px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
  position: relative;
}
.section-label {
  font-family: var(--font-hand);
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  text-align: center;
  margin-bottom: 0.5rem;
}
.section-title {
  font-size: 2.4rem;
  color: var(--ink);
  text-align: center;
  margin-bottom: 0.75rem;
}
.section-subtitle {
  text-align: center;
  font-size: 1.25rem;
  color: var(--text-muted);
  font-family: var(--font-hand);
  font-weight: 700;
  margin-bottom: 3rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* -- AI Avatar -- */
.ai-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  object-fit: cover;
}
.ai-avatar--lg {
  width: 80px;
  height: 80px;
}
.ai-avatar--xl {
  width: 100px;
  height: 100px;
}

/* -- AI bubble row -- */
.ai-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.ai-row .speech-bubble {
  flex: 1;
}
.ai-row .speech-bubble::after {
  display: none;
}

/* ===== HERO ===== */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  max-width: 1140px;
  margin: 0 auto;
  padding: 4rem 2rem 5rem;
}
.hero-content {
  flex: 1;
  max-width: 540px;
}
.hero-headline {
  font-family: var(--font-hand);
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 2rem;
}
.hero-headline span {
  color: var(--primary);
}
.hero-greeting {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
}
.hero-greeting .speech-bubble {
  padding: 1.5rem 1.75rem;
}
.hero-greeting .speech-bubble::after {
  display: none;
}
.hero-greeting .speech-bubble p {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.45;
  margin-bottom: 0;
}
.hero-subtitle {
  font-family: var(--font-hand);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-hand);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  background: var(--primary);
  border: 2px solid var(--ink);
  border-radius: var(--sketch-radius);
  box-shadow: var(--sketch-shadow-hard);
  padding: 1rem 3rem;
  text-decoration: none;
  transition: transform 0.1s, box-shadow 0.1s;
}
.hero-cta:hover {
  text-decoration: none;
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0px 0px rgba(26, 29, 30, 1);
}
.hero-cta:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px 0px var(--ink);
}
.hero-visual {
  flex: 1;
  max-width: 440px;
  position: relative;
}
.hero-visual img {
  width: 100%;
  border-radius: var(--sketch-radius);
  border: 3px solid var(--ink);
  box-shadow: var(--sketch-shadow-hard);
  position: relative;
  z-index: 1;
}
.hero-visual::before {
  content: '';
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border: 2px dashed rgba(45, 182, 125, 0.25);
  border-radius: var(--sketch-radius);
  z-index: 0;
}
.hero-doodle {
  position: absolute;
  z-index: 2;
  opacity: 0.7;
  color: var(--primary);
  pointer-events: none;
}
.hero-doodle .material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 400;
}
.hero-doodle--sparkle-tr {
  top: -18px;
  right: -16px;
  font-size: 1.6rem;
  animation: float-y 4s ease-in-out infinite;
}
.hero-doodle--sparkle-tl {
  top: -12px;
  left: -10px;
  font-size: 1rem;
  opacity: 0.45;
  animation: float-y 5s ease-in-out infinite 1s;
}
.hero-doodle--leaf-bl {
  bottom: -14px;
  left: -18px;
  font-size: 1.4rem;
  color: var(--amber);
  opacity: 0.5;
  animation: wobble 5s ease-in-out infinite;
}
.hero-doodle--heart-br {
  bottom: -10px;
  right: -14px;
  font-size: 1.1rem;
  color: var(--rose);
  opacity: 0.5;
  animation: float-y 4.5s ease-in-out infinite 0.5s;
}

/* ===== Section divider ===== */
.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 0.5rem 0;
  opacity: 0.15;
  color: var(--primary);
}
.section-divider::before,
.section-divider::after {
  content: '';
  width: 60px;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}
.section-divider .material-symbols-outlined {
  font-size: 20px;
  font-variation-settings: 'FILL' 1, 'wght' 300;
}

/* ===== Section doodles ===== */
.section-doodle {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  color: var(--primary);
}
.section-doodle .material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 400;
}
.sd-xs .material-symbols-outlined { font-size: 36px; }
.sd-sm .material-symbols-outlined { font-size: 56px; }
.sd-md .material-symbols-outlined { font-size: 80px; }
.sd-lg .material-symbols-outlined { font-size: 110px; }
.sd-far  { opacity: 0.05; }
.sd-mid  { opacity: 0.09; }
.sd-near { opacity: 0.14; }
.section-doodle--amber { color: var(--amber); }
.section-doodle--rose { color: var(--rose); }
.section-doodle--gold { color: var(--gold); }

/* ===== Alternating section backgrounds ===== */
.section--tinted {
  background: rgba(45, 182, 125, 0.03);
  border-top: 1.5px solid rgba(45, 182, 125, 0.08);
  border-bottom: 1.5px solid rgba(45, 182, 125, 0.08);
  max-width: 100%;
  padding-left: calc((100% - 960px) / 2 + 1.5rem);
  padding-right: calc((100% - 960px) / 2 + 1.5rem);
}

/* ===== PROBLEM ===== */
.problem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  max-width: 680px;
  margin: 0 auto 2rem;
}
.pain-bubble {
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--sketch-radius);
  padding: 1.5rem 1.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
  position: relative;
}
.pain-bubble::before {
  content: '\201C';
  font-size: 2rem;
  color: var(--rose);
  position: absolute;
  top: 4px;
  left: 10px;
  line-height: 1;
}
.pain-bubble p {
  margin: 0;
  padding-left: 0.5rem;
}
.ai-response {
  max-width: 640px;
  margin: 0 auto;
}

/* ===== EXPERIENCE (Two-Phone Flow) ===== */
.phones-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.phone-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  position: relative;
}
.phone-col-label {
  font-family: var(--font-hand);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}
.phone-frame {
  width: 280px;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 32px;
  padding: 2.5rem 1rem 1.5rem;
  position: relative;
  box-shadow: var(--sketch-shadow-hard);
  z-index: 1;
}
.phone-frame::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 6px;
  background: var(--ink);
  border-radius: 3px;
  opacity: 0.15;
}

/* -- Phone 1: Logging -- */
.log-screen-title {
  font-family: var(--font-hand);
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  color: var(--ink);
  margin-bottom: 1rem;
}
.log-prompt {
  font-family: var(--font-hand);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.75rem;
}
.log-input {
  border: 2px solid var(--ink);
  border-radius: var(--sketch-radius);
  padding: 1rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1rem;
  min-height: 70px;
}
.quick-adds {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}
.quick-add-chip {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--ink);
  border: 1.5px solid var(--slate-400);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
}
.log-btn {
  display: block;
  width: 100%;
  text-align: center;
  font-family: var(--font-hand);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  background: var(--primary);
  border: 2px solid var(--ink);
  border-radius: var(--sketch-radius);
  padding: 0.65rem 1rem;
}

/* -- Phone 2: Results -- */
.result-header {
  text-align: center;
  margin-bottom: 1rem;
}
.result-header .result-icon {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}
.result-header .result-title {
  font-family: var(--font-hand);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.result-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 2px solid var(--ink);
  border-radius: var(--sketch-radius);
  padding: 0.75rem 1rem;
}
.result-item-name {
  font-family: var(--font-hand);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}
.result-item-kcal {
  font-family: var(--font-hand);
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
}
.result-total {
  background: var(--primary);
  border-radius: 16px;
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-around;
  text-align: center;
}
.result-total-item {
  color: var(--white);
}
.result-total-item .total-value {
  font-family: var(--font-hand);
  font-size: 1.1rem;
  font-weight: 700;
}
.result-total-item .total-label {
  font-family: var(--font-body);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.85;
}

.experience-caption {
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-muted);
  font-style: italic;
  max-width: 500px;
  margin: 0 auto;
}

/* ===== ONBOARDING ===== */
.onboarding-intro {
  max-width: 640px;
  margin: 0 auto 2rem;
}
.onboarding-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 760px;
  margin: 0 auto;
}
.onboard-card {
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--sketch-radius);
  padding: 1.5rem 1.25rem;
  text-align: center;
  position: relative;
  transition: transform 0.15s, box-shadow 0.15s;
}
.onboard-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--sketch-shadow-hard);
}
.onboard-card .onboard-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}
.onboard-card h3 {
  font-size: 1.35rem;
  color: var(--primary);
  margin-bottom: 0.35rem;
}
.onboard-card p {
  font-family: var(--font-hand);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

/* -- Macro mini-grid (inside onboarding) -- */
.macro-mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.macro-mini {
  border-radius: 12px;
  padding: 0.5rem 0.35rem;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
}
.macro-mini--green { border: 2px solid var(--primary); color: var(--primary); }
.macro-mini--amber { border: 2px solid var(--amber); color: var(--amber); }
.macro-mini--gold { border: 2px solid var(--gold); color: var(--gold); }
.macro-mini--rose { border: 2px solid var(--rose); color: var(--rose); }

/* ===== COACHING ===== */
.coaching-bubbles {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  max-width: 600px;
  margin: 0 auto;
}
.coaching-bubbles .ai-row {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.coaching-bubbles .ai-row.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== WHO IT'S FOR ===== */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 760px;
  margin: 0 auto;
}
.audience-card {
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--sketch-radius);
  padding: 1.75rem;
  transition: transform 0.15s, box-shadow 0.15s;
}
.audience-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--sketch-shadow-hard);
}
.audience-card h3 {
  font-size: 1.4rem;
  color: var(--primary);
  margin-bottom: 0.35rem;
}
.audience-card p {
  font-family: var(--font-hand);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

/* ===== FINAL CTA ===== */
.final-cta {
  text-align: center;
  padding: 4rem 1.5rem 5rem;
}
.final-cta .ai-avatar {
  margin: 0 auto 1.5rem;
  display: block;
}
.final-cta .cta-bubble {
  display: inline-block;
  max-width: 420px;
  margin-bottom: 2rem;
}
.final-cta .cta-bubble p {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero {
    flex-direction: column-reverse;
    text-align: center;
    gap: 2.5rem;
    padding: 2rem 1.25rem 3rem;
    min-height: auto;
  }
  .hero-content { max-width: 100%; }
  .hero-headline { font-size: 2.4rem; margin-bottom: 1.5rem; }
  .hero-visual { max-width: 300px; }
  .hero-greeting {
    flex-direction: column;
    align-items: center;
  }
  .hero-subtitle { font-size: 1.3rem; }

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

  .phones-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .onboarding-cards {
    grid-template-columns: 1fr;
    max-width: 360px;
  }

  .audience-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }
}

/* -- Food Showcase Table -- */
.food-showcase {
  max-width: 640px;
  margin: 0 auto;
}

.showcase-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-body);
  font-size: 0.95rem;
  border: 2px solid var(--ink);
  border-radius: 12px;
  overflow: hidden;
}

.showcase-table thead {
  background: var(--ink);
  color: var(--white);
}

.showcase-table th {
  font-weight: 600;
  text-align: left;
  padding: 0.6rem 0.85rem;
}

.showcase-table td {
  padding: 0.5rem 0.85rem;
  border-bottom: 1px solid rgba(26, 29, 30, 0.08);
}

.showcase-table td a {
  color: var(--primary);
  font-weight: 600;
}

.showcase-table tbody tr:nth-child(even) {
  background: rgba(45, 182, 125, 0.03);
}

.showcase-link {
  text-align: center;
  margin-top: 1rem;
  font-family: var(--font-hand);
  font-size: 1.2rem;
  font-weight: 700;
}

.section-subtitle {
  font-family: var(--font-body);
  color: var(--text-muted);
  font-size: 1rem;
  text-align: center;
  max-width: 540px;
  margin: 0 auto 1.5rem;
}

/* -- Blog Preview -- */
.blog-preview {
  max-width: 540px;
  margin: 0 auto;
}

.blog-preview-card {
  display: block;
  padding: 1.25rem 1.5rem;
  border: 2px solid var(--ink);
  border-radius: var(--sketch-radius);
  background: var(--white);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.15s, box-shadow 0.15s;
}

.blog-preview-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--sketch-shadow-hard);
  text-decoration: none;
}

.blog-preview-card strong {
  font-family: var(--font-hand);
  font-size: 1.2rem;
  display: block;
  margin-bottom: 0.4rem;
}

.blog-preview-card p {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* -- FAQ Section -- */
.faq-list {
  max-width: 700px;
  margin: 0 auto;
}

.faq-item {
  margin-bottom: 1rem;
  padding: 1rem 1.25rem;
  border: 2px solid var(--ink);
  border-radius: var(--sketch-radius);
  background: var(--white);
}

.faq-item h3 {
  font-size: 1.15rem;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.faq-item p {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text);
  margin: 0;
}

/* -- Data Attribution -- */
.data-attribution {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.data-attribution p {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.data-attribution a {
  color: var(--primary);
  font-weight: 600;
}

@media (max-width: 640px) {
  .section { padding: 3.5rem 1rem; }
  .section-title { font-size: 1.8rem; }
  .hero-headline { font-size: 2rem; }
  .hero-greeting .speech-bubble p { font-size: 1.15rem; }
  .hero-subtitle { font-size: 1.15rem; }
  .phone-frame { width: 260px; }
  .showcase-table { font-size: 0.85rem; }
  .showcase-table th, .showcase-table td { padding: 0.4rem 0.6rem; }
}
