/* =========================================================================
   WinNewsWire — Fluent-inspired design system
   Clean, fast, layered surfaces. Modest geometry (no pill / bubble shapes).
   ========================================================================= */

:root {
  /* Accent — derived from the app icon (teal ribbon + blue + amber dots) */
  --accent: #0e7d9e;
  --accent-strong: #0a6480;
  --accent-soft: #e3f2f7;
  --accent-2: #2b6cb0;
  --amber: #f5c518;

  /* Light theme surfaces (Mica-like layering) */
  --bg: #f3f4f6;
  --bg-gradient-a: #eef2f5;
  --bg-gradient-b: #e7edf1;
  --surface: #ffffff;
  --surface-2: #fbfcfd;
  --surface-3: #f1f4f7;
  --card: rgba(255, 255, 255, 0.72);
  --card-border: rgba(0, 0, 0, 0.08);
  --stroke: rgba(0, 0, 0, 0.10);
  --stroke-strong: rgba(0, 0, 0, 0.18);

  --text: #14181c;
  --text-2: #485058;
  --text-3: #6b7480;
  --text-on-accent: #ffffff;

  --shadow-sm: 0 1px 2px rgba(16, 24, 32, 0.06), 0 1px 1px rgba(16, 24, 32, 0.04);
  --shadow-md: 0 2px 8px rgba(16, 24, 32, 0.08), 0 1px 3px rgba(16, 24, 32, 0.06);
  --shadow-lg: 0 16px 40px rgba(16, 24, 32, 0.14), 0 4px 12px rgba(16, 24, 32, 0.08);

  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 10px;

  --maxw: 1120px;
  --header-h: 60px;

  --font: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system,
    "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Code", "Cascadia Mono", "Consolas", ui-monospace, monospace;
}

:root[data-theme="dark"] {
  --accent: #34b6d6;
  --accent-strong: #57c6e2;
  --accent-soft: rgba(52, 182, 214, 0.14);
  --accent-2: #6aa6e8;
  --amber: #ffd34d;

  --bg: #0d1014;
  --bg-gradient-a: #11161c;
  --bg-gradient-b: #0a0d11;
  --surface: #171c22;
  --surface-2: #1c222a;
  --surface-3: #222932;
  --card: rgba(28, 34, 42, 0.66);
  --card-border: rgba(255, 255, 255, 0.08);
  --stroke: rgba(255, 255, 255, 0.10);
  --stroke-strong: rgba(255, 255, 255, 0.18);

  --text: #eef1f4;
  --text-2: #b3bcc6;
  --text-3: #8a939e;
  --text-on-accent: #06222b;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 2px 10px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.6), 0 4px 14px rgba(0, 0, 0, 0.5);
}

/* ------------------------------------------------------------------ Reset */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 80% -10%, var(--bg-gradient-a), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, var(--bg-gradient-b), transparent 55%);
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; color: var(--text-2); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.muted { color: var(--text-3); }
.center { text-align: center; }

/* --------------------------------------------------------------- Buttons */
.btn {
  --b: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 11px 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease,
    border-color 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  color: var(--text-on-accent);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { color: var(--text-on-accent); box-shadow: var(--shadow-md); filter: brightness(1.05); }

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--stroke-strong);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { color: var(--text); background: var(--surface-2); border-color: var(--accent); }

.btn-lg { padding: 14px 26px; font-size: 1.02rem; }

/* ---------------------------------------------------------------- Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--stroke);
}
.site-header .container { display: flex; align-items: center; gap: 20px; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
.brand:hover { color: var(--text); }
.brand img { width: 28px; height: 28px; border-radius: 6px; }
.brand b { font-size: 1.06rem; }
.brand b span { color: var(--accent); }

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a {
  color: var(--text-2);
  font-weight: 500;
  font-size: 0.93rem;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.14s ease, color 0.14s ease;
}
.nav a:hover { background: var(--surface-3); color: var(--text); }
.nav a.active { color: var(--accent); }
/* nav buttons keep their own colors (override generic .nav a rules) */
.nav a.btn { background: var(--surface); }
.nav a.btn-primary,
.nav a.btn-primary:hover { color: var(--text-on-accent); background: linear-gradient(180deg, var(--accent), var(--accent-strong)); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--stroke);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); border-color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .moon { display: none; }
:root[data-theme="dark"] .icon-btn .moon { display: block; }
:root[data-theme="dark"] .icon-btn .sun { display: none; }

.nav-toggle { display: none; }

/* ----------------------------------------------------------------- Hero */
.hero { position: relative; padding: 84px 0 64px; overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero h1 { margin-bottom: 18px; }
.hero h1 .grad {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lede { font-size: 1.18rem; max-width: 38ch; color: var(--text-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-meta { margin-top: 18px; font-size: 0.86rem; color: var(--text-3); display: flex; gap: 16px; flex-wrap: wrap; }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta svg { width: 15px; height: 15px; color: var(--accent); }

/* App screenshot (static image of the three-pane interface) */
.mockup-shot {
  position: relative;
  display: block;
  border-radius: var(--radius-lg);
  border: 1px solid var(--stroke-strong);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: perspective(1600px) rotateY(-7deg) rotateX(2deg);
  transition: transform 0.4s ease;
}
.mockup-shot:hover { transform: perspective(1600px) rotateY(-3deg) rotateX(1deg); }
.mockup-shot img { display: block; width: 100%; height: auto; }
.mockup-shot .shot-dark { position: absolute; inset: 0; opacity: 0; transition: opacity 0.2s ease; }
:root[data-theme="dark"] .mockup-shot .shot-light { opacity: 0; }
:root[data-theme="dark"] .mockup-shot .shot-dark { opacity: 1; }

/* Reusable theme-aware screenshot (used by the showcase split sections) */
.shot {
  position: relative;
  display: block;
  border-radius: var(--radius-lg);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.shot img { display: block; width: 100%; height: auto; }
.shot .shot-dark { position: absolute; inset: 0; opacity: 0; transition: opacity 0.2s ease; }
:root[data-theme="dark"] .shot .shot-light { opacity: 0; }
:root[data-theme="dark"] .shot .shot-dark { opacity: 1; }

/* ------------------------------------------------------------- Sections */
.section { padding: 72px 0; }
.section-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.section-head p { font-size: 1.08rem; }

.logos-strip { padding: 28px 0; border-top: 1px solid var(--stroke); border-bottom: 1px solid var(--stroke); }
.logos-strip .container { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: center; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.85rem; font-weight: 600; color: var(--text-2);
  padding: 7px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--stroke);
}
.chip svg { width: 15px; height: 15px; color: var(--accent); }

/* Feature cards */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  overflow: hidden;
}
.card::after {
  /* subtle Fluent "reveal" highlight following pointer */
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 0%),
    color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--stroke-strong); }
.card:hover::after { opacity: 1; }
.card .ficon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 16px;
}
.card .ficon svg { width: 22px; height: 22px; }
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; font-size: 0.95rem; }

/* Split / showcase */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.reverse .split-media { order: -1; }
.split h2 { margin-bottom: 14px; }
.feature-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 14px; }
.feature-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-2); }
.feature-list .tick {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center;
}
.feature-list .tick svg { width: 13px; height: 13px; }
.feature-list b { color: var(--text); font-weight: 600; }

.panel {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 8px;
}
.panel-inner {
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--stroke);
  padding: 22px;
}

/* keyboard chips */
.kbd {
  display: inline-block;
  min-width: 24px; text-align: center;
  font-family: var(--mono); font-size: 0.82rem; font-weight: 600;
  color: var(--text); background: var(--surface);
  border: 1px solid var(--stroke-strong);
  border-bottom-width: 2px;
  border-radius: var(--radius-sm);
  padding: 3px 8px;
}

/* CTA band */
.cta {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 56px 40px;
  text-align: center;
  color: #fff;
  background: linear-gradient(120deg, var(--accent-strong), var(--accent-2));
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.cta::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(500px 240px at 15% 0%, rgba(255,255,255,0.18), transparent 60%),
    radial-gradient(420px 220px at 90% 110%, rgba(0,0,0,0.18), transparent 55%);
}
.cta * { position: relative; }
.cta h2 { color: #fff; }
.cta p { color: rgba(255,255,255,0.88); max-width: 46ch; margin: 0 auto 26px; }
.cta .btn-primary { background: #fff; color: var(--accent-strong); }
.cta .btn-primary:hover { color: var(--accent-strong); filter: brightness(0.97); }
.cta .btn-ghost { background: rgba(255,255,255,0.10); color: #fff; border-color: rgba(255,255,255,0.5); }
.cta .btn-ghost:hover { background: rgba(255,255,255,0.18); color: #fff; }

/* ------------------------------------------------------- Download page */
.dl-hero { padding: 72px 0 32px; text-align: center; }
.dl-card {
  max-width: 560px; margin: 0 auto;
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
  padding: 32px; text-align: center;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.dl-card img { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 14px; box-shadow: var(--shadow-sm); }
.dl-card .ver { font-size: 0.82rem; color: var(--text-3); margin-bottom: 20px; }
.dl-card .btn { width: 100%; justify-content: center; }
.dl-sub { font-size: 0.82rem; color: var(--text-3); margin-top: 14px; }

.req-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.req-grid .card { padding: 22px; }
.req-grid dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 0.92rem; }
.req-grid dt { color: var(--text-3); }
.req-grid dd { margin: 0; color: var(--text); font-weight: 600; }

.steps { counter-reset: step; display: grid; gap: 16px; max-width: 720px; margin: 0 auto; }
.step { display: flex; gap: 16px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.step .num {
  counter-increment: step; flex: none;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  color: var(--text-on-accent); font-weight: 700; font-size: 0.9rem;
}
.step .num::before { content: counter(step); }
.step h3 { margin: 2px 0 4px; font-size: 1.02rem; }
.step p { margin: 0; font-size: 0.92rem; }

/* code block */
.code {
  font-family: var(--mono); font-size: 0.86rem;
  background: var(--surface-3); border: 1px solid var(--stroke);
  border-radius: var(--radius-sm); padding: 12px 14px;
  color: var(--text); overflow-x: auto;
}

/* ----------------------------------------------------------- Help page */
.help-layout { display: grid; grid-template-columns: 230px 1fr; gap: 48px; align-items: start; }
.help-nav { position: sticky; top: calc(var(--header-h) + 20px); }
.help-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.help-nav a {
  display: block; padding: 8px 12px; border-radius: var(--radius-sm);
  color: var(--text-2); font-size: 0.92rem; font-weight: 500;
  border-left: 2px solid transparent;
}
.help-nav a:hover { background: var(--surface-3); color: var(--text); }
.help-nav a.active { color: var(--accent); border-left-color: var(--accent); background: var(--accent-soft); }

.help-section { scroll-margin-top: calc(var(--header-h) + 24px); margin-bottom: 52px; }
.help-section > h2 { display: flex; align-items: center; gap: 10px; }
.help-section h2 .hicon { color: var(--accent); display: inline-grid; place-items: center; }
.help-section h2 .hicon svg { width: 22px; height: 22px; }

.shortcut-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--radius); overflow: hidden; }
.shortcut-table th, .shortcut-table td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--stroke); font-size: 0.93rem; }
.shortcut-table th { background: var(--surface-3); color: var(--text-3); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.06em; }
.shortcut-table tr:last-child td { border-bottom: none; }
.shortcut-table td:first-child { white-space: nowrap; width: 1%; }

/* FAQ accordion */
.faq { display: grid; gap: 12px; }
.faq details {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 20px;
  font-weight: 600; color: var(--text); display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chev { transition: transform 0.2s ease; color: var(--text-3); flex: none; }
.faq details[open] summary .chev { transform: rotate(180deg); }
.faq .faq-body { padding: 0 20px 18px; color: var(--text-2); }
.faq .faq-body p { margin: 0; font-size: 0.95rem; }

.callout {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: var(--radius); padding: 16px 18px; margin: 18px 0;
}
.callout svg { width: 20px; height: 20px; color: var(--accent); flex: none; margin-top: 2px; }
.callout p { margin: 0; color: var(--text-2); font-size: 0.93rem; }

/* ---------------------------------------------------------------- Footer */
.site-footer { border-top: 1px solid var(--stroke); margin-top: 40px; padding: 48px 0 36px; background: color-mix(in srgb, var(--surface) 50%, transparent); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 36px; }
.footer-grid .brand { margin-bottom: 12px; }
.footer-grid p { font-size: 0.9rem; max-width: 32ch; }
.footer-col h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); margin-bottom: 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.footer-col a { color: var(--text-2); font-size: 0.92rem; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--stroke); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 0.85rem; color: var(--text-3); }

/* --------------------------------------------------------------- Reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ----------------------------------------------------------- Responsive */
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero .lede { max-width: none; }
  .mockup-shot { transform: none; }
  .features { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .split.reverse .split-media { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .help-layout { grid-template-columns: 1fr; }
  .help-nav { position: static; }
  .help-nav ul { grid-auto-flow: column; overflow-x: auto; }
}

@media (max-width: 680px) {
  .nav { position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column;
    align-items: stretch; gap: 0; background: var(--surface);
    border-bottom: 1px solid var(--stroke); padding: 8px; margin-left: 0;
    box-shadow: var(--shadow-lg); transform: translateY(-130%); transition: transform 0.22s ease; }
  .nav.open { transform: none; }
  .nav a { padding: 12px 14px; }
  .nav .btn { margin: 6px 8px; justify-content: center; }
  .nav-toggle { display: inline-grid; margin-left: auto; }
  .theme-toggle { order: 2; }
  .features { grid-template-columns: 1fr; }
  .req-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
}
