/* ============================================
   KODEWARS.COM — Global Stylesheet
   ============================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black: #0A0A0B;
  --dark: #111114;
  --card: #16161A;
  --border: #222228;
  --muted: #3A3A44;
  --text-dim: #888896;
  --text: #C8C8D4;
  --white: #F0F0F8;
  --accent: #4F6EF7;
  --accent-dim: #2A3A8A;
  --accent-glow: rgba(79,110,247,0.15);
  --green: #22C77A;
  --green-dim: rgba(34,199,122,0.12);
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5%;
  height: 64px;
  background: rgba(10,10,11,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.nav-logo span { color: var(--accent); }
#navLinks { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--white); }
.nav-cta {
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
}
.nav-cta:hover { opacity: 0.85; }
.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ── BUTTONS ── */
.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 0.875rem 2rem;
  border-radius: 8px;
  font-size: 0.975rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
  display: inline-flex; align-items: center; gap: 0.5rem;
  border: none; cursor: pointer;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-secondary {
  background: transparent;
  color: var(--text);
  padding: 0.875rem 2rem;
  border-radius: 8px;
  font-size: 0.975rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--border);
  transition: border-color 0.2s, color 0.2s;
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.btn-secondary:hover { border-color: var(--muted); color: var(--white); }
.btn-whatsapp {
  background: #25D366;
  color: #fff;
  padding: 0.875rem 2rem;
  border-radius: 8px;
  font-size: 0.975rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.5rem;
  transition: opacity 0.2s;
}
.btn-whatsapp:hover { opacity: 0.88; }

/* ── TYPOGRAPHY ── */
h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.75rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
  letter-spacing: -0.03em;
}
h1 em { font-style: normal; color: var(--accent); }
h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.025em;
  line-height: 1.15;
}
h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--white);
}
.section-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
  display: block;
}
.section-sub {
  font-size: 1rem;
  color: var(--text-dim);
  max-width: 560px;
  line-height: 1.7;
  margin-top: 0.75rem;
}

/* ── LAYOUT ── */
section { padding: 100px 5%; }
.container { max-width: 1100px; margin: 0 auto; }
.page-hero {
  padding: 140px 5% 80px;
  border-bottom: 1px solid var(--border);
  background: var(--dark);
}

/* ── CARDS ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  transition: border-color 0.25s, transform 0.25s;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.25s;
}
.card:hover { border-color: var(--accent-dim); transform: translateY(-3px); }
.card:hover::before { opacity: 1; }
.card-icon {
  width: 44px; height: 44px;
  background: var(--accent-glow);
  border: 1px solid var(--accent-dim);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
}

/* ── TAGS ── */
.tag {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-dim);
  background: var(--dark);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
}
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; }

/* ── BADGE ── */
.badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--accent-glow);
  border: 1px solid var(--accent-dim);
  border-radius: 100px;
  padding: 0.35rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.75rem;
  width: fit-content;
}
.badge::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* ── FOOTER ── */
footer {
  background: var(--dark);
  border-top: 1px solid var(--border);
  padding: 60px 5% 30px;
}
.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-dim);
  line-height: 1.7;
  margin-top: 1rem;
  max-width: 280px;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
}
.footer-logo span { color: var(--accent); }
.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col ul a {
  font-size: 0.875rem;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-col ul a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-bottom p { font-size: 0.8rem; color: var(--text-dim); }
.footer-bottom a { color: var(--text-dim); text-decoration: none; }
.footer-bottom a:hover { color: var(--white); }

/* ── WHATSAPP FLOAT ── */
.whatsapp-float {
  position: fixed;
  bottom: 30px; right: 30px;
  background: #25D366;
  color: #fff;
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  z-index: 999;
  transition: transform 0.2s, box-shadow 0.2s;
}
.whatsapp-float:hover { transform: scale(1.1); box-shadow: 0 6px 25px rgba(37,211,102,0.5); }

/* ── STATS ── */
.stats-bar {
  background: var(--card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2rem 5%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat-item {
  text-align: center;
  padding: 1rem;
  border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: none; }
.stat-number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.03em;
  display: block;
}
.stat-number span { color: var(--accent); }
.stat-label { font-size: 0.8rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 0.25rem; }

/* ── FORMS ── */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: var(--dark);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--white);
  font-size: 0.9rem;
  font-family: var(--font-body);
  transition: border-color 0.2s;
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: var(--accent); }
.form-group textarea { min-height: 140px; resize: vertical; }
.form-group select option { background: var(--dark); }

/* ── ALERT ── */
.alert {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  display: none;
}
.alert.success { background: var(--green-dim); border: 1px solid rgba(34,199,122,0.3); color: var(--green); }
.alert.error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: #F87171; }

/* ── RESPONSIVE ── */

/* ── NAV DROPDOWN (Desktop) ── */
.nav-right { display:flex; align-items:center; gap:1rem; }
.hamburger { background:none; border:none; color:#fff; font-size:1.5rem; cursor:pointer; display:none; padding:0.25rem; }
.has-dropdown { position:relative; }
.sub-menu { display:none; position:absolute; top:calc(100% + 8px); left:0; background:var(--dark); border:1px solid var(--border); border-radius:10px; padding:0.5rem; min-width:220px; list-style:none; z-index:200; box-shadow:0 8px 32px rgba(0,0,0,0.6); }
.has-dropdown:hover .sub-menu { display:block; }
.sub-menu li a { display:block; padding:0.5rem 0.75rem; font-size:0.85rem; color:var(--text-dim); border-radius:6px; text-decoration:none; white-space:nowrap; }
.sub-menu li a:hover { background:var(--card); color:var(--white); }

/* ── MOBILE NAV ── */
@media (max-width:768px) {
  nav { padding:0 4%; }
  section { padding:70px 4%; }
  .page-hero { padding:110px 4% 60px; }
  .footer-grid { grid-template-columns:1fr; gap:2rem; }
  .footer-bottom { flex-direction:column; text-align:center; }
  .whatsapp-float { bottom:20px; right:20px; }
  .hamburger { display:block !important; }
  .nav-cta { display:none; }
  #navLinks {
    display:none;
    position:fixed;
    top:64px; left:0; right:0; bottom:0;
    background:var(--dark);
    flex-direction:column;
    padding:1rem 5%;
    gap:0;
    border-top:1px solid var(--border);
    overflow-y:auto;
    z-index:998;
    list-style:none;
  }
  #navLinks.open { display:flex; }
  #navLinks > li { border-bottom:1px solid var(--border); }
  #navLinks > li:last-child { border-bottom:none; }
  #navLinks a { display:block; padding:0.875rem 0; color:var(--text); font-size:1rem; }
  .sub-menu { display:none; position:static; background:transparent; border:none; box-shadow:none; padding:0 0 0.5rem 1rem; min-width:unset; }
  .has-dropdown.open .sub-menu { display:block; }
  .sub-menu li a { padding:0.4rem 0; color:var(--text-dim); border-radius:0; white-space:normal; }
  .has-dropdown > a::after { content:" +"; color:var(--accent); }
  .has-dropdown.open > a::after { content:" -"; }
}

@media (max-width:900px) {
  .footer-grid { grid-template-columns:1fr 1fr; }
  .stats-bar { grid-template-columns:repeat(2,1fr); }
  .stat-item:nth-child(2) { border-right:none; }
  .stat-item:nth-child(3) { border-right:1px solid var(--border); }
}
