/* Mica Habits marketing site. One committed look: warm paper by day, night sections
   where the product's night lives. Every color explicit; no theme switching. */

@font-face {
  font-family: 'Newsreader';
  src: url('/assets/newsreader-normal-latin.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Newsreader';
  src: url('/assets/newsreader-italic-latin.woff2') format('woff2');
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Figtree';
  src: url('/assets/figtree-normal-latin.woff2') format('woff2');
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #FBF3E4;
  --paper-dim: #F6EBD7;
  --card: #FFFCF4;
  --parch: #F7E7CB;
  --ink: #2A1C10;
  --ink-soft: rgba(42, 28, 16, 0.72);
  --ink-faint: rgba(42, 28, 16, 0.52);
  --line: rgba(42, 28, 16, 0.12);
  --ember: #F0871F;
  --ember-bright: #FFC076;
  --rust: #E07B1E;
  --rust-deep: #B4551A;
  --night: #0E1817;
  --night-2: #131F1D;
  --on-night: #FFF6EA;
  --on-night-soft: rgba(255, 246, 234, 0.78);
  --on-night-faint: rgba(255, 246, 234, 0.55);
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Figtree', -apple-system, 'Segoe UI', system-ui, sans-serif;
  --radius: 26px;
  --w: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap { max-width: var(--w); margin: 0 auto; padding: 0 28px; }

/* ---------- header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 243, 228, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
}
.wordmark img { width: 34px; height: 34px; }
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, #FFB962, #F08A22);
  color: #341B04;
  text-decoration: none;
  font-weight: 800;
  font-size: 16px;
  padding: 11px 20px;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(240, 135, 31, 0.35);
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(240, 135, 31, 0.45); }

/* ---------- hero ---------- */
.hero { overflow: hidden; position: relative; }
.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  padding-top: 64px;
  padding-bottom: 84px;
}
.kicker {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rust);
}
h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(44px, 6.2vw, 78px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin: 14px 0 20px;
  text-wrap: balance;
}
.hero p.lede {
  font-size: 20px;
  color: var(--ink-soft);
  max-width: 34em;
  margin-bottom: 30px;
}
.cta-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #111;
  color: #fff;
  text-decoration: none;
  border-radius: 14px;
  padding: 12px 22px;
  line-height: 1.15;
  transition: transform 150ms ease;
}
.store-btn:hover { transform: translateY(-1px); }
.store-btn .apple { font-size: 30px; }
.store-btn .lines { display: flex; flex-direction: column; text-align: left; }
.store-btn .small { font-size: 11px; opacity: 0.85; letter-spacing: 0.02em; }
.store-btn .big { font-size: 19px; font-weight: 700; }
.cta-note { font-size: 15px; color: var(--ink-faint); font-weight: 600; }

.hero-art { position: relative; min-height: 460px; }
.hero-room {
  width: 100%;
  border-radius: 34px;
  box-shadow: 0 40px 80px rgba(42, 28, 16, 0.28);
}
.hero-mica {
  position: absolute;
  left: 50%;
  bottom: -26px;
  width: 46%;
  transform: translateX(-50%);
  filter: drop-shadow(0 24px 30px rgba(42, 28, 16, 0.35)) drop-shadow(0 0 34px rgba(255, 170, 70, 0.45));
  animation: breathe 4.5s ease-in-out infinite;
  transform-origin: 50% 100%;
}
@keyframes breathe {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.025); }
}

/* ---------- sections ---------- */
section { padding: 96px 0; }
.eyebrow {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 10px;
}
h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(32px, 4.2vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin-bottom: 16px;
}
.section-lede { font-size: 19px; color: var(--ink-soft); max-width: 38em; }
.center { text-align: center; }
.center .section-lede { margin: 0 auto; }

/* the loop cards */
.loop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 48px;
}
.loop-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(42, 28, 16, 0.1);
}
.loop-card img { height: 230px; width: 100%; object-fit: cover; }
.loop-card .pad { padding: 24px 26px 28px; }
.loop-step {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, var(--ember-bright), var(--ember));
  color: #341B04;
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 12px;
}
.loop-card h3 { font-family: var(--serif); font-size: 25px; font-weight: 600; margin-bottom: 8px; }
.loop-card p { font-size: 16.5px; color: var(--ink-soft); }

/* split rows */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.split.flip > .split-art { order: 2; }
.split-art img {
  border-radius: 34px;
  box-shadow: 0 30px 70px rgba(42, 28, 16, 0.25);
}
.objects-row { display: flex; gap: 20px; margin-top: 26px; align-items: flex-end; }
.objects-row img {
  width: 58px;
  filter: drop-shadow(0 8px 10px rgba(42, 28, 16, 0.3));
}

/* night sections */
.night {
  background: linear-gradient(180deg, var(--night), var(--night-2));
  color: var(--on-night);
}
.night .eyebrow { color: var(--ember-bright); }
.night .section-lede, .night p { color: var(--on-night-soft); }
.night-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.4;
  color: var(--on-night);
  max-width: 26em;
  margin: 26px auto 0;
}
.coals {
  width: 130px;
  margin: 40px auto 0;
  filter: drop-shadow(0 0 30px rgba(240, 135, 31, 0.5));
  animation: breathe-soft 6s ease-in-out infinite;
}
@keyframes breathe-soft {
  0%, 100% { opacity: 0.92; }
  50% { opacity: 1; }
}

/* phones */
.phones {
  display: flex;
  gap: 34px;
  justify-content: center;
  align-items: flex-end;
  margin-top: 54px;
  flex-wrap: wrap;
}
.phone {
  width: 250px;
  border-radius: 38px;
  border: 9px solid #241a12;
  overflow: hidden;
  box-shadow: 0 34px 70px rgba(42, 28, 16, 0.35);
  background: #241a12;
}
.phone img { border-radius: 28px; }
.phone.mid { width: 280px; }

/* hill */
.hill-section {
  position: relative;
  background: var(--night) url('/assets/hillside.jpg') center / cover no-repeat;
  color: var(--on-night);
}
.hill-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9, 14, 24, 0.82), rgba(9, 14, 24, 0.55) 40%, rgba(9, 14, 24, 0.86));
}
.hill-section .wrap { position: relative; }
.hill-section .eyebrow { color: var(--ember-bright); }
.hill-section p { color: var(--on-night-soft); }

/* plus card */
.plus-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 34px;
  box-shadow: 0 26px 60px rgba(42, 28, 16, 0.14);
  padding: 52px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 44px;
  align-items: center;
}
.plus-list { list-style: none; margin-top: 20px; display: grid; gap: 12px; }
.plus-list li { display: flex; gap: 12px; align-items: baseline; font-size: 17px; color: var(--ink-soft); }
.plus-list li::before { content: '◆'; color: var(--ember); font-size: 13px; }
.price-block { text-align: center; }
.price-free { font-family: var(--serif); font-size: 42px; font-weight: 600; }
.price-then { color: var(--ink-faint); font-weight: 600; margin-top: 4px; font-size: 16px; }
.price-keep { margin-top: 16px; font-size: 15px; color: var(--ink-soft); font-style: italic; font-family: var(--serif); }

/* final cta */
.final {
  background:
    radial-gradient(90% 130% at 50% 115%, rgba(240, 135, 31, 0.55), rgba(240, 135, 31, 0) 60%),
    linear-gradient(180deg, var(--night-2), var(--night));
  color: var(--on-night);
  text-align: center;
  padding: 120px 0 130px;
}
.final .lede { color: var(--on-night-soft); font-size: 20px; max-width: 30em; margin: 0 auto 34px; }
.final .cta-row { justify-content: center; }
.final .cta-note { color: var(--on-night-faint); }
.final-mica { width: 120px; margin: 0 auto 20px; filter: drop-shadow(0 0 34px rgba(255, 170, 70, 0.55)); animation: breathe 4.5s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .hero-mica, .final-mica, .coals { animation: none; }
  .reveal { transition: none; opacity: 1; transform: none; }
}

/* footer */
footer { background: var(--night); color: var(--on-night-faint); padding: 44px 0 60px; font-size: 15px; }
footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
footer a { color: var(--on-night-soft); text-decoration: none; margin-left: 22px; }
footer a:hover { color: var(--on-night); }
footer .fm { font-family: var(--serif); font-size: 20px; color: var(--on-night); display: flex; gap: 9px; align-items: center; }
footer .fm img { width: 26px; }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 700ms ease, transform 700ms ease; }
.reveal.in { opacity: 1; transform: none; }

/* confirmation toast */
#saved-toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  translate: -50%;
  z-index: 90;
  background: rgba(20, 18, 16, 0.92);
  color: var(--on-night);
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 16px 40px rgba(6, 9, 8, 0.5);
  max-width: min(420px, calc(100vw - 40px));
  text-align: center;
  line-height: 1.45;
}

/* prose pages (privacy, terms) */
.prose { max-width: 720px; margin: 0 auto; padding: 72px 28px 110px; }
.prose h1 { font-size: clamp(36px, 5vw, 52px); margin-bottom: 8px; }
.prose .updated { color: var(--ink-faint); font-weight: 600; font-size: 15px; margin-bottom: 40px; }
.prose h2 { font-size: 27px; margin: 42px 0 10px; }
.prose p, .prose li { color: var(--ink-soft); font-size: 17px; }
.prose ul { padding-left: 22px; margin: 10px 0; }
.prose a { color: var(--rust-deep); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  section { padding: 72px 0; }
  .hero .wrap { grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 64px; }
  .hero-art { min-height: 0; margin-top: 8px; }
  .hero-mica { bottom: -18px; }
  .loop-grid { grid-template-columns: 1fr; }
  .split, .plus-card { grid-template-columns: 1fr; gap: 34px; }
  .split.flip > .split-art { order: 0; }
  .plus-card { padding: 34px 26px; }
  .phone, .phone.mid { width: min(250px, 70vw); }
}
