/* ============================================================
   LilSleep – Shared Stylesheet
   Color palette mirrors the Flutter app
   ============================================================ */

:root {
  --teal:        #4F7C8A;
  --teal-dark:   #236A62;
  --teal-light:  #E5F4F2;
  --purple:      #8F5D7A;
  --orange:      #B06C3A;
  --orange-bg:   #FFF3EA;
  --orange-border:#FFD7BA;
  --text-main:   #1A2633;
  --text-muted:  #617083;
  --text-body:   #445060;
  --border:      #E2E7F0;
  --card-bg:     #FFFFFF;
  --page-bg:     #F6F7FB;
  --radius:      10px;
  --shadow:      0 2px 16px rgba(79,124,138,.10);
  --max-w:       860px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--page-bg);
  color: var(--text-main);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }
a  { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Utility ---------- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 700;
}

.badge-teal   { background: var(--teal-light); color: var(--teal-dark); }
.badge-orange { background: var(--orange-bg);  color: var(--orange);    }

/* ---------- Navigation ---------- */
.nav {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
}

.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 1.15rem;
  color: var(--text-main);
  text-decoration: none;
}

.nav__logo-icon {
  width: 36px;
  height: 36px;
  background: #FFE5D3;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
}

.nav__links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.nav__links a {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.nav__links a:hover { color: var(--teal); text-decoration: none; }

/* ---------- Hero ---------- */
.hero {
  padding: 72px 20px 60px;
  text-align: center;
}

.hero__eyebrow {
  display: inline-block;
  margin-bottom: 16px;
}

.hero__title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--text-main);
  margin-bottom: 18px;
}

.hero__title span { color: var(--teal); }

.hero__sub {
  max-width: 560px;
  margin: 0 auto 36px;
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--teal);
  color: #fff;
  font-weight: 700;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-size: 1rem;
  transition: background .2s;
}
.hero__cta:hover { background: #3d6473; text-decoration: none; }

/* ---------- Section ---------- */
.section {
  padding: 56px 0;
}

.section__title {
  font-size: 1.6rem;
  font-weight: 900;
  margin-bottom: 8px;
}

.section__sub {
  color: var(--text-muted);
  margin-bottom: 32px;
  font-size: .97rem;
}

/* ---------- Features grid ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.feature-card__icon {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  margin-bottom: 14px;
}

.feature-card__title {
  font-weight: 800;
  font-size: .97rem;
  margin-bottom: 6px;
}

.feature-card__body {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ---------- Stats row ---------- */
.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin: 40px 0;
}

.stat-pill {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 40px;
  padding: 12px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  min-width: 130px;
}

.stat-pill__value {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--teal);
}

.stat-pill__label {
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ---------- How it works ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
  counter-reset: step;
}

.step-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
  box-shadow: var(--shadow);
  counter-increment: step;
}

.step-card::before {
  content: counter(step);
  position: absolute;
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  background: var(--teal);
  color: #fff;
  border-radius: 50%;
  font-size: .78rem;
  font-weight: 900;
  display: grid;
  place-items: center;
}

.step-card__icon {
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.step-card__title {
  font-weight: 800;
  font-size: .95rem;
  margin-bottom: 6px;
}

.step-card__body {
  font-size: .87rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ---------- Tip banner ---------- */
.tip-banner {
  background: var(--orange-bg);
  border: 1px solid var(--orange-border);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.tip-banner__icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 2px; }

.tip-banner__text {
  font-size: .92rem;
  color: #6D4A31;
  font-weight: 600;
  line-height: 1.5;
}

/* ---------- Legal pages ---------- */
.legal-header {
  padding: 52px 20px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--card-bg);
}

.legal-header__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.legal-header__back:hover { color: var(--teal); text-decoration: none; }

.legal-header__title {
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 6px;
}

.legal-header__meta {
  font-size: .88rem;
  color: var(--text-muted);
}

.legal-content {
  padding: 40px 20px 64px;
}

.legal-content h2 {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 32px 0 10px;
  color: var(--text-main);
}

.legal-content h2:first-child { margin-top: 0; }

.legal-content p,
.legal-content li {
  font-size: .95rem;
  color: var(--text-body);
  line-height: 1.7;
  margin-bottom: 10px;
}

.legal-content ul {
  padding-left: 22px;
  margin-bottom: 10px;
}

.legal-content .highlight-box {
  background: var(--teal-light);
  border-left: 4px solid var(--teal);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px;
  margin: 16px 0;
}

.legal-content .highlight-box p {
  color: var(--teal-dark);
  font-weight: 600;
  margin: 0;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  padding: 32px 20px;
}

.footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: .95rem;
}

.footer__brand-icon {
  width: 30px;
  height: 30px;
  background: #FFE5D3;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 1rem;
}

.footer__links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.footer__links a {
  font-size: .85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.footer__links a:hover { color: var(--teal); text-decoration: none; }

.footer__copy {
  font-size: .82rem;
  color: var(--text-muted);
  width: 100%;
  text-align: center;
  margin-top: 8px;
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
  .hero { padding: 48px 20px 44px; }
  .nav__links { gap: 14px; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}
