/* ==========================================================================
   Design System & Base Styles (Light Mode Theme)
   ========================================================================== */

:root {
  /* Main Website Theme (Light Mode mirroring the App) */
  --bg-main: hsl(210, 20%, 98%);       /* Body background, soft off-white */
  --bg-surface: hsl(0, 0%, 100%);      /* Surface background, pure white */
  --bg-surface-glow: rgba(0, 0, 0, 0.015);
  --border-color: rgba(0, 0, 0, 0.07);
  
  --text-main: hsl(222, 47%, 11%);     /* High-contrast ink for text */
  --text-muted: hsl(222, 10%, 45%);    /* Soft dark-gray for description */
  --text-inverse: hsl(210, 20%, 98%);  /* Light text for dark surfaces */
  
  /* Brand / App Colors */
  --accent-green: hsl(152, 76%, 40%);
  --accent-green-glow: rgba(28, 176, 107, 0.08);
  --accent-red: hsl(355, 85%, 55%);
  
  /* Macro Colors */
  --macro-carb: hsl(262, 83%, 58%);
  --macro-carb-bg: rgba(124, 58, 237, 0.08);
  --macro-protein: hsl(217, 91%, 60%);
  --macro-protein-bg: rgba(37, 99, 235, 0.08);
  --macro-fat: hsl(24, 95%, 53%);
  --macro-fat-bg: rgba(234, 88, 12, 0.08);

  /* Font Families */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Layout */
  --max-width: 1100px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}

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

/* ==========================================================================
   Buttons & UI Elements
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  padding: 0.8rem 1.6rem;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.95rem;
  border: none;
  gap: 8px;
}

.btn-sm {
  padding: 0.5rem 1.2rem;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 1.1rem 2.2rem;
  font-size: 1.1rem;
}

.btn-primary {
  background-color: var(--text-main);
  color: var(--bg-surface);
}

.btn-primary:hover {
  transform: scale(0.96);
  opacity: 0.9;
}

.btn-accent {
  background-color: var(--accent-green);
  color: white;
  box-shadow: 0 10px 25px rgba(28, 176, 107, 0.2);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(28, 176, 107, 0.3);
}

.btn-accent:active {
  transform: translateY(0) scale(0.97);
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.btn-secondary:hover {
  background-color: var(--bg-main);
  transform: translateY(-2px);
}

.btn-secondary:active {
  transform: translateY(0);
}

.icon {
  width: 20px;
  height: 20px;
}

.badge {
  display: inline-block;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--accent-green);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

/* ==========================================================================
   Header
   ========================================================================== */

.main-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(244, 246, 248, 0.85); /* Matches bg-primary opacity */
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
}

.main-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
}

.logo-img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
}

.logo-text span {
  color: var(--accent-green);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text-main);
}

/* ==========================================================================
   Hero Section & Layout
   ========================================================================== */

.hero-section {
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}

/* Subtle background glow */
.hero-section::after {
  content: "";
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-green-glow) 0%, rgba(244,246,248,0) 70%);
  z-index: -1;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 4rem;
  align-items: center;
}

.hero-content h1 {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 1.5rem;
}

.hero-content h1 span {
  background: linear-gradient(135deg, var(--text-main) 30%, var(--accent-green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.hero-features {
  display: flex;
  gap: 2rem;
}

.h-feat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.feat-icon {
  font-size: 1.2rem;
}

/* ==========================================================================
   App Mockup Screen (Static Phone Frame)
   ========================================================================== */

.hero-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.phone-mockup {
  width: 310px;
  height: 630px;
  background-color: #0f172a; /* Device border color */
  border-radius: 36px;
  padding: 10px;
  box-shadow: 
    0 0 0 3px #334155,
    0 20px 45px rgba(0, 0, 0, 0.12),
    0 0 80px rgba(28, 176, 107, 0.04);
  position: relative;
}

/* Speaker & Camera notch */
.phone-mockup::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 75px;
  height: 16px;
  background-color: #0f172a;
  border-radius: 10px;
  z-index: 10;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background-color: hsl(210, 20%, 98%); /* Exact bg-primary from App */
  color: hsl(222, 47%, 11%); /* Exact text-primary from App */
  border-radius: 28px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  font-size: 14px;
}

/* Simulator App Header */
.app-header {
  padding: 24px 16px 12px;
  background-color: white;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.app-title-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent-green);
  display: block;
  margin-bottom: 2px;
}

.app-current-date {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
}

.app-config-btn-static {
  color: hsl(222, 47%, 40%);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-config-btn-static svg {
  width: 20px;
  height: 20px;
}

/* App Content Area */
.app-content {
  flex: 1;
  overflow: hidden;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Calorie SVG Progress Meter */
.meter-section {
  background: white;
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.015);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.meter-wrapper {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-svg {
  transform: rotate(-90deg);
  width: 140px;
  height: 140px;
}

.progress-bg {
  fill: none;
  stroke: rgba(0, 0, 0, 0.04);
  stroke-width: 10;
}

.progress-bar {
  fill: none;
  stroke: var(--accent-green);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 471; 
  stroke-dashoffset: 339; /* ~28.6% of 471 (573/2000 kcal) */
}

.meter-info {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.meter-value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1;
}

.meter-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: hsl(222, 47%, 45%);
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* Macro Badges */
.macro-bar-container {
  display: flex;
  width: 100%;
  justify-content: space-between;
  gap: 8px;
}

.macro-badge {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
}

.macro-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-bottom: 4px;
}

.macro-title {
  color: hsl(222, 47%, 40%);
  font-size: 0.65rem;
  margin-bottom: 2px;
}

.macro-val {
  font-weight: 700;
  font-family: var(--font-display);
}

.macro-carb { background-color: var(--macro-carb-bg); }
.macro-carb .macro-dot { background-color: var(--macro-carb); }
.macro-carb .macro-val { color: var(--macro-carb); }

.macro-protein { background-color: var(--macro-protein-bg); }
.macro-protein .macro-dot { background-color: var(--macro-protein); }
.macro-protein .macro-val { color: var(--macro-protein); }

.macro-fat { background-color: var(--macro-fat-bg); }
.macro-fat .macro-dot { background-color: var(--macro-fat); }
.macro-fat .macro-val { color: var(--macro-fat); }

/* Entries Section */
.entries-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
}

.section-title-row h4 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
}

.entries-count {
  font-size: 0.75rem;
  color: hsl(222, 47%, 45%);
}

.meal-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.meal-item-static {
  background: white;
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.03);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.01);
  overflow: hidden;
}

.meal-item-summary {
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.meal-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.meal-emoji {
  font-size: 1.4rem;
}

.meal-info-text {
  display: flex;
  flex-direction: column;
}

.meal-desc {
  font-weight: 600;
  font-size: 0.9rem;
  color: hsl(222, 47%, 12%);
}

.meal-time {
  font-size: 0.7rem;
  color: hsl(222, 47%, 45%);
}

.meal-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meal-kcal {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
}

.confidence-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.conf-alta { background-color: var(--accent-green); }

/* Chat bottom area (Static mockup version) */
.app-chat-bar {
  padding: 12px;
  background-color: white;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.chat-form {
  display: flex;
  background-color: hsl(210, 20%, 95%);
  border-radius: 28px;
  padding: 6px 6px 6px 16px;
  align-items: center;
  justify-content: space-between;
}

.chat-placeholder {
  font-size: 0.82rem;
  color: hsl(222, 10%, 60%);
}

.send-btn-static {
  background-color: var(--accent-green);
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.send-btn-static svg {
  width: 13px;
  height: 13px;
  margin-left: 2px;
}

/* ==========================================================================
   Pillars & Features Section (Clean White)
   ========================================================================== */

.pillars-section {
  padding: 6rem 0;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 4rem;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

.section-header h2 span {
  color: var(--accent-green);
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
}

.pillar-card {
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  padding: 2.5rem;
  border-radius: 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
}

.pillar-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-green);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.02);
}

.pillar-icon {
  font-size: 2.5rem;
  margin-bottom: 1.2rem;
  display: inline-block;
}

.pillar-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
}

.pillar-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ==========================================================================
   Detail / Copy Section
   ========================================================================== */

.detail-section {
  padding: 6rem 0;
}

.detail-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 5rem;
  align-items: center;
}

.feature-demo-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 28px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.02);
  max-width: 440px;
  margin: 0 auto;
}

.demo-bubble {
  padding: 12px 18px;
  border-radius: 18px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.user-bubble {
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  align-self: flex-start;
  max-width: 85%;
  border-bottom-left-radius: 4px;
}

.demo-arrow {
  text-align: center;
  font-size: 1.2rem;
  color: var(--accent-green);
}

.ai-bubble {
  background-color: white;
  color: hsl(222, 47%, 11%);
  align-self: flex-end;
  border: 1px solid var(--border-color);
  max-width: 90%;
  border-bottom-right-radius: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.02);
  width: 100%;
}

.ai-header {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  padding-bottom: 8px;
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-family: var(--font-display);
}

.ai-status {
  color: var(--accent-green);
}

.demo-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.detail-content h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.detail-content p {
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  font-size: 1.05rem;
}

/* ==========================================================================
   FAQ Section
   ========================================================================== */

.faq-section {
  padding: 6rem 0;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-color);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2.5rem;
  margin-top: 2rem;
}

.faq-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item h4 {
  font-size: 1.15rem;
  font-weight: 600;
}

.faq-item p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ==========================================================================
   Download Section
   ========================================================================== */

.download-section {
  padding: 5rem 0 6rem;
}

.download-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 36px;
  padding: 5rem 2rem;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
}

.download-content {
  max-width: 600px;
  margin: 0 auto;
}

.download-content h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
  letter-spacing: -1px;
}

.download-content p {
  color: var(--text-muted);
  font-size: 1.15rem;
  margin-bottom: 2.5rem;
}

.download-buttons {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.version-badge {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: 500;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.main-footer {
  border-top: 1px solid var(--border-color);
  padding: 5rem 0 3rem;
  background-color: var(--bg-surface);
  color: var(--text-muted);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-logo {
  width: 48px;
  height: 48px;
  margin-bottom: 1.2rem;
  border-radius: 12px;
  object-fit: contain;
}

.footer-produced-by {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.footer-producer-name {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-main);
  margin-bottom: 1rem;
  line-height: 1;
}

.footer-dots {
  display: flex;
  gap: 6px;
  margin-bottom: 1rem;
}

.footer-dots span {
  width: 4px;
  height: 4px;
  background-color: var(--accent-green);
  border-radius: 50%;
}

.footer-version-tag {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.footer-links {
  display: flex;
  gap: 12px;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 0.85rem;
}

.footer-links a {
  transition: color 0.2s ease;
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--accent-green);
}

.footer-copyright {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Responsive Queries
   ========================================================================== */

@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .hero-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .hero-features {
    justify-content: center;
  }
  
  .detail-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .detail-visual {
    order: 2;
  }
  
  .detail-content {
    order: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 768px) {
  .main-header .container {
    flex-direction: column;
    gap: 12px;
  }
  
  .nav-links {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .hero-content h1 {
    font-size: 2.5rem;
  }
  
  .faq-grid {
    grid-template-columns: 1fr;
  }
  
  .download-content h2 {
    font-size: 2.2rem;
  }
}
