/* ============================================================
   CODERHOLICS — stylesheet
   Palette: near-black, off-white, electric-blue accent
   No gradients.
   ============================================================ */

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

:root {
  --black:     #0a0a0a;
  --near-black:#111111;
  --dark:      #1a1a1a;
  --surface:   #1f1f1f;
  --border:    #2a2a2a;
  --mid:       #3a3a3a;
  --muted:     #666666;
  --sub:       #999999;
  --body:      #cccccc;
  --white:     #f5f5f5;
  --accent:    #3b82f6;
  --accent-dark:#2563eb;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --radius:    6px;
  --radius-lg: 10px;
  --max-w:     1140px;
  --section-gap: 100px;
}

html { scroll-behavior: smooth; font-size: 16px; }

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

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

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

ul { list-style: none; }

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4 { color: var(--white); line-height: 1.2; font-weight: 600; }

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); letter-spacing: -0.015em; }
h3 { font-size: 1.15rem; font-weight: 600; }

p { color: var(--body); }

.mono { font-family: var(--font-mono); font-size: 0.9em; }
.accent { color: var(--accent); }

/* ── Layout ───────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

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

.section-alt {
  background: var(--near-black);
}

.section-header {
  max-width: 600px;
  margin-bottom: 64px;
}

.section-header h2 { margin: 12px 0 16px; }
.section-header p  { color: var(--sub); font-size: 1.05rem; }

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  padding: 4px 10px;
  border-radius: var(--radius);
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 11px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s;
  white-space: nowrap;
}

.btn-sm { padding: 7px 16px; font-size: 0.85rem; }
.btn-full { width: 100%; justify-content: center; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--white);
}
.btn-ghost:hover { border-color: var(--mid); background: var(--surface); }

/* Nav uses the ghost style inline */
nav .btn-sm {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--white);
}
nav .btn-sm:hover { border-color: var(--accent); color: var(--accent); }

/* ── Navigation ───────────────────────────────────────────── */
.nav-wrapper {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--black) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--white);
}

.logo-mark {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 1rem;
  letter-spacing: -0.05em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links li > a:not(.btn) {
  font-size: 0.9rem;
  color: var(--sub);
  transition: color 0.15s;
}
.nav-links li > a:not(.btn):hover { color: var(--white); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 160px 0 100px;
  overflow: hidden;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.25;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 20%, black 30%, transparent 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 780px;
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.hero-heading {
  margin-bottom: 24px;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--sub);
  max-width: 560px;
  margin-bottom: 40px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ── Stats bar ────────────────────────────────────────────── */
.stats-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--near-black);
  padding: 48px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 32px;
  border-right: 1px solid var(--border);
}
.stat:first-child { padding-left: 0; }
.stat:last-child  { border-right: none; }

.stat-number {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--sub);
}

/* ── Services grid ────────────────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.service-card {
  background: var(--near-black);
  padding: 36px;
  transition: background 0.15s;
}
.service-card:hover { background: var(--surface); }

.service-icon {
  width: 40px;
  height: 40px;
  color: var(--accent);
  margin-bottom: 20px;
}
.service-icon svg { width: 100%; height: 100%; }

.service-card h3 { margin-bottom: 12px; }
.service-card > p { color: var(--sub); font-size: 0.9rem; margin-bottom: 20px; line-height: 1.65; }

.service-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.service-list li {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}
.service-list li::before {
  content: '→ ';
  color: var(--accent);
}

/* ── Process ──────────────────────────────────────────────── */
.process-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.process-step {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 32px;
  padding: 40px 0;
  border-top: 1px solid var(--border);
}
.process-step:last-child { border-bottom: 1px solid var(--border); }

.step-number {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.05em;
  padding-top: 4px;
}

.step-content h3 { margin-bottom: 10px; }
.step-content p  { color: var(--sub); font-size: 0.95rem; max-width: 560px; }

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

.about-text .section-tag { margin-bottom: 20px; }
.about-text h2 { margin-bottom: 20px; }
.about-text p { color: var(--sub); margin-bottom: 16px; font-size: 0.95rem; line-height: 1.7; }

.about-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--sub);
}

.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2px;
}
.about-card-inner {
  padding: 44px;
  border-radius: calc(var(--radius-lg) - 2px);
  border: 1px solid var(--border);
}

.about-quote {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--white);
  font-style: italic;
  margin-bottom: 24px;
}

.about-sig {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}

/* ── Stack grid ───────────────────────────────────────────── */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.stack-item {
  background: var(--near-black);
  padding: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
}
.stack-item:hover {
  background: var(--surface);
  color: var(--white);
}

/* ── Contact ──────────────────────────────────────────────── */
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 80px;
  align-items: start;
}

.contact-text .section-tag { margin-bottom: 20px; }
.contact-text h2 { margin-bottom: 20px; }
.contact-text > p { color: var(--sub); font-size: 0.95rem; line-height: 1.7; margin-bottom: 32px; }

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--sub);
}
.contact-item svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--accent); }
.contact-item a:hover { color: var(--white); }

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--body);
  letter-spacing: 0.01em;
}

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  padding: 11px 14px;
  transition: border-color 0.15s;
  outline: none;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-group select option { background: var(--dark); color: var(--white); }

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

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

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--muted); }

.form-note {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  margin-top: -8px;
}

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  background: var(--near-black);
  padding: 64px 0 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  padding-bottom: 48px;
}

.footer-brand .logo { margin-bottom: 14px; }
.footer-brand p { font-size: 0.9rem; color: var(--muted); line-height: 1.7; }

.footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 16px;
}

.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 0.875rem; color: var(--muted); transition: color 0.15s; }
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
  max-width: var(--max-w);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .stack-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 860px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .stat { border-right: none; padding: 0; }
  .about-inner { grid-template-columns: 1fr; gap: 48px; }
  .contact-inner { grid-template-columns: 1fr; gap: 48px; }
  .footer-inner { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 768px) {
  :root { --section-gap: 72px; }
  .nav-links { display: none; position: fixed; top: 64px; left: 0; right: 0;
    background: var(--near-black); border-bottom: 1px solid var(--border);
    flex-direction: column; gap: 0; padding: 12px 0; }
  .nav-links.open { display: flex; }
  .nav-links li { padding: 0; }
  .nav-links li > a { display: block; padding: 12px 24px; width: 100%; }
  .nav-toggle { display: flex; }
  .services-grid { grid-template-columns: 1fr; }
  .stack-grid { grid-template-columns: repeat(3, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .process-step { grid-template-columns: 60px 1fr; gap: 20px; }
  .footer-links { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 480px) {
  .hero { padding: 120px 0 72px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .stats-grid { grid-template-columns: 1fr; }
  .stack-grid { grid-template-columns: repeat(2, 1fr); }
}
