/* =====================================================================
   Habit Tracker — Landing site stylesheet
   Theme: warm "daily growth" — cream + forest green + amber streak-flame
   Fonts: Fraunces (display) · Plus Jakarta Sans (body)
   Pure CSS, mobile-first. Sectioned for readability.
   NOTE: site is served from a GitHub Pages sub-path
   (asimcanyagiz.github.io/HabitTracker-Website/), so every internal link
   in the HTML is RELATIVE — never root-absolute.
   ===================================================================== */

/* ---------- 1. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

/* ---------- 2. Design tokens ---------- */
:root {
  /* palette */
  --cream:        #F7F1E5;
  --cream-2:      #FCF8F0;
  --ink:          #1B2A22;   /* near-black forest, body text */
  --forest:       #22503C;   /* primary */
  --forest-deep:  #142C22;   /* dark sections */
  --sage:         #6E8B78;
  --amber:        #E07A2F;   /* streak-flame accent / CTA */
  --amber-soft:   #F0A85A;
  --gold:         #EEC15A;
  --muted:        #59665C;   /* secondary text on light */
  --muted-dark:   #A9BEB0;   /* secondary text on dark */
  --card:         #FFFFFF;
  --line:         rgba(27, 42, 34, 0.10);
  --line-strong:  rgba(27, 42, 34, 0.18);

  /* type */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body:    'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* shape & motion */
  --radius:    26px;
  --radius-sm: 16px;
  --shadow-sm: 0 2px 10px rgba(27, 42, 34, 0.06);
  --shadow:    0 18px 44px rgba(27, 42, 34, 0.12);
  --shadow-lg: 0 30px 80px rgba(20, 44, 34, 0.22);
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast:    0.2s ease;
  --maxw:      1160px;
}

/* ---------- 3. Base ---------- */
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* subtle film-grain overlay for warmth/depth */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--forest-deep);
  font-optical-sizing: auto;
}

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

/* eyebrow label used above section headings */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body);
  font-weight: 700; font-size: 0.78rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--amber);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--amber); border-radius: 2px; }

.section { padding: 110px 0; position: relative; }
.section-head { max-width: 640px; margin: 0 auto 64px; text-align: center; }
.section-head h2 { font-size: clamp(2rem, 4.5vw, 3rem); margin: 16px 0 14px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 28px; border-radius: 999px;
  font-weight: 700; font-size: 1rem;
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
  white-space: nowrap;
}
.btn-primary { background: var(--amber); color: #fff; box-shadow: 0 12px 26px rgba(224, 122, 47, 0.34); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 34px rgba(224, 122, 47, 0.42); }
.btn-ghost { background: transparent; color: var(--forest-deep); border: 1.5px solid var(--line-strong); }
.btn-ghost:hover { border-color: var(--forest); background: rgba(34, 80, 60, 0.05); transform: translateY(-2px); }

/* App Store badge button */
.badge-store {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--forest-deep); color: #fff;
  padding: 12px 22px; border-radius: 16px;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
  box-shadow: var(--shadow-sm);
}
.badge-store:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.badge-store svg { width: 26px; height: 26px; flex-shrink: 0; }
.badge-store .b-small { font-size: 0.68rem; opacity: 0.8; line-height: 1; }
.badge-store .b-big { font-family: var(--font-display); font-size: 1.16rem; font-weight: 600; line-height: 1.1; }

/* ---------- 5. Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background var(--t-fast), box-shadow var(--t-fast), padding var(--t-fast);
  padding: 20px 0;
}
.nav.scrolled {
  background: rgba(247, 241, 229, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
  padding: 12px 0;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; }
.brand img { width: 40px; height: 40px; border-radius: 11px; box-shadow: var(--shadow-sm); }
.brand span { font-family: var(--font-display); font-size: 1.28rem; font-weight: 600; color: var(--forest-deep); }
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a { font-weight: 600; font-size: 0.96rem; color: var(--ink); transition: color var(--t-fast); }
.nav-links a:hover { color: var(--amber); }
.nav-cta { display: inline-flex; align-items: center; gap: 16px; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--forest-deep); border-radius: 2px; transition: var(--t-fast); }

/* ---------- 6. Hero ---------- */
.hero {
  position: relative;
  padding: 168px 0 96px;
  background:
    radial-gradient(1100px 520px at 80% -8%, rgba(240, 168, 90, 0.28), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(34, 80, 60, 0.12), transparent 55%);
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: 56px; align-items: center;
}
.hero-eyebrow { margin-bottom: 22px; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); margin-bottom: 22px; }
.hero h1 .accent { color: var(--amber); font-style: italic; }
.hero-sub { font-size: clamp(1.05rem, 2vw, 1.24rem); color: var(--muted); max-width: 30ch; margin-bottom: 34px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 22px; color: var(--muted); font-size: 0.9rem; font-weight: 600; }
.hero-trust span { display: inline-flex; align-items: center; gap: 7px; }
.hero-trust .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--forest); }

/* Hero app-preview (pure CSS phone mockup — no external screenshots) */
.preview-wrap { position: relative; display: flex; justify-content: center; }
.phone {
  position: relative; width: 300px; background: var(--forest-deep);
  border-radius: 44px; padding: 12px; box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,0.06);
}
.phone-screen { background: var(--cream-2); border-radius: 34px; padding: 26px 20px; overflow: hidden; }
.pv-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.pv-title { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; color: var(--forest-deep); }
.pv-streak {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(224, 122, 47, 0.14); color: var(--amber);
  font-weight: 800; font-size: 0.9rem; padding: 6px 12px; border-radius: 999px;
}
.pv-day { color: var(--muted); font-size: 0.82rem; font-weight: 600; margin-bottom: 14px; }
.habit {
  display: flex; align-items: center; gap: 13px;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 13px 15px; margin-bottom: 11px; box-shadow: var(--shadow-sm);
}
.habit .tick {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-size: 0.8rem; font-weight: 800; color: #fff;
  background: var(--sage);
}
.habit.done .tick { background: var(--forest); }
.habit.todo .tick { background: transparent; border: 2px solid var(--line-strong); color: transparent; }
.habit .h-name { font-weight: 700; font-size: 0.95rem; color: var(--ink); }
.habit .h-sub { font-size: 0.76rem; color: var(--muted); }
.habit .h-emoji { font-size: 1.15rem; }
.pv-bar { display: flex; align-items: flex-end; gap: 7px; height: 60px; margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line-strong); }
.pv-bar i { flex: 1; background: linear-gradient(var(--amber-soft), var(--amber)); border-radius: 5px 5px 0 0; opacity: 0.9; }
/* floating accent chip */
.pv-float {
  position: absolute; top: 40px; right: -18px;
  background: #fff; border-radius: 16px; padding: 12px 16px;
  box-shadow: var(--shadow); display: flex; align-items: center; gap: 10px;
  animation: floaty 4s var(--ease) infinite;
}
.pv-float .fi { width: 34px; height: 34px; border-radius: 10px; background: rgba(238, 193, 90, 0.22); display: grid; place-items: center; font-size: 1.1rem; }
.pv-float b { font-family: var(--font-display); font-size: 1.05rem; color: var(--forest-deep); display: block; line-height: 1; }
.pv-float small { font-size: 0.72rem; color: var(--muted); }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ---------- 7. Feature grid ---------- */
.features { background: var(--cream-2); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.f-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px 30px; transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
}
.f-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.f-ico {
  width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center;
  font-size: 1.5rem; margin-bottom: 20px; background: rgba(34, 80, 60, 0.08);
}
.f-card:nth-child(2) .f-ico { background: rgba(224, 122, 47, 0.12); }
.f-card:nth-child(3) .f-ico { background: rgba(238, 193, 90, 0.18); }
.f-card:nth-child(4) .f-ico { background: rgba(110, 139, 120, 0.16); }
.f-card:nth-child(5) .f-ico { background: rgba(224, 122, 47, 0.12); }
.f-card:nth-child(6) .f-ico { background: rgba(34, 80, 60, 0.08); }
.f-card h3 { font-size: 1.3rem; margin-bottom: 10px; }
.f-card p { color: var(--muted); font-size: 0.98rem; }

/* ---------- 8. How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; counter-reset: step; }
.step { position: relative; padding: 34px 28px; border-radius: var(--radius); background: var(--cream-2); border: 1px solid var(--line); }
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--font-display); font-size: 2.6rem; font-weight: 600;
  color: var(--amber); opacity: 0.5; line-height: 1; display: block; margin-bottom: 16px;
}
.step h3 { font-size: 1.28rem; margin-bottom: 10px; }
.step p { color: var(--muted); font-size: 0.98rem; }

/* ---------- 9. Quote / philosophy band ---------- */
.quote-band {
  background: var(--forest-deep); color: #fff; text-align: center;
  background-image: radial-gradient(700px 300px at 50% 0%, rgba(240,168,90,0.18), transparent 60%);
}
.quote-band .eyebrow { color: var(--gold); }
.quote-band blockquote {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.6rem, 3.6vw, 2.5rem); line-height: 1.28;
  max-width: 900px; margin: 20px auto 22px; color: #fff; font-style: italic;
}
.quote-band cite { color: var(--muted-dark); font-style: normal; font-weight: 600; }
.stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 56px; margin-top: 54px; }
.stat b { font-family: var(--font-display); font-size: 2.6rem; color: var(--gold); display: block; line-height: 1; }
.stat span { color: var(--muted-dark); font-size: 0.92rem; font-weight: 600; }

/* ---------- 10. CTA band ---------- */
.cta { text-align: center; }
.cta-card {
  background: linear-gradient(135deg, var(--forest) 0%, var(--forest-deep) 100%);
  border-radius: 34px; padding: 72px 40px; color: #fff; position: relative; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.cta-card::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(500px 260px at 80% 120%, rgba(240,168,90,0.28), transparent 60%);
  pointer-events: none;
}
.cta-card img.cta-icon { width: 78px; height: 78px; border-radius: 20px; margin: 0 auto 22px; box-shadow: var(--shadow); }
.cta-card h2 { color: #fff; font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: 14px; }
.cta-card p { color: var(--muted-dark); max-width: 520px; margin: 0 auto 30px; font-size: 1.06rem; position: relative; }
.cta-card .hero-actions { justify-content: center; position: relative; }

/* ---------- 11. Footer ---------- */
.footer { background: var(--cream-2); border-top: 1px solid var(--line); padding: 56px 0 40px; }
.footer-content { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.footer-brand { display: inline-flex; align-items: center; gap: 12px; }
.footer-logo { width: 38px; height: 38px; border-radius: 10px; }
.footer-name { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--forest-deep); }
.footer-links { display: flex; flex-wrap: wrap; gap: 26px; }
.footer-links a { color: var(--muted); font-weight: 600; font-size: 0.94rem; transition: color var(--t-fast); }
.footer-links a:hover { color: var(--amber); }
.footer-copyright { width: 100%; color: var(--muted); font-size: 0.86rem; padding-top: 24px; margin-top: 8px; border-top: 1px solid var(--line); }

/* ---------- 12. Legal pages (privacy / terms) ---------- */
.legal-page { padding: 150px 0 90px; background: radial-gradient(900px 460px at 80% -6%, rgba(240,168,90,0.16), transparent 60%); }
.legal-content {
  max-width: 820px; margin: 0 auto; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 60px; box-shadow: var(--shadow-sm);
}
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--amber); font-weight: 700; font-size: 0.92rem; margin-bottom: 28px; transition: gap var(--t-fast); }
.back-link:hover { gap: 12px; }
.legal-title { font-size: clamp(2rem, 5vw, 2.7rem); text-align: center; margin-bottom: 8px; }
.legal-updated { text-align: center; color: var(--muted); font-size: 0.9rem; margin-bottom: 44px; }
.legal-section { margin-bottom: 34px; }
.legal-section h2 { font-size: 1.35rem; color: var(--forest); margin-bottom: 13px; }
.legal-section p, .legal-section li { color: var(--muted); line-height: 1.8; margin-bottom: 11px; }
.legal-section ul { padding-left: 24px; list-style: disc; }
.legal-section li { margin-bottom: 7px; }
.legal-section a { color: var(--amber); font-weight: 600; }

/* ---------- 13. Scroll-reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 14. Responsive ---------- */
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; text-align: center; }
  .hero-eyebrow, .hero .eyebrow { justify-content: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-actions, .hero-trust { justify-content: center; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .section { padding: 78px 0; }
  .nav-links, .nav-cta .btn-ghost { display: none; }
  .nav-toggle { display: flex; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; gap: 18px;
    position: absolute; top: 100%; left: 16px; right: 16px;
    background: var(--cream-2); padding: 24px; border-radius: var(--radius-sm);
    box-shadow: var(--shadow); border: 1px solid var(--line);
  }
  .feature-grid { grid-template-columns: 1fr; }
  .stats { gap: 34px; }
  .legal-content { padding: 40px 24px; }
  .cta-card { padding: 54px 24px; }
  .footer-content { flex-direction: column; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; transform: none; }
  .pv-float { animation: none; }
  html { scroll-behavior: auto; }
}
