/* Ivan Matković. Shared by the four homepage mockups: the app's Nightfall and Day values. */
/* Nunito (SIL Open Font License), self-hosted as two compressed files: 75 KB together instead of 277 KB. */
@font-face { font-family: Nunito; src: url("nunito-latin-ext.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Nunito; src: url("nunito-latin.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  /* Night, from ThemePalette.night */
  --night: #0a0c1b;
  --night-top: #191a38;
  --night-mid: #0e1026;
  --night-low: #070812;
  --surface: #141731;
  --surface-alt: #1c2040;
  --control: #232849;
  --ink: #f2ead3;
  --soft: #b4ac94;
  --gold: #f3b100;
  --gold-text: #f6d07a;
  --on-gold: #141024;
  --accent-fill: linear-gradient(135deg, #f6d07a, #e0913f);
  /* Day, from ThemePalette.day */
  --day: #eaf1fb;
  --day-top: #f3f7fe;
  --day-low: #e3e7fa;
  --day-alt: #e2ebf9;
  --day-ink: #233252;
  --day-soft: #5f6f90;
  --day-gold-text: #b06800;
  --day-gold-soft: #f7e6c7;
  --day-fill: linear-gradient(135deg, #e6b032, #dd7707);
  /* The cream "paper" the app uses for its create door at night */
  --paper: #f2ead3;
  --paper-ink: #141024;
  --paper-soft: #4d4a5c;
  --r-card: 22px;
  --r-art: 18px;
  --margin: clamp(20px, 4vw, 56px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  font-family: Nunito, ui-rounded, system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--night);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.6;
  overflow-x: clip;
}
h1, h2, h3, p, figure, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-weight: 800; letter-spacing: -.02em; line-height: 1.04; text-wrap: balance; }
p { text-wrap: pretty; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1.5px; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
em, i { font-style: normal; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; border-radius: 6px; }
::selection { color: var(--on-gold); background: var(--gold-text); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; z-index: 20; top: 12px; left: 12px; padding: 10px 16px; border-radius: 999px; color: var(--on-gold); background: var(--gold-text); transform: translateY(-200%); }
.skip:focus { transform: none; }

/* The night sky of snivaj.com. Same stars, drift and blink as before, but each layer now moves
   with a transform on its own layer. Animating background-position repainted the whole screen on
   every frame (measured: about 4 s of raster work per second of scrolling, against about 0.1 s now). */
.sky { background: var(--night-low); }
.sky::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse 140% 80% at 50% -20%, var(--night-top) 0%, var(--night-mid) 42%, var(--night-low) 100%); }
.stars { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; opacity: .8; contain: strict; }
.stars i { position: absolute; left: 0; background-repeat: repeat; will-change: transform; backface-visibility: hidden; }
.stars i:nth-child(1) { top: -900px; width: calc(100% + 1100px); height: calc(100% + 900px); background-size: 1100px 900px; animation: starsA 220s linear infinite; background-image: radial-gradient(2.6px 2.6px at 8% 12%, #F2EAD3 50%, transparent 50%), radial-gradient(1.2px 1.2px at 58% 22%, #F2EAD3 50%, transparent 50%), radial-gradient(1.8px 1.8px at 5% 62%, #F2EAD3 50%, transparent 50%), radial-gradient(3px 3px at 88% 86%, #F2EAD3 50%, transparent 50%), radial-gradient(1.2px 1.2px at 46% 52%, #F2EAD3 50%, transparent 50%), radial-gradient(1.4px 1.4px at 29% 18%, #F2EAD3 50%, transparent 50%), radial-gradient(2.2px 2.2px at 71% 40%, #F2EAD3 50%, transparent 50%), radial-gradient(1.2px 1.2px at 52% 88%, #F2EAD3 50%, transparent 50%); }
.stars i:nth-child(2) { top: -1000px; width: calc(100% + 1300px); height: calc(100% + 1000px); background-size: 1300px 1000px; animation: starsB 180s linear infinite, sTwinkle 5s ease-in-out infinite; background-image: radial-gradient(1.6px 1.6px at 22% 34%, #F2EAD3 50%, transparent 50%), radial-gradient(3.2px 3.2px at 76% 12%, #F2EAD3 50%, transparent 50%), radial-gradient(2.4px 2.4px at 33% 80%, #F2EAD3 50%, transparent 50%), radial-gradient(1.2px 1.2px at 63% 64%, #F2EAD3 50%, transparent 50%), radial-gradient(2px 2px at 12% 90%, #F2EAD3 50%, transparent 50%), radial-gradient(1.2px 1.2px at 84% 56%, #F2EAD3 50%, transparent 50%), radial-gradient(2.6px 2.6px at 51% 30%, #F2EAD3 50%, transparent 50%); }
.stars i:nth-child(3) { top: -760px; width: calc(100% + 900px); height: calc(100% + 760px); background-size: 900px 760px; animation: starsC 260s linear infinite, sTwinkle 7.5s ease-in-out 2.6s infinite; background-image: radial-gradient(2.8px 2.8px at 41% 7%, #F2EAD3 50%, transparent 50%), radial-gradient(1.8px 1.8px at 91% 30%, #F2EAD3 50%, transparent 50%), radial-gradient(1.2px 1.2px at 68% 74%, #F2EAD3 50%, transparent 50%), radial-gradient(2px 2px at 14% 46%, #F2EAD3 50%, transparent 50%), radial-gradient(1.2px 1.2px at 38% 60%, #F2EAD3 50%, transparent 50%), radial-gradient(2.4px 2.4px at 96% 78%, #F2EAD3 50%, transparent 50%), radial-gradient(1.2px 1.2px at 60% 44%, #F2EAD3 50%, transparent 50%); }
@keyframes sTwinkle { 0%, 100% { opacity: .15; } 50% { opacity: 1; } }
@keyframes starsA { to { transform: translate3d(-1100px, 900px, 0); } }
@keyframes starsB { to { transform: translate3d(-1300px, 1000px, 0); } }
@keyframes starsC { to { transform: translate3d(-900px, 760px, 0); } }

/* Brand mark */
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-size: 26px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.brand img { width: 34px; height: 34px; }

/* The app's primary button: pill, fixed 135° gold, half-strength glow, press feedback */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 58px; padding: 12px 26px; border: 0; border-radius: 999px; color: var(--on-gold); background: var(--accent-fill); font-size: 17px; font-weight: 800; letter-spacing: .1px; line-height: 1.2; text-align: center; text-decoration: none; box-shadow: 0 10px 26px -10px rgb(246 208 122 / .5); transition: transform .15s ease, opacity .15s ease, filter .15s ease; }
.btn:active { transform: scale(.97); opacity: .82; }
.btn.ink { color: var(--paper); background: var(--paper-ink); box-shadow: none; }
.btn.small { min-height: 44px; padding: 8px 20px; font-size: 15px; }
@media (hover: hover) { .btn:hover { filter: brightness(1.07); } .btn.ink:hover { filter: none; background: #2a2440; } }
.note { font-size: 14.5px; color: var(--soft); }

/* An iPhone with a real screenshot inside */
.phone { --pw: 300px; position: relative; width: var(--pw); flex: none; aspect-ratio: 402 / 874; padding: calc(var(--pw) * .028); border-radius: calc(var(--pw) * .16); background: #04050c; box-shadow: inset 0 0 0 1.5px rgb(242 234 211 / .2); }
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--pw) * .134); }

/* Parts of a section rise in, one after another. Without script they are simply there. */
.js .rise { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
.js .rise.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stars i { animation: none; }
  .js .rise { opacity: 1; transform: none; transition: none; }
}
