/* Segment-timer world: ABS plastics, one orange for the energy path, cobalt for grid import only. */
:root {
  --abs: #E8EAEC; --face: #FFFFFF; --ink: #15171A; --pin: #FF5B1F; --grid: #1F4FD8;
  --mute: #42474D; --groove: #D3D7DC; --pin-up: #C3C8CE; --err: #A3221A;
  --ease: cubic-bezier(.25, 1, .5, 1);
  /* the tokens the dealt moment (pinned-chapters) reads */
  --s-2: 8px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --gutter: 24px; --r-md: 18px; --nav: 72px;
  --line: #C9CED3; --muted: #42474D; --accent: #15171A; --font-text: "Onest", system-ui, sans-serif; --t-lead: 1.3rem; --ground-bg: #E8EAEC;
}
/* the page rhythm (taste layout v4): a fixed header, one container, the hero alone on the first screen,
   every later section (and footer.closing, the booking and the footer in one) one or two whole screens */
:root { --nav: 72px; --padt: 120px; --padb: 72px; --hgap: 40px; --hpadb: 48px; --gut: 80px; --container: 1280px; }
@media (max-width: 1023px) { :root { --gut: 40px; } }
@media (max-width: 639px) { :root { --nav: 60px; --padt: 96px; --padb: 48px; --hgap: 24px; --hpadb: 24px; --gut: 20px; } }
.wrap { width: min(100% - 2 * var(--gut), var(--container)); margin-inline: auto; padding-inline: 0; }
header.nav { position: fixed; inset: 0 0 auto 0; z-index: 40; height: var(--nav);
  background: color-mix(in oklab, var(--abs) 88%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
header.nav > .wrap { height: 100%; }
main > section, footer.closing { position: relative; box-sizing: border-box; height: calc(var(--h, 1) * 100svh); padding: var(--padt) 0 var(--padb); }
main > section > .wrap, footer.closing > .wrap { height: 100%; }
main > section.hero { height: 100svh; padding: calc(var(--nav) + var(--hgap)) 0 var(--hpadb); }
.hero-text { height: 100%; }
@media (max-width: 1279px) { main > section:not(.hero), footer.closing { height: auto; min-height: calc(var(--h, 1) * 100svh); } }
@media (max-width: 639px) { main > section:not(.hero), footer.closing { min-height: calc(var(--hm, var(--h, 1)) * 100svh); } }
@media (max-width: 639px) { main > section.hero { height: auto; min-height: 100svh; } }
/* the dealt moment at rest (phones, tablets, short screens) holds two whole screens */
main > section[data-moment][data-moment][data-moment]:not(.is-live) { min-height: 200svh; }
main > section[data-moment] { scroll-margin-top: 0; }
html { background: var(--abs); color: var(--ink); scrollbar-color: var(--ink) var(--abs); }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--ink); color: #fff; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
input, textarea, select { caret-color: var(--ink); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--abs); }
::-webkit-scrollbar-thumb { background: var(--ink); border: 3px solid var(--abs); border-radius: 8px; }

/* moulded plastic: a part that stands proud of the ground */
.plastic { background: var(--face); border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 1px 2px rgba(21,23,26,.10), 0 14px 28px -16px rgba(21,23,26,.32); }
.groove { background: var(--abs); box-shadow: inset 0 2px 5px rgba(21,23,26,.14), inset 0 -1px 0 rgba(255,255,255,.75); }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: .6rem; min-height: 48px; padding: 0 1.4rem; border-radius: 999px;
  background: var(--ink); color: #fff; font-weight: 600; letter-spacing: -.005em;
  box-shadow: 0 2px 0 #000, 0 10px 20px -10px rgba(21,23,26,.6);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 0 #000, 0 16px 24px -12px rgba(21,23,26,.6); }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 0 #000, 0 4px 10px -6px rgba(21,23,26,.6); }
.btn svg { transition: transform .35s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.lnk { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .22em; transition: text-underline-offset .3s var(--ease); }
.lnk:hover { text-underline-offset: .35em; }

/* the dial (adapted from @kokonutui/detent-dial) */
.dial { position: relative; aspect-ratio: 1; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; border-radius: 50%; }
.dial:focus-visible { outline-offset: 8px; }
.dial.grabbing { cursor: grabbing; }
.dial > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible;
  filter: drop-shadow(0 22px 34px rgba(21,23,26,.20)) drop-shadow(0 2px 3px rgba(21,23,26,.14)); }
.dial .hit { cursor: pointer; }
.knob { position: absolute; inset: 26%; border-radius: 50%; background: var(--abs); pointer-events: none;
  box-shadow: inset 0 4px 9px rgba(21,23,26,.17), inset 0 -2px 0 rgba(255,255,255,.8), 0 1px 0 #fff;
  display: grid; place-content: center; text-align: center; }

/* every count arrives visibly: digits swap one by one (raised from the nixie counter) */
.odo > span[aria-hidden] { display: inline-flex; white-space: pre; }
.dg { display: inline-block; width: .62em; text-align: center; }
.dg.sw { position: relative; overflow: hidden; }
.dg.sw .o { position: absolute; inset: 0; animation: dg-out .36s var(--ease) forwards; }
.dg.sw .n { display: block; animation: dg-in .36s var(--ease) backwards; }
/* numbers inside a sentence stay plain text: they change, but do not roll */
.odo.in > span[aria-hidden] { display: inline; }
.odo.in .dg { display: inline; width: auto; }
.odo.in .dg.sw .o { display: none; }
.odo.in .dg.sw .n { display: inline; animation: none; }
@keyframes dg-out { to { transform: translateY(-110%); opacity: 0; } }
@keyframes dg-in { from { transform: translateY(110%); opacity: 0; } }

/* energy beams (adapted from @magicui/animated-beam) */
.flow { position: relative; }
.flow > svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.node { position: relative; z-index: 1; transition: transform .35s var(--ease); }
.node:hover { transform: translateY(-2px); }

/* sun / moon switch (adapted from @kokonutui/switch-button) */
.sw-track { position: relative; flex: none; width: 60px; height: 34px; border-radius: 999px; background: var(--groove);
  box-shadow: inset 0 2px 4px rgba(21,23,26,.2); transition: background .3s var(--ease); }
.sw-knob { position: absolute; top: 3px; left: 3px; width: 28px; height: 28px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 3px rgba(21,23,26,.28); display: grid; place-items: center; transition: transform .38s cubic-bezier(.23,1,.32,1); }
[role=switch][aria-checked=true] .sw-track { background: var(--ink); }
[role=switch][aria-checked=true] .sw-knob { transform: translateX(26px); }
.sw-ico [data-part=ray] { transform-origin: 12px 12px; transition: opacity .26s cubic-bezier(.23,1,.32,1), transform .26s cubic-bezier(.23,1,.32,1); }
.sw-ico [data-part=bite] { transform: translate(10px, -10px); transition: transform .38s cubic-bezier(.65,0,.35,1); }
.sw-ico [data-part=disc] { transform-origin: 12px 12px; transform: scale(.62); transition: transform .38s cubic-bezier(.23,1,.32,1); }
[aria-checked=true] .sw-ico [data-part=ray] { opacity: 0; transform: scale(.4); }
[aria-checked=true] .sw-ico [data-part=bite] { transform: translate(0, 0); }
[aria-checked=true] .sw-ico [data-part=disc] { transform: scale(1); }

/* appliance pins */
.ap { display: flex; align-items: center; gap: 1rem; width: 100%; text-align: left; padding: .55rem 1rem; border-radius: 12px;
  background: var(--face); box-shadow: 0 1px 2px rgba(21,23,26,.08); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.ap:hover { transform: translateY(-2px); box-shadow: 0 8px 16px -10px rgba(21,23,26,.35); }
.ap .pinv { flex: none; width: 11px; height: 30px; border-radius: 3px; background: var(--pin-up);
  box-shadow: 2px 4px 4px rgba(21,23,26,.32); transform: translateY(-3px); transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease); }
.ap[aria-checked=true] .pinv { background: var(--ink); box-shadow: .5px 1px 1px rgba(21,23,26,.3); transform: translateY(2px); }
.ap:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; transition: none; }
.ap .kwh { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--mute); }

/* the battery cabinet: modules slide into their slots when the evening changes (never on scroll) */
.mods .body { fill: transparent; stroke: #8D939A; stroke-width: 1.5; stroke-dasharray: 5 4; transition: fill .4s var(--ease), stroke .4s var(--ease); }
.mods .led { fill: transparent; transition: fill .4s var(--ease); }
.mods .mod { transition: transform .55s var(--ease), opacity .4s var(--ease); }
.mods .mod.on .body { fill: var(--ink); stroke: var(--ink); stroke-dasharray: none; }
.mods .mod.on .led { fill: #fff; }
.mods .mod.arrive { transform: translateX(34px); opacity: 0; transition: none; }

/* the day, unrolled */
.day { display: grid; grid-template-columns: repeat(96, minmax(0, 1fr)); gap: 1px; align-items: end; }
.col { position: relative; display: flex; flex-direction: column-reverse; height: 100%; cursor: pointer; }
.col i { display: block; width: 100%; }
.col.now::after { content: ""; position: absolute; inset: -6px -2px -6px -2px; border: 2px solid var(--ink); border-radius: 3px; }
.k-sun { background: var(--pin); }
.k-bat { background: repeating-linear-gradient(135deg, var(--pin) 0 2px, rgba(255,91,31,.35) 2px 4px); }
.k-grid { background: var(--grid); }

/* form */
.field { display: block; width: 100%; min-height: 50px; padding: .75rem 1rem; border-radius: 12px; background: #fff; color: var(--ink);
  border: 1.5px solid #B9BEC4; transition: border-color .25s var(--ease), box-shadow .25s var(--ease); }
.field:hover { border-color: var(--ink); }
.field:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(21,23,26,.18); }
.field[aria-invalid=true] { border-color: var(--err); border-width: 2px; }
.err { color: var(--err); font-size: .9rem; margin-top: .4rem; }
.chip { display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; padding: 0 1rem; border-radius: 999px; background: #fff;
  border: 1.5px solid #B9BEC4; cursor: pointer; transition: border-color .25s var(--ease), transform .3s var(--ease); }
.chip:hover { border-color: var(--ink); transform: translateY(-1px); }
.chip:has(input:checked) { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 3px; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }

/* hero enters once */
html.m-enter .hero [data-rise] { opacity: 0; transform: translateY(16px); }
html.m-enter.m-enter-done .hero [data-rise] { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.m-enter .hero [data-rise] { opacity: 1; transform: none; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
}

/* chapters: hairlines over each step instead of the moment's side rail; the open step's line goes ink */
main [data-moment="pinned-chapters"][data-moment] .mo-pc__step { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 14px; }
main [data-moment="pinned-chapters"][data-moment].is-live .mo-pc__step { box-shadow: inset 0 1px 0 transparent; transition: box-shadow 300ms ease; }
main [data-moment="pinned-chapters"][data-moment].is-live .mo-pc__step.is-on { border-top-color: var(--ink); box-shadow: inset 0 1px 0 var(--ink); }
