/* site.css — Marketing pages for win9-5.com */

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

/* ─── Dark theme (default) ─── */
:root {
  --bg: #0c0c0c;
  --surface: #161616;
  --surface-hover: #1e1e1e;
  --border: #252525;
  --text: #d8d8d8;
  --text-muted: #777;
  --accent: #008080;
  --accent-light: #00b3b3;
  --navy: #000080;
  --white: #f0f0f0;
  --radius: 6px;
  --max-w: 1080px;
  --code-bg: #161616;
  --code-border: #252525;
  --nav-bg: rgba(12,12,12,.92);
}

/* ─── Light theme ─── */
[data-theme="light"] {
  --bg: #f8f8f8;
  --surface: #ffffff;
  --surface-hover: #f0f0f0;
  --border: #e0e0e0;
  --text: #2a2a2a;
  --text-muted: #666;
  --accent: #006e6e;
  --accent-light: #008080;
  --navy: #000080;
  --white: #111;
  --code-bg: #f4f4f4;
  --code-border: #ddd;
  --nav-bg: rgba(248,248,248,.92);
}

/* Auto-detect system preference */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f8f8f8;
    --surface: #ffffff;
    --surface-hover: #f0f0f0;
    --border: #e0e0e0;
    --text: #2a2a2a;
    --text-muted: #666;
    --accent: #006e6e;
    --accent-light: #008080;
    --navy: #000080;
    --white: #111;
    --code-bg: #f4f4f4;
    --code-border: #ddd;
    --nav-bg: rgba(248,248,248,.92);
  }
}

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

body {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-light); text-decoration: none; transition: color .15s; }
a:hover { color: var(--white); }

/* ─── Nav ─── */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
}
.site-nav .nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.site-nav .logo {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--white);
  display: flex; align-items: center; gap: .5rem;
}
.site-nav .logo .win { color: var(--accent); }
.site-nav .nav-links { display: flex; gap: 1.75rem; list-style: none; }
.site-nav .nav-links a {
  color: var(--text-muted);
  font-size: .875rem;
  font-weight: 500;
  transition: color .15s;
}
.site-nav .nav-links a:hover { color: var(--white); }

/* ─── Container ─── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }

/* ─── Hero ─── */
.hero {
  padding: 6rem 1.5rem 4rem;
  text-align: center;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--white);
  margin-bottom: 1.25rem;
}
.hero h1 .accent { color: var(--accent); }
.hero .subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 2.5rem;
  line-height: 1.65;
}
.hero .ctas { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .75rem 1.75rem;
  font-size: .9rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
  color: var(--white);
}
.btn-outline {
  background: transparent;
  color: var(--accent-light);
  border-color: var(--border);
}
.btn-outline:hover {
  border-color: var(--accent);
  background: rgba(0,128,128,.08);
  color: var(--white);
}

/* ─── Demo showcase ─── */
.demo-showcase {
  max-width: var(--max-w);
  margin: 0 auto 5rem;
  padding: 0 1.5rem;
}
.demo-frame {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16/10;
  position: relative;
}
.demo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .9;
}
.demo-frame .overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.45);
}
.demo-frame .overlay .btn { font-size: 1.1rem; padding: 1rem 2.5rem; }

/* ─── Section ─── */
.section {
  padding: 5rem 1.5rem;
  border-top: 1px solid var(--border);
}
.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--white);
  text-align: center;
  margin-bottom: .75rem;
}
.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 3rem;
}

/* ─── Feature cards ─── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  max-width: var(--max-w);
  margin: 0 auto;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color .2s, transform .2s;
}
.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.feature-card .icon {
  font-size: 1.5rem;
  margin-bottom: .75rem;
  display: block;
}
.feature-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: .5rem;
}
.feature-card p {
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ─── Pricing cards ─── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  max-width: var(--max-w);
  margin: 0 auto;
}
.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: border-color .2s;
  display: flex;
  flex-direction: column;
}
.price-card.featured {
  border-color: var(--accent);
  position: relative;
}
.price-card.featured::before {
  content: 'Best Value';
  position: absolute;
  top: -11px; left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--white);
  font-size: .7rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.price-card h3 {
  font-size: .95rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: .75rem;
}
.price-card .price {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: .25rem;
}
.price-card .price-unit {
  font-size: .8rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.price-card .details {
  list-style: none;
  text-align: left;
  margin-bottom: 1.5rem;
  flex: 1;
}
.price-card .details li {
  font-size: .85rem;
  color: var(--text-muted);
  padding: .4rem 0;
  border-bottom: 1px solid var(--border);
}
.price-card .details li::before {
  content: '✓ ';
  color: var(--accent);
}
.price-card .btn { width: 100%; justify-content: center; }

/* ─── API teaser ─── */
.code-block {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  overflow-x: auto;
  max-width: var(--max-w);
  margin: 0 auto;
}
.code-block pre {
  font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
  font-size: .85rem;
  line-height: 1.7;
  color: var(--text);
}
.code-block .kw { color: #c792ea; }
.code-block .fn { color: #82aaff; }
.code-block .str { color: #c3e88d; }
.code-block .cmt { color: #546e7a; }

/* ─── Footer ─── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem;
  text-align: center;
}
.site-footer .footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.site-footer .footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  list-style: none;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.site-footer .footer-links a {
  color: var(--text-muted);
  font-size: .85rem;
}
.site-footer .footer-links a:hover { color: var(--white); }
.site-footer .copyright {
  font-size: .8rem;
  color: #555;
}

/* ─── Legal pages ─── */
.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}
.legal h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: .5rem;
}
.legal .last-updated {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}
.legal h2 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--white);
  margin-top: 2.5rem;
  margin-bottom: .75rem;
}
.legal p, .legal li {
  font-size: .925rem;
  color: var(--text);
  line-height: 1.75;
  margin-bottom: .75rem;
}
.legal ul, .legal ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.legal strong { color: var(--white); }

/* ─── Theme toggle ─── */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: .35rem .6rem;
  line-height: 1;
  transition: color .15s, border-color .15s;
}
.theme-toggle:hover { color: var(--white); border-color: var(--accent); }

/* ─── API docs ─── */
.api-docs { max-width: 780px; margin: 0 auto; padding: 3rem 1.5rem; }
.api-docs h1 { font-size: 1.8rem; font-weight: 700; color: var(--white); margin-bottom: 1.5rem; }
.endpoint {
  margin-bottom: 2.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.endpoint-header {
  display: flex; align-items: center; gap: .75rem;
  padding: .85rem 1.25rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.method {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: .75rem;
  font-weight: 700;
  padding: .2rem .5rem;
  border-radius: 3px;
  text-transform: uppercase;
}
.method-get { background: #1a3a2a; color: #4ade80; }
.method-post { background: #1a2a3a; color: #60a5fa; }
.method-delete { background: #3a1a1a; color: #f87171; }
[data-theme="light"] .method-get { background: #dcfce7; color: #166534; }
[data-theme="light"] .method-post { background: #dbeafe; color: #1e40af; }
[data-theme="light"] .method-delete { background: #fee2e2; color: #991b1b; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .method-get { background: #dcfce7; color: #166534; }
  :root:not([data-theme="dark"]) .method-post { background: #dbeafe; color: #1e40af; }
  :root:not([data-theme="dark"]) .method-delete { background: #fee2e2; color: #991b1b; }
}
.endpoint-path {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: .9rem;
  color: var(--white);
}
.endpoint-body { padding: 1.25rem; }
.endpoint-body p { font-size: .9rem; color: var(--text); line-height: 1.6; margin-bottom: .75rem; }
.endpoint-body h4 { font-size: .8rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin: 1.25rem 0 .5rem; }
.endpoint-body .code-inline {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius);
  padding: 1rem;
  overflow-x: auto;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: .82rem;
  line-height: 1.65;
  white-space: pre;
  display: block;
  color: var(--text);
}
.param-table { width: 100%; border-collapse: collapse; font-size: .85rem; margin-bottom: .75rem; }
.param-table th {
  text-align: left; padding: .4rem .5rem; color: var(--text-muted); font-weight: 600;
  border-bottom: 1px solid var(--border); font-size: .75rem; text-transform: uppercase;
}
.param-table td { padding: .4rem .5rem; border-bottom: 1px solid var(--border); color: var(--text); }
.param-table code { font-size: .8rem; color: var(--accent-light); }

/* ─── Responsive ─── */
@media (max-width: 640px) {
  .site-nav .nav-links { gap: 1rem; }
  .site-nav .nav-links a { font-size: .8rem; }
  .hero { padding: 4rem 1rem 2.5rem; }
  .hero .ctas { flex-direction: column; align-items: center; }
  .section { padding: 3rem 1rem; }
  .features-grid, .pricing-grid { grid-template-columns: 1fr; }
}
