/* Rise, "Sunny" theme: cream → apricot by day, warm cocoa by night. Mirrors Shared/Theme.swift. */
:root {
  --cream: #fff5e3; --apricot: #ffcca3; --cocoa: #40261c;
  --night-top: #211a1c; --night-bottom: #452b2b; --moonlight: #fff2de;
  --coral: #c74738; --butter: #ffdb73; --marigold: #ffb33d;
  --bg: linear-gradient(180deg, var(--cream), var(--apricot));
  --text: var(--cocoa); --dim: rgba(64, 38, 28, .78);
  --panel: rgba(255, 255, 255, .55); --line: rgba(64, 38, 28, .14);
  --radius: 24px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: linear-gradient(180deg, var(--night-top), var(--night-bottom));
    --text: var(--moonlight); --dim: rgba(255, 242, 222, .78);
    --panel: rgba(255, 242, 222, .08); --line: rgba(255, 242, 222, .16);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: linear-gradient(180deg, var(--night-top), var(--night-bottom));
  --text: var(--moonlight); --dim: rgba(255, 242, 222, .78);
  --panel: rgba(255, 242, 222, .08); --line: rgba(255, 242, 222, .16);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh; background: var(--cream); background-image: var(--bg); background-attachment: fixed;
  color: var(--text); font: 17px/1.55 ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, sans-serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body { background-color: var(--night-top); } }
:root[data-theme="dark"] body { background-color: var(--night-top); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 8px; }

.wrap { width: min(1040px, 100% - 32px); margin-inline: auto; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.bar nav { display: flex; gap: 18px; font-size: 15px; }
.bar nav a { text-decoration: none; opacity: .8; padding: 10px 0; }
.bar nav a:hover, .bar nav a[aria-current] { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }

h1, h2, h3 { line-height: 1.12; letter-spacing: -.01em; }
h1 { font-size: clamp(40px, 7vw, 68px); font-weight: 800; }
h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
h3 { font-size: 20px; font-weight: 700; }
p { color: var(--dim); }

.hero { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 32px; padding: 40px 0 72px; }
.hero .lede { font-size: clamp(18px, 2.2vw, 21px); margin: 18px 0 28px; max-width: 34ch; }
.hero .sun { justify-self: center; width: min(320px, 70vw); animation: breathe 4.8s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.03); } }
@media (prefers-reduced-motion: reduce) { .hero .sun { animation: none; } }

.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.store {
  display: inline-flex; align-items: center; gap: 10px; min-height: 54px; padding: 0 22px; border-radius: 999px;
  background: var(--coral); color: #fff; font-weight: 700; text-decoration: none; box-shadow: 0 8px 24px rgba(199, 71, 56, .3);
  transition: transform .2s cubic-bezier(.3, 1.6, .5, 1);
}
.store:hover { transform: scale(1.03); }
.store:active { transform: scale(.96); }
.store[aria-disabled="true"] { cursor: default; box-shadow: none; opacity: .92; }
.store svg { width: 20px; height: 20px; fill: currentColor; }
.small { font-size: 14px; color: var(--dim); }

section { padding: 56px 0; }
.sec-head { max-width: 40ch; margin-bottom: 28px; }
.sec-head p { margin-top: 10px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.card { background: var(--panel); border-radius: var(--radius); padding: 22px; display: grid; gap: 8px; align-content: start; }
.card img { width: 44px; height: 44px; }
.card .step { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--coral); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .card .step { color: var(--marigold); } }
:root[data-theme="dark"] .card .step { color: var(--marigold); }

.night {
  background: linear-gradient(180deg, var(--night-top), var(--night-bottom)); color: var(--moonlight);
  border-radius: 32px; padding: 40px; display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: center;
}
.night p { color: rgba(255, 242, 222, .8); }
.night img { width: 180px; }

.modes { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.modes img.sun { width: 200px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.chip { display: inline-flex; align-items: center; gap: 8px; background: var(--panel); border-radius: 999px; padding: 8px 16px 8px 10px; font-weight: 700; }
.chip img { width: 26px; height: 26px; }

.faq { display: grid; gap: 12px; max-width: 760px; }
.faq details { background: var(--panel); border-radius: 18px; padding: 4px 20px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; min-height: 44px; }
.faq details p { padding-bottom: 16px; }

footer { padding: 40px 0 56px; border-top: 1px solid var(--line); margin-top: 40px; display: grid; gap: 10px; }
footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
footer nav a { padding: 8px 0; }

/* Legal pages */
.legal { max-width: 72ch; padding: 24px 0 40px; display: grid; gap: 34px; }
.legal header p { margin-top: 8px; }
.legal section { padding: 0; display: grid; gap: 10px; }
.legal h2 { font-size: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.legal ul { padding-left: 22px; display: grid; gap: 8px; color: var(--dim); }
.legal strong { color: var(--text); }
.summary { background: var(--panel); border-radius: var(--radius); padding: 20px 22px; }
.summary p { color: var(--text); }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding-top: 16px; text-align: left; }
  .hero .sun { order: -1; width: 200px; justify-self: start; }
  .night, .modes { grid-template-columns: 1fr; padding: 28px; }
  .modes { padding: 0; }
  .night img, .modes img.sun { width: 130px; }
  .bar nav { gap: 14px; }
  .bar nav .opt { display: none; }
}

/* On the night ground the night card needs its own edge. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .night { background: rgba(255, 242, 222, .06); border: 1px solid var(--line); }
}
:root[data-theme="dark"] .night { background: rgba(255, 242, 222, .06); border: 1px solid var(--line); }
