/* UenoLabs — shared foundation: tokens, light and dark themes, header, buttons, footer */
:root, :root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6ef;
  --s1: #e9ede1;
  --s2: #dde3d3;
  --ink: #222924;
  --soft: #4f5c51;
  --lime: #80d023;
  --on-lime: #222924;
  --accent-text: #3d7710;
  --deep: #222924;
  --on-deep: #f1f4ec;
  --deep-soft: #b9c2b3;
  --flame: #e86a12;
  --paper: #ffffff;
  --dot: 34, 41, 36;
  --dot-a: 0.10;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #222924;
  --s1: #2a322c;
  --s2: #343d36;
  --ink: #f1f4ec;
  --soft: #b9c2b3;
  --accent-text: #80d023;
  --deep: #171c18;
  --on-deep: #f1f4ec;
  --deep-soft: #b9c2b3;
  --flame: #ff8a3d;
  --paper: #2a322c;
  --dot: 241, 244, 236;
  --dot-a: 0.07;
}
:root {
  --f-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-serif: "Instrument Serif", Georgia, serif;
  --s-small: 0.9375rem;
  --s-body: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  --s-mid: clamp(1.5rem, 1.1rem + 1.4vw, 2.5rem);
  --s-head: clamp(2.5rem, 1.1rem + 5vw, 6.5rem);
  --s-display: clamp(3.5rem, 0.8rem + 12vw, 13rem);
  --m: clamp(16px, 2.4vw, 32px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-sans); font-size: var(--s-body); line-height: 1.55; letter-spacing: -0.012em; overflow-x: clip; transition: background-color 400ms ease, color 400ms ease; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }
ul { padding: 0; list-style: none; }
::selection { background: var(--lime); color: var(--on-lime); }
:focus-visible { outline: 3px solid var(--flame); outline-offset: 3px; }
.wrap { padding-inline: var(--m); }
.h { font-weight: 700; letter-spacing: -0.045em; line-height: 0.95; }
.serif { font-family: var(--f-serif); font-weight: 400; letter-spacing: -0.01em; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--m); top: 8px; z-index: 99; background: var(--lime); color: var(--on-lime); padding: 10px 18px; }
header.top, main, footer { position: relative; z-index: 1; }

/* background clock sweep */
#bg { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }

/* buttons: one shape, fully round, like the clock */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.55em; background: var(--lime); color: var(--on-lime); font: inherit; font-weight: 600; letter-spacing: -0.01em; text-decoration: none; padding: 0.95em 1.6em; border: 0; border-radius: 999px; cursor: pointer; transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.btn:hover { background: #93e03a; }
.btn:active { transform: scale(0.96); }
.btn--ink { background: var(--ink); color: var(--bg); }
.btn--ink:hover { background: var(--soft); }
.btn--line { background: transparent; color: inherit; box-shadow: inset 0 0 0 2px currentColor; } /* taste-skill-ignore: outlined secondary button */
.btn--line:hover { background: var(--s1); }
.btn .arr { display: inline-block; transition: transform var(--t-hover) var(--ease-out); }
.btn:hover .arr { transform: translateX(4px); }

/* header */
header.top { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px var(--m); transition: background-color 300ms ease, transform 400ms var(--ease-out); }
header.top.solid { background: var(--bg); }
header.top.hide { transform: translateY(-100%); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.375rem; letter-spacing: -0.04em; text-decoration: none; }
.brand i { width: 26px; height: 26px; border-radius: 50%; background: var(--lime); position: relative; flex: none; }
.brand i::after { content: ""; position: absolute; left: 50%; top: 4px; width: 3px; height: 9px; margin-left: -1.5px; border-radius: 2px; background: var(--on-lime); transform-origin: 50% 100%; animation: tick 6s steps(12) infinite; }
@keyframes tick { to { transform: rotate(360deg); } }
.nav { display: flex; align-items: center; gap: clamp(14px, 2vw, 30px); }
.nav a.l { text-decoration: none; font-weight: 500; position: relative; padding: 4px 0; }
.nav a.l::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--lime); transform: scaleX(0); transform-origin: left; transition: transform 260ms var(--ease-out); }
.nav a.l:hover::after, .nav a.l[aria-current="page"]::after { transform: scaleX(1); }
.theme { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--s1); color: var(--ink); cursor: pointer; display: grid; place-items: center; transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.theme:hover { background: var(--s2); }
.theme:active { transform: scale(0.92); }
.theme svg { width: 22px; height: 22px; transition: transform 500ms var(--ease-out); }
.theme .moon { display: none; }
:root[data-theme="dark"] .theme .sun { display: none; }
:root[data-theme="dark"] .theme .moon { display: block; }
.theme:hover svg { transform: rotate(-25deg); }
@media (max-width: 860px) { .nav a.l.hide-sm { display: none; } .nav .btn { padding: 0.75em 1.1em; } }
@media (max-width: 420px) { .nav a.l { display: none; } .nav .btn { padding: 0.7em 1em; font-size: 0.9375rem; } }

/* cursor */
.cur { position: fixed; left: 0; top: 0; z-index: 90; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--lime); pointer-events: none; opacity: 0; display: grid; place-items: center; color: var(--on-lime); font: 600 13px/1 var(--f-sans); transition: width 260ms var(--ease-out), height 260ms var(--ease-out), margin 260ms var(--ease-out); }
.cur span { opacity: 0; transition: opacity 160ms ease; }
.cur.big { width: 76px; height: 76px; margin: -38px 0 0 -38px; }
.cur.big span { opacity: 1; }
@media (hover: none) { .cur { display: none; } }

/* first paint: keep animated pieces hidden until their entrance starts (a timer in <head> lifts this if scripts never load) */
.intro [data-rv], .intro [data-rv-kids] > *,
.intro-hero .uname .mask > span, .intro-hero .ufull, .intro-hero .uhero h1, .intro-hero .uhero-txt > p, .intro-hero .uhero-acts, .intro-hero .uhero-art,
.intro-hero .hl .mask > span, .intro-hero .sea, .intro-hero header.top, .intro-hero .hero-sub { visibility: hidden; }

/* Ueno flow animation (shared by home and the Ueno page) */
[data-ueno-flow] { --uf-room: var(--s1); --uf-seat: var(--soft); --uf-chip: var(--paper); --uf-chip-ink: var(--ink); --uf-chip-soft: var(--soft); --uf-label: var(--ink); }
.uf-svg { display: block; width: 100%; height: auto; overflow: visible; }
.uf-room { fill: var(--uf-room); }
.uf-seat { fill: var(--uf-seat); }
.uf-chip { fill: var(--uf-chip); }
.uf-chip-ink { fill: var(--uf-chip-ink); }
.uf-chip-soft { fill: var(--uf-chip-soft); }
.uf-label { fill: var(--uf-label); }
.uf-cap { margin-top: 18px; min-height: 1.6em; text-align: center; font-weight: 600; letter-spacing: -0.02em; font-size: var(--s-body); }

/* app store buttons (shared) */
.stores { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; }
.store { display: inline-flex; align-items: center; gap: 12px; padding: 12px 22px 12px 16px; border-radius: 16px; background: var(--lime); color: #222924; text-decoration: none; transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease; }
.store:hover { background: #93e03a; transform: translateY(-2px); }
.store:active { transform: scale(0.97); }
.store svg { width: 26px; height: 26px; flex: none; }
.store small { display: block; font-size: 0.8125rem; font-weight: 600; line-height: 1.1; }
.store b { display: block; white-space: nowrap; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }

/* floating "Get the app" bar: appears after the first screen, steps aside while the downloads are on screen */
.appbar { position: fixed; z-index: 30; left: 50%; bottom: 18px; transform: translate(-50%, 140%); display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 999px; background: #222924; color: #f1f4ec; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28); transition: transform 450ms var(--ease-out); } /* taste-skill-ignore: a floating bar */
.appbar.show { transform: translate(-50%, 0); }
.appbar .ab-label { padding: 0 10px 0 14px; font-weight: 600; white-space: nowrap; }
.appbar a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: #80d023; color: #222924; font-weight: 700; text-decoration: none; white-space: nowrap; transition: background-color var(--t-hover) ease; }
.appbar a:hover { background: #93e03a; }
@media (max-width: 560px) { .appbar { left: 12px; right: 12px; transform: translateY(140%); justify-content: space-between; } .appbar.show { transform: translateY(0); } }

/* contact dialog (shared) */
.cta { background: var(--lime); color: var(--on-lime); min-height: 92svh; display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; padding: 64px var(--m) 48px; }
.cta-copy { grid-column: 1 / span 6; align-self: end; }
.cta h2 { font-size: var(--s-head); }
.cta-copy p { margin-top: 18px; max-width: 36ch; }
.dialog { grid-column: 8 / span 5; align-self: center; background: var(--deep); color: var(--on-deep); padding: 28px; border-radius: 28px; width: min(460px, 100%); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3); } /* taste-skill-ignore: open dialog inside data-ui */
.dialog h3 { font-weight: 700; font-size: var(--s-mid); letter-spacing: -0.04em; line-height: 1; }
.dialog label { display: block; margin-top: 20px; font-size: var(--s-small); color: var(--deep-soft); }
.dialog input[type=text] { display: block; width: 100%; margin-top: 6px; padding: 14px 16px; background: #2a322c; color: var(--on-deep); border: 2px solid #343d36; border-radius: 14px; font: inherit; }
.dialog input[type=text]:focus { outline: none; border-color: var(--lime); }
.seg { margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: #2a322c; padding: 4px; border-radius: 999px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { margin: 0; padding: 12px; text-align: center; color: var(--on-deep); font-size: var(--s-small); font-weight: 600; border-radius: 999px; cursor: pointer; transition: background-color var(--t-hover) ease, color var(--t-hover) ease; }
.seg input:checked + label { background: var(--lime); color: var(--on-lime); }
.seg input:focus-visible + label { outline: 3px solid var(--flame); }
.dialog .btn { margin-top: 24px; width: 100%; }

/* footer */
.foot { position: relative; min-height: 92svh; overflow: hidden; padding: 72px var(--m) 0; display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-content: start; }
.foot h2 { grid-column: 1 / span 7; font-size: var(--s-head); max-width: 9em; }
.foot-links { grid-column: 10 / span 3; grid-row: 1 / span 2; display: grid; gap: 10px; align-content: start; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: var(--accent-text); }
.foot-act { grid-column: 1 / span 7; margin-top: 28px; }
.legal { grid-column: 1 / -1; margin-top: 64px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; font-size: var(--s-small); color: var(--soft); }
.credits { grid-column: 1 / -1; margin-top: 14px; font-size: var(--s-small); color: var(--soft); max-width: 72ch; }
.credits a { color: var(--soft); }
.bigname { grid-column: 1 / -1; margin-top: 24px; font-size: 21vw; line-height: 0.8; font-weight: 700; color: var(--lime); white-space: nowrap; letter-spacing: -0.07em; transform: translateY(14%); }
.bigname .mask { display: block; overflow: hidden; }
.bigname .mask > span { display: block; }

@media (max-width: 760px) {
  .cta { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .cta-copy, .dialog { grid-column: 1; }
  .dialog { margin-top: 40px; }
  .foot { grid-template-columns: minmax(0, 1fr); }
  .foot h2, .foot-links, .foot-act { grid-column: 1; grid-row: auto; }
  .foot-act .btn { width: 100%; }
  .foot-links { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 8px 20px; }
}
