/* =============================================
   style-index.css — Rugmi
   Deep ink-blue + warm fabric-cream palette,
   mapped from the app's design system (Palette.swift).
   ============================================= */

/* ── TOKENS ── */
:root {
  /* Backgrounds — warm neutral surfaces inspired by fabric and yarn */
  --bg:        #F5F0E6;   /* warm near-white cream */
  --bg-alt:    #ECE7DC;   /* app Surface — warm cream */
  --bg-dark:   #2E4E6E;   /* deep ink blue (app BrandPrimary, darkened) */

  /* Text */
  --text:      #1E2126;   /* app Ink */
  --muted:     #726A61;   /* warm muted brown */
  --cream:     #EFE6D2;   /* logo cream — text on dark blue */
  --cream-muted: rgba(239, 230, 210, 0.72);

  /* Accents — from the app palette */
  --accent:    #365A7C;   /* BrandPrimary — the core app tint */
  --ochre:     #A67A42;   /* StatusAmber — warm ochre */
  --sage:      #526E48;   /* yarn green */
  --rose:      #A85C75;   /* muted rose — pricing */
  --purple:    #72587A;   /* BrandAccent */

  /* Borders */
  --border:    rgba(30, 33, 38, 0.12);

  /* Layout */
  --px: 60px;
}

html { scroll-behavior: smooth; }

section[id] { scroll-margin-top: 61px; }

body {
  font-family: 'Nunito', sans-serif;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  min-width: 360px;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 240, 230, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--px);
}

.logo {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 22%;
  box-shadow:
    0 2px 8px rgba(30, 40, 58, 0.28),
    0 1px 3px rgba(30, 40, 58, 0.18);
}

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

.nav-links a {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

/* Download pill */
.nav-download {
  background: var(--accent) !important;
  color: var(--bg) !important;
  padding: 8px 20px;
  border-radius: 20px;
  font-weight: 600 !important;
  transition: opacity 0.2s !important;
}

.nav-download:hover {
  color: var(--bg) !important;
  opacity: 0.82;
}

/* ── HERO ── */
.hero {
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(54, 90, 124, 0.08), transparent 60%),
    var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 61px);
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 80px;
  max-width: 1200px;
  width: 100%;
  padding: 60px var(--px);
}

.hero-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 540px;
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.hero-left h1 {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.hero-sub {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--muted);
}

.hero-sub + .hero-sub { margin-top: 16px; }

.appstore-btn {
  display: block;
  margin-top: 36px;
}

.appstore-icon {
  height: 52px;
  width: auto;
  display: block;
  transition: opacity 0.2s, transform 0.2s;
}

.appstore-icon:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.hero-note {
  margin-top: 16px;
  font-size: 0.78rem;
  color: var(--muted);
}

.hero-right {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
}

/* ── HERO PREVIEW ── */
.device-preview {
  width: 100%;
  max-width: 520px;
  height: auto;
  display: block;
  filter: drop-shadow(0 30px 60px rgba(30, 40, 58, 0.28));
}

/* ── SHARED SECTION HEADER ── */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 12px;
}

.section-header .sub {
  font-size: 0.98rem;
  color: var(--muted);
  line-height: 1.65;
  max-width: 620px;
  margin: 0 auto;
}

/* ── FEATURES SECTION ── */
.features-section {
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(78, 111, 145, 0.55), transparent 55%),
    var(--bg-dark);
  padding: 88px var(--px);
}

.features-section .section-header h2 { color: var(--cream); }
.features-section .section-header .sub { color: var(--cream-muted); }

.feat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 18px;
  max-width: 1120px;
  margin: 0 auto;
}

.feat-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 30px 28px 32px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.feat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(30, 33, 38, 0.18);
  box-shadow: 0 12px 32px rgba(30, 40, 58, 0.10);
}

.feat-icon {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feat-icon svg { width: 27px; height: 27px; display: block; }
.feat-icon svg * { stroke: #fff; }

.feat-icon.i-accent { background: var(--accent); }
.feat-icon.i-ochre  { background: var(--ochre); }
.feat-icon.i-sage   { background: var(--sage); }
.feat-icon.i-rose   { background: var(--rose); }
.feat-icon.i-purple { background: var(--purple); }

.feat-card h3 {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.feat-card p {
  font-size: 0.9rem;
  line-height: 1.72;
  color: var(--muted);
}

/* ── HOW IT WORKS ── */
.howitworks-section {
  background: var(--bg-alt);
  padding: 96px var(--px);
}

.howitworks-section .section-header h2 { color: var(--text); }
.howitworks-section .section-header .sub { color: var(--muted); }

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
}

.step {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 30px 26px 32px;
}

.step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--cream);
  background: var(--accent);
  margin-bottom: 18px;
}

.step h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.step p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--muted);
}

/* ── FOOTER ── */
footer {
  background: var(--bg-dark);
  padding: 30px var(--px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-nav {
  display: flex;
  gap: 22px;
}

.footer-nav a {
  font-size: 0.84rem;
  color: var(--cream-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-nav a:hover { color: var(--cream); }

.social-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.social-links a {
  display: flex;
  align-items: center;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.social-links a:hover { opacity: 1; }

.social-icon {
  width: 26px;
  height: 26px;
  display: block;
  filter: brightness(0) invert(1);
}

.footer-copy {
  width: 100%;
  text-align: center;
  font-size: 0.78rem;
  color: var(--cream-muted);
  padding-top: 18px;
  border-top: 1px solid rgba(239, 230, 210, 0.12);
}

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .hero { min-height: auto; }

  .hero-inner {
    flex-direction: column-reverse;
    gap: 48px;
    padding: 56px var(--px);
  }

  .hero-right { width: 100%; }
}

@media (max-width: 960px) {
  :root { --px: 32px; }

  .nav-links a:not(.nav-download) { display: none; }

  footer {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }
}

@media (max-width: 520px) {
  :root { --px: 22px; }

  .hero-inner {
    gap: 48px;
    padding: 56px var(--px);
  }

  .features-section,
  .howitworks-section,
  .privacy-section { padding-left: var(--px); padding-right: var(--px); }
}
