/* The visualizations hub and the Storage City and Sharing Constellation pages. */
:root {
  --accent: #4A9EFF;
  --accent-dark: #3580d4;
  --bg: #0d1117;
  --surface: #161b22;
  --surface2: #1c2230;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --border: #30363d;
  --gold: #FFD700;
  --pink: #E040FB;
  --green: #66BB6A;
  --red: #EF5350;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.hero {
  padding: 120px 24px 48px; text-align: center;
  background:
    radial-gradient(ellipse at 30% 0%, rgba(255,215,0,0.10) 0%, transparent 55%),
    radial-gradient(ellipse at 70% 0%, rgba(74,158,255,0.10) 0%, transparent 55%);
}
.hero .screen-icon { font-size: 64px; margin-bottom: 12px; color: var(--gold); }
.hero .screen-icon svg { width: 1em; height: 1em; display: inline-block; fill: currentColor; }
.soon-pill {
  display: inline-block; padding: 4px 12px; border-radius: 999px; margin-bottom: 14px;
  background: rgba(255,215,0,0.12); border: 1px solid rgba(255,215,0,0.45);
  color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase;
}
.hero h1 { font-size: clamp(28px, 4vw, 44px); font-weight: 800; letter-spacing: -0.5px; line-height: 1.2; margin: 0 auto 12px; max-width: 820px; }
.hero h1 span { color: var(--gold); }
.hero .tagline {
  font-size: clamp(15px, 2vw, 18px); color: var(--text-muted);
  max-width: 660px; margin: 0 auto;
}
.hero-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; }
.hero-chips span {
  display: inline-block; padding: 4px 12px; border-radius: 12px; font-size: 12px; font-weight: 700;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
}
.hero-chips .c-gold { background: rgba(255,215,0,0.12); border-color: transparent; color: var(--gold); }
.hero-chips a { color: inherit; text-decoration: none; }
.hero-chips a:hover { text-decoration: underline; }

section { padding: 56px 24px; }
.container { max-width: 1000px; margin: 0 auto; }

h2.section-h { font-size: clamp(22px, 3vw, 28px); font-weight: 800; margin-bottom: 10px; letter-spacing: -0.3px; }
p.section-lede { color: var(--text-muted); font-size: 15px; margin-bottom: 28px; }

.definition-box {
  background: rgba(255,215,0,0.05); border-left: 3px solid var(--gold);
  border-radius: 0 10px 10px 0; padding: 16px 20px; margin: 0 0 12px;
}
.definition-box p { color: var(--text-muted); font-size: 15px; line-height: 1.7; }
.definition-box strong { color: var(--text); }

.visual { padding: 32px 0; border-bottom: 1px solid var(--border); scroll-margin-top: 80px; }
.visual:last-child { border-bottom: none; }
.visual h3 { font-size: 22px; font-weight: 700; margin-bottom: 4px; display: flex; align-items: center; gap: 10px; }
.visual h3 svg { width: 24px; height: 24px; fill: var(--gold); flex: none; }
#overview { padding-top: 6px; }
.visual p { color: var(--text-muted); font-size: 15px; line-height: 1.7; margin-bottom: 10px; }
.visual p strong { color: var(--text); }
.visual a { color: var(--accent); }

/* A phone screenshot beside the text; under it on a phone */
.visual.with-shot { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 36px; align-items: start; }
.visual-shot .ss-toggle { margin-bottom: 12px; }
.visual-shot .screenshot-gallery { display: flex; justify-content: center; }
/* Several shots of one visual in a row; a row to swipe on a phone */
.shot-row { display: flex; justify-content: center; gap: 24px; margin-top: 22px; }
.shot-row .screenshot-item { flex: none; }
.visual p.shot-note { font-size: 13px; text-align: center; margin: 14px 0 0; }
.screenshot-item { text-align: center; }
.screenshot-item img {
  display: block; width: 240px; height: auto; border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4); transition: transform 0.2s; cursor: pointer;
}
.screenshot-item img:hover { transform: scale(1.03); }
.screenshot-item .caption { font-size: 13px; color: var(--text-muted); margin-top: 8px; max-width: 240px; }
.lightbox {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.92);
  z-index: 200; justify-content: center; align-items: center; flex-direction: column; padding: 24px;
}
.lightbox.active { display: flex; }
.lightbox img { max-width: 90vw; max-height: 85vh; border-radius: 12px; }
.lb-caption { color: var(--text-muted); margin-top: 12px; font-size: 14px; }

.feature-list { list-style: none; margin-top: 6px; }
.feature-list li { padding: 7px 0; font-size: 14.5px; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.feature-list li:last-child { border-bottom: none; }
.feature-list li::before { content: "\2192  "; color: var(--gold); margin-right: 6px; font-weight: 700; }
.feature-list strong { color: var(--text); }

.faq-item { margin-bottom: 16px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.faq-item h3 { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.faq-item p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }
.faq-item a { color: var(--accent); }

.play-cta .links { margin-top: 12px; font-size: 13px; }
.play-cta .links a { color: var(--accent); text-decoration: none; font-weight: 600; margin: 0 8px; }

@media (max-width: 768px) {
  section { padding: 40px 16px; }
  .hero { padding: 96px 16px 36px; }
  .visual.with-shot { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .shot-row { justify-content: flex-start; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 8px; }
  .shot-row .screenshot-item { scroll-snap-align: start; }
}

/* The switch over a visual's media: dark, light (or screenshots) and video. CSS
   only, like the theme toggle in shared-nav.css; demo-video.js puts a playing
   video back to its preview when the switch moves. */
.ss-toggle label + label { border-left: none; }
.ss-video { display: none; flex-direction: column; align-items: center; gap: 10px; }
.ss-video .demo.tall { --w: 240px; width: min(100%, var(--w)); }
.ss-video .demo-note { margin-top: 0; max-width: 300px; text-align: center; }
.ss-toggle label { display: inline-flex; align-items: center; justify-content: center; min-width: 62px; }
/* Several dark screenshots: the theme toggle's moon, stacked like a pile of cards */
.moon-stack { display: inline-flex; }
.moon-stack span + span { margin-left: -11px; }
.moon-stack span:nth-child(1) { opacity: 0.45; }
.moon-stack span:nth-child(2) { opacity: 0.7; }
.ss-toggle .sw-yt { width: 26px; height: auto; display: block; }
.ss-r-shots:checked ~ .ss-toggle label.ss-lab-shots {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
/* YouTube's mark stays red, so its selected state is a red tint and not the blue */
.ss-r-video:checked ~ .ss-toggle label.ss-lab-video {
  background: rgba(255,0,0,0.16); border-color: #f00; box-shadow: inset 1px 0 0 #f00;
}
.ss-r-video:checked ~ .screenshot-gallery,
.ss-r-video:checked ~ .shot-note { display: none; }
.ss-r-video:checked ~ .ss-video { display: flex; }

/* The in-depth part of a visual's page */
.detail-block { padding: 26px 0; border-top: 1px solid var(--border); scroll-margin-top: 80px; }
.detail-block h3 { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.detail-block > p { color: var(--text-muted); font-size: 15px; line-height: 1.7; margin-bottom: 10px; }
.detail-block > p strong { color: var(--text); }
.detail-block a, .detail-card a { color: var(--accent); }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.detail-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px; scroll-margin-top: 80px; }
.detail-card h4 { font-size: 15.5px; font-weight: 700; margin-bottom: 8px; }
.detail-card p { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin-bottom: 6px; }
.detail-card p:last-child { margin-bottom: 0; }
.detail-card p b { color: var(--text); }

/* The app's own legend icons, in its colours (Material Rounded, as Flutter draws
   them): palette primary, then error, warning and critical, the moon's grey and
   the city's warm light. */
.ico { width: 20px; height: 20px; flex: none; fill: var(--accent); }
.ico.error { fill: #EF5350; }
.ico.warning { fill: #FFCA28; }
.ico.critical { fill: #FF7043; }
.ico.moon { fill: #D8E0EC; }
.ico.warm { fill: #FFD27A; }
.ico.in { width: 17px; height: 17px; vertical-align: -3px; margin-right: 4px; }
.hero-where { margin-top: 18px; font-size: 14px; color: var(--text-muted); }
.hero-where a { color: var(--accent); }
.hero-where .ico.in { margin: 0 3px 0 1px; }
.detail-block h3, .detail-card h4 { display: flex; align-items: center; gap: 9px; }
.detail-block h3 .ico { width: 22px; height: 22px; }
.detail-card h4 .ico + span { margin-left: 0; }
.detail-card h4 .ico + .ico { margin-left: -4px; }
/* A paragraph with its icon at the left, like the sections of the app's legends */
.visual p.lg { position: relative; padding-left: 32px; }
.visual p.lg > .ico { position: absolute; left: 0; top: 3px; width: 21px; height: 21px; }

/* The hub's two cards */
.hub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.hub-card {
  display: flex; gap: 18px; padding: 18px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; scroll-margin-top: 80px;
}
.hub-card img { display: block; width: 130px; height: auto; border-radius: 8px; flex: none; }
.hub-card h3 { font-size: 19px; font-weight: 700; margin-bottom: 6px; }
.hub-card p { color: var(--text-muted); font-size: 14px; line-height: 1.6; margin-bottom: 10px; }
.hub-card a.more { color: var(--accent); font-weight: 600; font-size: 14px; text-decoration: none; }
.hub-card a.more:hover { text-decoration: underline; }
.hub-also { color: var(--text-muted); font-size: 14px; margin-top: 18px; scroll-margin-top: 80px; }
.hub-also strong { color: var(--text); }
.hub-also a { color: var(--accent); }

@media (max-width: 768px) {
  .detail-grid, .hub-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 460px) {
  .hub-card { flex-direction: column; align-items: center; }
  .hub-card img { width: 170px; }
}
