/*
Theme Name: O'Neill Labs
Theme URI: https://oneill-labs.com
Author: Niall O'Neill
Author URI: https://oneill-labs.com
Description: O'Neill Labs homepage with dark/light mode toggle. Saves user preference.
Version: 2.0
License: GNU General Public License v2 or later
Text Domain: oneill-labs
*/

/* ============================================
   DARK MODE (default)
============================================ */
:root {
  --bg: #07090f;
  --bg-card: #0e1118;
  --bg-card-hover: #13171f;
  --bg-section: #0a0d14;
  --accent: #2dde98;
  --accent-hover: #25c985;
  --accent-2: #f5a623;
  --accent-3: #58a6ff;
  --text: #ffffff;
  --text-muted: #8b949e;
  --text-dim: #3d444d;
  --border: rgba(255,255,255,0.07);
  --border-hover: rgba(255,255,255,0.14);
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.5);
  --nav-bg: rgba(7,9,15,0.90);
  --logo-bg: #0e1118;
  --cta-bg: linear-gradient(160deg, #0a9e6e 0%, #077a54 100%);
  --footer-bg: transparent;
  --toggle-bg: #161b22;
  --toggle-border: rgba(255,255,255,0.1);
  --toggle-icon: '☀️';
}

/* ============================================
   LIGHT MODE
============================================ */
[data-theme="light"] {
  --bg: #f8f9fb;
  --bg-card: #ffffff;
  --bg-card-hover: #f2f4f8;
  --bg-section: #f0f2f5;
  --accent: #0a9e6e;
  --accent-hover: #077a54;
  --accent-2: #d4870a;
  --accent-3: #1a6fc4;
  --text: #0d1117;
  --text-muted: #4b5563;
  --text-dim: #9ca3af;
  --border: rgba(0,0,0,0.08);
  --border-hover: rgba(0,0,0,0.16);
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.12);
  --nav-bg: rgba(248,249,251,0.92);
  --logo-bg: #f0faf6;
  --cta-bg: linear-gradient(160deg, #0a9e6e 0%, #077a54 100%);
  --footer-bg: #ffffff;
  --toggle-bg: #e5e7eb;
  --toggle-border: rgba(0,0,0,0.1);
  --toggle-icon: '🌙';
}

/* ============================================
   BASE
============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: all 0.3s ease; }
a:hover { color: var(--accent-2); }

h1,h2,h3,h4 { font-family: 'Oswald', sans-serif; font-weight: 700; line-height: 1.1; color: var(--text); text-transform: uppercase; letter-spacing: 0.02em; }
h1 { font-size: clamp(2.8rem, 7vw, 5.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1rem, 2vw, 1.3rem); }
p { color: var(--text-muted); line-height: 1.75; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.section { padding: 100px 0; }

/* ============================================
   DARK/LIGHT TOGGLE BUTTON
============================================ */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--toggle-bg);
  border: 1px solid var(--toggle-border);
  border-radius: 100px;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.04em;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.toggle-track {
  width: 32px; height: 18px;
  background: var(--text-dim);
  border-radius: 100px;
  position: relative;
  transition: background 0.3s ease;
  flex-shrink: 0;
}
[data-theme="light"] .toggle-track { background: var(--accent); }
.toggle-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s ease;
}
[data-theme="light"] .toggle-thumb { transform: translateX(14px); }
.toggle-label-dark { display: block; }
.toggle-label-light { display: none; }
[data-theme="light"] .toggle-label-dark { display: none; }
[data-theme="light"] .toggle-label-light { display: block; }

/* ============================================
   LOGO
============================================ */
.oneill-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.oneill-logo svg { width: 36px; height: 36px; }
.logo-rect { fill: var(--logo-bg); transition: fill 0.3s ease; }
.oneill-logo-text { font-family: 'Oswald', sans-serif; font-size: 1rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text); transition: color 0.3s ease; }
.oneill-logo-text span { color: var(--accent); }

/* ============================================
   NAV
============================================ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 16px 0;
  background: var(--nav-bg);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease, border-color 0.3s ease;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nav-right { display: flex; align-items: center; gap: 20px; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a { color: var(--text-muted); font-size: 0.8rem; font-weight: 500; letter-spacing: 0.04em; }
.nav-links a:hover { color: var(--text); }
.nav-cta { background: var(--accent) !important; color: #fff !important; padding: 8px 20px; border-radius: 100px; font-weight: 700 !important; font-size: 0.8rem; font-family: 'Oswald', sans-serif; letter-spacing: 0.06em; text-transform: uppercase; }
.nav-cta:hover { background: var(--accent-hover) !important; color: #fff !important; }

/* ============================================
   HERO
============================================ */
.hero {
  min-height: 100vh; display: flex; align-items: center; padding-top: 80px;
  position: relative; overflow: hidden;
}
[data-theme="light"] .hero { background: linear-gradient(160deg, #ffffff 0%, #f0f5ff 50%, #f8f9fb 100%); }
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 50% at 80% 20%, rgba(45,222,152,0.07) 0%, transparent 60%),
              radial-gradient(ellipse 40% 40% at 20% 80%, rgba(88,166,255,0.05) 0%, transparent 60%);
}
[data-theme="light"] .hero-bg {
  background: radial-gradient(ellipse 50% 40% at 85% 15%, rgba(10,158,110,0.07) 0%, transparent 60%),
              radial-gradient(ellipse 40% 40% at 15% 85%, rgba(26,111,196,0.05) 0%, transparent 60%);
}
.hero-texture {
  position: absolute; inset: 0; pointer-events: none;
}
[data-theme="dark"] .hero-texture {
  opacity: 0.03;
  background-image: linear-gradient(rgba(255,255,255,0.5) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.5) 1px, transparent 1px);
  background-size: 60px 60px;
}
[data-theme="light"] .hero-texture, :root:not([data-theme]) .hero-texture {
  opacity: 0.4;
  background-image: radial-gradient(circle, rgba(0,0,0,0.06) 1px, transparent 1px);
  background-size: 28px 28px;
}
.hero-inner { position: relative; z-index: 1; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(45,222,152,0.06); border: 1px solid rgba(45,222,152,0.15);
  color: var(--accent); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 6px 16px; border-radius: 100px; margin-bottom: 2rem;
}
[data-theme="light"] .hero-kicker { background: rgba(10,158,110,0.07); border-color: rgba(10,158,110,0.18); }
.hero-kicker::before { content: ''; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }
.hero h1 { margin-bottom: 1.5rem; max-width: 800px; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero-sub { font-size: 1.1rem; color: var(--text-muted); max-width: 560px; margin-bottom: 3rem; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 4rem; }

/* ============================================
   BUTTONS
============================================ */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 28px; border-radius: 100px; font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; transition: all 0.3s ease; border: none; text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
[data-theme="dark"] .btn-primary { color: #07090f; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(45,222,152,0.25); }
.btn-ghost { background: transparent; color: var(--text); border: 1.5px solid var(--border-hover); }
.btn-ghost:hover { background: var(--bg-card); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-cta-white { background: #fff; color: var(--accent); }
.btn-cta-white:hover { background: #f0faf6; transform: translateY(-2px); }
.btn-cta-outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.4); }
.btn-cta-outline:hover { background: rgba(255,255,255,0.1); border-color: #fff; transform: translateY(-2px); }

/* ============================================
   STATS
============================================ */
.stats-bar { display: flex; gap: 40px; flex-wrap: wrap; }
.stat-num { font-family: 'Oswald', sans-serif; font-size: 1.8rem; font-weight: 700; color: var(--text); }
.stat-num span { color: var(--accent); }
.stat-label { font-size: 0.72rem; color: var(--text-dim); letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; margin-top: 2px; }

/* ============================================
   PRODUCTS
============================================ */
.products-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-top: 56px; }
.product-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px;
  padding: 36px 32px; position: relative; overflow: hidden;
  transition: all 0.3s ease; display: flex; flex-direction: column;
  text-decoration: none; box-shadow: var(--shadow);
}
.product-card:hover { background: var(--bg-card-hover); border-color: var(--border-hover); transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.product-card.featured { border-color: rgba(45,222,152,0.25); }
[data-theme="light"] .product-card.featured { border-color: rgba(10,158,110,0.22); }
.product-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.product-card.green::before { background: var(--accent); }
.product-card.blue::before { background: var(--accent-3); }
.product-card.amber::before { background: var(--accent-2); }
.product-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 10px; border-radius: 100px; margin-bottom: 20px; width: fit-content; }
.badge-live { background: rgba(45,222,152,0.1); color: var(--accent); border: 1px solid rgba(45,222,152,0.2); }
[data-theme="light"] .badge-live { background: rgba(10,158,110,0.08); border-color: rgba(10,158,110,0.2); }
.badge-live::before { content: ''; width: 5px; height: 5px; background: var(--accent); border-radius: 50%; }
.badge-soon { background: rgba(88,166,255,0.1); color: var(--accent-3); border: 1px solid rgba(88,166,255,0.2); }
[data-theme="light"] .badge-soon { background: rgba(26,111,196,0.08); border-color: rgba(26,111,196,0.2); }
.badge-coming { background: rgba(245,166,35,0.1); color: var(--accent-2); border: 1px solid rgba(245,166,35,0.2); }
[data-theme="light"] .badge-coming { background: rgba(212,135,10,0.08); border-color: rgba(212,135,10,0.2); }
.product-icon { width: 52px; height: 52px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 20px; }
.product-icon.green { background: rgba(45,222,152,0.1); }
[data-theme="light"] .product-icon.green { background: rgba(10,158,110,0.08); }
.product-icon.blue { background: rgba(88,166,255,0.1); }
[data-theme="light"] .product-icon.blue { background: rgba(26,111,196,0.08); }
.product-icon.amber { background: rgba(245,166,35,0.1); }
[data-theme="light"] .product-icon.amber { background: rgba(212,135,10,0.08); }
.product-card h3 { font-size: 1.1rem; margin-bottom: 10px; color: var(--text); }
.product-card p { font-size: 0.875rem; color: var(--text-muted); line-height: 1.7; flex: 1; margin-bottom: 24px; }
.product-link { display: inline-flex; align-items: center; gap: 6px; font-family: 'Oswald', sans-serif; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; transition: all 0.3s ease; text-decoration: none; }
.product-card.green .product-link { color: var(--accent); }
.product-card.blue .product-link { color: var(--accent-3); }
.product-card.amber .product-link { color: var(--accent-2); }

/* ============================================
   ABOUT
============================================ */
.about-section { background: var(--bg-section); transition: background 0.3s ease; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-bottom: 1rem; display: flex; align-items: center; gap: 8px; }
.about-label::before { content: ''; width: 20px; height: 1px; background: var(--accent); }
.about-grid h2 { margin-bottom: 1.25rem; }
.about-grid p { font-size: 0.9rem; margin-bottom: 1rem; }
.about-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1.5rem; }
.tag { background: var(--bg-card); border: 1px solid var(--border); color: var(--text-muted); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 6px 14px; border-radius: 100px; font-family: 'Oswald', sans-serif; }
.about-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; padding: 36px; position: relative; overflow: hidden; box-shadow: var(--shadow); }
.about-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-3)); }
.about-quote { font-family: 'Oswald', sans-serif; font-size: 1.15rem; font-weight: 600; color: var(--text); line-height: 1.5; letter-spacing: 0.02em; margin-bottom: 1rem; text-transform: uppercase; }
.about-quote em { color: var(--accent); font-style: normal; }
.about-cite { font-size: 0.75rem; color: var(--text-dim); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 1.5rem; display: block; }

/* ============================================
   CTA
============================================ */
.cta-section { text-align: center; padding: 120px 0; background: var(--cta-bg); position: relative; overflow: hidden; }
.cta-section::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px); background-size: 28px 28px; }
.cta-section h2 { color: #fff; margin-bottom: 1rem; position: relative; }
.cta-section p { color: rgba(255,255,255,0.8); font-size: 1.05rem; max-width: 520px; margin: 0 auto 2.5rem; position: relative; }
.cta-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; position: relative; }

/* ============================================
   DIVIDER & FOOTER
============================================ */
.divider { height: 1px; background: var(--border); transition: background 0.3s ease; }
.site-footer { border-top: 1px solid var(--border); padding: 40px 0; background: var(--footer-bg); transition: all 0.3s ease; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-inner p { font-size: 0.8rem; color: var(--text-dim); margin: 0; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-family: 'Oswald', sans-serif; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); }
.footer-links a:hover { color: var(--accent); }

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 900px) {
  .products-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .nav-links { display: none; }
  .section { padding: 64px 0; }
  .stats-bar { gap: 24px; }
  .footer-inner { flex-direction: column; text-align: center; }
}
