/* ========================================
   Binary Rogue — Shared Base CSS
   Extracted from per-page inline styles
   ======================================== */

/* ── Reset & Variables ── */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0d0d0d;
  --bg-card: #181c1f;
  --text: #c5c9d0;
  --text-bright: #e8eaed;
  --text-muted: #9ca3af;
  --accent: #2ecb71;
  --accent-dim: #2ba85c;
  --orange: #ff6b00;
  --orange-dim: rgba(255,107,0,0.12);
  --border: #3d4249;
}

html { scroll-behavior: smooth; }

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

/* ── Layout ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ── Header & Nav ── */
header { padding: 24px 0; border-bottom: 1px solid var(--border); min-height: 100px; position: sticky; top: 0; z-index: 50; background: rgba(13, 13, 13, 0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
nav { display: flex; justify-content: space-between; align-items: center; }

.logo-area { text-decoration: none; color: inherit; display: flex; align-items: center; gap: 16px; }
.logo-text { text-align: left; }
.logo { font-size: 2rem; font-weight: 700; letter-spacing: -0.5px; }
.logo span { color: var(--accent); }
.tagline { font-size: 1.1rem; color: var(--orange); margin-top: 4px; letter-spacing: 1px; font-style: italic; }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a { color: var(--text-muted); text-decoration: none; margin-left: 16px; font-size: 0.9rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--text-bright); }
.nav-links a.active { color: var(--accent); }
.btn-nav { background: var(--accent); color: #0d0d0d !important; padding: 8px 16px; border-radius: 4px; font-weight: 600; transition: background 0.2s; }
.btn-nav:hover { background: var(--accent-dim); }

/* ── Buttons ── */
.btn { display: inline-block; padding: 14px 32px; font-size: 1rem; font-weight: 600; text-decoration: none; border-radius: 6px; transition: all 0.2s ease; cursor: pointer; border: none; }
.btn-primary { background: var(--accent); color: #0d0d0d; box-shadow: 0 2px 12px rgba(46, 203, 113, 0.2); }
.btn-primary:hover { background: var(--accent-dim); box-shadow: 0 4px 20px rgba(46, 203, 113, 0.35); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--text-bright); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: rgba(46, 203, 113, 0.04); }
.btn-outline .play-icon { margin-right: 8px; }

/* ── Section Base ── */
section { padding: 64px 0; border-bottom: 1px solid transparent; position: relative; }
section::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: min(80%, 800px); height: 1px; background: linear-gradient(90deg, transparent, var(--border) 20%, var(--border) 80%, transparent); }
section:last-of-type::after { display: none; }
section:nth-child(even) { background: rgba(24, 28, 31, 0.4); }
.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 { font-size: 1.8rem; font-weight: 700; margin-bottom: 10px; color: var(--text-bright); letter-spacing: -0.02em; }
.section-header p { color: var(--text-muted); font-size: 1.05rem; }

/* ── CTA Section ── */
.cta { text-align: center; padding: 72px 0; }
.cta h2 { font-size: 2rem; font-weight: 700; margin-bottom: 14px; color: var(--text-bright); letter-spacing: -0.02em; }
.cta p { color: var(--text-muted); margin-bottom: 28px; font-size: 1.05rem; }

/* ── Footer ── */
footer { padding: 32px 0; text-align: center; color: var(--text-muted); font-size: 0.85rem; }
@media (max-width: 768px) { footer { padding-bottom: 80px; } }
footer a { color: var(--accent); text-decoration: none; }
.footer-nav a, .footer-legal a { margin: 0 10px; }
.footer-legal a { font-size: 0.8rem; }

/* ── Skip Link ── */
.skip-link { position: absolute; left: -9999px; top: 0; padding: 8px; background: var(--accent); color: #0d0d0d; z-index: 9999; font-weight: 600; text-decoration: none; }
.skip-link:focus { left: 0; }

/* ── SVG Icons ── */
.ico { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.ico-sm { width: 14px; height: 14px; }

/* ── Cookie Banner ── */
.cookie-banner { display:none; position:fixed; bottom:16px; right:16px; max-width:380px; background:#181c1f; border:1px solid var(--border); border-radius:10px; padding:16px 20px; z-index:9999; font-size:0.82rem; color:#c5c9d0; box-shadow:0 4px 24px rgba(0,0,0,0.4); line-height:1.5; }
.cookie-accept { padding:8px 18px; background:#2ecb71; color:#0d0d0d; border:none; border-radius:4px; font-weight:600; cursor:pointer; font-size:0.8rem; white-space:nowrap; flex-shrink:0; }
.cookie-decline { padding:8px 18px; background:transparent; color:#9ca3af; border:1px solid var(--border); border-radius:4px; font-size:0.8rem; cursor:pointer; white-space:nowrap; flex-shrink:0; margin-right:8px; }

/* ── Email Subscribe ── */
.subscribe-section { text-align: center; padding: 48px 0 32px; }
.subscribe-section h2 { font-size: 1.5rem; font-weight: 700; color: var(--text-bright); margin-bottom: 8px; }
.subscribe-section .sub-desc { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 24px; max-width: 500px; margin-left: auto; margin-right: auto; }
.subscribe-form { display: flex; gap: 8px; max-width: 440px; margin: 0 auto; }
.subscribe-form input[type="email"] { flex: 1; padding: 12px 16px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-card); color: var(--text-bright); font-size: 0.95rem; outline: none; transition: border-color 0.2s; }
.subscribe-form input[type="email"]:focus { border-color: var(--accent); }
.subscribe-form input[type="email"]::placeholder { color: var(--text-muted); }
.subscribe-form button { padding: 12px 24px; background: var(--accent); color: #0d0d0d; border: none; border-radius: 6px; font-weight: 700; font-size: 0.9rem; cursor: pointer; white-space: nowrap; transition: background 0.2s; }
.subscribe-form button:hover { background: var(--accent-dim); }
.subscribe-form button:disabled { opacity: 0.6; cursor: not-allowed; }
.subscribe-msg { font-size: 0.82rem; margin-top: 10px; min-height: 1.2em; }
.subscribe-msg.success { color: var(--accent); }
.subscribe-msg.error { color: #e57373; }
.footer-subscribe { margin-top: 16px; margin-bottom: 8px; }
.footer-subscribe .subscribe-form { max-width: 360px; }
.footer-subscribe .subscribe-form input[type="email"] { padding: 8px 12px; font-size: 0.85rem; }
.footer-subscribe .subscribe-form button { padding: 8px 16px; font-size: 0.82rem; }

/* ── Hamburger Menu ── */
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 8px; z-index: 60; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text-bright); margin: 5px 0; transition: transform 0.3s, opacity 0.3s; }
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile CTA Bar ── */
.mobile-cta-bar { display: none; }

/* ── Utility Classes ── */
.section-intro { max-width: 680px; margin: 0 auto; text-align: center; }
.flex-row { display: flex; align-items: center; gap: 12px; }
.flex-center { display: flex; justify-content: center; align-items: center; gap: 40px; flex-wrap: wrap; }
.accent-bold { color: var(--accent); font-weight: 600; }
.orange-bold { color: var(--orange); font-weight: 600; }
.text-sm-muted { font-size: 0.78rem; color: var(--text-muted); }
.text-md-muted { font-size: 0.88rem; color: var(--text-muted); }
.text-center { text-align: center; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.max-600 { max-width: 600px; margin: 0 auto; }

/* ── Responsive: Tablet ── */
@media (max-width: 768px) {
  .hamburger { display: block; }
  .nav-links { display: none; flex-direction: column; position: fixed; top: 0; right: 0; width: 260px; height: 100vh; background: var(--bg-card); border-left: 1px solid var(--border); padding: 80px 24px 24px; gap: 8px; z-index: 55; }
  .nav-links.open { display: flex; }
  .nav-links a { margin: 0; padding: 12px 0; font-size: 1rem; border-bottom: 1px solid var(--border); }
  .nav-links a:last-child { border-bottom: none; }
  .nav-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 50; }
  .nav-overlay.open { display: block; }
  nav { flex-direction: row; flex-wrap: nowrap; }
  .logo-area { justify-content: flex-start; flex: 1; min-width: 0; }
  .logo-area img { display: none; }
  .logo-text { text-align: left; }
  .logo { font-size: 1.5rem; }
  .tagline { font-size: 0.85rem; }
  .mobile-cta-bar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; background: var(--bg); border-top: 1px solid var(--border); padding: 12px 16px; justify-content: center; gap: 10px; }
  .mobile-cta-bar a { flex: 1; text-align: center; padding: 12px 0; font-size: 0.9rem; font-weight: 600; border-radius: 4px; text-decoration: none; }
  .mobile-cta-bar .mcta-primary { background: var(--accent); color: #0d0d0d; }
  .mobile-cta-bar .mcta-secondary { border: 1px solid var(--border); color: var(--text-bright); }
  .container { padding: 0 16px; }
  footer a { display: inline-flex; align-items: center; min-height: 48px; padding: 8px 12px; }
}

/* ── Responsive: Mobile ── */
@media (max-width: 480px) {
  .subscribe-form { flex-direction: column; }
  .subscribe-form button { width: 100%; }
}

/* ── Quick Estimate Form ── */
.estimate-form { max-width: 520px; margin: 0 auto; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 28px 24px; }
.estimate-form h3 { font-size: 1.1rem; color: var(--text-bright); margin-bottom: 4px; text-align: center; }
.estimate-form .estimate-sub { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 20px; text-align: center; }
.estimate-form label { display: block; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 4px; font-weight: 500; }
.estimate-form input, .estimate-form select, .estimate-form textarea { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text-bright); font-size: 0.9rem; font-family: inherit; outline: none; transition: border-color 0.2s; margin-bottom: 14px; }
.estimate-form input:focus, .estimate-form select:focus, .estimate-form textarea:focus { border-color: var(--accent); }
.estimate-form select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.estimate-form textarea { resize: vertical; min-height: 80px; }
.estimate-form button[type="submit"] { width: 100%; padding: 12px; background: var(--accent); color: #0d0d0d; border: none; border-radius: 6px; font-weight: 700; font-size: 0.95rem; cursor: pointer; transition: background 0.2s; }
.estimate-form button[type="submit"]:hover { background: var(--accent-dim); }
.estimate-form button[type="submit"]:disabled { opacity: 0.6; cursor: not-allowed; }
.estimate-form .estimate-msg { font-size: 0.82rem; margin-top: 10px; min-height: 1.2em; text-align: center; }
.estimate-form .estimate-msg.success { color: var(--accent); }
.estimate-form .estimate-msg.error { color: #e57373; }
.estimate-or { display: flex; align-items: center; gap: 16px; margin: 20px 0; max-width: 520px; margin-left: auto; margin-right: auto; }
.estimate-or::before, .estimate-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.estimate-or span { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

/* ── Accessibility ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
