/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* Colors */
  --bg:          #050507;
  --surface:     #0c0c10;
  --surface-2:   #111117;
  --border:      #191920;
  --border-2:    #23232e;
  --accent:      #f0e6c8;
  --accent-dim:  rgba(240, 230, 200, 0.12);
  --accent-2:    #7c3aed;
  --text:        #e2e2ea;
  --muted:       #6a6a80;
  --muted-2:     #3e3e52;

  /* Typography */
  --font-display: 'Syne', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
  --font-body:    'Inter', sans-serif;

  /* Layout */
  --nav-h: 72px;
  --max-w: 1200px;
  --pad-x: 48px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

/* ============================================================
   UTILITIES
   ============================================================ */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.mono-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

em {
  color: var(--accent);
  font-style: normal;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad-x);
  transition: background 0.4s var(--ease-out), border-color 0.4s;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(5, 5, 7, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-color: var(--border);
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 40px;
}

.nav-links a {
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.03em;
  transition: color 0.2s;
}

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

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-cta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 9px 22px;
  transition: background 0.2s, color 0.2s;
}

.nav-cta:hover {
  background: var(--accent);
  color: var(--bg);
}

/* Burger button */
.burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 200;
  position: relative;
}

.burger-bar {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.35s var(--ease-out), opacity 0.2s, width 0.35s var(--ease-out);
  transform-origin: center;
}

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

/* Full-screen overlay */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: var(--bg);
  display: flex;
  align-items: center;
  padding: 0 var(--pad-x);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}

.menu-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.menu-close {
  position: absolute;
  top: 24px;
  right: var(--pad-x);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  color: var(--muted);
  padding: 8px;
  transition: color 0.2s, transform 0.2s var(--ease-out);
}

.menu-close:hover {
  color: var(--text);
  transform: rotate(90deg);
}

.menu-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 36px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  overflow: hidden;
  transform: translateY(24px);
  opacity: 0;
  transition: transform 0.5s var(--ease-out), opacity 0.5s var(--ease-out), color 0.2s;
}

.menu-item:first-child { border-top: 1px solid var(--border); }

.menu-overlay.open .menu-item {
  transform: translateY(0);
  opacity: 1;
}

.menu-overlay.open .menu-item:nth-child(1) { transition-delay: 0.08s; }
.menu-overlay.open .menu-item:nth-child(2) { transition-delay: 0.16s; }

.menu-item:hover { color: var(--accent); }

.menu-item-num {
  color: var(--muted);
  text-transform: uppercase;
  min-width: 28px;
}

.menu-item-label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 8vw, 5.5rem);
  letter-spacing: -0.02em;
  line-height: 1;
  flex: 1;
}

.menu-item-arrow {
  font-size: 1.5rem;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.2s, transform 0.2s var(--ease-out);
}

.menu-item:hover .menu-item-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ============================================================
   PALETTE SWITCHER (temp preview UI)
   ============================================================ */
.palette-switcher {
  position: absolute;
  bottom: 40px;
  right: var(--pad-x);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.switcher-group {
  display: flex;
  align-items: center;
  gap: 6px;
}


.palette-btn {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-2);
  padding: 7px 14px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.palette-btn:hover  { color: var(--text); border-color: var(--muted); }
.palette-btn.active { color: var(--accent); border-color: var(--accent); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Radial atmosphere */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 55% at 15% 45%, rgba(124, 58, 237, 0.14) 0%, transparent 65%),
    radial-gradient(ellipse 50% 60% at 85% 55%, rgba(0, 229, 255, 0.09) 0%, transparent 65%);
  z-index: 1;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
  width: 100%;
}

/* Terminal tag */
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 36px;
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--accent);
}

.terminal-prompt {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
}

#typewriter {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text);
  letter-spacing: 0.08em;
}

.cursor {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  opacity: 1;
}

.cursor.cursor-blink {
  animation: blink 1.1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Big headline */
.hero-headline {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 13vw, 11rem);
  line-height: 0.88;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.line-solid {
  color: var(--text);
}

.line-outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--accent);
  text-stroke: 1.5px var(--accent);
}

.hero-descriptor {
  color: var(--muted);
  margin-bottom: 52px;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
}

/* Buttons */
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 36px;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  font-weight: 500;
}

.btn-primary:hover { background: #00cce8; }

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

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-lg { padding: 18px 52px; font-size: 0.8rem; }

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--muted-2);
  letter-spacing: 0.15em;
}

.scroll-bar {
  width: 1px;
  height: 52px;
  background: linear-gradient(to bottom, var(--muted-2), transparent);
  animation: scrollPulse 2.4s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.25; }
  50%       { opacity: 0.75; }
}

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee-strip {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 18px 0;
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 36px;
  width: max-content;
  animation: marquee 22s linear infinite;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

.marquee-track .dot { color: var(--accent); }

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============================================================
   SECTION COMMONS
   ============================================================ */
.section { padding: 120px 0; }

.section-label {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--accent);
  margin-bottom: 56px;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.section-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.body-copy {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.82;
  margin-bottom: 18px;
}

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 100px;
  align-items: start;
}

.about-copy .section-heading { margin-bottom: 32px; }

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 52px;
  padding-top: 8px;
  border-left: 1px solid var(--border);
  padding-left: 52px;
}

.stat-number {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  color: var(--text);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  color: var(--muted);
  text-transform: uppercase;
}

/* ============================================================
   SERVICES
   ============================================================ */
.services {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.services .section-heading { margin-bottom: 56px; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border);
  gap: 1px;
  background: var(--border);
}

.service-card {
  background: var(--surface);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: background 0.25s;
}

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

.service-number {
  color: var(--accent);
  text-transform: uppercase;
}

.service-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}

.service-body {
  color: var(--muted);
  line-height: 1.75;
  flex: 1;
  font-size: 0.95rem;
}

.service-cta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s;
}

.service-cta:hover { gap: 10px; }

/* ============================================================
   WORK
   ============================================================ */
.work .section-heading { margin-bottom: 56px; }

.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}

.work-card { cursor: pointer; }

.work-card.wide { grid-column: 1 / -1; }

.work-thumb { overflow: hidden; position: relative; }

.work-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
  position: relative;
}

.work-placeholder::before {
  content: '[image placeholder]';
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--muted-2);
}

.work-card.wide .work-placeholder { aspect-ratio: 16/6; }

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

.work-meta {
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.work-tag {
  color: var(--accent);
  text-transform: uppercase;
}

.work-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
}

/* ============================================================
   CONTACT CTA
   ============================================================ */
.contact-cta { border-top: 1px solid var(--border); }

.cta-block { max-width: 680px; }

.cta-heading {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  margin-top: 20px;
}

.cta-sub {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 48px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 64px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 80px;
  align-items: start;
  margin-bottom: 64px;
}

.footer-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  display: block;
  margin-bottom: 12px;
}

.footer-tagline { color: var(--muted); }

.footer-nav,
.footer-social {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-nav a,
.footer-social a {
  font-size: 0.875rem;
  color: var(--muted);
  transition: color 0.2s;
}

.footer-nav a:hover,
.footer-social a:hover { color: var(--text); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  color: var(--muted-2);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  :root { --pad-x: 28px; }

  .nav-links { display: none; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .about-stats {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--border);
    padding-top: 48px;
    flex-direction: row;
    gap: 40px;
  }

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

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

  .work-card.wide { grid-column: 1; }

  .footer-grid { grid-template-columns: 1fr; gap: 40px; }

  .footer-bottom { flex-direction: column; gap: 8px; }
}

@media (max-width: 540px) {
  :root { --pad-x: 20px; }

  .hero-actions { flex-direction: column; align-items: center; }

  .about-stats { flex-direction: column; }

  .menu-item-label { font-size: clamp(1.2rem, 5.5vw, 2rem); }

  .palette-switcher { bottom: 20px; right: auto; left: 50%; transform: translateX(-50%); }
  .palette-switcher .switcher-group { width: 200px; }
  .palette-switcher .palette-btn { flex: 1; justify-content: center; }

  .burger { width: 44px; height: 44px; }

  .menu-close { top: 20px; padding: 12px; min-width: 44px; min-height: 44px; }
}
