/*
  styles.css — Valves Security Landing Page
  Structure:
    1. Google Fonts import
    2. CSS reset
    3. Design tokens (custom properties)
    4. Base / typography
    5. Layout utilities
    6. Navigation
    7. Hero
    8. Track Record
    9. About
   10. Team
   11. Services
   12. Footer
   13. Scroll animations
   14. Responsive — tablet (768px+)
   15. Responsive — desktop (1024px+)
   16. Responsive — mobile nav overrides (max 767px)
*/

/* ── 1. Google Fonts ──────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ── 2. CSS Reset ─────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--cyan-dim) var(--bg-surface);
}

::-webkit-scrollbar          { width: 6px; }
::-webkit-scrollbar-track    { background: var(--bg-surface); }
::-webkit-scrollbar-thumb    { background: var(--cyan-dim); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--cyan); }

/* ── 3. Design Tokens ─────────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg-base:      #080b12;
  --bg-elevated:  #0d1117;
  --bg-surface:   #111827;
  --bg-surface-2: #1a2233;
  --bg-nav:       rgba(8, 11, 18, 0.88);

  /* Cyan accent */
  --cyan:         #00d4ff;
  --cyan-dim:     #0099cc;
  --cyan-glow:    rgba(0, 212, 255, 0.14);

  /* Purple accent */
  --purple:       #7c3aed;
  --purple-dim:   #5b21b6;
  --purple-glow:  rgba(124, 58, 237, 0.14);

  /* Text */
  --text-primary:   #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:     #475569;

  /* Borders */
  --border:        rgba(255, 255, 255, 0.08);
  --border-accent: rgba(0, 212, 255, 0.3);

  /* Geometry */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  /* Layout */
  --nav-height: 76px;
  --section-pad: 96px;

  /* Motion */
  --transition: 0.28s ease;
}

/* ── 4. Base / Typography ─────────────────────────────────────── */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-base);
  color: var(--text-secondary);
  line-height: 1.65;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img  { max-width: 100%; display: block; }
ul   { list-style: none; }
a    { text-decoration: none; color: inherit; }

h1, h2, h3 {
  color: var(--text-primary);
  line-height: 1.2;
}

h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.25rem);
  font-weight: 700;
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
}

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

/* ── 5. Layout Utilities ─────────────────────────────────────── */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: var(--section-pad) 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header h2 {
  margin-bottom: 0.75rem;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto;
}

.section-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  border: 1px solid var(--border-accent);
  background: var(--cyan-glow);
  padding: 4px 14px;
  border-radius: 100px;
  margin-bottom: 1rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── 6. Navigation ───────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  border-bottom: 1px solid transparent;
  transition:
    background var(--transition),
    backdrop-filter var(--transition),
    border-color var(--transition);
}

.nav.nav-scrolled {
  background: var(--bg-nav);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}

.nav-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--text-primary);
  font-size: 1.15rem;
  font-weight: 700;
  transition: opacity var(--transition);
}
.nav-logo:hover { opacity: 0.8; }

.nav-logo-img {
  height: 38px;
  width: 38px;
  object-fit: contain;
}

/* Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  position: relative;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 6px 13px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 13px;
  right: 13px;
  height: 2px;
  background: var(--cyan);
  border-radius: 2px;
}

.nav-link-cta {
  color: var(--cyan);
  border: 1px solid var(--border-accent);
  background: var(--cyan-glow);
  margin-left: 6px;
}
.nav-link-cta:hover {
  background: rgba(0, 212, 255, 0.22);
  color: var(--cyan);
}
.nav-link-cta.active::after { display: none; }

/* Hamburger button */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 8px 10px;
  width: 42px;
  height: 38px;
  transition: border-color var(--transition), background var(--transition);
}
.nav-toggle:hover {
  border-color: var(--border-accent);
  background: var(--bg-surface);
}

.hamburger-line {
  display: block;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* Hamburger → X animation */
.nav-toggle.nav-open .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.nav-open .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle.nav-open .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── 7. Hero ─────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding-top: var(--nav-height);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 30%, transparent 80%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 30%, transparent 80%);
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.3;
  pointer-events: none;
}
.hero-glow-1 {
  width: 700px;
  height: 700px;
  top: -150px;
  left: -150px;
  background: radial-gradient(circle, var(--purple) 0%, transparent 65%);
}
.hero-glow-2 {
  width: 550px;
  height: 550px;
  bottom: -120px;
  right: -120px;
  background: radial-gradient(circle, var(--cyan) 0%, transparent 65%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  padding: 0 1.5rem;
}

.hero-logo {
  width: 112px;
  height: 112px;
  object-fit: contain;
  margin: 0 auto 2rem;
  filter: drop-shadow(0 0 28px rgba(0, 212, 255, 0.45));
}

.hero-title {
  font-size: clamp(2.2rem, 5.5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 2.5rem;
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Cascade delay for hero animations */
.hero-content .animate-in:nth-child(2) { transition-delay: 0.15s; }
.hero-content .animate-in:nth-child(3) { transition-delay: 0.3s; }
.hero-content .animate-in:nth-child(4) { transition-delay: 0.45s; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition),
              background var(--transition), border-color var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan) 0%, #007acc 100%);
  color: #050810;
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.32);
}
.btn-primary:hover {
  box-shadow: 0 0 40px rgba(0, 212, 255, 0.55);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--border-accent);
  background: var(--cyan-glow);
  color: var(--cyan);
  transform: translateY(-2px);
}

/* ── 8. Track Record ─────────────────────────────────────────── */
.track-record {
  background: var(--bg-elevated);
}

.track-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.track-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition:
    border-color var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
}
.track-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 212, 255, 0.1);
}

.track-card-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg-surface-2);
}
.track-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}
.track-card:hover .track-card-image img {
  transform: scale(1.04);
}

.track-card-info {
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.track-platform {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.track-rank {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 100px;
}
.rank-gold {
  background: rgba(255, 193, 7, 0.14);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}
.rank-bronze {
  background: rgba(205, 127, 50, 0.14);
  color: #d97706;
  border: 1px solid rgba(217, 119, 6, 0.3);
}

/* Stagger track cards */
.track-card:nth-child(2) { transition-delay: 0.1s; }
.track-card:nth-child(3) { transition-delay: 0.2s; }

/* ── 9. About ─────────────────────────────────────────────────── */
.about {
  background: var(--bg-base);
}

.about-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3.5rem;
  align-items: start;
}

.about-content h2 {
  margin-bottom: 1.25rem;
}

.about-intro {
  font-size: 1.02rem;
  margin-bottom: 0.9rem;
  line-height: 1.75;
}

.value-props {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.value-prop {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

/* Stagger value props */
.value-prop:nth-child(2) { transition-delay: 0.1s; }
.value-prop:nth-child(3) { transition-delay: 0.2s; }

.value-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.value-body h3 {
  margin-bottom: 0.3rem;
  color: var(--text-primary);
}

.value-body p {
  font-size: 0.9rem;
  line-height: 1.65;
}

/* Code decoration */
.about-visual {
  position: relative;
}

.code-block {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 0 0 1px var(--border),
    0 20px 50px rgba(0, 0, 0, 0.45),
    0 0 60px rgba(0, 212, 255, 0.05);
}

.code-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 16px;
  background: var(--bg-surface-2);
  border-bottom: 1px solid var(--border);
}

.code-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-red    { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green  { background: #28c840; }

.code-filename {
  margin-left: 8px;
  font-size: 0.76rem;
  color: var(--text-muted);
  font-family: 'Menlo', 'Monaco', 'Consolas', 'Liberation Mono', monospace;
}

.code-body {
  padding: 1.5rem 1.75rem;
  font-family: 'Menlo', 'Monaco', 'Consolas', 'Liberation Mono', monospace;
  font-size: 0.8rem;
  line-height: 1.75;
  overflow-x: auto;
  white-space: pre;
}

.c-comment { color: #546e7a; }
.c-keyword  { color: #c792ea; }
.c-fn       { color: #82aaff; }
.c-type     { color: #ffcb6b; }
.c-string   { color: #c3e88d; }

/* ── 10. Team ─────────────────────────────────────────────────── */
.team {
  background: var(--bg-elevated);
}

.team .section-subtitle {
  font-size: 1.15rem;
}

.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.team-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  text-align: center;
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
}
.team-card:hover {
  border-color: var(--border-accent);
  box-shadow:
    0 0 0 1px var(--border-accent),
    0 10px 40px var(--cyan-glow);
  transform: translateY(-5px);
}

.team-card:nth-child(2) { transition-delay: 0.1s; }

.team-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1.25rem;
  border: 2px solid var(--border-accent);
  box-shadow: 0 0 24px var(--cyan-glow);
}

.team-handle {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--cyan);
  margin-bottom: 0.3rem;
  font-family: 'Menlo', 'Monaco', 'Consolas', 'Liberation Mono', monospace;
}

.team-role {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.1rem;
}

.team-bio {
  font-size: 0.91rem;
  line-height: 1.72;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.team-links {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.team-link {
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 6px 18px;
  border-radius: 100px;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.team-link:hover {
  color: var(--cyan);
  border-color: var(--border-accent);
  background: var(--cyan-glow);
}

/* ── 11. Services ─────────────────────────────────────────────── */
.services {
  background: var(--bg-base);
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.service-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
}
.service-card:hover {
  border-color: var(--border-accent);
  box-shadow:
    0 0 0 1px var(--border-accent),
    0 10px 36px var(--cyan-glow);
  transform: translateY(-4px);
}

/* Stagger service cards */
.service-card:nth-child(2) { transition-delay: 0.08s; }
.service-card:nth-child(3) { transition-delay: 0.16s; }
.service-card:nth-child(4) { transition-delay: 0.24s; }

.service-icon {
  font-size: 1.75rem;
  width: 54px;
  height: 54px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.4rem;
}

.service-card h3 {
  color: var(--text-primary);
}

.service-card p {
  font-size: 0.9rem;
  line-height: 1.65;
  flex: 1;
}

.service-link {
  display: inline-flex;
  align-items: center;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--cyan);
  margin-top: auto;
  padding-top: 0.5rem;
  transition: opacity var(--transition), transform var(--transition);
}
.service-link:hover {
  opacity: 0.75;
  transform: translateX(3px);
}

/* ── 12. Footer ──────────────────────────────────────────────── */
.footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-logo {
  height: 28px;
  width: 28px;
  object-fit: contain;
}

.footer-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1.75rem;
}

.footer-link {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
}
.footer-link:hover { color: var(--cyan); }

/* ── 13. Scroll Animations ───────────────────────────────────── */
.animate-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── 14. Responsive — Tablet (768px+) ───────────────────────── */
@media (min-width: 768px) {
  .track-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .about-layout {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .footer-container {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* ── 15. Responsive — Desktop (1024px+) ─────────────────────── */
@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── 16. Mobile Nav (max 767px) ──────────────────────────────── */
@media (max-width: 767px) {
  :root {
    --section-pad: 72px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg-nav);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.5rem 1.25rem;
    gap: 2px;
  }

  .nav-links.nav-open {
    display: flex;
  }

  .nav-link {
    padding: 11px 14px;
    text-align: left;
  }

  .nav-link.active::after {
    display: none;
  }

  .nav-link-cta {
    margin-left: 0;
    margin-top: 6px;
    text-align: center;
    justify-content: center;
  }

  .track-card-image {
    aspect-ratio: 4 / 3;
  }

  .hero-logo {
    width: 88px;
    height: 88px;
  }
}
