/* Hidamari landing. Sizes, colours and glass: design/landing/README.md; the card: design/panel and the app's code. */

@font-face { font-family: 'IBM Plex Mono'; font-weight: 400; font-style: normal; font-display: swap;
  src: url(fonts/IBMPlexMono-Regular.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 500; font-style: normal; font-display: swap;
  src: url(fonts/IBMPlexMono-Medium.woff2) format('woff2'); }

:root {
  /* the wall in the shade: what shows before the wall is drawn, or without WebGL 2 (the renderer also sets it) */
  --wall: #a7a6a9;
  /* set by page.js with every frame: the sky of the hour the wall shows */
  --ink: #1d2130;
  --soft: rgba(29, 33, 48, 0.55);
  --on-wall: #1d2130;
  --card-bg: rgba(200, 205, 215, 0.45);
  --button-bg: rgba(200, 205, 215, 0.45);
  --switch-on: linear-gradient(90deg, #f0a457, #f6c76f);
  --arc-glow: #ffb45e;
  --arc-line: #fff6e4;
  --halo: rgba(255, 178, 84, 0.85);
  --tint: #ffd27a;
  --caret: #f0a457;
  --field-bg: rgba(255, 255, 255, 0.36);
  --field-edge: rgba(255, 255, 255, 0.4);
  --row-on: rgba(255, 255, 255, 0.32);
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --system: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', system-ui, sans-serif;
  color-scheme: light;
}

html, body { margin: 0; height: 100%; }
body { background: var(--wall); font-family: var(--system); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
button { font: inherit; }

.stage { position: relative; width: 100%; height: 100vh; overflow: hidden; color: var(--on-wall); background: var(--wall); }
/* Until the page is laid out and the first picture of the wall is drawn, only the plain wall colour shows; then all of
   it fades in at once (Ed, 18 November 2026: while loading, the half-built page flashed). If the script never comes,
   the page shows anyway after 6 s. */
html.js .stage { opacity: 0; animation: stage-show 0s linear 6s forwards; }
html.js .stage.ready { opacity: 1; animation: none; transition: opacity 0.35s ease; }
@keyframes stage-show { to { opacity: 1; } }
.wall { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }

/* ---- logo, caption, button (positions set by page.js; these are the approved large-screen ones) ---- */

.logo { position: absolute; z-index: 1; top: 28px; left: 48px; width: calc(100% - 96px); margin: 0; line-height: 0; opacity: 0.6; pointer-events: none; }
.logo img { display: block; width: 100%; height: auto; }

.caption { position: absolute; z-index: 2; left: 48px; bottom: 40px; margin: 0;
  font-family: var(--mono); font-weight: 400; font-size: 18px; line-height: 36px; white-space: nowrap; color: var(--text-ink, var(--on-wall)); }

.cta { position: absolute; z-index: 2; right: 48px; bottom: 40px; height: 72px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; }
.download { position: relative; display: flex; align-items: center; justify-content: center; width: 300px; height: 46px; box-sizing: border-box; padding: 0 22px;
  border-radius: 999px; background: var(--button-bg);
  -webkit-backdrop-filter: blur(30px) saturate(1.4); backdrop-filter: blur(30px) saturate(1.4);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.45), inset 0 1px 0 rgba(255,255,255,0.55), 0 14px 36px rgba(0,0,0,0.20);
  color: var(--ink); font-family: var(--mono); font-weight: 500; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; }
.cta-note { font-family: var(--mono); font-weight: 400; font-size: 12px; line-height: 16px; letter-spacing: 0.14em; text-transform: uppercase; text-align: center; white-space: nowrap; color: var(--text-ink, var(--on-wall)); }

/* the two legal links, small, at the very bottom (TEMP, not in the mockup) */
.legal-links { position: absolute; z-index: 2; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 24px;
  font-family: var(--mono); font-size: 10px; line-height: 16px; letter-spacing: 0.14em; text-transform: uppercase; }
.legal-links a { color: var(--text-ink, var(--on-wall)); opacity: 0.7; text-decoration: none; }
.legal-links a:hover, .legal-links a:focus-visible { opacity: 1; text-decoration: underline; }
.caption, .cta-note, .legal-links a { transition: color 0.6s ease; }

/* the legal pages */
.legal-page { background: #c9c3b8; color: #1d2130; }
.legal { box-sizing: border-box; max-width: 680px; margin: 0 auto; padding: 40px 24px 64px; font-family: var(--mono); font-size: 15px; line-height: 1.7; }
.legal-home { display: block; width: 180px; margin-bottom: 40px; opacity: 0.8; }
.legal-home img { display: block; width: 100%; height: auto; filter: brightness(0.15); }
.legal h1 { font-weight: 500; font-size: 22px; letter-spacing: 0.04em; margin: 0 0 24px; }
.legal h2 { font-weight: 500; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; margin: 32px 0 8px; }
.legal p { margin: 0 0 12px; }
.legal a { color: inherit; }

/* ---- the card ---- */

.card-slot { position: absolute; z-index: 2; left: calc(50% - 210px); top: 244px; }
.card { position: relative; width: 300px; zoom: 1.4; box-sizing: border-box; padding: 18px 18px 16px;
  border-radius: 30px; background: var(--card-bg);
  -webkit-backdrop-filter: blur(30px) saturate(1.4); backdrop-filter: blur(30px) saturate(1.4);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.45), inset 0 1px 0 rgba(255,255,255,0.55), 0 24px 60px rgba(0,0,0,0.28);
  color: var(--ink); font-family: var(--system); -webkit-user-select: none; user-select: none; }
html:not(.js) .card-slot { display: none; }
.grain { position: absolute; inset: 0; border-radius: 30px; background: url(img/grain.png) 0 0 / 128px 128px repeat; opacity: 0.14; mix-blend-mode: overlay; pointer-events: none; }
.card > :not(.grain) { position: relative; }

.line { fill: none; stroke: var(--ink); stroke-linecap: round; stroke-linejoin: round; }
.line.soft { stroke: var(--soft); }
:where(.card button) { all: unset; cursor: pointer; }
.card button:focus-visible, .arc:focus-visible, .download:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.arc:focus { outline: none; }
.arc:focus-visible { outline-offset: 3px; border-radius: 6px; }

/* top: the place, the time, the arc, the walls; the city search takes their place */
.top { position: relative; }
.top-main { display: flex; align-items: center; gap: 12px; }
.top-main.away { visibility: hidden; }
.top-left { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.place { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--soft); white-space: nowrap; }
.time { font-size: 26px; font-weight: 300; letter-spacing: -0.26px; font-variant-numeric: tabular-nums; line-height: 31px; }
.arc { position: relative; margin-top: 2px; width: 236px; height: 112px; cursor: pointer; touch-action: none; -webkit-tap-highlight-color: transparent; }
.arc svg { display: block; overflow: visible; }
.horizon { stroke: var(--ink); stroke-opacity: 0.18; stroke-width: 1; }
.below { fill: none; stroke: var(--ink); stroke-opacity: 0.30; stroke-width: 1.4; stroke-linejoin: round; }
.above-glow { fill: none; stroke: var(--arc-glow); stroke-opacity: 0.65; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.above-line { fill: none; stroke: var(--arc-line); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sun-time { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.06em; fill: var(--soft); }
.real-sun { fill: none; stroke: var(--ink); stroke-opacity: 0.45; stroke-width: 1.4; }
.drop { stroke: var(--ink); stroke-opacity: 0.35; stroke-width: 1; stroke-dasharray: 2 3; }
.halo { fill: var(--halo); }
.halo-big { opacity: 0; }
.dragging .halo-big { opacity: 0.55; }
.drop { opacity: 0; }
.dragging .drop { opacity: 1; }
.tint-stop { stop-color: var(--tint); }
.sun-core { fill: #ffffff; stroke: var(--tint); stroke-width: 2; }

.walls { display: flex; flex-direction: column; justify-content: center; gap: 9px; padding-top: 4px; }
.wall-dot { position: relative; width: 13px; height: 13px; border-radius: 50%; box-shadow: inset 0 1px 1px rgba(255,255,255,0.4), 0 0 0 1px rgba(255,255,255,0.35); }
.wall-dot[aria-pressed="true"] { box-shadow: inset 0 1px 1px rgba(255,255,255,0.4), 0 0 0 3.5px var(--ink); }
.wall-dot::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; }

/* the city search: exactly as tall as what it replaces */
.search { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 8px; }
.search[hidden] { display: none; }
.search-head { display: flex; align-items: center; gap: 4px; margin-left: -6px; }
.back { width: 22px; height: 30px; display: flex; align-items: center; justify-content: center; }
.field { flex: 1; min-width: 0; height: 30px; box-sizing: border-box; display: flex; align-items: center; gap: 7px; padding: 0 10px; border-radius: 9px;
  background: var(--field-bg); box-shadow: inset 0 0 0 1px var(--field-edge); }
.field svg { flex: none; }
.field input { all: unset; flex: 1; min-width: 0; font-family: var(--system); font-size: 13px; color: var(--ink); caret-color: var(--caret); -webkit-user-select: text; user-select: text; }
.field input::placeholder { color: var(--soft); opacity: 1; }
.results { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 1px; margin: 0 -8px; overflow-y: auto; scrollbar-width: none; }
.results::-webkit-scrollbar { display: none; }
.result { flex: none; display: flex; align-items: center; gap: 9px; height: 30px; padding: 0 8px; border-radius: 8px; font-size: 13px; color: var(--ink); white-space: nowrap; }
.result.on { background: var(--row-on); }
.result-icon { width: 14px; height: 14px; flex: none; display: flex; align-items: center; justify-content: center; }
.result-icon svg { fill: var(--ink); }

/* the film of scenes: the chosen one 2.6 times as wide */
.film { margin-top: 16px; display: flex; gap: 3px; border-radius: 12px; overflow: hidden; }
.scene { position: relative; overflow: hidden; border-radius: 6px; flex: 1 1 0; min-width: 0; height: 54px; opacity: 0.78;
  transition: flex-grow 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.scene[aria-pressed="true"] { flex-grow: 2.6; opacity: 1; }
.scene img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; pointer-events: none; }
.scene.left img { object-position: left center; }
.scene-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 6px; background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,0.38));
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: #ffffff; white-space: nowrap; overflow: hidden;
  opacity: 0; transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.scene[aria-pressed="true"] .scene-name { opacity: 1; }

/* the plants under the Window frame: fold away when another scene is chosen */
.plants-fold { height: 0; overflow: hidden; opacity: 0; margin-bottom: 0; visibility: hidden;
  transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), margin-bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0.3s; }
.plants-fold.open { height: 42px; opacity: 1; margin-bottom: -2px; visibility: visible; transition-delay: 0s; }
.plants { display: flex; gap: 4px; padding-top: 10px; margin-left: calc((100% - 9px) / 5.6 + 3px); width: calc((100% - 9px) * 2.6 / 5.6); }
.plant { position: relative; flex: 1 1 0; min-width: 0; height: 30px; border-radius: 5px; opacity: 0.7; }
.plant img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 5px; pointer-events: none; }
.plant[aria-pressed="true"] { opacity: 1; box-shadow: 0 0 0 1.5px var(--ink); }

/* the two switches, and the weather by hand between the caption and the switch */
.switches { margin-top: 16px; display: flex; flex-direction: column; gap: 2px; }
.switch-row { display: flex; align-items: center; gap: 9px; height: 26px; }
.switch-row > svg { flex: none; }
.switch-title { flex: 1; min-width: 0; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap; }
.switch { position: relative; flex: none; width: 28px; height: 16px; border-radius: 8px; background: rgba(120,120,128,0.30); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35); }
.switch[aria-checked="true"] { background: var(--switch-on); }
.knob { position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #ffffff; box-shadow: 0 1px 3px rgba(0,0,0,0.25); transition: left 0.15s ease; }
.switch[aria-checked="true"] .knob { left: 14px; }

.weather { display: flex; align-items: center; margin-right: 10px; }
.weather[hidden] { display: none; }
.weather-slot { display: flex; justify-content: flex-end; overflow: hidden; width: 22px; opacity: 1;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.weather-slot.first { width: 15px; }
.weather-slot.gone { width: 0; opacity: 0; pointer-events: none; }
.weather-icon { width: 15px; height: 20px; display: flex; align-items: center; justify-content: center; flex: none; opacity: 0.38; }
.weather-icon[aria-pressed="true"] { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .scene, .scene-name, .plants-fold, .weather-slot, .knob, .caption, .cta-note, .legal-links a, .stage { transition-duration: 0s !important; transition-delay: 0s !important; }
}
