/* ============================================================
   BiteMath — style.css
   Polished, airy, App Store-quality design
   ============================================================ */

:root {
  --green: #16A34A;
  --green-bright: #22C55E;
  --green-deep: #0F7B3A;
  --charcoal: #1D2420;
  --muted: #55615A;
  --mint-bg: #F6FBF5;
  --card-bg: #FFFFFF;
  --card-tint: #EAF8EF;
  --border: #D6E2D8;
  --border-light: #E8F0EA;

  --maxw: 1120px;
  --radius: 20px;
  --radius-sm: 14px;
  --radius-xs: 10px;
  --shadow-card: 0 1px 3px rgba(22,163,74,0.04), 0 8px 24px rgba(22,163,74,0.07);
  --shadow-card-hover: 0 4px 12px rgba(22,163,74,0.08), 0 16px 40px rgba(22,163,74,0.12);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset & base ---------- */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--charcoal);
  background: var(--mint-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: var(--green); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--green-deep); text-decoration: underline; }

a:focus-visible, button:focus-visible {
  outline: 3px solid var(--green-bright);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Navigation ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 251, 245, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(214, 226, 216, 0.6);
  transition: box-shadow 0.3s var(--ease);
}

.site-nav:hover { box-shadow: 0 4px 20px rgba(22, 163, 74, 0.06); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 28px;
  max-width: var(--maxw);
  margin: 0 auto;
}

/* ---------- Wordmark with real icon ---------- */

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--charcoal);
  letter-spacing: -0.01em;
}

.wordmark:hover { text-decoration: none; }

.wordmark .icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.2);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.wordmark:hover .icon {
  transform: scale(1.06) rotate(-3deg);
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.3);
}

.wordmark b { color: var(--green); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 16px;
  border-radius: 999px;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.nav-links a:hover {
  background: var(--card-tint);
  color: var(--green);
  text-decoration: none;
}

/* ---------- Decorative backgrounds ---------- */

.bg-decor {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
}

.blob-a {
  width: 600px;
  height: 600px;
  top: -200px;
  right: -160px;
  background: radial-gradient(circle at 40% 40%, rgba(74, 222, 128, 0.35), transparent 70%);
}

.blob-b {
  width: 500px;
  height: 500px;
  top: 80px;
  left: -200px;
  background: radial-gradient(circle at 50% 50%, rgba(34, 197, 94, 0.2), transparent 70%);
}

.blob-c {
  width: 350px;
  height: 350px;
  bottom: -100px;
  right: 10%;
  background: radial-gradient(circle at 50% 50%, rgba(22, 163, 74, 0.12), transparent 70%);
}

.blob-d {
  width: 280px;
  height: 280px;
  top: 40%;
  left: 15%;
  background: radial-gradient(circle at 50% 50%, rgba(74, 222, 128, 0.15), transparent 70%);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 80px 0 72px;
  overflow: hidden;
  background: linear-gradient(175deg, #F6FBF5 0%, #EDF8F0 40%, #E5F5EA 100%);
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to bottom, transparent, var(--mint-bg));
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.08);
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-bright);
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

.hero h1 {
  font-size: clamp(2.6rem, 5.5vw, 3.8rem);
  line-height: 1.06;
  margin: 0 0 20px;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.hero h1 .accent {
  background: linear-gradient(135deg, var(--green), var(--green-bright));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .sub {
  font-size: 1.15rem;
  color: var(--muted);
  margin: 0 0 34px;
  max-width: 38ch;
  line-height: 1.7;
}

.cta-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--green-bright), var(--green));
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 15px 30px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(22, 163, 74, 0.3), inset 0 1px 0 rgba(255,255,255,0.2);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), filter 0.2s;
  letter-spacing: 0.01em;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(22, 163, 74, 0.35), inset 0 1px 0 rgba(255,255,255,0.2);
  filter: brightness(1.05);
}

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

.btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.cta-note {
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 20ch;
  line-height: 1.4;
}

/* ---------- Hero phone screenshot ---------- */

.phone-wrap {
  display: flex;
  justify-content: center;
  perspective: 1200px;
  position: relative;
}

.phone-wrap .glow {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  height: 100px;
  background: radial-gradient(ellipse, rgba(34, 197, 94, 0.18), transparent 70%);
  filter: blur(24px);
  pointer-events: none;
}

.phone-img {
  width: 320px;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.22)) drop-shadow(0 8px 16px rgba(0, 0, 0, 0.12));
  transform: rotateY(-4deg) rotateX(1deg);
  transition: transform 0.45s var(--ease), filter 0.45s var(--ease);
  position: relative;
  z-index: 1;
}

.phone-img:hover {
  transform: rotateY(0deg) rotateX(0deg);
  filter: drop-shadow(0 28px 50px rgba(0, 0, 0, 0.26)) drop-shadow(0 12px 24px rgba(0, 0, 0, 0.15));
}

/* ---------- Sections ---------- */

.section {
  padding: 80px 0;
  position: relative;
}

.section-tinted {
  background: linear-gradient(180deg, var(--mint-bg) 0%, #EFF8F2 30%, #EFF8F2 70%, var(--mint-bg) 100%);
}

.section-tinted::before,
.section-tinted::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.section-tinted::before { top: 0; }
.section-tinted::after { bottom: 0; }

.section-head {
  text-align: center;
  max-width: 48ch;
  margin: 0 auto 52px;
}

.section-head h2 {
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  letter-spacing: -0.025em;
  margin: 0 0 14px;
  font-weight: 800;
}

.section-head p {
  color: var(--muted);
  margin: 0;
  font-size: 1.1rem;
}

/* ---------- Feature cards ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.f-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s;
  position: relative;
  overflow: hidden;
}

.f-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green-bright), var(--green));
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}

.f-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--green-bright);
}

.f-card:hover::before { opacity: 1; }

.f-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--card-tint), #D8F2E1);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  font-size: 1.4rem;
  box-shadow: 0 2px 6px rgba(22,163,74,0.08);
}

.f-card h3 {
  margin: 0 0 8px;
  font-size: 1.12rem;
  font-weight: 700;
}

.f-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.6;
}

/* ---------- Origin section ---------- */

.origin-wrap {
  display: flex;
  justify-content: center;
}

.origin {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 52px 48px;
  max-width: 780px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.origin::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--green-bright), var(--green), var(--green-deep));
}

.origin-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(22,163,74,0.15);
}

.origin h2 {
  margin: 0 0 16px;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.origin p {
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.75;
  max-width: 56ch;
}

/* ---------- Safety / disclaimer ---------- */

.safety-wrap {
  max-width: 860px;
  margin: 0 auto;
}

.safety {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--green);
  border-radius: 4px var(--radius-sm) var(--radius-sm) 4px;
  padding: 28px 32px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  box-shadow: var(--shadow-card);
}

.safety-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--card-tint);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.safety p {
  margin: 0;
  color: var(--charcoal);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ---------- Content pages ---------- */

.page-header {
  position: relative;
  padding: 64px 0 32px;
  overflow: hidden;
  background: linear-gradient(175deg, #F6FBF5, #EDF8F0);
}

.page-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--mint-bg));
  pointer-events: none;
}

.page-header h1 {
  font-size: clamp(2.1rem, 4.5vw, 3rem);
  margin: 0 0 12px;
  letter-spacing: -0.025em;
  font-weight: 800;
}

.page-header .lead {
  color: var(--muted);
  font-size: 1.12rem;
  margin: 0;
  max-width: 55ch;
  line-height: 1.7;
}

.prose {
  max-width: 780px;
  margin: 0 auto;
  padding: 8px 28px 80px;
}

.prose .block {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 28px 32px;
  margin-bottom: 18px;
  transition: box-shadow 0.25s var(--ease);
}

.prose .block:hover {
  box-shadow: var(--shadow-card-hover);
}

.prose .block.disclaimer-block {
  background: var(--card-tint);
  border-left: 4px solid var(--green);
  border-radius: 4px var(--radius-sm) var(--radius-sm) 4px;
}

.prose h2 {
  font-size: 1.25rem;
  margin: 0 0 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.prose h2 .num {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--green);
  background: var(--card-tint);
  border: 1px solid var(--border-light);
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.prose h3 {
  font-size: 1.05rem;
  margin: 20px 0 8px;
  font-weight: 700;
}

.prose p {
  margin: 0 0 12px;
  color: var(--charcoal);
  line-height: 1.75;
}

.prose p:last-child { margin-bottom: 0; }

.prose ul {
  margin: 0 0 6px;
  padding-left: 22px;
  color: var(--charcoal);
}

.prose li {
  margin-bottom: 6px;
  line-height: 1.65;
}

.updated {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  padding: 6px 14px;
  border-radius: 999px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--card-tint);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s, border-color 0.2s;
}

.contact-link:hover {
  background: #D8F2E1;
  border-color: var(--green-bright);
  text-decoration: none;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  padding: 48px 0;
  position: relative;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--green-bright), var(--green), var(--green-bright), transparent);
  opacity: 0.35;
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 10px;
}

.footer-brand .icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  object-fit: cover;
}

.footer-brand b { color: var(--green); }

.footer-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.footer-links a:hover {
  background: var(--card-tint);
  border-color: var(--border);
  color: var(--green);
  text-decoration: none;
}

.footer-meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 2px;
  line-height: 1.6;
}

.footer-copy {
  font-weight: 600;
  color: var(--charcoal);
  font-size: 0.92rem;
  margin-bottom: 4px;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 44px;
    text-align: center;
  }

  .hero .sub { max-width: none; }
  .cta-row { justify-content: center; }

  .phone-wrap { order: -1; }
  .phone-img { transform: none; }
  .phone-img:hover { transform: none; }

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

  .origin { padding: 40px 28px; }
}

@media (max-width: 600px) {
  .container { padding: 0 20px; }
  .nav-inner { padding: 14px 20px; }

  .hero { padding: 56px 0 48px; }

  .phone-img { width: 260px; }

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

  .origin,
  .safety,
  .prose .block {
    padding-left: 22px;
    padding-right: 22px;
  }

  .safety { flex-direction: column; gap: 12px; }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .f-card:hover { transform: none; }
  .btn:hover { transform: none; }
  .phone-img { transform: none; }
}
