/* Auralo home page. Builds on styles.css tokens and the 12-column .g12 grid. */
main { overflow-x: clip; }
section h2 { max-width: 16ch; }

/* ---------- Aura: soft light field of concentric rings, echoing the app's score rings ---------- */
.aura {
  --c: var(--aura, var(--violet));
  position: absolute; left: 50%; top: 50%; z-index: 0; pointer-events: none;
  width: var(--aura-size, 150%); aspect-ratio: 1; translate: -50% -50%; border-radius: 50%;
  background:
    radial-gradient(closest-side, color-mix(in srgb, var(--c) 34%, transparent), color-mix(in srgb, var(--c) 10%, transparent) 55%, transparent 78%),
    repeating-radial-gradient(circle, transparent 0 31px, color-mix(in srgb, var(--c) 26%, transparent) 31px 32px);
  -webkit-mask: radial-gradient(closest-side, #000 20%, rgba(0,0,0,.55) 60%, transparent 100%);
  mask: radial-gradient(closest-side, #000 20%, rgba(0,0,0,.55) 60%, transparent 100%);
}
.aura::after { /* one partial arc, like a score ring caught mid-fill */
  content: ""; position: absolute; inset: 27%; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--c) 0 var(--arc, 64%), transparent 0);
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  mask: radial-gradient(closest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  opacity: .5;
}

/* Shared ring (app ScoreRing look) */
.ring-s { position: relative; display: grid; place-items: center; aspect-ratio: 1; }
.ring-s svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-s circle { fill: none; stroke-width: 3.6; stroke: color-mix(in srgb, var(--c) 22%, transparent); }
.ring-s circle.v { stroke: var(--c); stroke-dasharray: var(--v) 100; stroke-linecap: round; }
.ring-s b { position: relative; font-family: var(--rounded); font-weight: 700; }
.tile { flex: none; display: grid; place-items: center; border-radius: 10px; color: var(--t); background: color-mix(in srgb, var(--t) 15%, transparent); }

/* ---------- Hero ---------- */
.hero { padding: var(--sec-m) 0 var(--sec-l); }
.hero-grid { align-items: center; row-gap: 48px; }
.status { display: inline-flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--ink-2); margin-bottom: 28px; }
.status::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--m-plan); box-shadow: 0 0 0 4px color-mix(in srgb, var(--m-plan) 22%, transparent); }
.hero h1 em { font-style: italic; color: var(--accent); }
.lede { font-size: clamp(1.08rem, 1rem + .35vw, 1.25rem); color: var(--ink-2); max-width: 34em; margin: 28px 0 36px; }
.hero-fig { position: relative; margin: 0; display: grid; justify-items: center; isolation: isolate; }
.hero-fig .aura { --aura-size: 175%; --arc: 47%; --aura: var(--m-recovery); }
.hero-fig figcaption { position: relative; z-index: 1; margin-top: 18px; font-size: .82rem; color: var(--ink-3); }
.phone {
  position: relative; z-index: 1; width: min(330px, 84vw); padding: 10px; border-radius: 54px;
  background: linear-gradient(150deg, #3a3940, #121216 30%, #0b0b0e);
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.14), 0 44px 80px -32px rgba(23,16,70,.55), 0 14px 26px -14px rgba(0,0,0,.35);
}

/* Recreated iOS Today screen */
.ios { aspect-ratio: 9 / 19.5; border-radius: 44px; overflow: hidden; background: var(--app-bg); color: var(--app-text); padding: 14px 14px 0; display: flex; flex-direction: column; gap: 10px; font-family: var(--sans); container-type: inline-size; position: relative; }
.ios small { display: block; color: var(--app-text-2); font-size: 3.6cqw; line-height: 1.3; }
.ios-status { display: flex; justify-content: space-between; align-items: center; font: 600 4.6cqw var(--sans); padding: 2px 16px 6px; }
.ios-icons { display: flex; gap: 4px; align-items: center; }
.ios-icons i { width: 5cqw; height: 3cqw; border-radius: 1px; background: currentColor; opacity: .9; }
.ios-icons i.batt { width: 7.5cqw; height: 3.4cqw; border-radius: 3px; background: #34c759; }
.ios-title { margin: 8px 2px 0; font: 700 9cqw/1.1 var(--sans); letter-spacing: -0.02em; }
.ios-sub { margin: -8px 2px 2px; font-size: 3.6cqw; color: var(--app-text-2); }
.ios-card { background: var(--app-card); border-radius: 18px; padding: 12px 13px; }
.ios-row { display: flex; justify-content: space-between; font-size: 4.2cqw; }
.ios-muted { color: var(--app-text-2); }
.ios-bar { height: 5px; border-radius: 9px; background: color-mix(in srgb, var(--app-text-2) 18%, transparent); margin: 9px 0 11px; }
.ios-bar i { display: block; width: 4%; height: 100%; border-radius: inherit; background: #34c759; }
.ios-next { display: flex; gap: 10px; align-items: center; font-size: 4cqw; }
.ios-next .tile { width: 11cqw; height: 11cqw; }
.ios-next .tile svg { width: 60%; }
.ios-next b { font-weight: 600; display: block; }
.ios-rings { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; }
.ios-rings .ring-s { width: 100%; }
.ios-rings .ring-s b { font-size: 5.4cqw; }
.ios-rings small { margin-top: 5px; font-size: 3.2cqw; }
.ios-note { position: relative; padding-left: 24px; }
.ios-note::before { content: ""; position: absolute; left: 11px; top: 12px; bottom: 12px; width: 4px; border-radius: 2px; background: #ffb81a; }
.ios-pill { font: 600 3.2cqw var(--sans); color: #34c759; background: color-mix(in srgb, #34c759 15%, transparent); padding: 2px 8px; border-radius: 99px; }
.ios-big { margin: 2px 0 4px; font: 700 6.4cqw var(--sans); }
.ios-row b { font: 700 4.4cqw var(--rounded); }
.ios-card.ios-next { padding: 10px 13px; }
.ios-note strong { display: block; font-size: 4.6cqw; line-height: 1.25; margin-bottom: 4px; }
.ios-tabs { margin-top: auto; margin-bottom: 14px; display: flex; justify-content: space-around; padding: 10px 6px; border-radius: 999px; background: color-mix(in srgb, var(--app-card) 90%, transparent); box-shadow: 0 6px 20px -8px rgba(0,0,0,.25); font-size: 2.9cqw; color: var(--app-text-2); }
.ios-tabs .on { color: #34c759; font-weight: 600; }

/* ---------- Waitlist ---------- */
.join { max-width: 540px; }
.field-row { display: flex; gap: 8px; padding: 6px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule), 0 10px 30px -18px rgba(46,35,128,.35); }
.field-row:focus-within { box-shadow: inset 0 0 0 2px var(--focus), 0 10px 30px -18px rgba(46,35,128,.35); }
.field-row input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: 400 1.02rem var(--sans); padding: 0 16px; min-height: 48px; outline: none; }
.field-row input::placeholder { color: var(--ink-3); }
.field-row .btn { min-height: 48px; padding: 0 22px; }
.form-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; margin: 12px 4px 0; }
.check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px 0 12px; border: 1px solid var(--rule); border-radius: 999px; font: 500 .95rem var(--sans); color: var(--ink-2); cursor: pointer; user-select: none; transition: border-color .2s, background .2s, color .2s; }
.check:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--rule)); }
.check:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--ink); }
.check:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.check input { appearance: none; flex: none; width: 20px; height: 20px; margin: 0; border: 1.5px solid var(--ink-3); border-radius: 50%; display: grid; place-content: center; cursor: pointer; transition: background .2s, border-color .2s; }
.check input::after { content: ""; width: 10px; height: 6px; border: solid var(--accent-ink); border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg) scale(0); transition: transform .15s ease-out; }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { transform: translateY(-1px) rotate(-45deg) scale(1); }
@media (prefers-reduced-motion: reduce) { .check, .check input, .check input::after { transition: none; } }
.ref-note { margin: 0; font-size: .9rem; color: var(--accent); }
.consent { font-size: .86rem; color: var(--ink-3); margin: 2px 4px 0; max-width: 46ch; }
.form-error { color: #b3261e; font-size: .92rem; margin: 10px 4px 0; }
.form-error:empty { display: none; }
:root[data-theme="dark"] .form-error { color: #ff8a80; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .form-error { color: #ff8a80; } }
.turnstile:empty { display: none; }
.turnstile { margin: 10px 4px 0; }
.join-form.busy .btn { opacity: .6; pointer-events: none; }
@media (max-width: 440px) { .field-row { flex-direction: column; border-radius: 22px; } .field-row .btn { width: 100%; } }

.joined:focus { outline: none; }
.preview-flag { display: inline-block; font-size: .82rem; padding: 6px 12px; border-radius: 8px; background: #fff3c4; color: #5c4400; margin-bottom: 18px; }
.joined-line { margin: 0; font-weight: 600; }
.position { font: 400 clamp(4rem, 3rem + 5vw, 7.5rem)/0.95 var(--serif); letter-spacing: -0.03em; margin: 6px 0 12px; font-variant-numeric: tabular-nums; }
.position .hash { font-style: italic; color: var(--ink-2); font-size: .55em; letter-spacing: -.01em; }
.invite { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--rule); }
.invite-title { font-weight: 600; margin-bottom: 12px; }
.meter { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-width: 320px; }
.meter i { height: 8px; border-radius: 99px; background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--rule); }
.meter i.on { background: linear-gradient(90deg, var(--indigo), var(--violet)); box-shadow: none; }
:root[data-theme="dark"] .meter i.on { background: var(--accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .meter i.on { background: var(--accent); } }
.share { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.share input { flex: 1 1 220px; min-width: 0; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); font: 500 .92rem var(--sans); }
.copied { min-height: 1.2em; margin-top: 8px; }

/* ---------- A day with Auralo ---------- */
.day { padding: var(--sec-l) 0 var(--sec-s); border-top: 1px solid var(--rule); }
.day-head { align-items: end; row-gap: 20px; margin-bottom: var(--sec-s); }
.day-head p { margin: 0; max-width: 34em; }
.clock { position: sticky; top: calc(50vh - 120px); height: 240px; align-self: start; display: grid; place-items: center; --clock-c: var(--m-recovery); --p: 5; }
.clock svg { position: absolute; inset: 0; margin: auto; width: 240px; height: 240px; transform: rotate(-90deg); }
.clock circle { fill: none; stroke-width: 2.5; }
.clock-track { stroke: var(--rule); }
.clock-arc { stroke: var(--clock-c); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--p)); transition: stroke-dashoffset .9s cubic-bezier(.2,.7,.2,1), stroke .6s; }
.clock-face { display: flex; align-items: baseline; gap: 6px; font-family: var(--serif); }
.clock-time { font-size: 4.6rem; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.clock-ampm { font-style: italic; font-size: 1.5rem; color: var(--ink-2); }
.clock.swap .clock-face { animation: tick .45s ease; }
@keyframes tick { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.beats { list-style: none; margin: 0; padding: 0; }
.beat { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); column-gap: var(--gutter); align-items: center; min-height: 86vh; padding: 5vh 0; }
.beat-copy { grid-column: 1 / span 4; }
.beat-fig { grid-column: 5 / span 5; }
.beat-time { display: flex; align-items: baseline; gap: 12px; font-size: .88rem; color: var(--ink-3); margin-bottom: 14px; }
.beat-time time, .beat-time .big { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.beat h3 { font: 400 clamp(1.8rem, 1.3rem + 1.5vw, 2.6rem)/1.08 var(--serif); letter-spacing: -0.01em; margin-bottom: 18px; text-wrap: balance; }
.beat-copy p:last-child { color: var(--ink-2); max-width: 30em; margin: 0; }
.beat-fig { position: relative; margin: 0; display: grid; justify-items: center; isolation: isolate; padding: 40px 0; }
.beat-fig .aura { --aura-size: 130%; }
.screen { position: relative; z-index: 1; width: min(400px, 100%); border-radius: 28px; overflow: hidden; background: #f2f2f7; box-shadow: 0 30px 60px -30px rgba(23,16,70,.45), 0 0 0 1px rgba(0,0,0,.05); }

/* Recreated app UI (the app's cards: SF, 20pt radius, grouped background) */
.app { position: relative; z-index: 1; width: min(400px, 100%); background: var(--app-bg); color: var(--app-text); border-radius: 28px; padding: 12px; box-shadow: 0 30px 60px -30px rgba(23,16,70,.45), 0 0 0 1px rgba(0,0,0,.05); font-family: var(--sans); }
.app small { display: block; color: var(--app-text-2); font-size: .8rem; line-height: 1.3; margin-top: 2px; }
.plan-head { display: flex; gap: 14px; align-items: center; background: var(--app-card); border-radius: 20px; padding: 14px 16px; margin-bottom: 10px; }
.plan-count { flex: none; width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; white-space: nowrap; font: 600 1.05rem var(--rounded); box-shadow: inset 0 0 0 5px color-mix(in srgb, var(--m-plan) 25%, transparent); }
.plan-head strong { font-size: .98rem; }
.checklist { list-style: none; margin: 0; padding: 2px 14px; background: var(--app-card); border-radius: 20px; }
.checklist li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid color-mix(in srgb, var(--app-text-2) 16%, transparent); }
.checklist li:last-child { border-bottom: 0; }
.checklist .tile { width: 40px; height: 40px; }
.checklist .tile svg { width: 22px; height: 22px; }
.checklist .txt { flex: 1; min-width: 0; }
.checklist b { display: block; font-weight: 600; font-size: .93rem; line-height: 1.3; }
.tick { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--app-text-2) 50%, transparent); position: relative; transition: background .35s, border-color .35s; }
.tick::after { content: ""; position: absolute; left: 7.5px; top: 3.5px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) scale(0); transition: transform .3s cubic-bezier(.3,1.6,.5,1); }
.plan.run li[data-auto] .tick { background: var(--m-plan); border-color: var(--m-plan); transition-delay: calc(var(--i) * 650ms + 400ms); }
.plan.run li[data-auto] .tick::after { transform: rotate(45deg) scale(1); transition-delay: calc(var(--i) * 650ms + 450ms); }
.plan.run li[data-auto] b { color: var(--app-text-2); transition: color .3s calc(var(--i) * 650ms + 400ms); }

.breathe-stack { position: relative; z-index: 1; width: min(400px, 100%); display: grid; gap: 14px; }
.breathe-stack .app { width: 100%; }
.notif { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: start; border-radius: 22px; padding: 14px 16px; }
.notif img { border-radius: 8px; width: 34px; height: 34px; }
.notif strong { display: block; font-size: .92rem; }
.notif span { font-size: .9rem; line-height: 1.35; }
.notif time { font-size: .78rem; color: var(--app-text-2); }
.breathe { display: grid; justify-items: center; padding: 30px 16px 20px; }
.breathe-orb { width: 190px; height: 190px; border-radius: 50%; display: grid; place-items: center; background: repeating-radial-gradient(circle, transparent 0 18px, color-mix(in srgb, var(--m-stress) 22%, transparent) 18px 19px); }
.breathe-orb i, .w-orb i { width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #7fe3f0, var(--m-stress) 60%, #1f7d8e); box-shadow: 0 0 40px color-mix(in srgb, var(--m-stress) 50%, transparent); animation: breathe 10.9s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(.55); } 50% { transform: scale(1.35); } }
.breathe-cue { position: relative; height: 1.5em; width: 100%; margin: 18px 0 2px; text-align: center; font-weight: 600; }
.breathe-cue span { position: absolute; inset: 0; animation: cue 10.9s steps(1) infinite; }
.breathe-cue .cue-out { animation-delay: -5.45s; }
@keyframes cue { 0% { opacity: 1; } 50% { opacity: 0; } }
.breathe-meta { margin: 0; font-size: .8rem; color: var(--app-text-2); }

@media (max-width: 1000px) {
  .clock { display: none; }
  .beats { grid-column: 1 / -1; }
  .beat { grid-template-columns: 1fr; min-height: 0; padding: 48px 0; row-gap: 8px; border-top: 1px solid var(--rule); }
  .beat-copy, .beat-fig { grid-column: 1; }
  .beat-time { flex-direction: column; gap: 2px; }
  .beat-time time, .beat-time .big { font: italic 400 clamp(2.8rem, 2rem + 4vw, 4rem)/1 var(--serif); letter-spacing: -0.02em; }
}

/* Scroll-linked entrances: CSS scroll-driven where supported, IntersectionObserver (.in) otherwise. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .beat-fig > :not(.aura) { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% cover 35%; }
  }
  @supports not (animation-timeline: view()) {
    .js .beat .beat-fig > :not(.aura) { opacity: 0; transform: translateY(40px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
    .js .beat.in .beat-fig > :not(.aura) { opacity: 1; transform: none; }
  }
  .js .beat .beat-fig .aura { opacity: 0; scale: .6; transition: opacity 1.2s ease, scale 1.4s cubic-bezier(.2,.7,.2,1); }
  .js .beat.in .beat-fig .aura { opacity: 1; scale: 1; }
}
@keyframes rise { from { opacity: 0; transform: translateY(56px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .breathe-orb i, .w-orb i { animation: none; transform: scale(1); }
  .breathe-cue .cue-out { display: none; }
  .breathe-cue span { animation: none; }
}
