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

/* ── Fonts ── */
/* Google Fonts loaded via <link> in HTML <head> for performance — see preconnect + preload pattern */

/* ── 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;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', 'Inter', -apple-system, sans-serif;
}

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* ── Visually Hidden (SEO/GEO citable text) ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

/* ── Header & Nav ── */
header { padding: 16px 0; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; background: rgba(13, 13, 13, 0.92); 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: center; line-height: 1.15; }
.logo { font-family: var(--font-display); font-size: 2.2rem; font-weight: 700; letter-spacing: -0.5px; background: linear-gradient(135deg, #2ecb71, #ff6b00, #2ecb71); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.logo span { -webkit-text-fill-color: transparent; }
.tagline { font-family: var(--font-display); font-size: 1rem; font-weight: 600; color: var(--orange); margin-top: 4px; letter-spacing: 1.5px; font-style: italic; opacity: 0.9; }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links li { display: flex; align-items: center; }
.nav-links a { color: var(--text-muted); text-decoration: none; margin-left: 12px; font-size: 0.82rem; 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: 12px 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: transform 0.2s ease, opacity 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); will-change: transform; }
.btn-primary:hover { background: var(--accent-dim); transform: translateY(-1px); }
.btn-secondary { background: transparent; color: var(--text-bright); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); background: rgba(46, 203, 113, 0.04); }
.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); }

/* ── Section Base ── */
section { padding: 64px 24px; border-bottom: 1px solid transparent; position: relative; width: 100vw; margin-left: calc(-50vw + 50%); }
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-family: var(--font-display); 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; }
footer a { color: var(--accent); text-decoration: none; }
.footer-subscribe .subscribe-form { flex-direction: column; max-width: 100%; }
.footer-subscribe .subscribe-form input[type="email"] { width: 100%; }
.footer-subscribe .subscribe-form button { width: 100%; }
#sub-turnstile { max-width: 100%; overflow: hidden; }
@media (max-width: 768px) {
  footer { padding-bottom: 80px; }
  .footer-grid { grid-template-columns: 1fr !important; gap: 32px !important; text-align: center !important; }
}

/* ── 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:var(--bg-card); border:1px solid var(--border); border-radius:10px; padding:16px 20px; z-index:9998; font-size:0.82rem; color:var(--text); box-shadow:0 4px 24px rgba(0,0,0,0.4); line-height:1.5; }
.cookie-accept { padding:8px 18px; background:var(--accent); color:var(--bg); 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:var(--text-muted); 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; }

/* ── Solution Cards — Reusable Component ── */
.ways-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.ways-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

.way-card {
  --card-accent: var(--accent);
  position: relative; overflow: hidden;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px;
  padding: 36px 28px 28px; display: flex; flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.22,1,0.36,1);
  will-change: transform;
}
.way-card[data-theme="orange"] { --card-accent: var(--orange); }

.way-card::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(circle at 20% 80%, color-mix(in srgb, var(--card-accent) 6%, transparent) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, color-mix(in srgb, var(--card-accent) 4%, transparent) 0%, transparent 50%);
  transition: opacity 0.4s; opacity: 0.5;
}
.way-card:hover::before { opacity: 1; }

.way-card:hover {
  transform: translateY(-6px) scale(1.015);
}

.way-card > * { position: relative; z-index: 1; }
.way-card p { flex: 1; color: #b8b8b8; font-size: 0.92rem; line-height: 1.7; }
.way-card .way-detail { margin-top: auto; }

.way-card .way-label {
  font-family: var(--font-display); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase; margin-bottom: 14px;
  color: var(--card-accent);
}
.way-card h3, .way-card h4 {
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 700;
  color: #ffffff; margin-bottom: 12px; line-height: 1.25; letter-spacing: -0.02em;
}
.way-card .way-detail { margin-top: 16px; font-size: 0.82rem; color: var(--text); line-height: 1.8; }
.way-card .way-detail span { display: block; padding: 3px 0; }
.way-card .way-detail span::before { content: '+'; color: var(--card-accent); margin-right: 8px; font-weight: 700; }

.way-card .hover-stat {
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
  font-family: var(--font-display); font-size: 0.8rem; font-weight: 600;
  color: var(--card-accent); margin-top: 0; padding: 0;
  border-top: 1px solid transparent;
}
.way-card:hover .hover-stat {
  max-height: 60px; opacity: 1; margin-top: 14px; padding-top: 12px;
  border-top-color: color-mix(in srgb, var(--card-accent) 20%, transparent);
}

.pulse-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); margin-right: 8px; vertical-align: middle;
  animation: pulseDot 2s ease-in-out infinite;
  box-shadow: 0 0 6px var(--accent), 0 0 12px color-mix(in srgb, var(--accent) 40%, transparent);
}
@keyframes pulseDot { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.7); } }

.way-card.fade-in { opacity: 0; transform: translateY(30px); will-change: transform, opacity; }
.way-card.fade-in.visible { opacity: 1; transform: translateY(0); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22,1,0.36,1); }
.way-card.fade-in:nth-child(2).visible { transition-delay: 0.1s; }
.way-card.fade-in:nth-child(3).visible { transition-delay: 0.2s; }
.way-card.fade-in:nth-child(4).visible { transition-delay: 0.3s; }

.service-cta { display: inline-block; font-family: var(--font-display); font-size: 0.85rem; font-weight: 600; text-decoration: none; padding: 10px 22px; border-radius: 8px; margin-top: 12px; transition: transform 0.25s cubic-bezier(0.22,1,0.36,1); white-space: nowrap; }
.service-cta:active { transform: scale(0.96); }
.service-cta-green { background: var(--accent); color: #0d0d0d; }
.service-cta-green:hover { background: var(--accent-dim); box-shadow: 0 4px 16px rgba(46,203,113,0.3); }
.service-cta-orange { border: 1px solid var(--orange); color: var(--orange); background: transparent; }
.service-cta-orange:hover { background: var(--orange); color: #0d0d0d; box-shadow: 0 4px 16px rgba(255,107,0,0.3); }
.service-cta-outline { border: 1px solid var(--accent); color: var(--accent); background: transparent; }
.service-cta-outline:hover { background: var(--accent); color: #0d0d0d; }

@media (max-width: 768px) {
  .ways-grid, .ways-grid.cols-3 { grid-template-columns: 1fr; max-width: 480px; margin-left: auto; margin-right: auto; }
}

/* ── Utility Classes ── */
.flex-row { display: flex; align-items: center; gap: 12px; }
.orange-bold { color: var(--orange); font-weight: 600; }
.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; }

/* ── 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 li { display: block; }
  .nav-links a { margin: 0; padding: 12px 0; font-size: 1rem; border-bottom: 1px solid var(--border); display: block; }
  .nav-links li:last-child a { 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 .estimate-title { font-size: 1.1rem; color: var(--text-bright); margin-bottom: 4px; text-align: center; font-weight: 700; }
.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; }
