/* ============================================================
   PIXELS — style.css
   Motion rules: only transform & opacity are animated.
   Everything runs on the compositor → smooth at 60/120Hz.
   ============================================================ */

:root {
  --bg: #0a0a0b;
  --ink: #e8e6e1;
  --ink-dim: #6f6d68;
  --accent: #d9ff4b;
  --hairline: rgba(232, 230, 225, 0.12);
  --font-sans: "Archivo", system-ui, sans-serif;
  --font-mono: "Space Mono", ui-monospace, monospace;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --pad: clamp(1.25rem, 4vw, 4rem);
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--ink-dim) var(--bg);
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  cursor: none;
}

@media (pointer: coarse) {
  body { cursor: auto; }
}

::selection { background: var(--accent); color: var(--bg); }

a { color: inherit; text-decoration: none; }
em { font-style: italic; font-weight: 300; }

/* ---------- Loader ---------- */

.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: var(--pad);
  transition: transform 0.9s var(--ease-expo);
  will-change: transform;
}

.loader.done { transform: translateY(-100%); pointer-events: none; }

.loader__inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.loader__count {
  font-size: clamp(4rem, 14vw, 10rem);
  font-weight: 200;
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.loader__label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: var(--ink-dim);
}

.loader__bar {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  overflow: hidden;
}

.loader__bar span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s linear;
  will-change: transform;
}

/* ---------- Cursor ---------- */

.cursor,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99;
  pointer-events: none;
  border-radius: 50%;
  will-change: transform;
}

.cursor {
  width: 8px;
  height: 8px;
  background: var(--accent);
  margin: -4px 0 0 -4px;
}

.cursor-ring {
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border: 1px solid rgba(217, 255, 75, 0.5);
  transition: opacity 0.3s;
}

.cursor-ring.is-hover { border-color: var(--accent); }

@media (pointer: coarse) {
  .cursor, .cursor-ring { display: none; }
}

/* ---------- Progress ---------- */

.progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  will-change: transform;
}

/* ---------- Canvas & grid ---------- */

#field {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.55;
}

.grid-lines {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: flex;
  justify-content: space-evenly;
  pointer-events: none;
}

.grid-lines span {
  width: 1px;
  background: var(--hairline);
  opacity: 0.35;
}

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--pad);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  mix-blend-mode: difference;
  transition: transform 0.5s var(--ease-out);
  will-change: transform;
}

.nav.is-hidden { transform: translateY(-110%); }

.nav__logo {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.nav__logo sup { font-size: 0.5em; font-weight: 400; }

.nav__links { display: flex; gap: 2.25rem; }

.nav__links a {
  position: relative;
  padding: 0.25rem 0;
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}

.nav__links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav__idx {
  color: var(--ink-dim);
  margin-right: 0.4em;
  font-size: 0.85em;
}

.nav__meta { display: flex; align-items: center; gap: 0.5rem; color: var(--ink-dim); }

.nav__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.3; transform: scale(0.7); }
}

@media (max-width: 720px) {
  .nav__links { display: none; }
}

/* ---------- Layout base ---------- */

main { position: relative; z-index: 1; }

section { padding: clamp(5rem, 12vh, 9rem) var(--pad); }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: clamp(2.5rem, 6vh, 4.5rem);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 1rem;
}

.section-head__idx { color: var(--accent); }
.section-head__label { color: var(--ink-dim); }

/* ---------- Hero ---------- */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 20vh;
  padding-bottom: clamp(2rem, 6vh, 4rem);
}

.hero__meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--ink-dim);
  margin-bottom: clamp(1.5rem, 4vh, 3rem);
}

.hero__title {
  font-size: clamp(3.4rem, 14.5vw, 13.5rem);
  font-weight: 200;
  line-height: 0.92;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.hero__title em { color: var(--accent); font-style: italic; }

.line { display: block; overflow: hidden; }
.line--indent { padding-left: clamp(2rem, 12vw, 14rem); }

.line__inner {
  display: inline-block;
  transform: translateY(110%);
  will-change: transform;
}

body.is-ready .line__inner {
  transform: translateY(0);
  transition: transform 1.2s var(--ease-expo);
}

body.is-ready .hero .line:nth-child(2) .line__inner { transition-delay: 0.1s; }

.hero__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-top: clamp(2.5rem, 7vh, 5rem);
}

.hero__desc {
  max-width: 26rem;
  color: var(--ink-dim);
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  font-weight: 300;
}

.hero__cta {
  position: relative;
  flex-shrink: 0;
  width: 108px;
  height: 108px;
  display: grid;
  place-items: center;
  will-change: transform;
}

.hero__cta-ring {
  position: absolute;
  inset: 0;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  transition: transform 0.5s var(--ease-out);
}

.hero__cta:hover .hero__cta-ring {
  transform: scale(1.12);
  border-color: var(--accent);
}

.hero__cta-text {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-align: center;
  line-height: 1.8;
}

/* ---------- Marquee ---------- */

.marquee {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  overflow: hidden;
  padding: 1.1rem 0;
  position: relative;
  z-index: 1;
  background: var(--bg);
}

.marquee__track {
  display: flex;
  white-space: nowrap;
  will-change: transform;
  font-size: clamp(1.1rem, 2.6vw, 1.8rem);
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
}

/* ---------- Manifesto ---------- */

.manifesto__text {
  font-size: clamp(1.7rem, 4.6vw, 3.6rem);
  font-weight: 250;
  line-height: 1.22;
  letter-spacing: -0.02em;
  max-width: 62rem;
}

.reveal-line { display: block; overflow: hidden; }

.reveal-line span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1s var(--ease-expo);
  will-change: transform;
}

.reveal-line.in-view span { transform: translateY(0); }

.reveal-line:nth-child(2).in-view span { transition-delay: 0.07s; }
.reveal-line:nth-child(3).in-view span { transition-delay: 0.14s; }
.reveal-line:nth-child(4).in-view span { transition-delay: 0.21s; }

.manifesto__stats {
  display: flex;
  gap: clamp(2rem, 8vw, 7rem);
  margin-top: clamp(3rem, 8vh, 6rem);
  flex-wrap: wrap;
}

.stat { display: flex; flex-direction: column; gap: 0.4rem; }

.stat__num {
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  font-weight: 200;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.stat__num::after { content: "+"; color: var(--accent); font-weight: 300; }

.stat__label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  color: var(--ink-dim);
}

/* ---------- Work ---------- */

.work__list { list-style: none; }

.work__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 4vw, 3rem);
  padding: clamp(1.6rem, 4vh, 2.8rem) 0;
  border-bottom: 1px solid var(--hairline);
}

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

.work__num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-dim);
  letter-spacing: 0.15em;
}

.work__body { flex: 1; overflow: hidden; }

.work__name {
  font-size: clamp(1.9rem, 5.5vw, 4.2rem);
  font-weight: 250;
  letter-spacing: -0.03em;
  line-height: 1.05;
  transform: translateX(0);
  transition: transform 0.55s var(--ease-out);
  will-change: transform;
}

.work__item:hover .work__name { transform: translateX(1.2rem); }

.work__tags {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  color: var(--ink-dim);
  margin-top: 0.55rem;
  transform: translateX(0);
  transition: transform 0.55s var(--ease-out) 0.04s;
}

.work__item:hover .work__tags { transform: translateX(1.2rem); }

.work__arrow {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 200;
  opacity: 0;
  transform: translateX(-1rem) rotate(-45deg);
  transition: transform 0.5s var(--ease-out), opacity 0.5s var(--ease-out);
  color: var(--accent);
  will-change: transform, opacity;
}

.work__item:hover .work__arrow { opacity: 1; transform: translateX(0) rotate(0deg); }

/* generated preview disc — no images needed */
.work__disc {
  position: absolute;
  right: clamp(3rem, 10vw, 9rem);
  top: 50%;
  width: clamp(90px, 12vw, 170px);
  height: clamp(90px, 12vw, 170px);
  border-radius: 50%;
  background:
    conic-gradient(from 180deg,
      hsl(var(--hue) 90% 62%),
      hsl(calc(var(--hue) + 60) 80% 20%),
      hsl(var(--hue) 90% 62%));
  opacity: 0;
  transform: translateY(-50%) scale(0.5) rotate(-90deg);
  transition: transform 0.6s var(--ease-expo), opacity 0.4s var(--ease-out);
  pointer-events: none;
  will-change: transform, opacity;
  filter: saturate(1.1);
}

.work__item:hover .work__disc {
  opacity: 1;
  transform: translateY(-50%) scale(1) rotate(0deg);
}

@media (max-width: 720px) {
  .work__disc { display: none; }
}

/* ---------- Capabilities ---------- */

.caps__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
}

.cap {
  background: var(--bg);
  padding: clamp(1.6rem, 3vw, 2.6rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 240px;
}

.cap__idx {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.2em;
}

.cap h3 {
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-top: auto;
}

.cap p {
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--ink-dim);
  max-width: 30ch;
}

/* ---------- Contact ---------- */

.contact { padding-bottom: clamp(3rem, 8vh, 6rem); }

.contact__big {
  display: block;
  font-size: clamp(3.6rem, 15vw, 14rem);
  font-weight: 200;
  line-height: 0.95;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  width: fit-content;
  will-change: transform;
}

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

.reveal-big {
  transform: translateY(110%);
  transition: transform 1.1s var(--ease-expo);
}

.line .reveal-big.in-view { transform: translateY(0); }

.contact__mail {
  margin-top: 2rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--ink-dim);
}

/* ---------- Footer ---------- */

.footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.4rem var(--pad);
  border-top: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: var(--ink-dim);
  flex-wrap: wrap;
}

.footer a { transition: opacity 0.3s; }
.footer a:hover { opacity: 0.6; }

/* ---------- Reveal system ---------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.9s var(--ease-out) calc(var(--i, 0) * 90ms),
    transform 0.9s var(--ease-expo) calc(var(--i, 0) * 90ms);
  will-change: transform, opacity;
}

.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  html { scroll-behavior: auto; }
  .line__inner, .reveal-line span, .reveal, .reveal-big {
    transform: none !important;
    opacity: 1 !important;
  }
  .loader { display: none; }
  body { cursor: auto; }
  .cursor, .cursor-ring { display: none; }
}
