/* ASCII Koi: three waters. Each is a set of tokens; the pond reads them from :root.
   One colour of water, the koi as the only texture, a faint caustic net, and a clear space for the clock. */
@font-face { font-family: "Noto Serif Display"; font-weight: 700; font-display: swap; src: url("fonts/noto-serif-display-700.woff2") format("woff2"); }
@font-face { font-family: "Geist Mono"; font-weight: 100 900; font-display: swap; src: url("fonts/geist-mono.woff2") format("woff2"); }

:root,
:root[data-theme="pond"] {
  /* Pond: a deep lake teal */
  --pond: #0e2a32;
  --ink: #ebe6dc; --accent: #e8784f; --koi-light: #ece6da; --koi-dark: #3a3632;
  --title-from: #ffffff; --title-to: #9b9b9b;
  color-scheme: dark;
}
:root[data-theme="black"] {
  --pond: #0d1315;
  --ink: #ebe6dc; --accent: #e8784f; --koi-light: #ece6da; --koi-dark: #3a3632;
  --title-from: #ffffff; --title-to: #9b9b9b;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --pond: #e9e4da;
  --ink: #1c1a17; --accent: #9e3214; --koi-light: #f7f2e8; --koi-dark: #2b2723;
  --title-from: #000000; --title-to: #666666;
  /* dark letters cast their glow as a shadow: keep it faint */
  --title-glow: 0.3;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  background: var(--pond); color: var(--ink);
  font-family: "Geist Mono", ui-monospace, Menlo, monospace;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: none;
  cursor: pointer;
}
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#pond, #snap { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

.intro { position: fixed; inset: 0; z-index: 1; display: grid; place-content: center; justify-items: center; pointer-events: none; padding: 24px; }
.intro-box { position: relative; isolation: isolate; display: grid; justify-items: center; gap: 6px; }
.wordmark, .wordmark-tag { display: block; }
/* the title's light, blurred behind the letters */
.mark-glow { position: absolute; z-index: -1; pointer-events: none; filter: blur(var(--blur, 14px)); }
/* the date: a label in tracked capitals; it comes in last, after the clock and the day have settled */
.intro-line { margin: 14px 0 0; font-size: 13px; line-height: 18px; letter-spacing: 0.24em; text-transform: uppercase; color: color-mix(in srgb, var(--ink) 80%, transparent); opacity: 0; }
.intro-box.go .intro-line { opacity: 1; animation: intro-line-in 900ms cubic-bezier(0.22, 1, 0.36, 1) 900ms backwards; }
@keyframes intro-line-in { from { opacity: 0; transform: translateY(10px); filter: blur(6px); } }
@media (max-width: 720px) { .intro-line { margin-top: 10px; font-size: 12px; letter-spacing: 0.2em; } }
@media (prefers-reduced-motion: reduce) { .intro-line { opacity: 1; } .intro-box.go .intro-line { animation: none; } }

/* the old water, with a widening hole that shows the new one */
@property --r { syntax: "<length>"; inherits: false; initial-value: 0px; }
#snap { z-index: 2; pointer-events: none; opacity: 0; --r: 0px; }
#snap.show { opacity: 1; -webkit-mask: radial-gradient(circle at var(--x, 50%) var(--y, 50%), transparent var(--r), #000 calc(var(--r) + 28px)); mask: radial-gradient(circle at var(--x, 50%) var(--y, 50%), transparent var(--r), #000 calc(var(--r) + 28px)); }
#snap.wipe { --r: 160vmax; transition: --r 1100ms cubic-bezier(0.55, 0, 0.25, 1); }

.ui {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 16px max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  font-size: 12px; line-height: 16px; letter-spacing: 0.06em; text-transform: lowercase;
  color: color-mix(in srgb, var(--ink) 62%, transparent);
  transition: opacity 600ms ease;
  cursor: default;
}
.ui.idle { opacity: 0; }
.ui.idle:hover, .ui:focus-within { opacity: 1; }
.themes { display: flex; gap: 4px; }
.themes button {
  font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; cursor: pointer;
  background: none; border: 1px solid transparent; border-radius: 4px; padding: 6px 10px;
}
.themes button:hover { color: var(--ink); }
.themes button[aria-checked="true"] { color: var(--ink); border-color: color-mix(in srgb, var(--ink) 30%, transparent); }
.themes button::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; vertical-align: 0; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 40%, transparent); }
.themes [data-theme-pick="pond"]::before { background: #0e2a32; }
.themes [data-theme-pick="black"]::before { background: #0d1315; }
.themes [data-theme-pick="light"]::before { background: #e9e4da; }
.hint { margin: 0; display: flex; gap: 18px; flex-wrap: wrap; }
.hint b { font-weight: 500; color: var(--ink); }
.ui a { color: inherit; text-decoration: none; padding: 6px 2px; }
.ui a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 720px) { .hint .desk { display: none; } }
@media (hover: none) { .hint .mouse { display: none; } }
@media (hover: hover) { .hint .touch { display: none; } }
