/* SugarSentry home page (app/home.py). One day, 06:45 to 02:49, as a
   timeline under a sky that turns from dawn to night. Echoes sinilumi.com:
   the same ink, ice blue and Inter. Plain hyphens only in any copy. */

@font-face {
  font-family: 'Inter';
  src: url(/site/fonts/inter-var-latin.woff2) format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink: #05070e;
  --text: #eaeefb;
  --muted: #a3aeca;
  --faint: #828fb2;
  --ice: #7fb2ff;
  --frost: #bcd8ff;
  --dawn: #ffc98a;
  --amber: #ffb340;
  --red: #ff7a7f;
  --green: #35d399;
  --violet: #c4b5fd;
  --card: rgba(255, 255, 255, .045);
  --border: rgba(146, 180, 255, .16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* Clip, not hide: no animation may ever push the page sideways on a phone,
   and clip makes no scroll container, so vertical scrolling is untouched. */
html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--frost); }
a:hover { color: #fff; }
img { display: block; max-width: 100%; }

.skip { position: absolute; left: -999px; top: 8px; padding: 8px 14px; border-radius: 8px; background: var(--text); color: var(--ink); z-index: 10; }
.skip:focus { left: 8px; }

.sky {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #1d2b4f 0%, #16305c 12%, #14315f 30%, #1b2c58 44%, #2a2152 56%, #120f2a 66%, #05070e 74%, #05070e 100%);
}
.sun {
  position: absolute; right: 9%; top: 60px; width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle, #ffe2a8 0%, #ffb86b 55%, rgba(255, 184, 107, 0) 72%);
  animation: sun-rise 20s ease-in-out infinite alternate; pointer-events: none;
}
@keyframes sun-rise { to { transform: translateY(-26px); } }
.stars { position: absolute; left: 0; right: 0; top: 50%; height: 30%; pointer-events: none; }
.stars i { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #eaf3ff; animation: twinkle ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .15; } }
.moon {
  position: absolute; right: 9%; top: 58%; width: 100px; height: 100px; border-radius: 50%;
  box-shadow: -18px 8px 0 0 #dfe9ff; filter: drop-shadow(0 0 26px rgba(188, 216, 255, .45));
  animation: moon-drift 24s ease-in-out infinite alternate; pointer-events: none;
}
@keyframes moon-drift { to { transform: translateY(20px); } }

.wrap { position: relative; max-width: 1100px; margin: 0 auto; padding: 0 24px; }

.top { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; padding-top: 24px; padding-bottom: 24px; font-size: 15px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; flex-grow: 1; color: var(--text); text-decoration: none; }
/* Pills, not bare grey text: the links washed out on a phone in bright sun. */
.top nav { display: flex; gap: 8px; flex-wrap: wrap; }
/* Above the sun, which on a phone sits right behind them, and dark enough
   that the sun's glow can't wash the text out. */
.top { z-index: 2; }
.top nav a {
  color: #fff; text-decoration: none; font-weight: 600;
  padding: 7px 14px; border-radius: 999px;
  background: rgba(13, 20, 42, .82); border: 1px solid rgba(188, 216, 255, .35);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.top nav a:hover { background: rgba(32, 46, 86, .9); }
.top nav a:focus-visible { outline: 2px solid var(--ice); outline-offset: 2px; }

.hero { padding-top: 72px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 22px; }
.eyebrow { margin: 0; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: 13px; color: var(--dawn); }
.hero h1 { margin: 0; font-size: clamp(42px, 6vw, 84px); font-weight: 800; letter-spacing: -.035em; line-height: 1.02; max-width: 860px; }
.lead { margin: 0; max-width: 660px; font-size: clamp(17px, 1.5vw, 20px); color: var(--muted); line-height: 1.6; }
.ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; min-height: 54px; padding: 0 28px; border-radius: 27px; font-weight: 700; text-decoration: none; }
.btn-primary { background: linear-gradient(180deg, #ffe2b8, var(--ice)); color: var(--ink); }
.btn-primary:hover { color: var(--ink); filter: brightness(1.06); }
.btn-ghost { border: 1px solid rgba(188, 216, 255, .4); color: var(--text); font-weight: 600; }

.day { padding-bottom: 120px; }
.line { position: absolute; left: 139px; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(180deg, rgba(255, 200, 140, .45), rgba(127, 178, 255, .4) 40%, rgba(167, 139, 250, .45) 65%, rgba(255, 90, 95, .5) 85%, rgba(127, 178, 255, .2)); }
.day ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 72px; }
.moment { display: flex; gap: 24px; flex-wrap: wrap; }
.time { font-variant-numeric: tabular-nums; font-weight: 800; letter-spacing: -.02em; font-size: 23px; width: 78px; padding-top: 5px; flex-shrink: 0; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--ice); box-shadow: 0 0 0 6px rgba(127, 178, 255, .15); flex-shrink: 0; margin-top: 14px; }
.dot.dawn { background: var(--dawn); box-shadow: 0 0 0 6px rgba(255, 201, 138, .18); }
.dot.amber { background: #ff9f0a; box-shadow: 0 0 0 6px rgba(255, 159, 10, .18); }
.dot.violet { background: #a78bfa; box-shadow: 0 0 0 6px rgba(167, 139, 250, .18); }
.dot.red { background: #ff5a5f; box-shadow: 0 0 0 6px rgba(255, 90, 95, .18); animation: dot-pulse 1.2s ease-in-out infinite; }
@keyframes dot-pulse { 50% { box-shadow: 0 0 0 14px rgba(255, 90, 95, 0); } }
.time.red { color: var(--red); }
.body { flex: 1 1 420px; min-width: 0; display: flex; gap: 32px; flex-wrap: wrap; align-items: flex-start; }
.body.stack { flex-direction: column; align-items: stretch; gap: 20px; }
.body.stack .txt { flex: none; }
.txt { flex: 1 1 320px; min-width: 0; }
.txt h2 { margin: 0 0 10px; font-size: 28px; font-weight: 800; letter-spacing: -.015em; line-height: 1.15; }
.txt p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.6; }
.txt h2.red { color: #ff8a8e; }
.tag { display: inline-block; margin-bottom: 10px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ice); }
.tag.dawn { color: var(--dawn); } .tag.amber { color: var(--amber); } .tag.violet { color: var(--violet); } .tag.red { color: var(--red); }

.card { background: var(--card); border: 1px solid var(--border); border-radius: 20px; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; flex: 1 1 320px; min-width: 0; }
.stat { padding: 16px; }
.stat .k { color: var(--muted); font-size: 14px; }
.stat .v { font-size: 28px; font-weight: 800; }
.stat .n { color: var(--dawn); font-size: 13px; }

.carplay { padding: 18px 20px; border-radius: 20px; background: #000; border: 8px solid #1a1d24; display: flex; gap: 16px; align-items: center; width: 300px; max-width: 100%; }
.carplay .who, .lock .who { font-size: 14px; color: var(--muted); }
.reading { font-weight: 800; color: var(--green); line-height: 1.1; }

.browser { overflow: hidden; background: #0c111e; max-width: 780px; }
.browser .bar { display: flex; gap: 7px; padding: 10px 14px; border-bottom: 1px solid var(--border); align-items: center; }
.browser .bar span { width: 10px; height: 10px; border-radius: 5px; }
.browser .bar .url { width: auto; height: auto; margin-left: 10px; color: var(--muted); font-size: 13px; }
.browser .webview { width: 100%; height: auto; }

.shot { border-radius: 26px; border: 1px solid rgba(146, 180, 255, .2); }
.pair { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.skins { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.skins figure { margin: 0; text-align: center; }
.skins figcaption { color: var(--muted); font-size: 13px; margin-top: 8px; }

.toggle-card { padding: 22px; display: flex; flex-direction: column; gap: 14px; width: 320px; max-width: 100%; }
.toggle-row { display: flex; align-items: center; gap: 14px; }
.tg { width: 68px; height: 40px; border-radius: 20px; background: #2b3245; position: relative; animation: tg-bg 6s infinite; flex-shrink: 0; }
.tg::after { content: ''; position: absolute; top: 4px; left: 4px; width: 32px; height: 32px; border-radius: 50%; background: #fff; animation: tg-knob 6s infinite; }
@keyframes tg-bg { 0%, 20% { background: #2b3245; } 30%, 80% { background: #ff9f0a; } 90%, 100% { background: #2b3245; } }
@keyframes tg-knob { 0%, 20% { transform: none; } 30%, 80% { transform: translateX(28px); } 90%, 100% { transform: none; } }

.siri { padding: 20px 22px; display: flex; align-items: center; gap: 16px; width: 320px; max-width: 100%; font-size: 16px; }
/* A fixed-size box, and bars that scale rather than change height:
   animating `height` resized the card every frame and shook the whole page
   below it on a phone. */
.wave { display: inline-flex; align-items: center; height: 28px; flex: none; }
.wave i { display: block; width: 4px; height: 26px; margin: 0 2px; border-radius: 2px; background: var(--ice); transform: scaleY(.3); animation: wave 1.1s ease-in-out infinite; }
.wave i:nth-child(2) { animation-delay: .15s; } .wave i:nth-child(3) { animation-delay: .3s; } .wave i:nth-child(4) { animation-delay: .45s; } .wave i:nth-child(5) { animation-delay: .6s; }
@keyframes wave { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }

.lock { width: 260px; padding: 18px; }
.lock .row { display: flex; justify-content: space-between; color: var(--muted); font-size: 14px; }

.alarm { position: relative; width: 240px; display: flex; justify-content: center; animation: shake 2.4s ease-in-out infinite; }
.alarm img { position: relative; width: 200px; border-radius: 30px; border: 1px solid rgba(255, 90, 95, .45); }
@keyframes shake { 0%, 60%, 100% { transform: none; } 64% { transform: rotate(-3deg); } 68% { transform: rotate(3deg); } 72% { transform: rotate(-3deg); } 76% { transform: rotate(3deg); } 80% { transform: none; } }
.ring { position: absolute; left: 50%; top: 50%; width: 200px; height: 200px; margin: -100px 0 0 -100px; border: 2px solid rgba(255, 90, 95, .7); border-radius: 50%; animation: ring 2.4s ease-out infinite; pointer-events: none; }
.ring.r2 { animation-delay: .8s; } .ring.r3 { animation-delay: 1.6s; }
@keyframes ring { from { transform: scale(.6); opacity: .9; } to { transform: scale(2.1); opacity: 0; } }
.buzz { animation: buzz 3s ease-in-out infinite; }
@keyframes buzz { 0%, 70%, 100% { transform: none; } 74% { transform: translateX(-4px); } 78% { transform: translateX(4px); } 82% { transform: translateX(-4px); } 86% { transform: translateX(4px); } 90% { transform: none; } }

@property --n { syntax: '<integer>'; initial-value: 0; inherits: false; }
.cnt { counter-reset: n var(--n); animation: count 2.6s cubic-bezier(.2, .7, .2, 1) forwards; }
.cnt::after { content: counter(n); }
@keyframes count { to { --n: var(--to); } }
.draw { stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: draw 5s ease-out infinite; }
@keyframes draw { 70%, 100% { stroke-dashoffset: 0; } }

.section { padding-top: 24px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 28px; }
.section h2.big { margin: 0 0 10px; font-size: clamp(28px, 3.5vw, 45px); font-weight: 800; letter-spacing: -.025em; }
.section .intro { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.6; max-width: 680px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.steps li { padding: 22px; }
.steps .num { font-size: 26px; font-weight: 800; color: var(--ice); }
.steps h3 { margin: 6px 0 8px; font-size: 17px; }
.steps p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }

.side { padding: 32px; display: flex; flex-wrap: wrap; gap: 40px; align-items: center; background: rgba(127, 178, 255, .06); border-color: rgba(127, 178, 255, .3); }
.side .col { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.side h3 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.015em; line-height: 1.15; }
.side p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.side ol { margin: 4px 0 0; padding-left: 22px; font-size: 15px; line-height: 1.7; }
.logins { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.node { padding: 14px 18px; border-radius: 16px; background: #0c111e; border: 1px solid rgba(146, 180, 255, .3); text-align: center; }
.node.child { border-color: rgba(53, 211, 153, .5); padding: 14px 22px; }
.node.mine { border-color: rgba(127, 178, 255, .7); }
.node b { display: block; } .node.mine b { color: var(--frost); }
.node small { color: var(--muted); font-size: 14px; }
.links { display: flex; gap: 90px; }
.link { position: relative; display: block; width: 2px; height: 70px; background: rgba(127, 178, 255, .35); }
.link i { position: absolute; left: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--frost); box-shadow: 0 0 12px var(--ice); animation: down 1.8s linear infinite; }
.link + .link i { animation-delay: .9s; }
@keyframes down { from { top: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } to { top: 60px; opacity: 0; } }
.nodes { display: flex; gap: 20px; }
.nodes .node { width: 150px; }

.routine { display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }
.checklist { list-style: none; margin: 0; padding: 28px; flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.checklist li { display: flex; gap: 16px; align-items: flex-start; font-size: 16px; line-height: 1.5; }
.checklist li:last-child { font-weight: 700; }
/* One shared 9 s cycle: every box starts empty, they tick one by one, hold
   all ticked, then clear together and the routine starts again. */
.chk { position: relative; flex-shrink: 0; width: 28px; height: 28px; border-radius: 9px; border: 2px solid rgba(146, 180, 255, .45); animation: 9s infinite; }
.chk::after { content: ''; position: absolute; left: 8px; top: 3px; width: 7px; height: 13px; border: solid var(--ink); border-width: 0 3px 3px 0; transform: rotate(45deg) scale(0); animation: 9s infinite; }
.checklist li:nth-child(1) .chk { animation-name: chk-box-1; } .checklist li:nth-child(1) .chk::after { animation-name: chk-mark-1; }
.checklist li:nth-child(2) .chk { animation-name: chk-box-2; } .checklist li:nth-child(2) .chk::after { animation-name: chk-mark-2; }
.checklist li:nth-child(3) .chk { animation-name: chk-box-3; } .checklist li:nth-child(3) .chk::after { animation-name: chk-mark-3; }
.checklist li:nth-child(4) .chk { animation-name: chk-box-4; } .checklist li:nth-child(4) .chk::after { animation-name: chk-mark-4; }
.checklist li:nth-child(5) .chk { animation-name: chk-box-5; } .checklist li:nth-child(5) .chk::after { animation-name: chk-mark-5; }
@keyframes chk-box-1 { 0%, 10% { background: transparent; border-color: rgba(146, 180, 255, .45); } 12%, 88% { background: var(--green); border-color: var(--green); } 92%, 100% { background: transparent; border-color: rgba(146, 180, 255, .45); } }
@keyframes chk-mark-1 { 0%, 10% { transform: rotate(45deg) scale(0); } 12%, 88% { transform: rotate(45deg) scale(1); } 92%, 100% { transform: rotate(45deg) scale(0); } }
@keyframes chk-box-2 { 0%, 22% { background: transparent; border-color: rgba(146, 180, 255, .45); } 24%, 88% { background: var(--green); border-color: var(--green); } 92%, 100% { background: transparent; border-color: rgba(146, 180, 255, .45); } }
@keyframes chk-mark-2 { 0%, 22% { transform: rotate(45deg) scale(0); } 24%, 88% { transform: rotate(45deg) scale(1); } 92%, 100% { transform: rotate(45deg) scale(0); } }
@keyframes chk-box-3 { 0%, 34% { background: transparent; border-color: rgba(146, 180, 255, .45); } 36%, 88% { background: var(--green); border-color: var(--green); } 92%, 100% { background: transparent; border-color: rgba(146, 180, 255, .45); } }
@keyframes chk-mark-3 { 0%, 34% { transform: rotate(45deg) scale(0); } 36%, 88% { transform: rotate(45deg) scale(1); } 92%, 100% { transform: rotate(45deg) scale(0); } }
@keyframes chk-box-4 { 0%, 46% { background: transparent; border-color: rgba(146, 180, 255, .45); } 48%, 88% { background: var(--green); border-color: var(--green); } 92%, 100% { background: transparent; border-color: rgba(146, 180, 255, .45); } }
@keyframes chk-mark-4 { 0%, 46% { transform: rotate(45deg) scale(0); } 48%, 88% { transform: rotate(45deg) scale(1); } 92%, 100% { transform: rotate(45deg) scale(0); } }
@keyframes chk-box-5 { 0%, 58% { background: transparent; border-color: rgba(146, 180, 255, .45); } 60%, 88% { background: var(--green); border-color: var(--green); } 92%, 100% { background: transparent; border-color: rgba(146, 180, 255, .45); } }
@keyframes chk-mark-5 { 0%, 58% { transform: rotate(45deg) scale(0); } 60%, 88% { transform: rotate(45deg) scale(1); } 92%, 100% { transform: rotate(45deg) scale(0); } }
.auto { flex: 1 1 380px; min-width: 0; padding: 28px; display: flex; flex-direction: column; gap: 14px; background: rgba(167, 139, 250, .07); border-color: rgba(167, 139, 250, .3); }
.auto h3 { margin: 0; font-size: 21px; font-weight: 800; line-height: 1.2; }
.auto p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.auto p.small { font-size: 14px; }
.auto strong { color: var(--text); }
.hours { display: flex; gap: 8px; flex-wrap: wrap; }
.hours span { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: #1b2234; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; animation: hour 6s infinite; }
@keyframes hour { 0%, 6% { background: #1b2234; color: var(--muted); } 10%, 30% { background: #a78bfa; color: var(--ink); } 40%, 100% { background: #1b2234; color: var(--muted); } }

.foot { padding-top: 32px; padding-bottom: 48px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; color: var(--faint); font-size: 14px; }
.foot nav { display: flex; gap: 22px; flex-wrap: wrap; }
.foot p { margin: 0; line-height: 1.6; }

@supports (animation-timeline: view()) {
  .reveal { animation: enter linear both; animation-timeline: view(); animation-range: entry 0% cover 30%; }
}
@keyframes enter { from { opacity: 0; transform: translateX(-28px); } }

@keyframes fade { from { opacity: 0; } }
/* Phones: the page sat still only on a desktop. Sliding every moment in
   from the side, shaking the alarm, buzzing the watch and drifting the sun
   and moon read on a narrow screen as the whole page dancing (reported
   2026-10-06). Moments only fade in; the alarm rings still pulse. */
@media (max-width: 760px) {
  .line { display: none; }
  .time { width: auto; }
  .reveal { animation-name: fade; }
  .alarm, .buzz, .sun, .moon { animation: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  .draw { stroke-dashoffset: 0; }
  .cnt::after { content: attr(data-to); }
  .chk { background: var(--green); border-color: var(--green); }
  .chk::after { transform: rotate(45deg) scale(1); }
  .wave i { transform: scaleY(.6); }
}

/* The brand mark: the icon's shield and S on transparency (site/img/mark.png),
   cropped tight so it reads at this size. */
.brand-icon { width: 36px; height: 36px; display: block; flex: none; margin: -6px 0; }

/* 21:30, the nightstand: the app open in front, and what that takes. */
.stand { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.stand-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.stand-list li { display: flex; align-items: center; gap: 10px; font-weight: 650; color: var(--text); }
.stand-list svg { color: var(--green); flex: none; }

/* The Facebook link in the footer: the logo beside the word. */
a.fb { display: inline-flex; align-items: center; gap: 6px; }
a.fb svg { flex: none; }

/* A Shortcuts-style icon beside the automation heading. */
.auto h3.auto-h { display: flex; align-items: center; gap: 12px; }
.shortcuts-icon { width: 34px; height: 34px; flex: none; }
