:root {
  --bg: #050505;
  --text: #EDEDE8;
  --text-dim: #78786F;
  --border: rgba(255,255,255,0.09);
  --gkx: #3E6FF2;
  --adc: #E8621F;
  --lamp-yellow: #F4C430;
  --font-display: 'Archivo', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

html { background: var(--bg); scroll-behavior: smooth; }

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

body.loading { overflow: hidden; height: 100vh; }

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

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 40px; }

/* ============ Loader ============ */
.loader {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  transition: transform 0.9s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.7s ease;
}
.loader.loader-hide {
  transform: translateY(-100%);
}

.loader-wordmark {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(32px, 6vw, 64px);
  letter-spacing: -1px;
  text-transform: lowercase;
}
.lw-row { display: flex; }
.lw-letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(28px) rotate(4deg);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.lw-letter.revealed { opacity: 1; transform: translateY(0) rotate(0); }

.loader-count {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 2px;
  color: var(--text-dim);
}
.loader-count::after { content: '%'; }

/* ============ Custom cursor ============ */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text);
  pointer-events: none;
  z-index: 400;
  will-change: transform;
  transition: width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), height 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cursor-text {
  opacity: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--bg);
  white-space: nowrap;
  transition: opacity 0.25s ease;
}
.cursor.cursor-active {
  width: 72px;
  height: 72px;
  background: var(--text);
}
.cursor.cursor-active .cursor-text { opacity: 1; }

/* Hide native cursor + custom cursor visibility only on fine-pointer devices (handled via JS toggling this class) */
body.has-custom-cursor, body.has-custom-cursor a, body.has-custom-cursor button {
  cursor: none;
}

/* ============ Chapter rail (persistent vertical nav, desktop only) ============ */
.chapter-rail {
  position: fixed;
  top: 50%;
  right: 32px;
  transform: translateY(-50%);
  z-index: 190;
  display: flex;
  flex-direction: column;
  gap: 20px;
  mix-blend-mode: difference;
}
.chapter-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  justify-content: flex-end;
}
.chapter-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  transition: color 0.3s ease;
}
.chapter-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.3px;
  color: rgba(255,255,255,0.4);
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  transition: max-width 0.35s ease, opacity 0.3s ease, color 0.3s ease;
}
.chapter-item:hover .chapter-label,
.chapter-item.active .chapter-label {
  max-width: 100px;
  opacity: 1;
}
.chapter-item.active .chapter-num,
.chapter-item.active .chapter-label,
.chapter-item:hover .chapter-num {
  color: #fff;
}
.magnetic {
  will-change: transform;
}

/* ============ Nav ============ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 40px;
  mix-blend-mode: difference;
}
.nav-word {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.2px;
  text-transform: lowercase;
  color: #fff;
}
.nav-mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  object-fit: cover;
}
.nav-toggle {
  width: 32px;
  height: 20px;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: #fff;
  transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.3s ease, top 0.4s ease;
}
.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 18px; }
.menu-open .nav-toggle span:nth-child(1) { top: 9px; transform: rotate(45deg); }
.menu-open .nav-toggle span:nth-child(2) { top: 9px; transform: rotate(-45deg); }

/* ============ Full-screen menu overlay ============ */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  visibility: hidden;
  clip-path: circle(0% at calc(100% - 56px) 44px);
  transition: clip-path 0.7s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.4s ease, visibility 0s linear 0.7s;
}
.menu-open .menu-overlay {
  opacity: 1;
  visibility: visible;
  clip-path: circle(150% at calc(100% - 56px) 44px);
  transition: clip-path 0.7s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.4s ease, visibility 0s linear 0s;
}
.menu-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.menu-link {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 9vw, 96px);
  letter-spacing: -2px;
  color: var(--text-dim);
  padding: 8px 0;
  transition: color 0.3s ease, padding-left 0.3s ease;
  display: flex;
  align-items: baseline;
  gap: 20px;
}
.menu-link::before {
  content: attr(data-index);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--text-dim);
}
.menu-link:hover { color: var(--text); padding-left: 12px; }
.menu-footer {
  position: absolute;
  bottom: 40px;
  left: 40px;
  right: 40px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-dim);
}

/* ============ Site-wide layering ============ */
main { position: relative; z-index: 1; }

/* Slow ambient color drift: shifts between GKX blue and ADC orange as you
   scroll past those sections. Color is set via --drift-color from JS;
   position drifts continuously and independently via CSS animation. */
.gradient-drift {
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  --drift-color: rgba(120, 120, 120, 0.5);
  background: radial-gradient(circle, var(--drift-color), transparent 55%);
  opacity: 0.5;
  filter: blur(10px);
  animation: driftPosition 46s ease-in-out infinite alternate;
}
@keyframes driftPosition {
  0%   { transform: translate(0%, 0%) scale(1); }
  50%  { transform: translate(6%, 8%) scale(1.15); }
  100% { transform: translate(-5%, 4%) scale(1); }
}

/* Drifting particles: fixed full-viewport canvas, opacity driven by scroll
   position (see main.js) so it crossfades in as the gradient-drift glow
   fades out once the user scrolls past the Work section. */
.particles-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
}

/* Per-section parallax grid layers: same base grid pattern, each section's
   copy drifts at its own depth via JS based on cursor position. */
.parallax-grid {
  position: absolute;
  inset: -80px;
  z-index: 0;
  opacity: 0.3;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  will-change: transform;
}

/* ============ Grain texture overlay ============ */
.grain-svg {
  position: fixed;
  inset: -10%;
  z-index: 300;
  width: 120%;
  height: 120%;
  opacity: 0.09;
  pointer-events: none;
  mix-blend-mode: overlay;
  animation: grainFlicker 0.4s steps(2) infinite;
}
@keyframes grainFlicker {
  0%   { transform: translate(0, 0); }
  50%  { transform: translate(-2%, 1%); }
  100% { transform: translate(1%, -2%); }
}

/* ============ Hero ============ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 40px 80px;
  position: relative;
  overflow: hidden;
}
.hero-inner { max-width: 980px; position: relative; z-index: 1; }
.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(32px, 5.4vw, 66px);
  line-height: 1.12;
  letter-spacing: -1.2px;
}
.hero-line2 {
  color: var(--lamp-yellow);
  text-shadow: 0 0 22px rgba(244,196,48,0.5), 0 0 50px rgba(244,196,48,0.22);
}

.lamp-text {
  opacity: 0;
  text-shadow: 0 0 26px rgba(237,237,232,0.22), 0 0 54px rgba(237,237,232,0.09);
  transition: opacity 1.1s ease;
}
.lamp-text.lit { opacity: 1; }

.hero-sub {
  margin-top: 32px;
  max-width: 520px;
  font-size: 17px;
  color: var(--text-dim);
  line-height: 1.75;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  margin-top: 40px;
  padding: 16px 32px;
  background: var(--text);
  color: var(--bg);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  border-radius: 100px;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.hero-cta:hover { transform: translateY(-2px) scale(1.03); }

.reveal-mask { overflow: hidden; }
.reveal-mask span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-mask.in-view span { transform: translateY(0); }

.reveal-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-up.in-view { opacity: 1; transform: translateY(0); }
.hero .reveal-up { transition-delay: 1s; }

.scroll-cue {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--text-dim);
  transition: color 0.3s ease;
}
.scroll-cue:hover { color: var(--text); }
.scroll-cue-label { display: flex; gap: 2px; }
.scroll-chevron {
  font-size: 16px;
  animation: scrollBounce 1.8s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 0.45; }
  50% { transform: translateY(8px); opacity: 1; }
}

/* ============ Work section: full-bleed, wordmark dissolves into view ============ */
.work { border-top: 1px solid var(--border); }
.work-item {
  display: flex;
  align-items: center;
  gap: 64px;
  min-height: 100vh;
  padding: 80px 40px;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.work-mark {
  flex: 0 0 auto;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(90px, 18vw, 260px);
  line-height: 1;
  letter-spacing: -4px;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.work-mark::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 130%;
  height: 130%;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0.16;
  transform: translate(-50%, -50%);
  animation: spinSlow 40s linear infinite;
  pointer-events: none;
}
@keyframes spinSlow {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}
.work-item[data-accent="gkx"] .work-mark { color: var(--gkx); }
.work-item[data-accent="adc"] .work-mark { color: var(--adc); }
.work-item:hover .work-mark { transform: scale(1.04); }

.work-details { flex: 1; max-width: 460px; position: relative; z-index: 1; }

.work-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.work-details h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.2;
  margin-bottom: 18px;
}
.work-details p {
  color: var(--text-dim);
  font-size: 15.5px;
  line-height: 1.7;
  margin-bottom: 26px;
}
.work-link {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
}
.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  list-style: none;
}
.work-tags li {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-dim);
}

/* ============ Services ============ */
.services {
  padding: 160px 40px;
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.services-inner { max-width: 860px; margin: 0 auto; position: relative; z-index: 1; }
.services h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.6vw, 44px);
  margin-bottom: 56px;
  text-align: center;
}
.price-flat {
  text-align: center;
  padding: 48px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
}
.price-flat::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 520px;
  height: 520px;
  max-width: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(237,237,232,0.16), transparent 68%);
  transform: translate(-50%, -50%);
  animation: pulseGlow 4s ease-in-out infinite;
  pointer-events: none;
}
.price-amount {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(56px, 9vw, 110px);
  letter-spacing: -2px;
  line-height: 1;
  position: relative;
}
@keyframes pulseGlow {
  0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
}
.price-label {
  margin-top: 12px;
  font-size: 15px;
  color: var(--text-dim);
}
.services-addons { margin-top: 32px; text-align: center; font-size: 14px; color: var(--text-dim); }

/* ============ Process ============ */
.process {
  padding: 160px 40px;
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.process-inner { max-width: 860px; margin: 0 auto; position: relative; z-index: 1; }
.process h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.6vw, 44px);
  margin-bottom: 56px;
  text-align: center;
}
.process-steps { position: relative; padding-left: 22px; }
.process-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 0%;
  background: var(--text);
  transition: height 1.8s cubic-bezier(0.65, 0, 0.35, 1);
}
.process-line.drawn { height: 100%; }
.process-step {
  display: flex;
  gap: 32px;
  padding: 32px 0;
  border-top: 1px solid var(--border);
  position: relative;
}
.process-step:last-child { border-bottom: 1px solid var(--border); }
.step-num { font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--text-dim); flex: 0 0 40px; }
.step-content h3 { font-family: var(--font-display); font-weight: 700; font-size: 20px; margin-bottom: 8px; }
.step-content p { font-size: 14.5px; color: var(--text-dim); line-height: 1.6; max-width: 500px; }

/* ============ About ============ */
.about {
  padding: 160px 40px;
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.about-inner { max-width: 640px; margin: 0 auto; text-align: center; position: relative; z-index: 1; }
.about h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.6vw, 44px);
  margin-bottom: 32px;
}
.about p { color: var(--text-dim); font-size: 16.5px; line-height: 1.8; margin-bottom: 16px; }

/* ============ Testimonial (placeholder until a real one exists) ============ */
.testimonial {
  padding: 100px 40px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.testimonial-inner { max-width: 640px; text-align: center; position: relative; z-index: 1; }
.testimonial-quote {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 20px;
  font-style: italic;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 16px;
}
.testimonial-attribution { font-size: 13px; color: var(--text-dim); }

/* ============ Contact ============ */
.contact {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 40px 40px;
  position: relative;
  overflow: hidden;
}
.contact-inner { position: relative; z-index: 1; }
.contact h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(32px, 5vw, 58px);
  letter-spacing: -1px;
  margin-bottom: 28px;
}
.contact-link {
  display: block;
  width: fit-content;
  margin: 0 auto;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
}
.contact-phone {
  margin-top: 20px;
  font-size: 15px;
  color: var(--text-dim);
}
.footer-bottom {
  position: absolute;
  bottom: 32px;
  left: 40px;
  right: 40px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-dim);
  text-transform: lowercase;
}

/* ============ Responsive ============ */
@media (max-width: 1100px) {
  .chapter-rail { right: 18px; gap: 16px; }
  .chapter-label { display: none; }
  .chapter-item { padding: 4px; }
  .chapter-num { font-size: 12px; }
}

@media (max-width: 860px) {
  .work-item { flex-direction: column; align-items: flex-start; gap: 32px; padding: 100px 24px; min-height: auto; }
  .work-mark { font-size: 22vw; }
  .hero { padding: 100px 24px 60px; }
  .wrap, .nav, .menu-overlay, .menu-footer, .scroll-cue, .work, .services, .process, .about, .testimonial, .contact, .footer-bottom { padding-left: 24px; padding-right: 24px; }
  .nav { padding-top: 22px; padding-bottom: 22px; }
  .process-step { flex-direction: column; gap: 8px; }
}

@media (hover: none) and (pointer: coarse) {
  .cursor { display: none; }
  .work-link {
    display: inline-block;
    border: 1px solid rgba(237,237,232,0.28);
    border-radius: 100px;
    padding: 8px 18px;
    border-bottom: 1px solid rgba(237,237,232,0.28);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .reveal-mask span, .reveal-up { transform: none !important; opacity: 1 !important; }
}
