/* ============================================================
   BYTE VILLE — style.css
   Dark mode, production-ready, no dependencies
   ============================================================ */

/* ── Custom Properties ──────────────────────────────────────── */
:root {
  --bg:           #090909;
  --surface:      #111111;
  --surface-2:    #161616;
  --border:       #1e1e1e;
  --border-2:     #2a2a2a;

  --text:         #efefef;   /* ~16:1 on bg */
  --text-muted:   #a0a0a0;   /* ~7:1 on bg  — subtitles, descriptions */
  --text-soft:    #888888;   /* ~5.1:1 on bg — footer, labels */
  --text-faint:   #444444;   /* decorative only (aria-hidden) */

  --accent:       #ffffff;

  --font:         'Inter', system-ui, -apple-system, sans-serif;

  --radius-sm:    6px;
  --radius:       10px;
  --radius-lg:    16px;
  --radius-pill:  100px;

  --ease:         cubic-bezier(0.22, 1, 0.36, 1);
  --t:            0.2s ease;
  --t-slow:       0.55s var(--ease);

  --nav-h:        68px;
  --max-w:        1080px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

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

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }

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

@media (min-width: 768px) {
  .container { padding: 0 48px; }
}

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3 {
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 700;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: background var(--t), color var(--t), border-color var(--t), transform var(--t), opacity var(--t);
  cursor: pointer;
}

.btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  transition: transform var(--t);
}

.btn:hover svg { transform: translateX(3px); }

.btn-primary {
  background: var(--accent);
  color: #090909;
  font-weight: 600;
}

.btn-primary:hover {
  background: #d6d6d6;
  transform: translateY(-1px);
}

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

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border-2);
  background: var(--surface);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

/* ── Navigation ─────────────────────────────────────────────── */
.nav-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  height: var(--nav-h);
  transition: background var(--t), border-color var(--t), backdrop-filter var(--t);
}

.nav-header.scrolled {
  background: rgba(9, 9, 9, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

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

@media (min-width: 768px) {
  .nav { padding: 0 48px; }
}

/* Logo */
.nav-logo img {
  height: 28px;
  width: auto;
  filter: invert(1);
  opacity: 0.9;
  transition: opacity var(--t);
}

.nav-logo:hover img { opacity: 1; }

/* Nav menu */
.nav-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
}

.nav-menu.open {
  display: flex;
  position: absolute;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: rgba(9, 9, 9, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px 20px;
  animation: navSlideDown 0.2s var(--ease);
}

@keyframes navSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (min-width: 768px) {
  .nav-menu,
  .nav-menu.open {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    position: static;
    background: none;
    border: none;
    padding: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    animation: none;
  }
}

.nav-link {
  display: block;
  padding: 10px 14px;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: color var(--t), background var(--t);
}

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

.nav-cta {
  display: inline-flex;
  align-items: center;
  margin-top: 6px;
  padding: 8px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background var(--t), border-color var(--t), color var(--t);
}

@media (min-width: 768px) {
  .nav-cta { margin-top: 0; margin-left: 8px; }
}

.nav-cta:hover {
  background: var(--surface-2);
  border-color: var(--border-2);
  color: var(--accent);
}

/* Hamburger */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 8px;
  width: 40px;
  height: 40px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--t), opacity var(--t);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

@media (min-width: 768px) {
  .nav-toggle { display: none; }
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 72px) 0 100px;
  overflow: hidden;
}

/* Subtle grid background */
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 75% 65% at 48% 38%, black 10%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 48% 38%, black 10%, transparent 75%);
  pointer-events: none;
}

.hero-content { position: relative; max-width: 740px; }

/* Hero label pill */
.hero-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  margin-bottom: 28px;
}

/* Hero title */
.hero-title {
  font-size: clamp(2.8rem, 7.5vw, 5.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.04;
  margin-bottom: 28px;
}

.hero-title em {
  font-style: normal;
  color: var(--text-muted);
}

/* Hero subtitle */
.hero-subtitle {
  font-size: clamp(1rem, 2.2vw, 1.1875rem);
  color: var(--text-muted);
  line-height: 1.72;
  max-width: 500px;
  margin-bottom: 44px;
}

/* Hero CTAs */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
}

.hero-scroll-line {
  display: block;
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, transparent 0%, var(--text-faint) 100%);
  animation: scrollPulse 2.4s ease infinite;
}

@keyframes scrollPulse {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 0; }
  40%  { transform: scaleY(1); transform-origin: top; opacity: 1; }
  60%  { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* Hero entrance animations */
.hero-anim {
  animation: heroUp var(--t-slow) both;
}
.hero-anim-1 { animation-delay: 0.05s; }
.hero-anim-2 { animation-delay: 0.18s; }
.hero-anim-3 { animation-delay: 0.32s; }
.hero-anim-4 { animation-delay: 0.46s; }

@keyframes heroUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Statement ──────────────────────────────────────────────── */
.statement {
  padding: 72px 0;
  border-top: 1px solid var(--border);
}

.statement-text {
  font-size: clamp(1.05rem, 2.4vw, 1.4rem);
  color: var(--text-muted);
  line-height: 1.72;
  max-width: 800px;
}

.statement-accent {
  display: block;
  margin-top: 16px;
  color: var(--text);
  font-weight: 500;
}

/* ── Section Header ─────────────────────────────────────────── */
.section-header {
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  margin-bottom: 10px;
}

.section-header p {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* ── Services ───────────────────────────────────────────────── */
.services {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  gap: 1px;
  background: var(--border);
}

@media (min-width: 600px) {
  .services-grid { grid-template-columns: 1fr 1fr; }
}

.service-card {
  background: var(--surface);
  padding: 36px 32px;
  transition: background var(--t);
}

.service-card:hover { background: var(--surface-2); }

.service-icon {
  width: 36px;
  height: 36px;
  color: var(--text-faint);
  margin-bottom: 22px;
  transition: color var(--t);
}

.service-card:hover .service-icon { color: var(--text-muted); }

.service-icon svg { width: 100%; height: 100%; }

.service-card h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.68;
}

/* ── Process ────────────────────────────────────────────────── */
.process {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.process-steps {
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

@media (min-width: 768px) {
  .process-steps { grid-template-columns: repeat(3, 1fr); }
}

.process-step {
  padding: 40px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  transition: background var(--t);
}

.process-step:last-child { border-bottom: none; }

@media (min-width: 768px) {
  .process-step {
    border-bottom: none;
    border-right: 1px solid var(--border);
  }
  .process-step:last-child { border-right: none; }
}

.process-step:hover { background: var(--surface-2); }

.step-num {
  display: block;
  font-size: 3rem;
  font-weight: 700;
  color: var(--text-faint);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 20px;
  font-variant-numeric: tabular-nums;
  transition: color var(--t);
}

.process-step:hover .step-num { color: var(--border-2); }

.process-step h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

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

/* ── About ──────────────────────────────────────────────────── */
.about {
  padding: 100px 0;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.about-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

@media (min-width: 768px) {
  .about-layout {
    grid-template-columns: 140px 1fr;
    gap: 72px;
    align-items: start;
  }
}

.about-label {
  padding-top: 6px;
}

.about-label span {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.about-body h2 {
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  margin-bottom: 32px;
}

.about-text p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.78;
  margin-bottom: 18px;
}

.about-text p:last-child { margin-bottom: 0; }

.about-text strong {
  color: var(--text);
  font-weight: 500;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
}

.tag {
  display: inline-block;
  padding: 5px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

/* ── Contact CTA ────────────────────────────────────────────── */
.cta {
  padding: 100px 0 120px;
  border-top: 1px solid var(--border);
}

.cta-content { max-width: 620px; }

.cta-content h2 {
  font-size: clamp(2rem, 5.5vw, 3.75rem);
  margin-bottom: 20px;
}

.cta-content p {
  font-size: 1.0625rem;
  color: var(--text-muted);
  line-height: 1.72;
  margin-bottom: 40px;
}

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

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.footer-logo img {
  height: 22px;
  width: auto;
  filter: invert(1);
  opacity: 0.35;
  transition: opacity var(--t);
}

.footer-logo:hover img { opacity: 0.6; }

.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.footer-meta p {
  font-size: 0.8125rem;
  color: var(--text-soft);
}

.footer-email {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--t);
}

.footer-email:hover { color: var(--text); }

/* ── Scroll Animations ──────────────────────────────────────── */
.js-ready .animate {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

.js-ready .animate.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger for service cards */
.js-ready .services-grid .service-card:nth-child(1) { transition-delay: 0s; }
.js-ready .services-grid .service-card:nth-child(2) { transition-delay: 0.08s; }
.js-ready .services-grid .service-card:nth-child(3) { transition-delay: 0.16s; }
.js-ready .services-grid .service-card:nth-child(4) { transition-delay: 0.24s; }

/* Stagger for process steps */
.js-ready .process-steps .process-step:nth-child(1) { transition-delay: 0s; }
.js-ready .process-steps .process-step:nth-child(2) { transition-delay: 0.1s; }
.js-ready .process-steps .process-step:nth-child(3) { transition-delay: 0.2s; }

/* ── Skip link (WCAG 2.4.1) ─────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -200%;
  left: 16px;
  z-index: 9999;
  padding: 10px 20px;
  background: var(--accent);
  color: #090909;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius);
  white-space: nowrap;
  transition: top 0.15s ease;
}

.skip-link:focus { top: 16px; }

/* ── Accessibility ──────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .js-ready .animate,
  .js-ready .animate.in-view {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ── Selection ──────────────────────────────────────────────── */
::selection {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}
