/* ==========================================================================
   KINESIS — a study in motion
   Vanilla CSS. Accent: warm coral #FF4D2E. Base: #0B0B0E.
   All animation runs on transform/opacity only.
   ========================================================================== */

:root {
  --ink: #0B0B0E;
  --ink-2: #121218;
  --ink-3: #1B1B23;
  --paper: #F2EFEA;
  --paper-dim: #A9A6A0;
  --accent: #FF4D2E;
  --line: rgba(242, 239, 234, 0.14);
  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", monospace;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.45, 1);
}

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

html { scroll-behavior: smooth; }

html, body { overflow-x: clip; }

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Technique tags */
.tag { color: var(--paper-dim); }
.tag .tag-no { color: var(--accent); }
.tag.in-section { margin-bottom: 2.5rem; }

/* Color-block fallback behind every image */
.img-block { background: linear-gradient(135deg, var(--ink-3), #2A2230 60%, #3B1F1A); }

.section-title {
  font-weight: 900;
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin-bottom: 3rem;
}

.accent { color: var(--accent); }

/* ==========================================================================
   01 — CURSOR FOLLOWER
   ========================================================================== */

.cursor { display: none; }

@media (pointer: fine) {
  body.has-cursor { cursor: none; }
  body.has-cursor a,
  body.has-cursor button { cursor: none; }

  body.has-cursor .cursor {
    display: block;
    position: fixed;
    top: 0; left: 0;
    z-index: 999;
    pointer-events: none;
  }
  .cursor-dot {
    position: fixed;
    top: -4px; left: -4px;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--accent);
    will-change: transform;
  }
  .cursor-ring {
    position: fixed;
    top: -22px; left: -22px;
    width: 44px; height: 44px;
    border: 1px solid rgba(242, 239, 234, 0.55);
    border-radius: 50%;
    display: grid;
    place-items: center;
    will-change: transform;
    transition: background-color 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
  }
  .cursor-label {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink);
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.2s var(--ease-out), transform 0.2s var(--ease-out);
  }
  .cursor.is-view .cursor-ring {
    background: var(--accent);
    border-color: var(--accent);
  }
  .cursor.is-view .cursor-label { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   HEADER
   ========================================================================== */

.site-head {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem clamp(1.2rem, 4vw, 3rem);
  mix-blend-mode: difference;
}

.brand {
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}
.brand-dot { color: var(--accent); }

.head-tag { color: var(--paper-dim); display: none; }

.head-link {
  color: var(--paper);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}

@media (min-width: 641px) {
  .head-tag { display: block; }
}

/* ==========================================================================
   02 — HERO ENTRANCE
   ========================================================================== */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding: 7rem clamp(1.2rem, 4vw, 3rem) 3rem;
}

.hero-tag {
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s var(--ease-out) 1.5s, transform 0.7s var(--ease-out) 1.5s;
}

.hero-title {
  font-weight: 900;
  font-size: clamp(3.2rem, 11vw, 9.5rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  position: relative;
  z-index: 2;
}

.line {
  display: block;
  overflow: clip;
  clip-path: inset(0 0 -0.15em 0);
}

.line-inner {
  display: inline-block;
  transform: translateY(115%) rotate(2.5deg);
  transform-origin: left top;
  transition: transform 1s var(--ease-out);
}
.line:nth-child(1) .line-inner { transition-delay: 0.25s; }
.line:nth-child(2) .line-inner { transition-delay: 0.42s; }
.line:nth-child(3) .line-inner { transition-delay: 0.59s; }

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

/* Floating orb: drops in after headline, then breathes forever */
.hero-orb {
  position: absolute;
  top: 18%;
  right: clamp(4%, 10vw, 14%);
  width: clamp(120px, 20vw, 280px);
  height: clamp(120px, 20vw, 280px);
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #FF8A6B, var(--accent) 55%, #B32410);
  z-index: 1;
  opacity: 0;
  transform: translateY(-70vh) scale(0.7);
}

body.loaded .hero-orb {
  animation:
    orb-settle 1.3s var(--ease-spring) 0.9s forwards,
    orb-float 7s ease-in-out 2.2s infinite;
}

@keyframes orb-settle {
  0%   { opacity: 0; transform: translateY(-70vh) scale(0.7); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes orb-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-26px) scale(1.03); }
}

.hero-sub {
  max-width: 34rem;
  margin-top: 2.5rem;
  color: var(--paper-dim);
  font-size: 1.05rem;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s var(--ease-out) 1.2s, transform 0.8s var(--ease-out) 1.2s;
}

.hero-foot {
  margin-top: auto;
  padding-top: 3rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--paper-dim);
  opacity: 0;
  transition: opacity 0.8s var(--ease-out) 1.7s;
}

body.loaded .line-inner { transform: translateY(0) rotate(0deg); }
body.loaded .hero-tag,
body.loaded .hero-sub { opacity: 1; transform: translateY(0); }
body.loaded .hero-foot { opacity: 1; }

.hero-note { display: none; }

@media (min-width: 641px) {
  .hero-note { display: block; }
}

/* ==========================================================================
   07 — MARQUEE + VELOCITY
   ========================================================================== */

.marquee-wrap {
  padding: 4rem 0 5rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.marquee-wrap .tag { padding: 0 clamp(1.2rem, 4vw, 3rem); margin-bottom: 1.6rem; }

.marquee { overflow: clip; }

.marquee-track {
  display: flex;
  white-space: nowrap;
  will-change: transform;
  width: max-content;
}

.marquee-chunk {
  font-weight: 900;
  font-size: clamp(2.4rem, 6vw, 5rem);
  letter-spacing: -0.02em;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--paper-dim);
}
.marquee-chunk i { font-style: normal; color: var(--accent); -webkit-text-stroke: 0; }

/* ==========================================================================
   03 — SCROLL-DRIVEN STORY
   ========================================================================== */

.story { height: 260vh; position: relative; }

.story-pin {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5.5rem clamp(1.2rem, 4vw, 3rem) 2rem;
  overflow: clip;
}

.story-panel {
  position: relative;
  width: min(1100px, 100%);
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: clip;
  transform: scale(0.6);
  will-change: transform;
}
.story-panel img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.story-caption {
  position: absolute;
  left: 1rem; bottom: 1rem;
  color: var(--paper);
  background: rgba(11, 11, 14, 0.65);
  padding: 0.45rem 0.7rem;
  border-radius: 3px;
}

.story-text {
  max-width: 46rem;
  margin: 2.5rem auto 0;
  text-align: center;
  font-size: clamp(1.1rem, 2.2vw, 1.55rem);
  font-weight: 800;
  line-height: 1.4;
}
.story-text .w {
  opacity: 0.14;
  transition: opacity 0.35s linear;
}
.story-text .w.on { opacity: 1; }

/* ==========================================================================
   04 — PARALLAX DEPTH
   ========================================================================== */

.parallax {
  position: relative;
  padding: 9rem clamp(1.2rem, 4vw, 3rem) 11rem;
  overflow: clip;
}

.px-layer { will-change: transform; }

.px-back {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.px-shape {
  position: absolute;
  border-radius: 50%;
}
.px-shape-a {
  width: 42vw; height: 42vw;
  max-width: 560px; max-height: 560px;
  right: -10vw; top: 4rem;
  border: 1px solid var(--line);
}
.px-shape-b {
  width: 20vw; height: 20vw;
  max-width: 260px; max-height: 260px;
  left: -6vw; bottom: 6rem;
  background: var(--ink-3);
}

.px-mid { position: relative; z-index: 1; }
.px-figure {
  width: min(640px, 84%);
  margin-left: auto;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  overflow: clip;
}
.px-figure img { width: 100%; height: 100%; object-fit: cover; }

.px-front {
  position: relative;
  z-index: 2;
  margin-top: -3rem;
}
.px-title {
  font-weight: 900;
  font-size: clamp(2.6rem, 7vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
.px-copy {
  max-width: 30rem;
  margin-top: 1.6rem;
  color: var(--paper-dim);
}

@media (min-width: 721px) {
  .px-front { margin-top: -9rem; }
}

/* ==========================================================================
   06 — HOVER-REVEAL GALLERY
   ========================================================================== */

.gallery {
  position: relative;
  padding: 7rem clamp(1.2rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
}

.gallery-list { list-style: none; }

.gallery-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.g-name {
  font-weight: 800;
  font-size: clamp(1.5rem, 4vw, 3rem);
  letter-spacing: -0.02em;
  transition: transform 0.4s var(--ease-out), color 0.4s var(--ease-out);
  display: inline-block;
}
.g-meta { color: var(--paper-dim); flex-shrink: 0; }

.gallery-item:hover .g-name,
.gallery-item:focus-visible .g-name {
  transform: translateX(14px);
  color: var(--accent);
}

.gallery-preview {
  position: fixed;
  top: 0; left: 0;
  width: min(340px, 38vw);
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  overflow: clip;
  pointer-events: none;
  z-index: 40;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
  will-change: transform;
  display: none;
}
@media (pointer: fine) {
  .gallery-preview { display: block; }
}
.gallery-preview.on { opacity: 1; }
.gallery-preview img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.25s var(--ease-out);
}
.gallery-preview img.on { opacity: 1; }

/* ==========================================================================
   08 — STICKY STACKING CARDS
   ========================================================================== */

.stack {
  padding: 7rem clamp(1.2rem, 4vw, 3rem) 9rem;
  border-top: 1px solid var(--line);
}

.stack-cards {
  display: grid;
  gap: 3.5rem;
  max-width: 880px;
  margin: 0 auto;
}

.stack-card {
  position: sticky;
  top: calc(5.5rem + var(--i) * 1.6rem);
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: clamp(1.4rem, 3.5vw, 2.6rem);
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  gap: 1.2rem 2rem;
  min-height: 0;
  will-change: transform;
  transform-origin: center top;
}

.stack-card-head {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  grid-column: 1 / -1;
}
.stack-no {
  color: var(--accent);
  font-size: 1rem;
  border: 1px solid var(--accent);
  border-radius: 50%;
  width: 2.2rem; height: 2.2rem;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}
.stack-card h3 {
  font-weight: 800;
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  letter-spacing: -0.02em;
}
.stack-card p {
  color: var(--paper-dim);
  align-self: start;
}
.stack-fig {
  border-radius: 6px;
  overflow: clip;
  aspect-ratio: auto;
  max-height: 180px;
}
.stack-fig img { width: 100%; height: 180px; object-fit: cover; }

@media (min-width: 721px) {
  .stack-card { grid-template-columns: 1.4fr 1fr; min-height: 340px; }
  .stack-fig { max-height: none; aspect-ratio: 4 / 3; }
  .stack-fig img { height: 100%; }
}

/* ==========================================================================
   05 — MAGNETIC BUTTONS + CONTACT
   ========================================================================== */

.contact {
  padding: 9rem clamp(1.2rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
  text-align: center;
}

.contact-title {
  font-weight: 900;
  font-size: clamp(2.6rem, 8vw, 7rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
.contact-title em {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 2px var(--accent);
}

.contact-copy {
  color: var(--paper-dim);
  margin: 1.8rem 0 3rem;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem;
}

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1.15rem 2.2rem;
  border-radius: 999px;
  will-change: transform;
}
.btn [data-magnetic-inner] { display: inline-block; will-change: transform; }

.btn-solid { background: var(--accent); color: var(--ink); font-weight: 500; }
.btn-ghost { border: 1px solid var(--line); color: var(--paper); }
.btn-ghost:hover { border-color: var(--accent); }

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-foot {
  padding: 2.2rem clamp(1.2rem, 4vw, 3rem) 2.8rem;
  border-top: 1px solid var(--line);
  color: var(--paper-dim);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
}
.foot-index { max-width: 44rem; }

/* ==========================================================================
   REDUCED MOTION — everything static and readable
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  body.has-cursor { cursor: auto; }
  body.has-cursor a, body.has-cursor button { cursor: pointer; }
  .cursor { display: none !important; }

  .line-inner { transform: none; }
  .hero-tag, .hero-sub, .hero-foot { opacity: 1; transform: none; }
  .hero-orb { opacity: 1; transform: none; animation: none !important; }

  .story { height: auto; }
  .story-pin { position: static; height: auto; padding-top: 6rem; }
  .story-panel { transform: none; }
  .story-text .w { opacity: 1; }

  .px-layer { transform: none !important; }

  .marquee-track { transform: none !important; flex-wrap: wrap; white-space: normal; width: auto; padding: 0 clamp(1.2rem, 4vw, 3rem); }
  .marquee-chunk[aria-hidden="true"] { display: none; }
  .marquee-chunk { white-space: normal; }

  .gallery-preview { display: none !important; }
  .gallery-item:hover .g-name { transform: none; }

  .stack-card { transform: none !important; }
  .btn, .btn [data-magnetic-inner] { transform: none !important; }
}
