/* SuperLysa showcase. One dark theme, matching the SuperLysa brand site and its white logo.
   Accent: a single lilac taken from the logo gradient. Radius rule: containers 20px,
   inner blocks 12px, buttons / tabs / chips 999px pill. */
:root {
  --bg: #0b1016;
  --bg-2: #0f161e;
  --surface: #141d27;
  --surface-2: #1a2531;
  --line: #24313f;
  --line-2: #2f3e4f;
  --text: #eef1f6;
  --muted: #a3aebf;
  --faint: #76839a;
  --accent: #b7aaff;
  --accent-ink: #0b1016;
  --accent-soft: rgba(183, 170, 255, .12);
  --ok: #8fd9b6;
  --shadow: 0 24px 60px -24px rgba(2, 6, 18, .85);

  --f-display: "Unbounded", "Noto Sans TC", "Noto Sans SC", system-ui, sans-serif;
  --f-body: "Noto Sans TC", "Noto Sans SC", -apple-system, "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --nav-h: 64px;
  --r-lg: 20px;
  --r: 12px;
  --gutter: 16px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}
:lang(zh-Hans) { --f-body: "Noto Sans SC", "Noto Sans TC", -apple-system, "PingFang SC", system-ui, sans-serif; }
@media (min-width: 720px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--f-body); font-size: 16px; line-height: 1.7; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.22; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.nb { display: inline-block; white-space: nowrap; }
.num { font-family: var(--f-display); font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--text); color: var(--bg); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  font-weight: 700; text-decoration: none; transition: transform .2s var(--ease), background .2s; }
.btn:hover { background: #c8bfff; transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn .ph { font-size: 18px; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 50; height: var(--nav-h); background: rgba(11, 16, 22, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav-in { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand img { width: 132px; height: auto; }
.nav-links { display: none; gap: 4px; margin-left: auto; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: 15px; padding: 6px 12px; border-radius: 999px; transition: color .2s, background .2s; }
.nav-links a:hover { color: var(--text); background: var(--surface); }
@media (min-width: 900px) { .nav-links { display: flex; } }
.lang { display: inline-flex; margin-left: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
@media (min-width: 900px) { .lang { margin-left: 8px; } }
.lang button { font-size: 13px; color: var(--muted); background: none; border: 0; min-width: 34px; height: 30px; border-radius: 999px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--text); color: var(--bg); font-weight: 700; }
.lang[hidden], .lang button[hidden] { display: none; }

/* Hero */
.hero { position: relative; padding: 40px 0 24px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -10% -20% auto 35%; height: 90%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(183, 170, 255, .16), transparent 70%), radial-gradient(closest-side at 70% 60%, rgba(91, 166, 244, .10), transparent 70%); }
.hero-in { position: relative; display: grid; gap: 36px; align-items: center; }
@media (min-width: 980px) { .hero { padding: 64px 0 40px; } .hero-in { grid-template-columns: 1fr 1.05fr; gap: 48px; min-height: calc(100dvh - var(--nav-h) - 160px); } }
.eyebrow { font-size: 14px; font-weight: 700; color: var(--accent); margin-bottom: 16px; }
.hero h1 { font-weight: 900; font-size: clamp(2rem, 7.4vw, 3.4rem); letter-spacing: -0.015em; }
.hero-sub { color: var(--muted); font-size: 1.08rem; margin: 18px 0 28px; max-width: 30em; }

/* Hero visual: real screenshots in light device frames */
.hero-visual { position: relative; aspect-ratio: 1.12 / 1; overflow: hidden; border-radius: var(--r-lg); }
.hero-visual figure { margin: 0; position: absolute; overflow: hidden; box-shadow: var(--shadow); }
.frame-browser { left: 0; top: 4%; width: 86%; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-2); }
.frame-bar { height: 30px; display: flex; align-items: center; padding: 0 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.frame-url { font-family: var(--f-mono); font-size: 11px; color: var(--faint); background: var(--bg-2); border-radius: 999px; padding: 2px 12px; }
.frame-browser img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.frame-poster { left: 6%; bottom: 2%; width: 25%; border-radius: 12px; transform: rotate(-4deg); border: 1px solid var(--line-2); }
.frame-poster img { aspect-ratio: 2 / 3; object-fit: cover; }
.frame-phone { right: 2%; bottom: 0; width: 34%; border-radius: 26px; border: 6px solid #1d2733; background: #1d2733; }
.frame-phone img { aspect-ratio: 9 / 16.5; object-fit: cover; object-position: top; border-radius: 20px; }

/* Numbers band under the hero */
.numbers { padding: 32px 0 36px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-2); }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 24px; }
@media (min-width: 860px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stats li { display: flex; flex-direction: column; gap: 4px; }
.stats .num { font-size: clamp(1.7rem, 4.6vw, 2.5rem); line-height: 1.05; color: var(--text); }
.stats span { font-size: 13.5px; color: var(--muted); line-height: 1.5; }

/* Section heads */
.services, .week, .case, .process { padding: 64px 0; }
@media (min-width: 860px) { .services, .week, .case, .process { padding: 96px 0 100px; } }
.services h2, .week h2, .case h2, .process h2 { font-weight: 900; font-size: clamp(1.6rem, 4.4vw, 2.4rem); letter-spacing: -0.01em; }
.sec-lead { color: var(--muted); font-size: 1.05rem; margin-top: 10px; max-width: 40em; }

/* Explorer tabs */
.tabs { display: flex; gap: 10px; margin: 28px calc(var(--gutter) * -1) 0; padding: 4px var(--gutter) 6px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: 0 0 auto; width: 148px; min-height: 96px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 10px;
  text-align: left; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer;
  transition: background .25s var(--ease), border-color .25s, color .25s, transform .25s var(--ease); }
.tab .ph { font-size: 24px; color: var(--faint); transition: color .25s; }
.tab span { font-size: 15px; font-weight: 700; line-height: 1.4; text-wrap: balance; }
.tab:hover { color: var(--text); border-color: var(--line-2); transform: translateY(-2px); }
.tab[aria-selected="true"] { background: var(--surface-2); border-color: var(--accent); color: var(--text); box-shadow: inset 0 0 0 1px var(--accent); }
.tab[aria-selected="true"] .ph { color: var(--accent); }
@media (min-width: 1100px) { .tabs { display: grid; grid-template-columns: repeat(7, 1fr); margin: 32px 0 0; padding: 0; overflow: visible; } .tab { width: auto; } }

/* Explorer panel */
.panels { margin-top: 16px; }
.panel { display: grid; gap: 28px; padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.panel[hidden] { display: none; }
@media (min-width: 960px) { .panel { grid-template-columns: 5fr 6fr; gap: 40px; padding: 36px; min-height: 620px; align-items: start; } }
.panel h3 { font-size: clamp(1.3rem, 3vw, 1.75rem); font-weight: 900; }
.panel-lead { color: var(--text); font-size: 1.05rem; margin-top: 10px; }
.fit { margin-top: 10px; color: var(--muted); font-size: 15px; }
.fit b { color: var(--text); }
.hint { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13.5px; color: var(--faint); }
.hint .ph { font-size: 16px; color: var(--accent); }
.expand-all { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border: 0; border-radius: 999px; padding: 4px 12px; cursor: pointer; transition: background .2s; }
.expand-all:hover { background: rgba(183, 170, 255, .22); }
.expand-all .ea-close, .expand-all[aria-expanded="true"] .ea-open { display: none; }
.expand-all[aria-expanded="true"] .ea-close { display: inline; }
.items { margin-top: 10px; display: grid; gap: 4px; }
.items details { border-radius: var(--r); border: 1px solid transparent; transition: background .2s, border-color .2s; }
.items details[open] { background: var(--bg-2); border-color: var(--line); }
.items summary { list-style: none; display: grid; grid-template-columns: 24px 1fr 18px; gap: 10px; align-items: start; padding: 10px; border-radius: var(--r); cursor: pointer; transition: background .2s; }
.items summary::-webkit-details-marker { display: none; }
.items summary:hover { background: var(--surface-2); }
.items details[open] summary:hover { background: transparent; }
.items .ph { font-size: 22px; color: var(--ok); margin-top: 1px; }
.items .ph-plus-circle { color: var(--accent); }
.items .chev { font-size: 16px; color: var(--faint); margin-top: 5px; transition: transform .25s var(--ease), color .2s; }
.items details[open] .chev { transform: rotate(180deg); color: var(--accent); }
.sum { display: grid; gap: 2px; }
.item-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.item-h b { font-weight: 800; font-size: 16px; }
.item-p { color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.more { padding: 0 12px 14px 44px; display: grid; gap: 10px; }
.more p { font-size: 14.5px; color: var(--muted); line-height: 1.65; }
.more b { display: block; color: var(--text); font-size: 13px; font-weight: 700; }
.when { font-family: var(--f-mono); font-size: 12px; color: var(--faint); }
.tag { font-size: 12px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 1px 8px; }
.steps-mini { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; font-size: 13.5px; }
.steps-mini li { background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; }
.steps-mini li + li::before { content: "→ "; color: var(--accent); }
.proof { margin-top: 22px; padding: 16px 18px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line); display: grid; gap: 10px; }
.proof-title { font-size: 13px; font-weight: 700; color: var(--accent); }
.proof p:not(.proof-title) { display: grid; gap: 2px; font-size: 14.5px; }
.proof b { font-weight: 800; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.proof b small { font-weight: 500; font-size: 12.5px; color: var(--faint); }
.proof span { color: var(--muted); line-height: 1.6; }
.links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 16px; font-size: 14px; }
.links span { color: var(--faint); }
.links a { color: var(--accent); font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.links a:hover { text-decoration: underline; }
.aside { margin-top: 14px; font-size: 14px; color: var(--faint); }

/* Viewer + thumbnails */
.viewer { margin: 0; }
.zoom { display: block; width: 100%; padding: 0; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; background: var(--bg-2); cursor: zoom-in; }
.viewer .zoom img { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; transition: opacity .25s; }
.viewer .zoom img.is-swapping { opacity: 0; }
.viewer.is-portrait .zoom img { aspect-ratio: 4 / 5; }
@media (min-width: 960px) { .viewer.is-portrait .zoom img { aspect-ratio: 1 / 1; } }
.viewer figcaption { font-size: 13.5px; color: var(--muted); margin-top: 10px; min-height: 1.5em; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.thumbs button { width: 62px; height: 48px; padding: 0; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); cursor: pointer; opacity: .65; transition: opacity .2s, border-color .2s; }
.thumbs button img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.thumbs button:hover { opacity: 1; }
@media (min-width: 960px) { .thumbs button { width: 76px; height: 56px; } }
.thumbs button[aria-pressed="true"] { opacity: 1; border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

/* Diagrams inside panels (one row each) */
.panel-diagrams { display: grid; gap: 16px; align-content: start; }
.flow { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 12px; }
.flow-label { font-size: 13px; font-weight: 700; color: var(--accent); }
.flow-in, .flow-out { display: flex; flex-wrap: wrap; gap: 6px; }
.flow-in li { font-size: 13.5px; border: 1px solid var(--line-2); border-radius: 999px; padding: 2px 10px; color: var(--muted); }
.flow-out li { font-size: 13.5px; background: var(--accent-soft); border-radius: 8px; padding: 3px 10px; }
.flow-core { display: grid; text-align: center; padding: 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); position: relative; }
.flow-core b { font-size: 15px; }
.flow-core span { font-size: 12.5px; color: var(--muted); }
.flow-core::before, .flow-core::after { content: "↓"; position: absolute; left: 50%; transform: translateX(-50%); color: var(--accent); font-size: 13px; }
.flow-core::before { top: -15px; } .flow-core::after { bottom: -15px; }
.brain { display: grid; gap: 22px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.brain-src, .brain-use { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.brain-src li { font-size: 13.5px; border: 1px solid var(--line-2); border-radius: 999px; padding: 2px 10px; color: var(--muted); }
.brain-use li { font-size: 13.5px; background: var(--accent-soft); border-radius: 8px; padding: 3px 10px; }
.brain-core { position: relative; border-radius: 16px; padding: 16px; display: grid; gap: 8px; background: var(--surface-2); border: 1px solid var(--accent); }
.brain-core::before, .brain-core::after { content: "↓"; position: absolute; left: 50%; transform: translateX(-50%); color: var(--accent); }
.brain-core::before { top: -21px; } .brain-core::after { bottom: -21px; }
.brain-name { font-family: var(--f-display); font-weight: 700; text-align: center; color: var(--accent); }
.brain-layer { display: grid; background: var(--bg-2); border-radius: 10px; padding: 8px 12px; }
.brain-layer b { font-size: 14.5px; }
.brain-layer span { font-size: 12.5px; color: var(--muted); }

/* Week timeline */
.week { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.week-scroll { overflow-x: auto; scrollbar-width: none; margin-top: 30px; }
.week-scroll::-webkit-scrollbar { display: none; }
.week-track { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(180px, 64vw); gap: 12px; padding: 18px var(--gutter) 6px; width: max-content; min-width: 100%; }
.week-track::before { content: ""; position: absolute; left: var(--gutter); right: var(--gutter); top: 0; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--accent), rgba(183,170,255,.15)); transform-origin: left; }
@media (min-width: 1100px) { .week-scroll { overflow: visible; } .week-track { max-width: 1200px; margin: 0 auto; width: auto; grid-auto-flow: row; grid-template-columns: repeat(8, 1fr); } }
.week-track button { width: 100%; height: 100%; text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); cursor: pointer; position: relative; transition: border-color .2s, transform .2s var(--ease); }
.week-track button::before { content: ""; position: absolute; left: 14px; top: -19px; width: 2px; height: 12px; background: var(--accent); border-radius: 2px; }
.week-track button:hover { border-color: var(--accent); transform: translateY(-2px); }
.week-track time { font-family: var(--f-mono); font-size: 12.5px; color: var(--accent); }
.week-track span { font-size: 14px; line-height: 1.5; color: var(--text); }

/* Regency case */
.gallery { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); margin: 28px calc(var(--gutter) * -1) 0; padding: 4px var(--gutter) 10px; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery figure { margin: 0; flex: 0 0 78%; scroll-snap-align: start; }
@media (min-width: 760px) { .gallery { display: grid; grid-template-columns: repeat(3, 1fr); margin: 32px 0 0; padding: 0; overflow: visible; } .gallery figure { flex: none; } }
.gallery .zoom img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; transition: transform .4s var(--ease); }
.gallery .zoom:hover img { transform: scale(1.03); }
.gallery figcaption { display: grid; gap: 2px; margin-top: 10px; font-size: 13.5px; color: var(--muted); }
.gallery figcaption b { color: var(--text); font-size: 15px; }

/* Process */
.process { background: var(--bg-2); border-top: 1px solid var(--line); }
.process-steps { margin-top: 28px; display: grid; gap: 12px; }
@media (min-width: 860px) { .process-steps { grid-template-columns: repeat(4, 1fr); gap: 20px; } }
.process-steps li { position: relative; display: grid; gap: 6px; padding: 20px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.process-steps .ph { font-size: 26px; color: var(--accent); }
.process-steps b { font-size: 1.05rem; font-weight: 800; }
.process-steps span { font-size: 14.5px; color: var(--muted); }
@media (min-width: 860px) { .process-steps li:not(:last-child)::after { content: "→"; position: absolute; right: -16px; top: 50%; transform: translateY(-50%); color: var(--accent); } }

/* Footer */
.foot { padding: 40px 0 56px; border-top: 1px solid var(--line); }
.foot-in { display: grid; gap: 10px; justify-items: start; }
.foot a { color: var(--text); }
.fine { font-size: 13px; color: var(--faint); max-width: 60em; }

/* Lightbox */
#lightbox { border: 0; padding: 0; background: transparent; max-width: min(96vw, 1400px); max-height: 94vh; }
#lightbox::backdrop { background: rgba(5, 8, 12, .9); }
#lightbox img { max-height: 84vh; width: auto; max-width: 100%; margin: 0 auto; border-radius: 10px; }
.lb-cap { color: var(--text); text-align: center; font-size: 14px; margin-top: 10px; }
.lb-close { position: fixed; top: 12px; right: 16px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--text); color: var(--bg); font-size: 22px; display: grid; place-items: center; cursor: pointer; }

/* Motion: entrance, timeline, panel switch. All of it switches off for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .hero-visual figure { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
  .js .hero-visual.is-in figure { opacity: 1; transform: none; }
  .js .hero-visual.is-in .frame-browser { transition-delay: .1s; }
  .js .hero-visual.is-in .frame-poster { transform: rotate(-4deg); transition-delay: .35s; }
  .js .hero-visual.is-in .frame-phone { transition-delay: .55s; }
  .js .week-track::before { transform: scaleX(0); transition: transform 1.4s var(--ease); }
  .js .week-track.is-in::before { transform: scaleX(1); }
  .js .week-track li { opacity: 0; transform: translateY(12px); transition: opacity .5s var(--ease), transform .5s var(--ease); transition-delay: calc(var(--i) * 120ms + 200ms); }
  .js .week-track.is-in li { opacity: 1; transform: none; }
  .js .week-track[data-reveal] { opacity: 1; transform: none; }
  .panel.is-entering { animation: panel-in .35s var(--ease); }
  .items details[open] .more { animation: panel-in .3s var(--ease); }
}
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
