/* ═══════════════════════════════════════════════════════════════
   SRE Buddy — Stylesheet
   Design: dark navy base, blue→purple accent gradient
   Font stack: system UI — no external CDN dependency
   ═══════════════════════════════════════════════════════════════ */

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Palette */
  --bg-base:       #0a0e1a;
  --bg-surface:    #111827;
  --bg-card:       #141c2e;
  --bg-card-hover: #1a2440;
  --bg-alt:        #0d1220;
  --border:        rgba(255, 255, 255, 0.07);
  --border-accent: rgba(59, 130, 246, 0.35);

  /* Text */
  --text-primary:   #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;

  /* Accent */
  --blue:        #3b82f6;
  --blue-light:  #60a5fa;
  --purple:      #8b5cf6;
  --green:       #10b981;
  --green-light: #34d399;
  --yellow:      #f59e0b;
  --red:         #ef4444;

  /* Gradients */
  --grad-primary:  linear-gradient(135deg, var(--blue) 0%, var(--purple) 100%);
  --grad-surface:  linear-gradient(180deg, #111827 0%, #0a0e1a 100%);

  /* Layout */
  --max-width: 1200px;
  --nav-h: 64px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;

  /* Shadows */
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.15);

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 200ms;

  /* Typography */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Cascadia Code", Menlo, Consolas, monospace;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Screenreader-only utility */
.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;
}

img, video { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

/* ── Navigation ─────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  background: rgba(10, 14, 26, 0.85);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--duration) var(--ease);
}

.navbar.scrolled {
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.5);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  transition: opacity var(--duration) var(--ease);
}
.nav-logo:hover { opacity: 0.85; }

.logo-icon { font-size: 1.25rem; }
.logo-text  { color: var(--text-primary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-links a {
  color: var(--text-secondary);
  transition: color var(--duration) var(--ease);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1.5px;
  background: var(--blue);
  transition: width var(--duration) var(--ease);
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { width: 100%; }

.btn-nav {
  padding: 7px 18px;
  background: var(--grad-primary);
  border-radius: 100px;
  color: #fff !important;
  font-weight: 600;
  font-size: 0.85rem;
  transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.btn-nav::after { display: none !important; }
.btn-nav:hover { opacity: 0.9; transform: translateY(-1px); }

/* Hamburger (mobile) */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--duration) var(--ease), opacity var(--duration) var(--ease);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 60px) 24px 80px;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(59,130,246,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(139,92,246,0.1) 0%, transparent 70%),
    var(--bg-base);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59,130,246,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
  pointer-events: none;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  position: relative;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(59,130,246,0.12);
  border: 1px solid rgba(59,130,246,0.25);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--blue-light);
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}
.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--blue);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59,130,246,0.7); }
  50%       { box-shadow: 0 0 0 5px rgba(59,130,246,0); }
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.gradient-text {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 480px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
}

/* Shared button styles */
.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 12px 26px;
  background: var(--grad-primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59,130,246,0.35);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 12px 26px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color var(--duration) var(--ease), color var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.btn-secondary:hover {
  border-color: var(--blue);
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* Hero stats */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
}
.stat { text-align: center; }
.stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 2px;
}
.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}
.stat-sep {
  width: 1px;
  height: 32px;
  background: var(--border);
}

/* ── Terminal widget ─────────────────────────────────────────── */
.terminal {
  background: #0d1117;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card), var(--shadow-glow);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.dot-red    { background: var(--red); }
.dot-yellow { background: var(--yellow); }
.dot-green  { background: var(--green); }

.terminal-title {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-left: 8px;
}

.terminal-body {
  padding: 20px 20px 24px;
  line-height: 1.8;
}

.t-line { display: flex; align-items: center; gap: 8px; }
.t-out  { padding-left: 20px; color: var(--text-secondary); }

.t-prompt { color: var(--green); }
.t-ok     { color: var(--green-light); }

.t-cmd {
  background: linear-gradient(90deg, var(--blue-light), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.t-tag {
  margin-left: auto;
  padding: 2px 8px;
  background: rgba(59,130,246,0.15);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 4px;
  color: var(--blue-light);
  font-size: 0.75rem;
}

.t-blink { color: var(--blue); animation: blink 1s step-end infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ── Sections (shared) ──────────────────────────────────────── */
.section {
  padding: 100px 24px;
}
.section--alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section--cta {
  background:
    radial-gradient(ellipse 60% 80% at 50% 50%, rgba(59,130,246,0.08) 0%, transparent 70%),
    var(--bg-base);
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-label {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--blue-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
}

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

/* ── Challenge Cards ─────────────────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform var(--duration) var(--ease), border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-card), var(--shadow-glow);
  background: var(--bg-card-hover);
}

.card--accent { border-color: rgba(139,92,246,0.2); }
.card--accent:hover { border-color: rgba(139,92,246,0.4); box-shadow: 0 0 40px rgba(139,92,246,0.12); }

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-icon { font-size: 1.75rem; line-height: 1; }

.card-badge {
  padding: 3px 10px;
  background: rgba(16,185,129,0.12);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: 100px;
  color: var(--green-light);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  flex: 1;
}

.card-topics {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card-topics li {
  font-size: 0.83rem;
  color: var(--text-secondary);
  padding-left: 16px;
  position: relative;
}
.card-topics li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--blue);
}

.card-footer {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.btn-card {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue-light);
  transition: color var(--duration) var(--ease), gap var(--duration) var(--ease);
}
.btn-card:hover { color: var(--text-primary); gap: 10px; }

/* ── About Section ───────────────────────────────────────────── */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-copy .section-label  { margin-bottom: 12px; }
.about-copy .section-title  { text-align: left; margin-bottom: 20px; }
.about-copy p               { color: var(--text-secondary); line-height: 1.75; margin-bottom: 12px; }

.pillars {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 32px;
}
.pillar {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.pillar-icon { font-size: 1.5rem; line-height: 1; flex-shrink: 0; margin-top: 2px; }
.pillar strong { display: block; font-weight: 700; margin-bottom: 2px; color: var(--text-primary); }
.pillar p { font-size: 0.88rem; color: var(--text-secondary); margin: 0; }

/* Progress widget */
.widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  font-size: 0.9rem;
  font-weight: 600;
}
.status-pill {
  font-size: 0.75rem;
  color: var(--green-light);
  font-weight: 600;
}

.metric {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.metric:last-of-type { margin-bottom: 20px; }
.metric-label { font-size: 0.82rem; color: var(--text-secondary); }

.bar {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
  width: 120px;
}
.bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--grad-primary);
  transition: width 1s var(--ease);
}
.bar-fill--purple { background: linear-gradient(90deg, var(--purple), #c084fc); }

.metric-val { font-size: 0.78rem; color: var(--text-muted); font-family: var(--font-mono); width: 36px; text-align: right; }
.widget-footer { font-size: 0.75rem; color: var(--text-muted); border-top: 1px solid var(--border); padding-top: 12px; }

/* ── CTA / Notify Section ───────────────────────────────────── */
.cta-box {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}
.cta-box h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.cta-box > p {
  color: var(--text-secondary);
  margin-bottom: 28px;
  font-size: 1rem;
}

.notify-form {
  display: flex;
  gap: 10px;
  max-width: 440px;
  margin: 0 auto 16px;
}

.email-input {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font);
  outline: none;
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.email-input::placeholder { color: var(--text-muted); }
.email-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

.cta-note {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.cta-note--success { color: var(--green-light); }

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
  padding: 48px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.05rem;
}
.footer-tagline { color: var(--text-muted); font-size: 0.875rem; }
.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color var(--duration) var(--ease);
}
.footer-links a:hover { color: var(--text-primary); }
.footer-copy { font-size: 0.78rem; color: var(--text-muted); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { max-width: 560px; }
  .about-layout { grid-template-columns: 1fr; gap: 48px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
}

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

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(10, 14, 26, 0.97);
    backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 24px;
    gap: 0;
    border-bottom: 1px solid var(--border);
    align-items: stretch;
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-bottom: 1px solid var(--border); }
  .nav-links a {
    display: block;
    padding: 14px 0;
    font-size: 1rem;
  }
  .nav-links a::after { display: none; }
  .btn-nav {
    display: inline-block;
    margin-top: 12px;
    text-align: center;
  }

  .cards { grid-template-columns: 1fr; }

  .notify-form { flex-direction: column; }
  .btn-primary { text-align: center; justify-content: center; }

  .hero { padding-bottom: 60px; }
  .section { padding: 72px 24px; }

  .hero-stats { flex-wrap: wrap; justify-content: center; gap: 16px; }
  .stat-sep   { display: none; }
}

@media (max-width: 480px) {
  .about-widget { display: none; }
}
