/* Rested Well home page: the app's premium look. Near-black ground, one warm
   champagne accent, light type weights, lots of room. Tokens mirror the app's
   DAY palette (src/theme/theme.ts on premium-restyle) and premium.ts glow.
   The legal pages use style.css, which shares these tokens. */

:root {
  --bg: #07070A;          /* palette.bg */
  --surface: #0C0C10;     /* palette.surface */
  --surface-alt: #141318; /* palette.surfaceAlt */
  --text: #EDEDF0;        /* main text (was #F3ECE0) */
  --body: #D4D4DA;        /* was rgba(230,220,200,0.82) */
  --dim: #B8B8C0;         /* secondary (was rgba(220,210,190,0.58)) */
  --faint: rgba(237,237,240,0.42); /* palette.textFaint (decorative only) */
  --line: rgba(232,213,181,0.22);  /* was 0.16 */
  --glass: rgba(255,255,255,0.025);
  --glass-strong: rgba(255,255,255,0.06);
  --accent: #E8D5B5;      /* champagne, the only accent */
  --accent-deep: #C9B08A; /* champagne, deep (labels, gradient foot) */
  --accent-ink: #1A1510;  /* palette.accentText */
  --glow: rgba(201,176,138,0.14);
  --max: 1200px;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Warm light falling from above, behind everything. No stars, no blue. */
.sky {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1500px;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 38% at 50% 0%, rgba(232,213,181,0.09), transparent 70%),
    radial-gradient(ellipse 42% 30% at 50% 58%, rgba(201,176,138,0.16), rgba(201,176,138,0.05) 50%, transparent 75%);
}

a { color: var(--accent); text-underline-offset: 3px; text-decoration-color: rgba(232,213,181,0.4); }
a:hover { text-decoration-color: var(--accent); }
::selection { background: rgba(232,213,181,0.28); color: var(--text); }

main { max-width: var(--max); margin: 0 auto; padding: 0 48px 56px; }

h1, h2, h3 { margin: 0; color: var(--text); text-wrap: balance; }
h2 {
  font-size: clamp(2.1rem, 4.4vw, 3.6rem);
  font-weight: 250;
  letter-spacing: -0.04em;
  line-height: 1.04;
  margin-bottom: 18px;
}
h3 { font-size: 1.06rem; font-weight: 500; letter-spacing: -0.01em; line-height: 1.3; margin-bottom: 8px; }
p { margin: 0 0 14px; }

/* ------------------------------------------------------------- top bar */
.top {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--accent);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.brand img { border-radius: 7px; box-shadow: 0 0 0 1px var(--line); }
.top-store {
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: opacity .2s, transform .2s;
}
.top-store:hover { opacity: .9; }
.top-store:active { transform: scale(.97); }

/* ---------------------------------------------------------------- hero */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 0 0;
}
.eyebrow {
  color: var(--accent-deep);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(3rem, 8.4vw, 7.4rem);
  font-weight: 250;
  line-height: 0.95;
  letter-spacing: -0.055em;
  color: #F6EFE3;
  text-transform: none;
  margin-bottom: 30px;
}
.hero h1 .l2 {
  display: block;
  background: linear-gradient(180deg, #F3E6CF 0%, var(--accent-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-transform: none;
  padding-bottom: 0.08em;
}
.hero .sub {
  font-size: 1.12rem;
  font-weight: 300;
  color: var(--body);
  max-width: 40rem;
  margin: 0 auto 32px;
}
.badge { display: inline-block; line-height: 0; transition: opacity .2s; }
.badge:hover { opacity: .88; }
.badge img { width: 164px; height: auto; display: block; }
.fine { color: var(--dim); font-size: 13.5px; margin-top: 14px; }

/* Phone screenshots show at full original color and brightness: no filters,
   overlays or tints on the images. Only a thin edge fade on the carousel. */
.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 64px;
}
.hero-art::before {
  content: "";
  position: absolute;
  left: 50%; top: 8%;
  width: min(1100px, 140%); height: 80%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse 45% 50% at 50% 50%, rgba(201,176,138,0.24), rgba(201,176,138,0.07) 50%, transparent 72%);
  filter: blur(8px);
  z-index: -1;
}
.hero-art img,
.track figure {
  padding: 8px;
  background: linear-gradient(160deg, #3A342C, #121110 40%, #1F1C18);
  box-shadow: 0 40px 100px rgba(0,0,0,0.45), 0 0 0 1px rgba(232,213,181,0.14), 0 0 80px rgba(201,176,138,0.10);
}
.track figure { box-shadow: 0 24px 50px rgba(0,0,0,0.4), 0 0 0 1px rgba(232,213,181,0.14); }
.hero-art img {
  display: block;
  width: min(100%, 340px);
  height: auto;
  border-radius: 40px;
}

/* ------------------------------------------------------------ carousel */
.shots { padding: 88px 0 8px; }
.carousel { position: relative; }
.track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 24px calc(50% - 140px) 56px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
}
.track::-webkit-scrollbar { display: none; }
.track figure {
  flex: 0 0 280px;
  margin: 0;
  scroll-snap-align: center;
  border-radius: 36px;
  overflow: hidden;
}
.track img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 29px;
}
.arrow {
  position: absolute;
  top: 46%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(7,7,10,0.72);
  color: var(--accent);
  font-size: 26px;
  line-height: 42px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: border-color .2s;
}
.arrow:hover { border-color: rgba(232,213,181,0.42); }
.arrow.prev { left: 0; }
.arrow.next { right: 0; }
.dots { display: flex; justify-content: center; gap: 10px; margin-top: 4px; }
.dots button {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  border: none;
  padding: 0;
  background: var(--faint);
  cursor: pointer;
  transition: width .25s, background .25s;
}
.dots button[aria-selected="true"] { background: var(--accent); width: 22px; }

/* ------------------------------------------------------------- pillars */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 96px;
  border-top: 1px solid var(--line);
}
.pillar { padding: 36px 32px 0 0; margin-right: 32px; border-right: 1px solid var(--line); }
.pillar:last-child { border-right: 0; margin-right: 0; }
.pillar .glyph { color: var(--accent-deep); font-size: 18px; margin-bottom: 18px; }
.pillar h3 { font-size: 2.3rem; font-weight: 200; letter-spacing: -0.04em; line-height: 1.05; color: var(--accent); margin-bottom: 16px; }
.pillar p { color: var(--dim); font-size: 15px; line-height: 1.6; margin: 0; }

/* ------------------------------------------------------------ features */
.features {
  padding: 128px 0 8px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 80px;
  align-items: start;
}
.features h2 { position: sticky; top: 40px; font-size: clamp(2.1rem, 3.6vw, 3.1rem); }
.grid { counter-reset: feat; }
.feature {
  counter-increment: feat;
  display: grid;
  grid-template-columns: 56px 1fr;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.feature:last-child { border-bottom: 1px solid var(--line); }
.feature::before {
  content: counter(feat, decimal-leading-zero);
  grid-row: 1 / span 2;
  color: var(--accent-deep);
  font-size: 12px;
  letter-spacing: 0.16em;
  padding-top: 4px;
}
.feature h3 { font-size: 1.1rem; }
.feature p { color: var(--dim); font-size: 15px; margin: 0; }

/* ------------------------------------------------------------- honest */
.honest {
  margin-top: 56px;
  padding: 32px 28px;
  border-radius: 24px;
  background: var(--glass);
  border: 1px solid var(--line);
}
.honest h2 { color: var(--accent); }
.honest p { max-width: 46rem; color: var(--body); }
.honest .quiet { color: var(--dim); font-style: italic; margin: 0; }

/* ------------------------------------------------------------- pricing */
.pricing {
  position: relative;
  overflow: hidden;
  margin-top: 128px;
  padding: 80px 40px 64px;
  text-align: center;
  border-radius: 32px;
  border: 1px solid var(--line);
  background: var(--glass);
}
.pricing::before {
  content: "";
  position: absolute;
  left: 50%; top: -280px;
  width: 900px; height: 560px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(201,176,138,0.24), transparent 65%);
  pointer-events: none;
}
.pricing > * { position: relative; }
.pricing .sub { color: var(--dim); max-width: 32rem; margin: 0 auto; }
.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: 820px;
  margin: 44px auto 22px;
}
.plan {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 34px 16px 26px;
}
.plan.featured {
  border-color: rgba(232,213,181,0.42);
  background: linear-gradient(160deg, rgba(232,213,181,0.08), rgba(255,255,255,0.02));
}
.plan .tag {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.plan .price { display: block; font-size: 2.9rem; font-weight: 200; letter-spacing: -0.04em; line-height: 1.1; color: #F6EFE3; }
.plan .per { display: block; color: var(--dim); font-size: 14px; margin-top: 4px; }
.pricing .fine { max-width: 36rem; margin: 0 auto 30px; }

/* ----------------------------------------------------------------- faq */
.faq {
  padding: 128px 0 8px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  column-gap: 80px;
  align-items: start;
}
.faq h2 { grid-column: 1; grid-row: 1 / span 20; position: sticky; top: 40px; }
details { grid-column: 2; border-top: 1px solid var(--line); padding: 20px 0; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary {
  cursor: pointer;
  font-weight: 400;
  font-size: 1.06rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  color: var(--text);
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent-deep); font-size: 22px; font-weight: 300; line-height: 1; }
details[open] summary::after { content: "–"; }
summary:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
details p { color: var(--dim); font-size: 15.5px; margin: 12px 0 0; max-width: 40rem; }

/* -------------------------------------------------------------- footer */
footer {
  margin-top: 112px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 13.5px;
}
.foot-links { display: flex; flex-wrap: wrap; gap: 24px; margin-bottom: 12px; }
.foot-links a { color: var(--body); text-decoration: none; }
.foot-links a:hover { color: var(--accent); }

/* --------------------------------------------------------------- phone */
@media (max-width: 860px) {
  main { padding: 0 20px 44px; }
  .top { padding: 18px 20px; }
  .brand { font-size: 11px; letter-spacing: 0.22em; }
  .top-store { height: 38px; padding: 0 16px; font-size: 13.5px; }
  .hero { padding-top: 28px; }
  .eyebrow { font-size: 10px; letter-spacing: 0.16em; }
  .hero h1 { font-size: clamp(2.6rem, 12vw, 4rem); margin-bottom: 22px; }
  .hero .sub { font-size: 1.02rem; }
  .hero-art { margin-top: 48px; }
  .hero-art::before { width: 100%; }
  .hero-art img { width: min(82%, 300px); border-radius: 36px; }
  .shots { padding-top: 64px; }
  .track { padding: 16px calc(50% - 120px) 32px; gap: 16px; }
  .track figure { flex-basis: 240px; border-radius: 32px; }
  .track img { border-radius: 25px; }
  .arrow { display: none; }
  .pillars { grid-template-columns: 1fr; margin-top: 64px; border-top: 0; }
  .pillar { border-right: 0; margin-right: 0; padding: 28px 0; border-top: 1px solid var(--line); }
  .pillar h3 { font-size: 2rem; }
  .features, .faq { grid-template-columns: 1fr; gap: 28px; padding-top: 88px; }
  .features h2, .faq h2 { position: static; }
  .faq h2 { grid-row: auto; }
  details { grid-column: 1; }
  .faq { row-gap: 0; }
  .pricing { margin-top: 88px; padding: 56px 18px 44px; border-radius: 26px; }
  .plans { grid-template-columns: 1fr; max-width: 340px; }
  .plan.featured { order: -1; }
  footer { margin-top: 80px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
