/* ============================================================
   AtomClock — Główny arkusz stylów
   Projekt: Zegar Atomowy — edukacyjna strona internetowa
   Autor: AtomClock Team | Wersja: 2.0
   ============================================================ */

/* ── IMPORT FONTS ── */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Mono:wght@300;400;500&family=Outfit:wght@300;400;500;600;700&display=swap');

/* ══════════════════════════════════════════
   1. CSS VARIABLES — DESIGN TOKENS
══════════════════════════════════════════ */
:root {
  /* Kolory — tryb ciemny (domyślny) */
  --bg-primary:   #080e1a;
  --bg-secondary: #0d1524;
  --bg-card:      #111d30;
  --bg-glass:     rgba(13,21,36,0.7);
  --border:       rgba(100,180,255,0.1);
  --border-hover: rgba(100,180,255,0.3);

  --navy:   #0a1628;
  --blue:   #1a4b8c;
  --sky:    #4db8ff;
  --neon:   #00e5ff;
  --neon2:  #7b61ff;
  --silver: #9ab5cc;
  --white:  #e8f2ff;

  --text-primary:   #e8f2ff;
  --text-secondary: #7a9bb8;
  --text-muted:     #3d5a78;

  --glow-neon:  0 0 24px rgba(0,229,255,0.35);
  --glow-soft:  0 8px 40px rgba(0,0,0,0.5);
  --glow-card:  0 2px 40px rgba(0,229,255,0.04);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;

  --font-display: 'DM Serif Display', serif;
  --font-mono:    'DM Mono', monospace;
  --font-body:    'Outfit', sans-serif;

  --nav-h: 68px;
  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
}

/* Tryb jasny */
[data-theme="light"] {
  --bg-primary:   #f0f5ff;
  --bg-secondary: #e4edf9;
  --bg-card:      #ffffff;
  --bg-glass:     rgba(255,255,255,0.8);
  --border:       rgba(26,75,140,0.12);
  --border-hover: rgba(26,75,140,0.3);

  --text-primary:   #0a1628;
  --text-secondary: #2a4a70;
  --text-muted:     #7a9bb8;

  --glow-card: 0 2px 40px rgba(26,75,140,0.08);
  --glow-soft: 0 8px 40px rgba(0,0,0,0.12);
}

/* ══════════════════════════════════════════
   2. RESET & BASE
══════════════════════════════════════════ */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

img { max-width: 100%; height: auto; display: block; }
a  { color: var(--neon); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--white); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--blue); border-radius: 99px; }

/* Focus */
:focus-visible { outline: 2px solid var(--neon); outline-offset: 3px; border-radius: 4px; }

/* ══════════════════════════════════════════
   3. NOISE TEXTURE OVERLAY
══════════════════════════════════════════ */
body::after {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 9998; opacity: 0.5;
}

/* ══════════════════════════════════════════
   4. NAVIGATION
══════════════════════════════════════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(1rem, 4vw, 3rem);
  background: var(--bg-glass);
  backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: background var(--transition);
}

.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.05em;
}

.nav-logo .logo-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--blue), var(--neon));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}

.nav-logo span { color: var(--neon); }

.nav-links {
  display: flex; gap: 0.25rem; list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.02em;
  transition: all var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--neon);
  background: rgba(0,229,255,0.06);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 50%;
  transform: translateX(-50%);
  width: 20px; height: 2px;
  background: var(--neon);
  border-radius: 99px;
}

.nav-right {
  display: flex; align-items: center; gap: 0.75rem;
}

/* Theme toggle */
.theme-toggle {
  width: 40px; height: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1.1rem;
  transition: all var(--transition);
  color: var(--text-secondary);
}

.theme-toggle:hover { border-color: var(--neon); color: var(--neon); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column; gap: 5px;
  cursor: pointer; padding: 8px;
  background: none; border: none;
}

.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text-primary);
  border-radius: 99px;
  transition: all var(--transition);
}

.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  background: var(--bg-glass);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  padding: 1rem;
  z-index: 999;
  flex-direction: column; gap: 0.25rem;
}

.mobile-menu.open { display: flex; }

.mobile-menu a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; gap: 0.75rem;
  transition: all var(--transition);
}

.mobile-menu a:hover,
.mobile-menu a.active { color: var(--neon); background: rgba(0,229,255,0.06); }

/* ══════════════════════════════════════════
   5. LAYOUT
══════════════════════════════════════════ */
.page-wrapper { padding-top: var(--nav-h); }

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
}

.container--wide { max-width: 1340px; }
.container--narrow { max-width: 780px; }

section { padding: clamp(3rem, 8vw, 6rem) 0; }

/* ══════════════════════════════════════════
   6. HERO
══════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
  padding: calc(var(--nav-h) + 4rem) clamp(1rem,4vw,3rem) 4rem;
  max-width: 1140px;
  margin: 0 auto;
  position: relative;
}

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--neon);
  margin-bottom: 1.5rem;
  padding: 0.35rem 0.9rem;
  border: 1px solid rgba(0,229,255,0.25);
  border-radius: 99px;
  background: rgba(0,229,255,0.04);
}

.hero-eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--neon);
  border-radius: 50%;
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:0.2; } }

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5.5vw, 4.8rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.hero h1 em {
  font-style: italic;
  color: var(--neon);
  display: block;
}

.hero-lead {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 500px;
  margin-bottom: 2.5rem;
}

.hero-cta {
  display: flex; gap: 1rem; flex-wrap: wrap;
  align-items: center;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  border: none; cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  letter-spacing: 0.02em;
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue), #1e6ec7);
  color: #fff;
  box-shadow: 0 4px 20px rgba(26,75,140,0.4);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1e6ec7, var(--neon));
  box-shadow: 0 4px 28px rgba(0,229,255,0.35);
  color: var(--bg-primary);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--neon);
  color: var(--neon);
  background: rgba(0,229,255,0.05);
}

/* Hero atom visual */
.hero-visual {
  display: flex; justify-content: center; align-items: center;
  position: relative;
}

.atom-svg-wrap {
  position: relative;
  width: clamp(260px, 40vw, 480px);
  height: clamp(260px, 40vw, 480px);
}

/* ══════════════════════════════════════════
   7. SECTION HEADERS
══════════════════════════════════════════ */
.section-header {
  text-align: center;
  margin-bottom: clamp(2rem, 5vw, 4rem);
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--neon);
  margin-bottom: 0.75rem;
  display: block;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.5vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.section-lead {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ══════════════════════════════════════════
   8. CARDS
══════════════════════════════════════════ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--glow-card), 0 0 0 0 transparent;
  transform: translateY(-3px);
}

.card:hover::before { opacity: 1; }

.card-icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, rgba(0,229,255,0.1), rgba(123,97,255,0.1));
  border: 1px solid rgba(0,229,255,0.15);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Grid presets */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }

/* ══════════════════════════════════════════
   9. ATOMIC CLOCK WIDGET
══════════════════════════════════════════ */
.clock-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 4rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.clock-widget::before {
  content: '';
  position: absolute;
  top: -100px; left: 50%; transform: translateX(-50%);
  width: 500px; height: 300px;
  background: radial-gradient(ellipse, rgba(0,229,255,0.06) 0%, transparent 65%);
  pointer-events: none;
}

.clock-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--neon);
  margin-bottom: 1.5rem;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
}

.clock-label::before, .clock-label::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(to right, transparent, rgba(0,229,255,0.3));
}
.clock-label::after { background: linear-gradient(to left, transparent, rgba(0,229,255,0.3)); }

.clock-time {
  font-family: var(--font-mono);
  font-size: clamp(2.5rem, 8vw, 5.5rem);
  font-weight: 500;
  color: var(--neon);
  text-shadow: var(--glow-neon);
  letter-spacing: 0.06em;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.clock-date {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.clock-ms {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  color: rgba(0,229,255,0.4);
  letter-spacing: 0.08em;
  margin-bottom: 2rem;
}

.clock-stats {
  display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.clock-stat { text-align: center; }
.clock-stat-num {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--neon);
  display: block;
}
.clock-stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ══════════════════════════════════════════
   10. FAQ
══════════════════════════════════════════ */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 0.75rem;
  transition: border-color var(--transition);
}

.faq-item.open { border-color: rgba(0,229,255,0.3); }

.faq-question {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border: none; cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
  gap: 1rem;
  transition: all var(--transition);
}

.faq-question:hover { color: var(--neon); }

.faq-icon {
  width: 28px; height: 28px; flex-shrink: 0;
  background: rgba(0,229,255,0.08);
  border: 1px solid rgba(0,229,255,0.15);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: transform var(--transition);
  color: var(--neon);
}

.faq-item.open .faq-icon { transform: rotate(45deg); }

.faq-answer {
  display: none;
  padding: 0 1.5rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.75;
  background: var(--bg-card);
}

.faq-item.open .faq-answer { display: block; }

/* ══════════════════════════════════════════
   11. QUOTES / TESTIMONIALS
══════════════════════════════════════════ */
.quote-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--neon);
  border-radius: var(--radius-md);
  padding: 2rem;
  position: relative;
}

.quote-card blockquote {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.quote-card blockquote::before {
  content: '"';
  font-size: 4rem;
  color: rgba(0,229,255,0.15);
  font-family: var(--font-display);
  line-height: 1;
  display: block;
  margin-bottom: -0.75rem;
}

.quote-author {
  display: flex; align-items: center; gap: 0.75rem;
}

.quote-avatar {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--blue), var(--neon2));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}

.quote-info strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}
.quote-info span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ══════════════════════════════════════════
   12. STAT STRIP
══════════════════════════════════════════ */
.stat-strip {
  display: flex; flex-wrap: wrap;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
}

.stat-strip-item {
  flex: 1; min-width: 160px;
  padding: 2rem 1.5rem;
  text-align: center;
  border-right: 1px solid var(--border);
  position: relative;
  transition: background var(--transition);
}

.stat-strip-item:last-child { border-right: none; }
.stat-strip-item:hover { background: rgba(0,229,255,0.03); }

.stat-strip-num {
  font-family: var(--font-mono);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  color: var(--neon);
  font-weight: 500;
  display: block;
  margin-bottom: 0.4rem;
}

.stat-strip-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ══════════════════════════════════════════
   13. CONTENT ARTICLE STYLES
══════════════════════════════════════════ */
.article-body h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  color: var(--text-primary);
  margin: 3rem 0 1rem;
  line-height: 1.25;
}

.article-body h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 2rem 0 0.75rem;
}

.article-body h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--neon);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
  margin: 1.5rem 0 0.5rem;
}

.article-body p {
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.8;
}

.article-body p:first-of-type {
  font-size: 1.1rem;
  color: var(--text-primary);
  line-height: 1.75;
}

.article-body strong { color: var(--text-primary); font-weight: 600; }

.article-body ul, .article-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
}

.article-body li { margin-bottom: 0.5rem; line-height: 1.7; }

.article-body .highlight-box {
  background: linear-gradient(135deg, rgba(0,229,255,0.06), rgba(123,97,255,0.06));
  border: 1px solid rgba(0,229,255,0.2);
  border-radius: var(--radius-md);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
}

.article-body .highlight-box p { color: var(--text-primary); margin: 0; }

.article-body .formula {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--neon);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.5rem;
  text-align: center;
  margin: 1.5rem 0;
  letter-spacing: 0.05em;
}

/* ══════════════════════════════════════════
   14. TIMELINE
══════════════════════════════════════════ */
.timeline {
  position: relative;
  padding-left: 2.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--neon), transparent);
}

.timeline-item {
  position: relative;
  padding-bottom: 3rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.5rem; top: 4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--neon);
  box-shadow: 0 0 12px rgba(0,229,255,0.5);
  transition: all var(--transition);
}

.timeline-item:hover::before {
  background: var(--neon);
  box-shadow: 0 0 20px rgba(0,229,255,0.8);
}

.timeline-year {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--neon);
  letter-spacing: 0.12em;
  margin-bottom: 0.4rem;
}

.timeline-item h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.timeline-item p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ══════════════════════════════════════════
   15. DIAGRAM / PROCESS
══════════════════════════════════════════ */
.process-flow {
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.process-step {
  flex: 1; min-width: 120px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem 1rem;
  text-align: center;
  position: relative;
  transition: all var(--transition);
}

.process-step:hover {
  border-color: var(--border-hover);
  background: rgba(0,229,255,0.03);
}

.process-step + .process-step {
  margin-left: -1px;
  border-left: none;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.process-step:first-child { border-radius: var(--radius-md) 0 0 var(--radius-md); }

.process-arrow {
  position: absolute;
  right: -14px; top: 50%; transform: translateY(-50%);
  color: var(--neon);
  font-size: 1.2rem;
  z-index: 2;
}

.process-step:last-child .process-arrow { display: none; }

.process-icon { font-size: 1.8rem; margin-bottom: 0.75rem; display: block; }

.process-step h4 {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

.process-step p {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ══════════════════════════════════════════
   16. CALCULATOR
══════════════════════════════════════════ */
.calculator {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}

.calc-header {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.calc-header h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--text-primary);
}

.calc-input-group {
  display: grid; grid-template-columns: 1fr 2fr; gap: 1rem;
  align-items: center;
  margin-bottom: 1.25rem;
}

.calc-input-group label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.calc-input-group input[type="range"] {
  -webkit-appearance: none;
  width: 100%; height: 4px;
  background: var(--border);
  border-radius: 99px;
  outline: none;
}

.calc-input-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  background: var(--neon);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(0,229,255,0.5);
}

.calc-result-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr));
  gap: 1rem; margin-top: 1.5rem;
}

.calc-result {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  text-align: center;
}

.calc-result.atomic { border-color: rgba(0,229,255,0.4); background: rgba(0,229,255,0.05); }

.calc-result-val {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.25rem;
  word-break: break-all;
}

.calc-result.atomic .calc-result-val { color: var(--neon); }
.calc-result-name { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }

/* ══════════════════════════════════════════
   17. COMMENTS
══════════════════════════════════════════ */
.comment {
  display: flex; gap: 1rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.comment:last-child { border-bottom: none; }

.comment-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--neon2));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.comment-meta {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.comment-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.comment-date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.comment-body {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.comment-form {
  display: flex; flex-direction: column; gap: 1rem;
  margin-top: 2rem;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.form-group { display: flex; flex-direction: column; gap: 0.4rem; }

.form-group label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.form-group input,
.form-group textarea,
.form-group select {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: var(--neon); }

.form-group textarea { resize: vertical; min-height: 120px; }

/* ══════════════════════════════════════════
   18. FOOTER
══════════════════════════════════════════ */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 1rem 0;
}

.footer-social {
  display: flex; gap: 0.5rem;
}

.social-btn {
  width: 36px; height: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition);
}

.social-btn:hover {
  border-color: var(--neon);
  color: var(--neon);
  background: rgba(0,229,255,0.05);
}

.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.6rem; }
.footer-col a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--neon); }

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-wrap: wrap; gap: 1rem;
}

/* ══════════════════════════════════════════
   19. PAGE HERO (subpages)
══════════════════════════════════════════ */
.page-hero {
  padding: calc(var(--nav-h) + 4rem) 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 800px; height: 400px;
  background: radial-gradient(ellipse, rgba(0,229,255,0.05) 0%, transparent 65%);
  pointer-events: none;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.breadcrumb {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--neon); }
.breadcrumb span { color: var(--neon); }

/* ══════════════════════════════════════════
   20. UTILITY / HELPERS
══════════════════════════════════════════ */
.text-neon    { color: var(--neon); }
.text-muted   { color: var(--text-muted); }
.text-center  { text-align: center; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Tag badge */
.badge {
  display: inline-flex; align-items: center;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  border: 1px solid rgba(0,229,255,0.25);
  color: var(--neon);
  background: rgba(0,229,255,0.05);
}

/* ══════════════════════════════════════════
   21. RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }

  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2.5rem;
  }

  .hero-lead { margin: 0 auto 2rem; }
  .hero-cta { justify-content: center; }
  .hero-visual { order: -1; }
  .atom-svg-wrap { width: 200px; height: 200px; }

  .grid-2, .grid-3 { grid-template-columns: 1fr; }

  .form-row { grid-template-columns: 1fr; }

  .process-flow { flex-direction: column; }
  .process-step { border-radius: var(--radius-md) !important; border-left: 1px solid var(--border) !important; margin-left: 0; }
  .process-arrow { right: auto; bottom: -14px; top: auto; left: 50%; transform: translateX(-50%) rotate(90deg); }

  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }

  .stat-strip { flex-direction: column; }
  .stat-strip-item { border-right: none; border-bottom: 1px solid var(--border); }
  .stat-strip-item:last-child { border-bottom: none; }

  .calc-input-group { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero-cta { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
  .clock-stats { gap: 1rem; }
}

/* ══════════════════════════════════════════
   22. PRINT
══════════════════════════════════════════ */
@media print {
  .nav, footer, .hamburger { display: none; }
  body { background: white; color: black; }
}
