/* ==========================================================================
   Edison Studios — shared design system
   Default skin = studio identity (gold brush on black).
   Product pages switch skin with <body data-theme="hanabi|rikizo|way|editorial|warm">.
   Every component reads only the CSS variables below, so a skin is just a
   variable override block.
   ========================================================================== */

:root {
  --bg: #0a0908;
  --bg-2: #13110e;
  --surface: #17140f;
  --surface-2: #1f1b14;
  --line: #2e281d;
  --ink: #efe8d8;
  --muted: #a69c87;
  --accent: #d4af37;        /* gold */
  --accent-hi: #f2d479;
  --accent-lo: #9c7a1e;
  --accent-ink: #0a0908;    /* text on accent buttons */
  --accent-2: #c8472a;      /* vermilion, used sparingly */
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 18px 40px -18px rgba(0,0,0,.7);
  --font-display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-jp: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --maxw: 1160px;
  --nav-h: 64px;
  color-scheme: dark;
}

/* ---------- product skins ---------- */
[data-theme="hanabi"] {
  --bg: #0b1430; --bg-2: #111c3e; --surface: #16213f; --surface-2: #1e2c57; --line: #2a3a6b;
  --ink: #f3ece2; --muted: #9aa6c8; --accent: #e8a23d; --accent-hi: #f5c46e; --accent-lo: #b9741c;
  --accent-ink: #1a1206; --accent-2: #d23b2e;
}
[data-theme="rikizo"] {
  --bg: #12101a; --bg-2: #1a1724; --surface: #1d1a28; --surface-2: #262235; --line: #34304a;
  --ink: #f1ecf7; --muted: #a9a2bd; --accent: #f0a85a; --accent-hi: #ffc98d; --accent-lo: #c27a33;
  --accent-ink: #1b1006; --accent-2: #9b5cff; /* the Stranger's purple */
}
[data-theme="way"] {
  color-scheme: light;
  --bg: #f7f2ed; --bg-2: #efe8de; --surface: #fffdf9; --surface-2: #f2ecde; --line: #e2d8c8;
  --ink: #1e1714; --muted: #6f655a; --accent: #bd4a2d; --accent-hi: #d64837; --accent-lo: #8f3520;
  --accent-ink: #fff8f0; --accent-2: #44568a;
  --shadow: 0 1px 0 rgba(255,255,255,.8) inset, 0 16px 34px -20px rgba(60,35,20,.35);
}
[data-theme="editorial"] {
  color-scheme: light;
  --bg: #f6f4ef; --bg-2: #ece8df; --surface: #ffffff; --surface-2: #f3f0e8; --line: #ddd7ca;
  --ink: #1b1a17; --muted: #625d53; --accent: #8a6a1c; --accent-hi: #b08a2e; --accent-lo: #5f4810;
  --accent-ink: #fffaf0; --accent-2: #b4432f;
  --shadow: 0 1px 0 #fff inset, 0 14px 30px -20px rgba(40,30,10,.35);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.65 var(--font-body); -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hi); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.12; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
.jp { font-family: var(--font-jp); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.kicker {
  font: 600 .74rem/1 var(--font-body); letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 14px; display: inline-flex; gap: 10px; align-items: center;
}
.kicker::before { content: ""; width: 26px; height: 1px; background: currentColor; opacity: .7; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--muted); max-width: 46ch; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 12px; }

/* ---------- nav ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.3) blur(14px); -webkit-backdrop-filter: saturate(1.3) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.site-nav .wrap { height: 100%; display: flex; align-items: center; gap: 22px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand img { width: 34px; height: 34px; border-radius: 50%; background: #000; }
.brand span { font: 400 1.15rem/1 var(--font-display); letter-spacing: .14em; }
.nav-links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 8px 13px; border-radius: 999px; text-decoration: none;
  color: var(--muted); font-size: .92rem; font-weight: 500;
}
.nav-links a:hover { color: var(--ink); background: var(--surface); }
.nav-links a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
.nav-cta { white-space: nowrap; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--ink); border-radius: 10px; padding: 7px 10px; font: inherit; }
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav .nav-cta { display: none; }
  .nav-links {
    position: absolute; top: var(--nav-h); left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 14px 16px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 10px; border-radius: 10px; font-size: 1.05rem; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px; padding: 12px 22px; border-radius: 999px;
  font: 600 .95rem/1 var(--font-body); text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hi); color: var(--accent-ink); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--ink); }
.btn-sm { padding: 9px 16px; font-size: .86rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* store buttons */
.store-btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 9px 18px 9px 14px; border-radius: 12px;
  background: var(--ink); color: var(--bg); text-decoration: none; line-height: 1.1; min-width: 168px;
}
.store-btn:hover { color: var(--bg); opacity: .9; }
.store-btn svg { width: 24px; height: 24px; flex: none; }
.store-btn small { display: block; font-size: .66rem; opacity: .75; letter-spacing: .02em; }
.store-btn b { font-size: 1.02rem; font-weight: 600; }
.store-btn.soon { background: transparent; color: var(--muted); border: 1px dashed var(--line); cursor: default; }

/* ---------- sections ---------- */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-tight { padding: clamp(40px, 6vw, 72px) 0; }
.section-alt { background: var(--bg-2); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 36px; }
.section-head h2 { margin: 0; }
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--line), transparent); border: 0; margin: 0; }

/* ---------- page hero ---------- */
.page-hero { padding: clamp(56px, 9vw, 112px) 0 clamp(40px, 6vw, 72px); position: relative; overflow: hidden; }
.page-hero .wrap { position: relative; z-index: 1; }
.hero-split { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (max-width: 900px) { .hero-split { grid-template-columns: 1fr; } }
.app-head { display: flex; gap: 18px; align-items: center; margin-bottom: 22px; }
.app-icon { width: 84px; height: 84px; border-radius: 20px; box-shadow: var(--shadow); flex: none; }
.app-head .meta { font-size: .9rem; color: var(--muted); }
.tag { display: inline-block; font-size: .74rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.tag.live { color: #6fd49a; border-color: color-mix(in srgb, #6fd49a 40%, var(--line)); }
.tag.soon { color: var(--accent); }

/* ---------- cards ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .35em; }
.card p:last-child { margin-bottom: 0; }

/* product card (home + hub pages): image top, copy below, whole card clickable */
.product-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  text-decoration: none; color: var(--ink); box-shadow: var(--shadow);
  transition: transform .25s ease, border-color .25s ease;
}
.product-card:hover { transform: translateY(-4px); border-color: var(--accent); color: var(--ink); }
.product-card .pc-media { aspect-ratio: 1024 / 500; overflow: hidden; background: #000; position: relative; }
.product-card .pc-media img, .product-card .pc-media video { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.product-card:hover .pc-media img { transform: scale(1.04); }
.product-card .pc-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-card .pc-body h3 { margin: 0; }
.product-card .pc-body p { color: var(--muted); margin: 0; font-size: .97rem; }
.product-card .pc-foot { margin-top: auto; padding-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: .88rem; color: var(--accent); font-weight: 600; }
.product-card .pc-tags { position: absolute; top: 14px; left: 14px; display: flex; gap: 6px; }
.product-card .pc-tags .tag { background: rgba(0,0,0,.6); backdrop-filter: blur(6px); }

/* feature list */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.feature { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.feature .fi { font: 500 1.6rem/1 var(--font-jp); color: var(--accent); margin-bottom: 12px; display: block; }
.feature h3 { font-family: var(--font-body); font-weight: 650; font-size: 1.02rem; letter-spacing: 0; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: .95rem; margin: 0; }

/* stats band */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.stat { background: var(--surface); padding: 24px 20px; }
.stat b { display: block; font: 500 2.2rem/1 var(--font-display); color: var(--accent); margin-bottom: 6px; }
.stat span { color: var(--muted); font-size: .9rem; }

/* ---------- screenshot gallery (horizontal scroll-snap) ---------- */
.gallery {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 22px 22px;
  margin: 0 -22px; scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.gallery > * { scroll-snap-align: start; flex: none; }
.gallery img { border-radius: 18px; border: 1px solid var(--line); background: var(--surface); cursor: zoom-in; }
.gallery.phone img { height: min(560px, 70vh); width: auto; }
.gallery.wide img { height: min(340px, 44vh); width: auto; }
.gallery figure { margin: 0; }
.gallery figcaption { font-size: .85rem; color: var(--muted); margin-top: 8px; max-width: 260px; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.92); display: none; align-items: center; justify-content: center; padding: 3vw; cursor: zoom-out; }
.lightbox.open { display: flex; }
.lightbox img { max-height: 94vh; max-width: 94vw; border-radius: 12px; }

/* ---------- video ---------- */
.video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden; background: #000; border: 1px solid var(--line); box-shadow: var(--shadow); }
.video-frame video, .video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.lite-yt { cursor: pointer; }
.lite-yt img { width: 100%; height: 100%; object-fit: cover; opacity: .88; transition: opacity .2s; }
.lite-yt:hover img { opacity: 1; }
.lite-yt .play {
  position: absolute; inset: 0; margin: auto; width: 78px; height: 78px; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 92%, transparent); display: grid; place-items: center;
  box-shadow: 0 10px 30px rgba(0,0,0,.5); transition: transform .2s;
}
.lite-yt:hover .play { transform: scale(1.08); }
.lite-yt .play::after { content: ""; border-left: 22px solid var(--accent-ink); border-top: 14px solid transparent; border-bottom: 14px solid transparent; margin-left: 6px; }
.lite-yt .yt-label { position: absolute; left: 16px; bottom: 14px; font-size: .85rem; color: #fff; background: rgba(0,0,0,.55); padding: 6px 12px; border-radius: 999px; }

/* ---------- spoilers ---------- */
.spoiler { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.spoiler + .spoiler { margin-top: 16px; }
.spoiler summary {
  list-style: none; cursor: pointer; padding: 22px 26px; display: flex; align-items: center; gap: 14px;
  font: 500 1.4rem/1.2 var(--font-display);
}
.spoiler summary::-webkit-details-marker { display: none; }
.spoiler summary .warn { margin-left: auto; font: 600 .72rem/1 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--accent-2); border: 1px solid currentColor; padding: 6px 10px; border-radius: 999px; }
.spoiler summary::after { content: "+"; font: 300 1.8rem/1 var(--font-body); color: var(--muted); transition: transform .2s; }
.spoiler[open] summary::after { transform: rotate(45deg); }
.spoiler .spoiler-body { padding: 0 26px 26px; }

/* ---------- signup ---------- */
.signup {
  position: relative; border-radius: var(--radius-lg); padding: clamp(28px, 5vw, 52px);
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 55%),
    var(--surface);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
}
.signup h2 { margin-bottom: .3em; }
.signup form { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; max-width: 560px; }
.signup input[type="email"] {
  flex: 1 1 260px; min-width: 0; padding: 14px 18px; border-radius: 999px; font: inherit; font-size: 1rem;
  background: var(--bg); color: var(--ink); border: 1px solid var(--line);
}
.signup input[type="email"]:focus { outline: none; border-color: var(--accent); }
.signup .hp { position: absolute; left: -5000px; }
.signup .fine { font-size: .82rem; color: var(--muted); margin-top: 12px; }
.signup .msg { margin-top: 12px; font-weight: 600; min-height: 1.4em; }
.signup .msg.ok { color: #6fd49a; }
.signup .msg.err { color: #ff8a7a; }
.signup .topics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; width: 100%; }
.signup .topics label { font-size: .85rem; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.signup .topics input { accent-color: var(--accent); }

/* ---------- news / announcements ---------- */
.news { display: grid; gap: 14px; }
.news-item { display: grid; grid-template-columns: 120px 1fr; gap: 20px; padding: 20px 0; border-top: 1px solid var(--line); }
.news-item time { color: var(--muted); font-size: .88rem; padding-top: 3px; }
.news-item h3 { font-family: var(--font-body); font-weight: 650; font-size: 1.08rem; letter-spacing: 0; margin: 0 0 4px; }
.news-item p { color: var(--muted); margin: 0; }
@media (max-width: 600px) { .news-item { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 40px; margin-top: 0; font-size: .92rem; color: var(--muted); background: var(--bg); }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 780px) { .site-footer .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } .site-footer .cols > :first-child { grid-column: 1 / -1; } }
.site-footer a { overflow-wrap: anywhere; }
.site-footer h4 { font: 600 .74rem/1 var(--font-body); letter-spacing: .18em; text-transform: uppercase; color: var(--ink); margin: 0 0 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer .legal { margin-top: 36px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .84rem; }
.socials { display: flex; gap: 10px; margin-top: 14px; }
.socials a { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; }
.socials svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- splash (home only, once per session) ---------- */
.splash { position: fixed; inset: 0; z-index: 300; background: #000; display: grid; place-items: center; transition: opacity .7s ease; }
.splash video { width: min(1100px, 100vw); height: auto; }
.splash.done { opacity: 0; pointer-events: none; }
.splash .skip { position: absolute; right: 22px; bottom: 22px; background: rgba(255,255,255,.06); color: #cdbf95; border: 1px solid #3a3222; border-radius: 999px; padding: 9px 18px; font: 500 .85rem/1 var(--font-body); cursor: pointer; letter-spacing: .08em; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .product-card, .product-card .pc-media img { transition: none; }
}

/* ---------- utility ---------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 12px; } .mt-2 { margin-top: 24px; } .mt-3 { margin-top: 40px; }
.mb-0 { margin-bottom: 0; }
.pill-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.pill-list li { padding: 6px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: .86rem; color: var(--muted); }
.breadcrumb { font-size: .86rem; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.quote { font: 400 clamp(1.3rem, 2.4vw, 1.75rem)/1.4 var(--font-display); border-left: 2px solid var(--accent); padding-left: 22px; margin: 0; }

/* ---------- fixes ---------- */
[hidden] { display: none !important; }
[data-theme="way"] .tag.live, [data-theme="editorial"] .tag.live { color: #2f7a4f; border-color: color-mix(in srgb, #2f7a4f 40%, var(--line)); }
[data-theme="way"] .signup .msg.ok, [data-theme="editorial"] .signup .msg.ok { color: #2f7a4f; }
[data-theme="way"] .signup .msg.err, [data-theme="editorial"] .signup .msg.err { color: #b3261e; }
.section-head h2 + .lede { margin-top: 16px; }
h1 .jp, h2 .jp { white-space: nowrap; }
