/* Home only: the hero's live alarm card and the five sections under it. Tokens live in style.css. */

/* hero: the sentence split by the frame; the frame is tomorrow's alarm, worked out live */
.hero { padding: 4px var(--m) 0; }
.hero h1 { font-size: var(--t-display); }
.hero h1 span { display: block; }
.hero h1 .b { text-align: right; }
.reel { margin: 12px 0 16px; }
.sliver { height: 28px; overflow: hidden; border-radius: 0 0 22px 22px; background: var(--s1); display: flex; align-items: flex-end; justify-content: space-between; padding: 0 18px 6px; font-size: var(--t-small); color: var(--soft); }
.sliver.next { border-radius: 22px 22px 0 0; align-items: flex-start; padding: 6px 18px 0; }
.reel .morning { margin: 8px 0; }
.lede { max-width: 34ch; }
.hero .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 16px; }
.hero .actions small { font-size: var(--t-small); color: var(--soft); }

/* the app's own surfaces, inside data-ui fragments only */
[data-ui] { font-family: var(--sans); color: var(--ink); }
.card { background: var(--s1); border: 1px solid rgba(255,255,255,.10); border-radius: 22px; padding: 16px; }
.morning { display: flex; flex-direction: column; }
.morning .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: var(--t-small); color: var(--soft); }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 14px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.10); color: var(--ink); font: 500 var(--t-small)/1 var(--sans); cursor: pointer; }
select.chip { appearance: none; -webkit-appearance: none; padding-right: 30px; }
.chip:hover { background: rgba(255,255,255,.14); }
.select { position: relative; display: inline-block; }
.select::after { content: ""; position: absolute; right: 12px; top: 50%; width: 7px; height: 7px; border: solid var(--soft); border-width: 0 2px 2px 0; transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.clock { font: 200 var(--t-clock)/0.9 var(--round); letter-spacing: -0.04em; margin: 14px 0 6px; font-variant-numeric: tabular-nums; }
.clock small { font-size: var(--t-sub); font-weight: 300; letter-spacing: 0; margin-left: 6px; }
.when { font-size: var(--t-small); color: var(--soft); }
.when b { color: var(--ink); font-weight: 600; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; margin-top: 14px; background: rgba(255,255,255,.06); border-radius: 14px; }
.seg button { min-height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--soft); font: 500 var(--t-small)/1 var(--sans); cursor: pointer; transition: background .15s, color .15s; }
.seg button[aria-pressed="true"] { background: rgba(255,255,255,.16); color: var(--ink); }
.seg button:hover { color: var(--ink); }
.offset { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; font-size: var(--t-small); }
.stepper { display: flex; gap: 4px; }
.stepper button { width: 44px; height: 40px; border: 0; border-radius: 10px; background: rgba(255,255,255,.08); color: var(--ink); font: 400 var(--t-body)/1 var(--sans); cursor: pointer; transition: background .15s, transform .1s; }
.stepper button:hover { background: rgba(255,255,255,.14); }
.stepper button:active { transform: scale(.94); }
.window-note { margin-top: 6px; font-size: var(--t-small); color: var(--soft); }
.window-note b { color: var(--sun); font-weight: 600; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: -6px -6px 0; }
.pager button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--soft); font: 400 var(--t-sub)/1 var(--sans); cursor: pointer; }
.pager button:hover:not(:disabled) { color: var(--ink); background: rgba(255,255,255,.08); }
.pager button:disabled { opacity: .35; cursor: default; }

/* sections */
section { padding-block: 96px; }
.sec-h { font-size: var(--t-display); margin-bottom: 40px; max-width: 16ch; }

/* pick your light: one row, three states; the sky itself beside each */
.light-list { display: grid; gap: 48px; }
.light { display: grid; gap: 10px; }
.light-pic { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 22px; }
.light-word { font-size: var(--t-body); color: var(--soft); }
.light-row { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px; cursor: pointer; transition: background .15s, transform .15s var(--ease); }
.light-row:hover { background: var(--s2); }
.light-row b { display: block; font-size: var(--t-body); font-weight: 600; }
.light-row span { display: block; font-size: var(--t-small); color: var(--soft); line-height: 1.35; }
.light-row .t { font: 300 var(--t-sub)/1 var(--round); color: var(--ink); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.light-row input { position: absolute; opacity: 0; pointer-events: none; }
.light-row:has(input:checked) { background: var(--s2); border-color: rgba(255,214,115,.6); }
.light-row:has(input:focus-visible) { outline: 3px solid var(--sun); outline-offset: 3px; }

/* built like an alarm: staggered fragment cells */
.cells { display: grid; gap: 6px; }
.cell { background: var(--s1); border-radius: 22px; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; padding: 24px 0 0; }
.cell .txt { padding: 0 24px; }
.cell h3 { font-size: var(--t-body); letter-spacing: -0.01em; line-height: 1.25; margin-bottom: 6px; }
.cell p { font-size: var(--t-small); color: var(--soft); line-height: 1.45; max-width: 36ch; }
.frag { margin: 0 0 -1px 24px; border-radius: 18px 0 0 0; background: var(--bg); padding: 16px 18px; border: 1px solid rgba(255,255,255,.10); border-right: 0; border-bottom: 0; }
.cell:nth-child(even) .frag { margin: 0 24px -1px 0; border-radius: 0 18px 0 0; border: 1px solid rgba(255,255,255,.10); border-left: 0; border-bottom: 0; }
.alert { background: #2a2c45; border-radius: 26px; padding: 16px; margin: 0 24px 24px; }
.alert .top { display: flex; justify-content: space-between; font-size: var(--t-small); color: var(--soft); }
.alert .big { font: 300 var(--t-display)/1 var(--round); margin: 10px 0 4px; }
.alert .btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.alert .btns span { display: grid; place-items: center; height: 48px; border-radius: 24px; background: rgba(255,255,255,.14); font-weight: 600; font-size: var(--t-small); }
.alert .btns span:last-child { background: var(--sunrise); color: var(--bg); }
.kv { font-size: var(--t-small); }
.kv div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; }
.kv div + div { border-top: 1px solid rgba(255,255,255,.08); } /* taste-skill-ignore: a settings list inside the app's own fragment */
.kv span { color: var(--soft); }
.toggle { width: 51px; height: 31px; border-radius: 16px; background: #34c759; position: relative; flex: none; }
.toggle::after { content: ""; position: absolute; right: 2px; top: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; }
.tonight { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; gap: 4px; font-size: var(--t-small); color: var(--soft); }
.tonight b { display: block; font: 400 var(--t-sub)/1.2 var(--round); color: var(--ink); margin: 6px 0 2px; }
.dots { position: relative; height: 10px; margin: 4px 16% 10px; }
.dots::before { content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 2px; background: var(--moon); opacity: .6; }
.dots i { position: absolute; top: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--sun); transform: translateX(-50%); }
.year svg { width: 100%; height: auto; display: block; }
.year .legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: var(--t-small); color: var(--soft); margin-top: 8px; }
.year .legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }

/* one alarm, all year: four fields */
.seasons { padding: 0; }
.fields { display: grid; }
.field { padding: 40px var(--m) 48px; display: flex; flex-direction: column; gap: 24px; }
.field:nth-child(1) { background: var(--s2); }
.field:nth-child(2) { background: var(--sun); color: var(--bg); }
.field:nth-child(3) { background: var(--moon); color: var(--bg); }
.field:nth-child(4) { background: var(--bg); }
.field h2 { font-size: var(--t-sub); font-weight: 700; }
.field .clause { font-size: var(--t-sub); line-height: 1.2; letter-spacing: -0.01em; max-width: 18ch; }
.mini { width: 260px; background: var(--bg); color: var(--ink); border-radius: 22px; padding: 16px; transition: transform .15s var(--ease); }
.field:nth-child(4) .mini { background: var(--s1); }
.field:hover .mini { transform: translateY(-6px); }
.mini .d, .mini .s { font-size: var(--t-small); color: var(--soft); }
.mini .c { font: 200 var(--t-display)/1 var(--round); letter-spacing: -0.03em; margin: 8px 0 4px; font-variant-numeric: tabular-nums; }
.mini .c small { font-size: var(--t-body); font-weight: 300; }

/* faq */
.faq-grid { display: grid; gap: 0; }
.faq-list { display: grid; gap: 6px; }
details { background: var(--s1); border-radius: 18px; transition: background .2s; }
details[open] { background: var(--s2); }
details[open] summary .pm { color: var(--sun); }
summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 64px; padding: 16px 20px; font-size: var(--t-body); font-weight: 500; cursor: pointer; }
summary:hover { color: #fff; }
summary::-webkit-details-marker { display: none; }
summary .pm { position: relative; flex: none; width: 16px; height: 16px; }
summary .pm::before, summary .pm::after { content: ""; position: absolute; left: 0; top: 6.5px; width: 16px; height: 3px; border-radius: 2px; background: currentColor; transition: transform .2s var(--ease); }
summary .pm::after { transform: rotate(90deg); }
details[open] summary .pm::after { transform: rotate(0deg); }
details p { padding: 0 20px 20px; max-width: 52ch; }
.faq-more { margin-top: 20px; }

/* close: the sunrise itself, text beside */
.close { padding: 0; }
.close-pic { position: relative; height: 70svh; overflow: hidden; background: #0b0d1a; }
.close-pic video { width: 100%; height: 100%; object-fit: cover; object-position: 35% 60%; }
.close-text { background: var(--bg); padding: 40px var(--m) 32px; }
.close-text h2 { font-size: var(--t-display); font-weight: 300; }
.close-text p { margin: 16px 0 24px; max-width: 40ch; }
.close-text .btn { width: 100%; }


/* entrances: the parts of each section, staggered; nothing hidden without script or with reduced motion */
@media (prefers-reduced-motion: no-preference) {
  .js .rise { opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
  .js .rise.in { opacity: 1; transform: none; }
  .clock span { display: inline-block; transition: transform .35s var(--ease), opacity .35s; }
  .clock.tick span { transform: translateY(-8px); opacity: 0; }
}

/* the adaptation: wider screens */
@media (min-width: 768px) {
  .cells { grid-template-columns: 1fr 1fr; gap: 8px; }
  .light-list { gap: 56px; }
  .light { grid-template-columns: 5fr 7fr; align-items: center; column-gap: 24px; }
  .light-word { grid-column: 2; }
  .light-pic { grid-row: 1 / span 2; }
  .fields { grid-template-columns: 1fr 1fr; }
  .field { min-height: 60svh; justify-content: space-between; }
}
@media (min-width: 1100px) {
  :root { --t-display: clamp(40px, 3.5vw, 60px); }
  .hero { display: grid; grid-template-columns: 1fr minmax(420px, 30vw) 1fr; grid-template-rows: 1fr auto; column-gap: 40px; align-items: center; padding-top: 0; height: calc(100svh - 84px); min-height: 660px; }
  .hero h1 { grid-column: 1 / -1; grid-row: 1; display: grid; grid-template-columns: subgrid; align-items: center; }
  .hero h1 .a { grid-column: 1; white-space: nowrap; }
  .hero h1 .b { grid-column: 3; white-space: nowrap; }
  .reel { grid-column: 2; grid-row: 1 / span 2; margin: 0; position: relative; z-index: 1; }
  .sliver { height: 56px; }
  .hero .below { grid-column: 1; grid-row: 2; align-self: end; padding-bottom: 32px; }
  section { padding-block: 160px; }
  .sec-h { margin-bottom: 56px; }
  .light { grid-template-columns: 3fr 4fr 5fr; column-gap: 32px; }
  .light-word { grid-column: 1; grid-row: 1; text-align: right; font-size: var(--t-sub); }
  .light-pic { grid-column: 2; grid-row: 1; }
  .light-row { grid-column: 3; grid-row: 1; padding: 20px 24px; }
  .pick .sec-h { margin-left: calc((100% - 64px) * 3 / 12 + 32px); }
  .cells { grid-template-columns: repeat(3, 1fr); }
  .cell { min-height: 440px; }
  .cell:nth-child(2), .cell:nth-child(4), .cell:nth-child(6) { flex-direction: column-reverse; padding: 0 0 24px; }
  .cell:nth-child(2) .frag, .cell:nth-child(6) .frag { border-radius: 0 0 18px 0; margin: -1px 24px 0 0; border: 1px solid rgba(255,255,255,.10); border-left: 0; border-top: 0; }
  .cell:nth-child(4) .frag { border-radius: 0 0 0 18px; margin: -1px 0 0 24px; border: 1px solid rgba(255,255,255,.10); border-right: 0; border-top: 0; }
  .fields { grid-template-columns: repeat(4, 1fr); }
  .field { min-height: 84svh; padding: 40px var(--m) 32px; display: grid; grid-template-rows: 22svh auto 1fr auto; gap: 0; }
  .field h2 { grid-row: 1; }
  .field .mini { width: 100%; grid-row: 2; }
  .field .clause { grid-row: 4; }
  .faq-grid { grid-template-columns: 4fr 8fr; gap: 32px; align-items: start; }
  .faq-grid .sec-h { position: sticky; top: 96px; }
  .close { position: relative; }
  .close-pic { height: 90svh; }
  .close-pic video { filter: brightness(.85); }
  .close-text { position: absolute; left: calc(var(--m) + (100% - 2 * var(--m) - 64px) * 7 / 12 + 64px); right: var(--m); bottom: 12svh; background: none; padding: 0; }
  .close-text .btn { width: auto; }
}

/* the live controls do nothing without script, so they show only with it */
html:not(.js) .needs-js { display: none; }
