/* ---------- Base ---------- */
:root {
  --bg: #0a0a0d;
  --bg-alt: #101014;
  --ink: #f3f2ee;
  --ink-dim: #a7a6a1;
  --accent: #ff5a1f;
  --accent-2: #4de1c1;
  --line: rgba(243,242,238,0.12);
  --container: 1200px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
  cursor: default;
}

h1, h2, h3, .logo { font-family: 'Space Grotesk', sans-serif; }

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

ul { list-style: none; }

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

::selection { background: var(--accent); color: #0a0a0d; }

.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  z-index: 999;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease, opacity 0.3s ease, width 0.2s, height 0.2s;
  opacity: 0;
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .cursor-dot { display: block; opacity: 0.8; }
}

/* ---------- Nav ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 22px 0;
  transition: background 0.4s ease, padding 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  background: rgba(10,10,13,0.85);
  backdrop-filter: blur(10px);
  padding: 14px 0;
  border-color: var(--line);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.logo-accent { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  font-size: 14px;
  color: var(--ink-dim);
}

.nav-links a { transition: color 0.25s ease; }
.nav-links a:hover { color: var(--ink); }

.nav-cta {
  color: var(--ink) !important;
  border: 1px solid var(--line);
  padding: 8px 18px;
  border-radius: 999px;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.nav-cta:hover { border-color: var(--accent); background: rgba(255,90,31,0.08); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 120px 32px 60px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.grid-floor {
  position: absolute;
  bottom: -10%;
  left: -20%;
  right: -20%;
  height: 70%;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  transform: perspective(600px) rotateX(65deg);
  mask-image: linear-gradient(to top, black, transparent 85%);
  -webkit-mask-image: linear-gradient(to top, black, transparent 85%);
  opacity: 0.6;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
}
.glow-1 {
  width: 500px; height: 500px;
  background: var(--accent);
  top: -10%; left: -10%;
}
.glow-2 {
  width: 400px; height: 400px;
  background: var(--accent-2);
  bottom: 0%; right: -5%;
  opacity: 0.2;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
  text-align: center;
}

.eyebrow {
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(48px, 8vw, 96px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.hero-title .line { display: block; overflow: hidden; }
.hero-title em { color: var(--accent); font-style: normal; }

.hero-sub {
  margin: 28px auto 0;
  max-width: 520px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-dim);
}

.hero-actions {
  margin-top: 40px;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 30px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--accent);
  color: #0a0a0d;
}
.btn-primary:hover { background: #ff7440; }

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--ink-dim); }

/* Floating shapes */
.float-shape {
  position: absolute;
  z-index: 1;
  will-change: transform;
}

.shape-cube {
  top: 22%;
  left: 10%;
  width: 90px;
  height: 90px;
  perspective: 800px;
}

.cube {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: spinCube 14s linear infinite;
}

.face {
  position: absolute;
  width: 90px;
  height: 90px;
  border: 1px solid rgba(255,90,31,0.6);
  background: rgba(255,90,31,0.06);
  backdrop-filter: blur(2px);
}
.front  { transform: translateZ(45px); }
.back   { transform: translateZ(-45px) rotateY(180deg); }
.right  { transform: rotateY(90deg) translateZ(45px); }
.left   { transform: rotateY(-90deg) translateZ(45px); }
.top    { transform: rotateX(90deg) translateZ(45px); }
.bottom { transform: rotateX(-90deg) translateZ(45px); }

@keyframes spinCube {
  from { transform: rotateX(0deg) rotateY(0deg); }
  to   { transform: rotateX(360deg) rotateY(360deg); }
}

.shape-gear {
  top: 62%;
  right: 12%;
  width: 70px;
  height: 70px;
  color: var(--accent-2);
  opacity: 0.5;
  animation: floatY 7s ease-in-out infinite, spinSlow 20s linear infinite;
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.shape-sphere {
  top: 15%;
  right: 20%;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--accent-2) 60%, transparent 100%);
  opacity: 0.6;
  animation: floatY 5.5s ease-in-out infinite;
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-24px); }
}

.scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.scroll-line {
  width: 1px;
  height: 50px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}

.scroll-dot {
  position: absolute;
  top: -20%;
  left: 0;
  width: 100%;
  height: 30%;
  background: var(--accent);
  animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
  0% { top: -30%; }
  60% { top: 100%; }
  100% { top: 100%; }
}

/* ---------- Marquee ---------- */
.marquee-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 18px 0;
  background: var(--bg-alt);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 22s linear infinite;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  letter-spacing: 0.05em;
  color: var(--ink-dim);
  white-space: nowrap;
}

.marquee-group {
  display: flex;
  flex-shrink: 0;
}

.marquee-group span {
  padding-right: 8px;
}

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

/* ---------- Sections ---------- */
.section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 140px 32px;
}

.section-head {
  max-width: 640px;
  margin-bottom: 70px;
}

.tag {
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.section-head h2, .contact h2 {
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

/* ---------- Services ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  background: var(--line);
  border: 1px solid var(--line);
}

.service-card {
  background: var(--bg);
  padding: 48px;
  transition: background 0.4s ease;
}
.service-card:hover { background: var(--bg-alt); }

.service-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  color: var(--accent-2);
  margin-bottom: 24px;
}

.service-card h3 {
  font-size: 26px;
  font-weight: 500;
  margin-bottom: 16px;
}

.service-card p {
  color: var(--ink-dim);
  line-height: 1.7;
  margin-bottom: 24px;
}

.service-list li {
  position: relative;
  padding-left: 20px;
  color: var(--ink-dim);
  font-size: 14px;
  line-height: 2;
}
.service-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

/* ---------- Work / Projects ---------- */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 100px;
}

.project-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.project-row.reverse .project-visual { order: 2; }
.project-row.reverse .project-info { order: 1; }

.project-visual {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 24px;
  overflow: hidden;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-visual-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16,1,0.3,1);
}

.project-visual-img:hover img {
  transform: scale(1.08);
}

.project-index {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  color: var(--accent-2);
}

.project-info h3 {
  font-size: 30px;
  font-weight: 500;
  margin: 14px 0 16px;
  letter-spacing: -0.01em;
}

.project-info p {
  color: var(--ink-dim);
  line-height: 1.7;
  margin-bottom: 20px;
  max-width: 420px;
}

.project-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.project-tags span {
  font-size: 12px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-dim);
}

/* ---------- Process / Timeline ---------- */
.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}

.timeline-line {
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--line);
  z-index: 0;
}

.timeline-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.2s ease-out;
}

.timeline-step {
  position: relative;
  z-index: 1;
  padding-top: 60px;
}

.step-marker {
  position: absolute;
  top: 0;
  left: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  transition: border-color 0.4s ease, color 0.4s ease, background 0.4s ease;
}

.timeline-step.in-view .step-marker {
  border-color: var(--accent);
  background: var(--accent);
  color: #0a0a0d;
}

.timeline-step h3 {
  font-size: 19px;
  font-weight: 500;
  margin-bottom: 10px;
}

.timeline-step p {
  color: var(--ink-dim);
  font-size: 14.5px;
  line-height: 1.65;
}

/* ---------- Contact ---------- */
.contact {
  text-align: center;
  padding-bottom: 180px;
}

.contact-inner {
  max-width: 640px;
  margin: 0 auto;
}

.contact-sub {
  margin: 20px 0 40px;
  color: var(--ink-dim);
  font-size: 17px;
}

.email-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(22px, 4vw, 34px);
  font-weight: 500;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--line);
  transition: border-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.email-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.email-arrow {
  width: 22px;
  height: 22px;
  transition: transform 0.3s ease;
}
.email-link:hover .email-arrow { transform: translate(3px, -3px); }

/* ---------- Footer ---------- */
.footer {
  display: flex;
  justify-content: space-between;
  padding: 28px 32px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-dim);
  max-width: var(--container);
  margin: 0 auto;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1), transform 0.8s cubic-bezier(0.16,1,0.3,1);
  transition-delay: calc(var(--i, 0) * 0.08s);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-links { gap: 20px; font-size: 13px; }
  .nav-links li:not(:last-child) { display: none; }

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

  .project-row, .project-row.reverse {
    grid-template-columns: 1fr;
  }
  .project-row.reverse .project-visual,
  .project-row.reverse .project-info { order: 0; }

  .timeline { grid-template-columns: 1fr; gap: 50px; }
  .timeline-line { display: none; }

  .shape-cube { left: 4%; width: 60px; height: 60px; }
  .shape-cube .face { width: 60px; height: 60px; }
  .front  { transform: translateZ(30px); }
  .back   { transform: translateZ(-30px) rotateY(180deg); }
  .right  { transform: rotateY(90deg) translateZ(30px); }
  .left   { transform: rotateY(-90deg) translateZ(30px); }
  .top    { transform: rotateX(90deg) translateZ(30px); }
  .bottom { transform: rotateX(-90deg) translateZ(30px); }

  .shape-gear { right: 6%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
