/* CloudCondom / Phantom — Pitch Website Styles */
:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  --bg-card: #1c2128;
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --border: #30363d;
  --border-light: #3d444d;

  /* Section accent colors */
  --accent-product: #58a6ff;
  --accent-arch: #3fb950;
  --accent-security: #d29922;
  --accent-devops: #a371f7;
  --accent-news: #f0883e;
  --accent-hero: #79c0ff;

  /* Score colors */
  --score-high: #3fb950;
  --score-mid: #d29922;
  --score-low: #f85149;

  --sidebar-width: 260px;
  --content-max: 960px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Fira Mono", Menlo, Consolas, monospace;
}

/* ─── Light Mode ─── */
[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f6f8fa;
  --bg-tertiary: #eef1f5;
  --bg-card: #f6f8fa;
  --text-primary: #1f2328;
  --text-secondary: #59636e;
  --text-muted: #818b98;
  --border: #d1d9e0;
  --border-light: #b8c0c8;

  --accent-product: #0969da;
  --accent-arch: #1a7f37;
  --accent-security: #9a6700;
  --accent-devops: #8250df;
  --accent-news: #cf4e10;
  --accent-hero: #0969da;

  --score-high: #1a7f37;
  --score-mid: #9a6700;
  --score-low: #d1242f;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg-primary: #ffffff;
    --bg-secondary: #f6f8fa;
    --bg-tertiary: #eef1f5;
    --bg-card: #f6f8fa;
    --text-primary: #1f2328;
    --text-secondary: #59636e;
    --text-muted: #818b98;
    --border: #d1d9e0;
    --border-light: #b8c0c8;

    --accent-product: #0969da;
    --accent-arch: #1a7f37;
    --accent-security: #9a6700;
    --accent-devops: #8250df;
    --accent-news: #cf4e10;
    --accent-hero: #0969da;

    --score-high: #1a7f37;
    --score-mid: #9a6700;
    --score-low: #d1242f;
  }
}

/* ─── Theme Toggle ─── */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  margin: 8px 20px 0;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 13px;
  transition: all 0.15s;
}

.theme-toggle:hover {
  color: var(--text-primary);
  border-color: var(--border-light);
}

.theme-toggle .theme-icon {
  font-size: 14px;
  line-height: 1;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* ─── Sidebar Navigation ─── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 24px 20px 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-brand .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}

.sidebar-brand .cloud-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar-brand .cloud-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-brand h1 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.sidebar-brand .subtitle {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.sidebar-nav {
  padding: 12px 0;
  flex: 1;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s;
  border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.sidebar-nav a.active {
  color: var(--text-primary);
  background: rgba(88, 166, 255, 0.08);
}

.sidebar-nav a .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sidebar-nav a[data-section="overview"] .dot { background: var(--accent-hero); }
.sidebar-nav a[data-section="overview"].active { border-left-color: var(--accent-hero); }
.sidebar-nav a[data-section="market"] .dot { background: var(--accent-product); }
.sidebar-nav a[data-section="market"].active { border-left-color: var(--accent-product); }
.sidebar-nav a[data-section="architecture"] .dot { background: var(--accent-arch); }
.sidebar-nav a[data-section="architecture"].active { border-left-color: var(--accent-arch); }
.sidebar-nav a[data-section="security"] .dot { background: var(--accent-security); }
.sidebar-nav a[data-section="security"].active { border-left-color: var(--accent-security); }
.sidebar-nav a[data-section="operations"] .dot { background: var(--accent-devops); }
.sidebar-nav a[data-section="operations"].active { border-left-color: var(--accent-devops); }
.sidebar-nav a[data-section="news"] .dot { background: var(--accent-news); }
.sidebar-nav a[data-section="news"].active { border-left-color: var(--accent-news); }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
}

/* ─── Mobile Hamburger ─── */
.hamburger {
  display: none;
  position: fixed;
  top: 14px; left: 14px;
  z-index: 200;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  color: var(--text-primary);
  line-height: 1;
  font-size: 20px;
}

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 90;
}

/* ─── Main Content ─── */
.main {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
}

.content {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 48px 40px 80px;
}

/* ─── Page Header ─── */
.page-header {
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.page-header .accent-bar {
  width: 48px;
  height: 4px;
  border-radius: 2px;
  margin-bottom: 16px;
}

.page-header p {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 640px;
}

/* ─── Hero Section (index only) ─── */
.hero {
  text-align: center;
  padding: 64px 0 48px;
  margin-bottom: 48px;
  border-bottom: 1px solid var(--border);
}

.hero .cloud-mascot {
  width: 120px;
  height: 120px;
  margin: 0 auto 24px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(88, 166, 255, 0.2);
}

.hero .cloud-mascot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero h1 {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-hero));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .tagline {
  font-size: 20px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero .cta-line {
  display: inline-block;
  padding: 10px 24px;
  background: rgba(88, 166, 255, 0.1);
  border: 1px solid rgba(88, 166, 255, 0.3);
  border-radius: 8px;
  font-size: 14px;
  color: var(--accent-product);
  font-weight: 500;
}

/* ─── Score Dashboard ─── */
.score-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}

.score-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.score-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}

.score-card[data-accent="product"]::before { background: var(--accent-product); }
.score-card[data-accent="arch"]::before { background: var(--accent-arch); }
.score-card[data-accent="security"]::before { background: var(--accent-security); }
.score-card[data-accent="devops"]::before { background: var(--accent-devops); }

.score-card .label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.score-card .score {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}

.score-card .score-improved {
  font-size: 14px;
  color: var(--score-high);
  margin-bottom: 10px;
}

.score-bar {
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1s ease;
}

.score-bar-fill.high { background: var(--score-high); }
.score-bar-fill.mid { background: var(--score-mid); }
.score-bar-fill.low { background: var(--score-low); }

/* ─── Verdict Banner ─── */
.verdict-banner {
  background: linear-gradient(135deg, rgba(63, 185, 80, 0.1), rgba(88, 166, 255, 0.1));
  border: 1px solid rgba(63, 185, 80, 0.3);
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 48px;
  text-align: center;
}

.verdict-banner h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--score-high);
  margin-bottom: 8px;
}

.verdict-banner p {
  color: var(--text-secondary);
  font-size: 15px;
}

/* ─── Sections ─── */
.section {
  margin-bottom: 48px;
}

.section h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section h2 .section-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.section h3 {
  font-size: 17px;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.section h4 {
  font-size: 15px;
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.section p {
  margin-bottom: 12px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.section p strong {
  color: var(--text-primary);
}

.section ul, .section ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.section li {
  margin-bottom: 6px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.section li strong {
  color: var(--text-primary);
}

/* ─── Tables ─── */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 14px;
}

thead th {
  background: var(--bg-tertiary);
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border);
}

tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

tbody td strong {
  color: var(--text-primary);
}

/* ─── Collapsible / Idea Bin ─── */
details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 16px;
  overflow: hidden;
}

details summary {
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s, color 0.15s;
  list-style: none;
}

details summary::-webkit-details-marker { display: none; }

details summary::before {
  content: '\25B6';
  font-size: 10px;
  transition: transform 0.2s;
  flex-shrink: 0;
}

details[open] summary::before {
  transform: rotate(90deg);
}

details summary:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

details[open] summary {
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}

details .details-content {
  padding: 20px;
}

.idea-bin-header {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 16px;
}

.idea-bin-header h2 {
  margin-bottom: 8px;
}

.idea-bin-header p {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
}

/* ─── Info Cards ─── */
.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 16px;
}

.info-card.highlight {
  border-left: 3px solid var(--accent-product);
}

.info-card.warning {
  border-left: 3px solid var(--accent-security);
}

.info-card.success {
  border-left: 3px solid var(--accent-arch);
}

.info-card.danger {
  border-left: 3px solid var(--score-low);
}

.info-card h4 {
  margin-top: 0;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.info-card p {
  margin-bottom: 0;
}

/* ─── Stat Grid ─── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.stat-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}

.stat-item .stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.stat-item .stat-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* ─── Timeline ─── */
.timeline {
  position: relative;
  padding-left: 28px;
  margin-bottom: 24px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 20px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-product);
  border: 2px solid var(--bg-primary);
}

.timeline-item .time {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-product);
  margin-bottom: 2px;
}

.timeline-item p {
  margin: 0;
  font-size: 14px;
}

/* ─── Code Blocks ─── */
code {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 2px 6px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  color: var(--accent-hero);
}

pre {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
  margin-bottom: 16px;
}

pre code {
  padding: 0;
  background: none;
  color: var(--text-primary);
}

/* ─── Nav Cards (index page) ─── */
.nav-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}

.nav-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  text-decoration: none;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.nav-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

.nav-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}

.nav-card[data-accent="product"]::before { background: var(--accent-product); }
.nav-card[data-accent="arch"]::before { background: var(--accent-arch); }
.nav-card[data-accent="security"]::before { background: var(--accent-security); }
.nav-card[data-accent="devops"]::before { background: var(--accent-devops); }
.nav-card[data-accent="news"]::before { background: var(--accent-news); }

.nav-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  margin-top: 0;
}

.nav-card p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* ─── Two Column Layout ─── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

/* ─── News Article Card ─── */
.news-article {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 16px;
}

.news-article .news-meta {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.news-article .news-meta .source {
  color: var(--accent-news);
  font-weight: 500;
}

.news-article h4 {
  font-size: 15px;
  margin-top: 0;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.news-article p {
  font-size: 14px;
  margin-bottom: 8px;
}

.news-article .implication {
  font-size: 13px;
  color: var(--accent-news);
  font-style: italic;
}

/* ─── Comparison Table Highlights ─── */
td.yes { color: var(--score-high); font-weight: 600; }
td.no { color: var(--score-low); }
td.partial { color: var(--score-mid); }

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .overlay.open {
    display: block;
  }

  .hamburger {
    display: block;
  }

  .main {
    margin-left: 0;
  }

  .content {
    padding: 72px 20px 60px;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero .tagline {
    font-size: 16px;
  }

  .score-dashboard {
    grid-template-columns: repeat(2, 1fr);
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .nav-cards {
    grid-template-columns: 1fr;
  }

  table {
    font-size: 12px;
  }

  thead th, tbody td {
    padding: 8px 10px;
  }
}

@media (max-width: 480px) {
  .score-dashboard {
    grid-template-columns: 1fr;
  }

  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ─── Print Styles ─── */
@media print {
  .sidebar, .hamburger, .overlay { display: none !important; }
  .main { margin-left: 0; }
  .content { max-width: 100%; padding: 20px; }
  body { background: #fff; color: #111; font-size: 12px; }
  .hero h1 { -webkit-text-fill-color: #111; background: none; }
  .score-card, .info-card, .nav-card, .news-article, .stat-item {
    background: #f9f9f9;
    border-color: #ddd;
    break-inside: avoid;
  }
  .verdict-banner { background: #f0fff0; border-color: #3fb950; }
  table { font-size: 11px; }
  thead th { background: #eee; }
  tbody td { border-color: #ddd; }
  a { color: inherit; text-decoration: none; }
  .score-bar { background: #eee; }
  .section h2, .section h3 { color: #111; }
  .section p, .section li, tbody td { color: #333; }
}
