/* ===========================================
   Calorie Counter & AI Tracker — Main Styles
   Sky Fresh Palette 2026
   =========================================== */

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

:root {
  --bg: #F0F9FF;
  --bg2: #E0F2FE;
  --white: #FFFFFF;
  --accent1: #0EA5E9;
  --accent2: #10B981;
  --grad: linear-gradient(135deg, #0EA5E9 0%, #10B981 100%);
  --grad-soft: linear-gradient(135deg, #E0F2FE 0%, #DCFCE7 100%);
  --text: #0F172A;
  --text-muted: #475569;
  --text-light: #94A3B8;
  --border: #E2E8F0;
  --shadow: 0 4px 24px rgba(14,165,233,0.10);
  --shadow-lg: 0 12px 48px rgba(14,165,233,0.18);
  --radius: 20px;
  --radius-sm: 12px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ---- TYPOGRAPHY ---- */
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 600; }
p  { font-size: 1rem; color: var(--text-muted); }

/* ---- UTILITIES ---- */
.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }
.section-tag {
  display: inline-block;
  background: var(--grad-soft);
  color: var(--accent1);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 16px;
}
.section-title { margin-bottom: 16px; }
.section-sub { max-width: 560px; margin: 0 auto 48px; text-align: center; font-size: 1.05rem; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 6px 24px rgba(14,165,233,0.35);
}
.btn-primary:hover { box-shadow: 0 10px 32px rgba(14,165,233,0.45); }
.btn-outline {
  background: transparent;
  color: var(--accent1);
  border: 2px solid var(--accent1);
}
.btn-outline:hover { background: var(--accent1); color: #fff; }

/* ---- HEADER / NAV ---- */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(240,249,255,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}
header.scrolled { box-shadow: var(--shadow); }

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text);
}
.nav-logo img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent1); }
.nav-cta { display: flex; align-items: center; gap: 12px; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 0;
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 16px 20px 24px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 12px 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu .btn { margin-top: 16px; justify-content: center; }

/* ---- HERO ---- */
#hero {
  padding-top: 120px;
  padding-bottom: 80px;
  background: linear-gradient(160deg, #F0F9FF 0%, #E0F2FE 50%, #DCFCE7 100%);
  overflow: hidden;
  position: relative;
}
#hero::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(14,165,233,0.12) 0%, transparent 70%);
  top: -100px; right: -100px;
  border-radius: 50%;
  pointer-events: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero-content { max-width: 560px; }
.hero-title { margin-bottom: 20px; }
.hero-title span { background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-desc { font-size: 1.1rem; margin-bottom: 32px; max-width: 480px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 40px; }
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--text);
  color: #fff;
  padding: 12px 24px;
  border-radius: 14px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
}
.store-badge:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(15,23,42,0.25); }
.store-badge svg { width: 22px; height: 22px; fill: #fff; }
.store-badge span { display: flex; flex-direction: column; line-height: 1.2; }
.store-badge small { font-size: 0.7rem; font-weight: 400; opacity: 0.8; }

.hero-stats {
  display: flex;
  gap: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.hero-stat-num { font-size: 1.6rem; font-weight: 800; color: var(--accent1); display: block; }
.hero-stat-label { font-size: 0.8rem; color: var(--text-muted); }

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.hero-mockup-wrap {
  position: relative;
  display: inline-block;
}
.hero-phone-bg {
  width: 280px;
  height: 560px;
  background: var(--grad);
  border-radius: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg), 0 0 0 12px rgba(14,165,233,0.08);
}
.hero-icon-big {
  width: 140px;
  height: 140px;
  border-radius: 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.hero-float-card {
  position: absolute;
  background: var(--white);
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  animation: float 4s ease-in-out infinite;
}
.hero-float-card.card1 { left: -80px; top: 100px; animation-delay: 0s; }
.hero-float-card.card2 { right: -70px; top: 200px; animation-delay: 1.5s; }
.hero-float-card.card3 { left: -60px; bottom: 120px; animation-delay: 3s; }
.hero-float-card .fc-icon { font-size: 1.4rem; }
.hero-float-card .fc-text { display: flex; flex-direction: column; }
.hero-float-card .fc-val { font-size: 0.95rem; font-weight: 700; color: var(--accent2); }
.hero-float-card .fc-label { font-size: 0.7rem; color: var(--text-muted); font-weight: 400; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ---- FEATURES ---- */
#features { background: var(--white); }
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 32px 28px;
  border: 1px solid var(--border);
  transition: transform 0.25s, box-shadow 0.25s;
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.feature-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: var(--grad-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 20px;
}
.feature-card h3 { margin-bottom: 10px; }

/* ---- HOW IT WORKS ---- */
#how { background: var(--grad-soft); }
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  position: relative;
}
.how-grid::before {
  content: '';
  position: absolute;
  top: 36px; left: calc(16.66% + 16px); right: calc(16.66% + 16px);
  height: 2px;
  background: var(--grad);
  z-index: 0;
}
.how-step {
  text-align: center;
  position: relative;
  z-index: 1;
}
.how-num {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 6px 24px rgba(14,165,233,0.3);
}
.how-step h3 { margin-bottom: 8px; }

/* ---- PRICING ---- */
#pricing { background: var(--white); }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}
.pricing-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 36px 28px;
  border: 2px solid var(--border);
  text-align: center;
  position: relative;
  transition: transform 0.25s, box-shadow 0.25s;
}
.pricing-card.popular {
  border-color: var(--accent1);
  background: var(--white);
  transform: scale(1.04);
  box-shadow: var(--shadow-lg);
}
.pricing-badge {
  position: absolute;
  top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--grad);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 16px;
  border-radius: 100px;
}
.pricing-period { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.pricing-price { font-size: 2.6rem; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.pricing-price span { font-size: 1rem; font-weight: 400; color: var(--text-muted); }
.pricing-desc { font-size: 0.85rem; margin-bottom: 24px; }
.pricing-features { margin-bottom: 28px; text-align: left; }
.pricing-features li { padding: 6px 0; font-size: 0.9rem; display: flex; align-items: center; gap: 8px; }
.pricing-features li::before { content: '✓'; color: var(--accent2); font-weight: 700; }

/* ---- BLOG ---- */
#blog { background: var(--bg); }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.blog-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.blog-thumb {
  height: 180px;
  background: var(--grad-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}
.blog-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.blog-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent1);
  margin-bottom: 10px;
}
.blog-card h3 { font-size: 1.05rem; margin-bottom: 12px; line-height: 1.4; }
.blog-coming {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 500;
}
.blog-coming::before { content: '🕐'; font-size: 0.85rem; }

.blog-card-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; height: 100%; }
.blog-card-title { font-size: 1.05rem; margin-bottom: 8px; line-height: 1.4; color: var(--text); }
.blog-excerpt { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 0; flex: 1; }
.blog-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.blog-date { font-size: 0.78rem; color: var(--text-light); }
.blog-card:has(.blog-card-link:hover) { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

/* ---- CTA BAND ---- */
#cta-band {
  background: var(--grad);
  padding: 80px 0;
  text-align: center;
  color: #fff;
}
#cta-band h2 { color: #fff; margin-bottom: 16px; }
#cta-band p { color: rgba(255,255,255,0.85); margin-bottom: 36px; font-size: 1.05rem; }
.store-badge-white {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.5);
  color: #fff;
  padding: 14px 28px;
  border-radius: 16px;
  font-size: 0.95rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
  transition: background 0.2s, transform 0.2s;
}
.store-badge-white:hover { background: rgba(255,255,255,0.25); transform: translateY(-2px); }
.store-badge-white svg { width: 24px; height: 24px; fill: #fff; }
.store-badge-white span { display: flex; flex-direction: column; line-height: 1.2; text-align: left; }
.store-badge-white small { font-size: 0.72rem; font-weight: 400; opacity: 0.8; }

/* ---- FOOTER ---- */
footer {
  background: var(--text);
  color: rgba(255,255,255,0.7);
  padding: 48px 0 28px;
}
.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.footer-brand { max-width: 280px; }
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
  margin-bottom: 12px;
}
.footer-logo img { width: 32px; height: 32px; border-radius: 8px; }
.footer-brand p { font-size: 0.875rem; line-height: 1.6; }
.footer-links h4 { color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; }
.footer-links ul { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 0.875rem; color: rgba(255,255,255,0.6); transition: color 0.2s; }
.footer-links a:hover { color: var(--accent1); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
}
.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom a:hover { color: #fff; }

/* ---- INNER PAGES (privacy, terms, support, blog) ---- */
.inner-hero {
  padding: 140px 0 60px;
  background: linear-gradient(160deg, #F0F9FF 0%, #DCFCE7 100%);
  text-align: center;
}
.inner-hero h1 { margin-bottom: 12px; }
.inner-hero p { font-size: 1rem; color: var(--text-muted); }

.inner-body {
  padding: 60px 0 80px;
  background: var(--white);
}
.inner-content {
  max-width: 760px;
  margin: 0 auto;
}
.inner-content h2 { font-size: 1.4rem; margin: 36px 0 12px; color: var(--text); }
.inner-content h3 { font-size: 1.1rem; margin: 24px 0 8px; color: var(--text); }
.inner-content p { margin-bottom: 16px; font-size: 0.97rem; line-height: 1.75; }
.inner-content ul, .inner-content ol { margin: 0 0 16px 20px; }
.inner-content li { margin-bottom: 8px; font-size: 0.97rem; color: var(--text-muted); line-height: 1.7; }
.inner-content a { color: var(--accent1); }
.inner-content strong { color: var(--text); }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .how-grid::before { display: none; }
}

@media (max-width: 768px) {
  .section { padding: 56px 0; }
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }

  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }
  .hero-content { max-width: 100%; }
  .hero-desc { max-width: 100%; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-float-card.card1 { left: -20px; }
  .hero-float-card.card2 { right: -20px; }
  .hero-float-card.card3 { left: -10px; }

  .features-grid { grid-template-columns: 1fr; }
  .how-grid { grid-template-columns: 1fr; gap: 24px; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 360px; }
  .pricing-card.popular { transform: scale(1); }
  .blog-grid { grid-template-columns: 1fr; }

  .footer-top { flex-direction: column; }
  .footer-bottom { flex-direction: column; text-align: center; }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }

  .hero-phone-bg { width: 220px; height: 440px; }
  .hero-icon-big { width: 110px; height: 110px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-float-card { font-size: 0.75rem; padding: 10px 12px; }
  .hero-float-card.card1 { left: -8px; }
  .hero-float-card.card2 { right: -8px; }
  .hero-float-card.card3 { left: -4px; }
  .pricing-grid { max-width: 100%; }
}
