/* ============================================================
   StormCam Product Analysis — Storm Camera UI Style
   Pure black + mint green accent · iOS-native minimal
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&family=Noto+Sans+SC:wght@400;500;600;700&display=swap');

:root {
  --bg-black: #000000;
  --bg-card: #1c1c1e;
  --bg-card-hover: #2c2c2e;
  --bg-grouped: #1c1c1e;
  --bg-input: #2c2c2e;

  --text-primary: #ffffff;
  --text-secondary: #8e8e93;
  --text-tertiary: #636366;
  --text-quaternary: #48484a;

  --accent-mint: #34c7a9;
  --accent-red: #ff3b30;
  --accent-orange: #ff9500;
  --accent-yellow: #ffd60a;
  --accent-blue: #0a84ff;
  --accent-green: #30d158;

  --border-separator: rgba(255,255,255,0.08);
  --border-card: rgba(255,255,255,0.06);

  --font-body: 'DM Sans', 'Noto Sans SC', -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --font-cn: 'Noto Sans SC', -apple-system, sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-black);
  overflow-x: hidden;
  line-height: 1.6;
}
::selection { background: var(--accent-mint); color: var(--bg-black); }
button { cursor: pointer; border: none; background: none; color: inherit; font: inherit; }
a { color: inherit; text-decoration: none; }

/* === SIDE NAV === */
.side-nav {
  position: fixed; right: 1.2rem; top: 50%; transform: translateY(-50%);
  z-index: 100; display: flex; flex-direction: column; gap: 0.5rem;
  align-items: center;
}
.nav-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-quaternary); transition: all 0.3s var(--ease);
  position: relative;
}
.nav-dot.active { background: var(--accent-mint); width: 8px; height: 8px; box-shadow: 0 0 8px rgba(52,199,169,0.4); }
.nav-dot span {
  position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-cn); font-size: 0.65rem;
  color: var(--text-secondary); white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.nav-dot:hover span { opacity: 1; }
.nav-dot:hover { background: var(--accent-mint); }

/* === CONTAINER === */
.container { max-width: 960px; margin: 0 auto; padding: 0 1.5rem; }

/* === SECTIONS === */
.section { position: relative; padding: 5rem 0; }

/* === HERO === */
.hero-section {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; min-height: 100vh; padding: 3rem 1.5rem;
}
.hero-logo {
  width: 64px; height: 64px; margin-bottom: 1.5rem;
  animation: fadeIn 0.6s var(--ease) both;
}
.hero-logo svg { width: 100%; height: 100%; }
.hero-logo .logo-circle { fill: var(--text-primary); }

.hero-eyebrow {
  font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.2em;
  color: var(--text-tertiary); margin-bottom: 1rem; text-transform: uppercase;
  animation: fadeIn 0.6s var(--ease) 0.1s both;
}
.hero-title { margin-bottom: 1.2rem; animation: fadeIn 0.6s var(--ease) 0.15s both; }
.title-line {
  display: block; font-family: var(--font-cn); font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.2; letter-spacing: -0.01em;
}
.title-sub {
  display: block; font-family: var(--font-body); font-weight: 600;
  font-size: clamp(1rem, 2.5vw, 1.5rem); color: var(--text-secondary);
  margin-top: 0.3rem;
}
.hero-subtitle {
  font-size: 0.95rem; color: var(--text-secondary); max-width: 420px; margin: 0 auto 2.5rem;
  animation: fadeIn 0.6s var(--ease) 0.2s both;
}
.hero-subtitle strong { color: var(--accent-mint); }

.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem;
  margin-bottom: 1.5rem; width: 100%; max-width: 520px;
  animation: fadeIn 0.6s var(--ease) 0.3s both;
}
.stat-pill {
  padding: 1rem 0.5rem; background: var(--bg-card); border-radius: var(--radius-md);
  text-align: center; transition: transform 0.2s var(--ease);
}
.stat-pill:hover { transform: translateY(-2px); }
.stat-value {
  display: block; font-family: var(--font-body); font-weight: 700;
  font-size: 1.4rem; color: var(--text-primary);
}
.stat-label {
  display: block; font-size: 0.6rem; font-weight: 500;
  color: var(--text-tertiary); margin-top: 0.25rem;
}

.hero-meta {
  display: flex; gap: 0.4rem; justify-content: center; flex-wrap: wrap;
  animation: fadeIn 0.6s var(--ease) 0.35s both;
}
.meta-tag {
  font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.05em;
  padding: 0.3rem 0.65rem; background: var(--bg-card);
  border-radius: 999px; color: var(--text-tertiary);
}

.scroll-cue {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  animation: fadeIn 0.6s var(--ease) 0.5s both;
}
.scroll-cue span {
  font-family: var(--font-mono); font-size: 0.5rem; letter-spacing: 0.2em;
  color: var(--text-quaternary);
}
.scroll-arrow {
  width: 1px; height: 20px;
  background: linear-gradient(to bottom, var(--text-quaternary), transparent);
  animation: scrollBounce 2s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(5px); opacity: 0.8; }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === SECTION HEADER === */
.section-header { margin-bottom: 2rem; }
.section-marker {
  font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.15em;
  color: var(--accent-mint); margin-bottom: 0.6rem; display: block;
}
.section-title {
  font-family: var(--font-cn); font-weight: 700;
  font-size: clamp(1.5rem, 3.5vw, 2rem); line-height: 1.3; margin-bottom: 0.4rem;
}
.section-desc { font-size: 0.9rem; color: var(--text-secondary); max-width: 480px; }
.section-desc em { color: var(--accent-red); font-style: normal; font-weight: 600; }

/* === FADE IN === */
.fade-in { opacity: 0; transform: translateY(20px); transition: all 0.5s var(--ease); }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* === iOS GROUPED CARD === */
.grouped-card {
  background: var(--bg-grouped); border-radius: var(--radius-lg);
  overflow: hidden;
}
.grouped-card-header {
  padding: 0.8rem 1rem 0.5rem;
  font-size: 0.7rem; font-weight: 600; color: var(--text-tertiary);
  text-transform: uppercase; letter-spacing: 0.05em;
}

/* === RATINGS === */
.ratings-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 1rem; }

.rating-dist-card, .trend-card {
  background: var(--bg-card); border-radius: var(--radius-lg); padding: 1.5rem;
}
.card-label {
  font-size: 0.7rem; font-weight: 600; color: var(--text-tertiary);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1.2rem;
}
.dist-bars { display: flex; flex-direction: column; gap: 0.7rem; }
.dist-row { display: grid; grid-template-columns: 24px 1fr 32px 38px; gap: 0.5rem; align-items: center; }
.dist-star { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-secondary); }
.dist-bar-track { height: 6px; background: var(--bg-input); border-radius: 3px; overflow: hidden; }
.dist-bar-fill {
  height: 100%; width: 0%; border-radius: 3px;
  background: var(--bar-color, var(--accent-mint));
  transition: width 1s var(--ease);
}
.dist-bar-fill.animated { width: var(--target-width); }
.dist-count { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-secondary); text-align: right; }
.dist-pct { font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-tertiary); text-align: right; }

.trend-chart { margin-bottom: 0.8rem; }
.trend-svg { width: 100%; height: auto; }
.trend-labels {
  display: flex; justify-content: space-between; padding: 0 0.8rem; margin-top: 0.2rem;
}
.trend-labels span { font-family: var(--font-mono); font-size: 0.5rem; color: var(--text-quaternary); }
.trend-insight {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 0.8rem; background: rgba(255,59,48,0.08);
  border-radius: var(--radius-sm); border-left: 2px solid var(--accent-red);
}
.trend-insight .insight-icon {
  width: 16px; height: 16px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.trend-insight .insight-icon svg { width: 14px; height: 14px; }
.trend-insight p { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.4; }
.trend-insight strong { color: var(--accent-red); }

/* === FEEDBACK === */
.feedback-controls {
  display: flex; gap: 0.4rem; margin-bottom: 1.5rem; flex-wrap: wrap;
}
.filter-btn {
  font-size: 0.75rem; font-weight: 500;
  padding: 0.4rem 1rem; background: var(--bg-card);
  border-radius: 999px; color: var(--text-tertiary);
  transition: all 0.2s var(--ease);
}
.filter-btn.active { background: var(--accent-mint); color: var(--bg-black); }
.filter-btn:hover:not(.active) { background: var(--bg-card-hover); color: var(--text-secondary); }

.feedback-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.75rem;
}
.feedback-card {
  background: var(--bg-card); border-radius: var(--radius-md); padding: 1.2rem;
  transition: all 0.25s var(--ease); position: relative;
  animation: fadeIn 0.4s var(--ease) both;
}
.feedback-card:hover { background: var(--bg-card-hover); transform: translateY(-2px); }

.fb-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.6rem; }
.fb-priority {
  font-size: 0.6rem; font-weight: 600; letter-spacing: 0.05em;
  padding: 0.15rem 0.4rem; border-radius: 4px;
}
.fb-priority.p0 { background: rgba(255,59,48,0.15); color: var(--accent-red); }
.fb-priority.p1 { background: rgba(255,149,0,0.15); color: var(--accent-orange); }
.fb-priority.p2 { background: rgba(10,132,255,0.15); color: var(--accent-blue); }
.fb-priority.p3 { background: rgba(48,209,88,0.15); color: var(--accent-green); }

.fb-score { font-weight: 700; font-size: 1rem; }
.fb-score.low { color: var(--accent-red); }
.fb-score.mid { color: var(--accent-orange); }
.fb-score.high { color: var(--accent-green); }

.fb-title { font-family: var(--font-cn); font-weight: 600; font-size: 0.9rem; margin-bottom: 0.3rem; }
.fb-mentions { font-family: var(--font-mono); font-size: 0.55rem; color: var(--text-quaternary); letter-spacing: 0.05em; }
.fb-analysis {
  font-size: 0.75rem; color: var(--text-tertiary); margin-top: 0.5rem;
  padding-top: 0.5rem; border-top: 1px solid var(--border-separator); line-height: 1.4;
}

/* === TIMELINE === */
.timeline { position: relative; padding-left: 20px; }
.timeline::before {
  content: ''; position: absolute; left: 3px; top: 0; bottom: 0;
  width: 1px; background: var(--border-separator);
}
.tl-item {
  position: relative; margin-bottom: 1rem; padding-left: 1.5rem;
  animation: fadeIn 0.4s var(--ease) both;
}
.tl-item::before {
  content: ''; position: absolute; left: -20px; top: 0.5rem;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--text-quaternary); transition: all 0.2s;
}
.tl-item.major::before { background: var(--accent-mint); width: 7px; height: 7px; left: -21px; box-shadow: 0 0 6px rgba(52,199,169,0.3); }
.tl-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.2rem; }
.tl-version { font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500; color: var(--accent-mint); }
.tl-date { font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-quaternary); }
.tl-milestone {
  font-family: var(--font-mono); font-size: 0.5rem;
  background: rgba(52,199,169,0.1); color: var(--accent-mint);
  padding: 0.1rem 0.4rem; border-radius: 4px;
}
.tl-content { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.5; }
.tl-content strong { color: var(--text-primary); }

/* === DEMANDS === */
.demand-tabs { display: flex; gap: 0.4rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.demand-tab {
  font-family: var(--font-cn); font-size: 0.8rem; font-weight: 500;
  padding: 0.5rem 1.2rem; border-radius: 999px;
  background: var(--bg-card); color: var(--text-tertiary);
  transition: all 0.2s var(--ease);
}
.demand-tab.active { background: var(--text-primary); color: var(--bg-black); }
.demand-tab:hover:not(.active) { background: var(--bg-card-hover); }
.tab-count {
  font-family: var(--font-mono); font-size: 0.6rem;
  margin-left: 0.2rem; opacity: 0.6;
}

.demand-panel { display: none; }
.demand-panel.active { display: block; }
.demand-list { display: flex; flex-direction: column; gap: 0; }

.demand-item {
  display: grid; grid-template-columns: 32px 1fr auto; gap: 0.8rem;
  align-items: center; padding: 0.9rem 1rem;
  background: var(--bg-card); transition: background 0.2s var(--ease);
}
.demand-item:first-child { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.demand-item:last-child { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.demand-item:only-child { border-radius: var(--radius-lg); }
.demand-item:not(:last-child) { border-bottom: 1px solid var(--border-separator); }
.demand-item:hover { background: var(--bg-card-hover); }

.demand-icon {
  width: 28px; height: 28px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-input); flex-shrink: 0;
}
.demand-icon svg { width: 14px; height: 14px; stroke: var(--text-secondary); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.demand-name { font-family: var(--font-cn); font-weight: 500; font-size: 0.88rem; }
.demand-ver { font-size: 0.7rem; color: var(--text-tertiary); margin-top: 0.1rem; }
.demand-badge {
  font-family: var(--font-mono); font-size: 0.55rem; letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem; border-radius: 5px; white-space: nowrap;
}
.demand-badge.resolved { background: rgba(48,209,88,0.1); color: var(--accent-green); }
.demand-badge.partial { background: rgba(255,149,0,0.1); color: var(--accent-orange); }
.demand-badge.high { background: rgba(255,59,48,0.1); color: var(--accent-red); }
.demand-badge.mid { background: rgba(255,149,0,0.1); color: var(--accent-orange); }
.demand-badge.low { background: rgba(10,132,255,0.1); color: var(--accent-blue); }

/* Progress ring */
.progress-summary {
  display: flex; align-items: center; gap: 2.5rem;
  justify-content: center; margin-top: 2rem;
}
.progress-ring-wrap { position: relative; width: 140px; height: 140px; }
.progress-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--bg-input); stroke-width: 6; }
.ring-resolved { fill: none; stroke: var(--accent-green); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 1.2s var(--ease); }
.ring-partial { fill: none; stroke: var(--accent-orange); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 1.2s var(--ease) 0.2s; }
.ring-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.ring-pct { font-weight: 700; font-size: 1.6rem; }
.ring-label { font-size: 0.6rem; color: var(--text-tertiary); }

.progress-legend { display: flex; flex-direction: column; gap: 0.4rem; }
.legend-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.78rem; color: var(--text-secondary); }
.legend-dot { width: 8px; height: 8px; border-radius: 2px; }

/* === COMPETE TABLE === */
.compete-table-wrap { overflow-x: auto; margin-bottom: 1.5rem; }
.compete-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--bg-card); border-radius: var(--radius-lg); overflow: hidden;
}
.compete-table th, .compete-table td {
  padding: 0.8rem 1rem; text-align: center; font-size: 0.8rem;
}
.compete-table th {
  font-size: 0.7rem; font-weight: 600; color: var(--text-tertiary);
  background: var(--bg-input); letter-spacing: 0.03em;
}
.compete-table td { border-bottom: 1px solid var(--border-separator); color: var(--text-secondary); }
.compete-table tbody tr:last-child td { border-bottom: none; }
.compete-dim { text-align: left !important; font-weight: 600; color: var(--text-primary) !important; }
.compete-brand.storm { color: var(--accent-mint) !important; }
.compete-brand.bmc { color: var(--accent-blue) !important; }
.compete-brand.kino { color: var(--accent-orange) !important; }
.compete-table td.yes { color: var(--accent-green); }
.compete-table td.no { color: var(--accent-red); }
.compete-table .ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.compete-table td.highlight { color: var(--accent-mint); font-weight: 500; }
.compete-table tbody tr { transition: background 0.15s; }
.compete-table tbody tr:hover { background: rgba(255,255,255,0.02); }

.compete-insight { margin-top: 1rem; }
.compete-insight blockquote {
  font-size: 0.85rem; color: var(--text-secondary); padding: 1rem 1.2rem;
  border-left: 2px solid var(--accent-mint); background: rgba(52,199,169,0.04);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; line-height: 1.6;
}
.compete-insight strong { color: var(--accent-mint); }

/* === ACTION LANES === */
.action-lanes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-bottom: 2rem; }
.action-lane { background: var(--bg-card); border-radius: var(--radius-lg); overflow: hidden; }
.lane-header {
  padding: 1rem 1.2rem; display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--border-separator);
}
.lane-phase { font-family: var(--font-cn); font-weight: 700; font-size: 1rem; }
.lane-time { font-family: var(--font-mono); font-size: 0.55rem; color: var(--text-quaternary); }
.lane-items { padding: 0.5rem; }
.lane-item {
  display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.6rem;
  border-radius: var(--radius-sm); transition: background 0.15s;
}
.lane-item:hover { background: rgba(255,255,255,0.03); }
.item-num { font-family: var(--font-mono); font-size: 0.55rem; color: var(--accent-mint); flex-shrink: 0; margin-top: 0.1rem; }
.lane-item p { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.4; }

/* === PM SUMMARY === */
.pm-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 2rem; }
.summary-card { padding: 1.5rem; border-radius: var(--radius-lg); }
.summary-card.good { background: rgba(48,209,88,0.06); }
.summary-card.warn { background: rgba(255,59,48,0.06); }
.summary-card h3 { font-family: var(--font-cn); font-size: 0.95rem; margin-bottom: 0.8rem; display: flex; align-items: center; gap: 0.4rem; }
.summary-card h3 .card-icon { width: 18px; height: 18px; flex-shrink: 0; }
.summary-card h3 .card-icon svg { width: 100%; height: 100%; }
.summary-card ul { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.summary-card li {
  font-size: 0.8rem; color: var(--text-secondary); line-height: 1.5;
  padding-left: 0.8rem; position: relative;
}
.summary-card li::before {
  content: ''; position: absolute; left: 0; top: 0.5rem;
  width: 3px; height: 3px; border-radius: 50%;
}
.summary-card.good li::before { background: var(--accent-green); }
.summary-card.warn li::before { background: var(--accent-red); }

/* === FINAL STATEMENT === */
.final-statement { text-align: center; padding: 3rem 0; }
.final-quote {
  font-family: var(--font-cn); font-weight: 700;
  font-size: clamp(1.2rem, 2.5vw, 1.6rem); line-height: 1.8;
}
.final-statement footer {
  font-size: 0.9rem; color: var(--accent-mint); margin-top: 1rem;
  font-family: var(--font-cn);
}

/* === FOOTER === */
.site-footer {
  padding: 2rem 1.5rem; text-align: center;
  border-top: 1px solid var(--border-separator);
}
.site-footer p { font-family: var(--font-mono); font-size: 0.55rem; letter-spacing: 0.08em; color: var(--text-quaternary); }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .ratings-grid { grid-template-columns: 1fr; }
  .action-lanes { grid-template-columns: 1fr; }
  .pm-summary { grid-template-columns: 1fr; }
  .side-nav { display: none; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}
