/* ============================================================
   HARETRICK — styles
   Palette: pure white #FFFFFF · pure black #000000 · pink #EB81E0
   Type:    Syne (display) · Manrope (body) · Space Mono (labels)
   ============================================================ */

:root {
  --white: #ffffff;
  --black: #000000;
  --pink: #eb81e0;
  --pink-soft: rgba(235, 129, 224, 0.14);
  --font-display: "Syne", sans-serif;
  --font-body: "Manrope", sans-serif;
  --font-mono: "Space Mono", monospace;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --pad: clamp(1.25rem, 5vw, 5rem);
}

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

img,
svg {
  max-width: 100%;
  height: auto;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--black);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  width: 100%;
}

::selection { background: var(--pink); color: var(--black); }

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

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

.eyebrow { display: block; margin-bottom: 2rem; opacity: 0.7; }
.eyebrow--pink { color: var(--pink); opacity: 1; }
.eyebrow--dim { opacity: 0.4; margin-top: clamp(4rem, 10vw, 8rem); }

/* ============ NAV ============ */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem var(--pad);
  mix-blend-mode: difference;
  color: #fff;
}

.nav__brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.nav__dot { color: var(--pink); }

.nav__links {
  display: flex;
  gap: clamp(1rem, 3vw, 2.5rem);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: lowercase;
}

.nav__links a {
  position: relative;
  padding-bottom: 2px;
}

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

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

/* ============ HERO ============ */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 var(--pad);
  overflow: hidden;
}

.hero__inner { position: relative; z-index: 2; }

.hero__eyebrow { margin-bottom: 1.5rem; opacity: 0.7; }

.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(4rem, 17vw, 15rem);
  line-height: 0.88;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  max-width: 100%;
}

.hero__line { display: block; overflow: hidden; }
.hero__line > span { display: inline-block; }
.hero__line--pink { color: var(--pink); }

.hero__tag {
  margin-top: 2rem;
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 500;
  max-width: 26ch;
}

/* Hare silhouette — parallax layer behind the wordmark */
.hero__hare {
  position: absolute;
  z-index: 1;
  right: 4%;
  top: 9%;
  width: clamp(280px, 34vw, 520px);
  height: auto;
  opacity: 0.82;
  pointer-events: none;
  will-change: transform;
  filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.08));
}

/* Floating pink sparks at different parallax speeds */
.hero__spark {
  position: absolute;
  border-radius: 50%;
  background: var(--pink);
  pointer-events: none;
  will-change: transform;
}
.hero__spark--1 { width: 10px; height: 10px; top: 22%; left: 12%; }
.hero__spark--2 { width: 6px;  height: 6px;  top: 68%; left: 28%; opacity: 0.7; }
.hero__spark--3 { width: 16px; height: 16px; top: 34%; left: 58%; opacity: 0.5; }
.hero__spark--4 { width: 8px;  height: 8px;  top: 78%; left: 74%; }

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: var(--pad);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  opacity: 0.6;
}

.hero__scroll-bar {
  display: block;
  width: 48px;
  height: 1px;
  background: var(--black);
  transform-origin: left;
  animation: scrollPulse 2s var(--ease-out) infinite;
}

@keyframes scrollPulse {
  0%   { transform: scaleX(0); }
  50%  { transform: scaleX(1); }
  100% { transform: scaleX(0); transform-origin: right; }
}

/* Hero load-in choreography */
[data-load] { opacity: 0; }

body.is-loaded [data-load] {
  animation: loadFade 0.9s var(--ease-out) forwards;
}
body.is-loaded [data-load="1"] { animation-delay: 0.1s; }
body.is-loaded [data-load="2"] { animation-delay: 0.2s; }
body.is-loaded [data-load="3"] { animation-delay: 0.32s; }
body.is-loaded [data-load="4"] { animation-delay: 0.55s; }
body.is-loaded [data-load="5"] { animation-delay: 0.8s; }

body.is-loaded .hero__line > span {
  transform: translateY(110%);
  animation: lineRise 1s var(--ease-out) forwards;
}
body.is-loaded .hero__line:nth-child(1) > span { animation-delay: 0.2s; }
body.is-loaded .hero__line:nth-child(2) > span { animation-delay: 0.32s; }

@keyframes loadFade {
  to { opacity: 1; }
}
@keyframes lineRise {
  to { transform: translateY(0); }
}

/* ============ MARQUEE ============ */

.marquee {
  background: var(--pink);
  color: var(--black);
  overflow: hidden;
  padding: 0.9rem 0;
  border-top: 1px solid var(--black);
  border-bottom: 1px solid var(--black);
}

.marquee__track {
  display: flex;
  width: max-content;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  animation: marquee 22s linear infinite;
}

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

/* ============ ABOUT (black act) ============ */

.about {
  background: var(--black);
  color: var(--white);
  padding: clamp(6rem, 14vw, 12rem) var(--pad);
}

.about__inner { max-width: 1100px; margin: 0 auto; }

.about__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  line-height: 1.02;
  text-transform: uppercase;
  margin-bottom: 3rem;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  text-wrap: balance;
}

.about__title em {
  font-style: normal;
  color: var(--pink);
}

.about__body {
  display: grid;
  gap: 1.5rem;
  max-width: 56ch;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  opacity: 0.85;
  margin-bottom: 4rem;
}

.about__list {
  list-style: none;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.about__list li {
  display: flex;
  gap: 2rem;
  align-items: baseline;
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  font-weight: 500;
}

.about__list .mono {
  color: var(--pink);
  min-width: 5.5rem;
}

/* ============ WORK (white act) ============ */

.work {
  background: var(--white);
  padding: clamp(6rem, 14vw, 12rem) var(--pad);
}

.work__inner { max-width: 1100px; margin: 0 auto; }

.project--featured {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: stretch;
  border: 1px solid var(--black);
  padding: clamp(1.5rem, 4vw, 3.5rem);
  transition: background 0.4s var(--ease-out), color 0.4s var(--ease-out);
}

.project--featured > * {
  min-width: 0;
}

.project--featured:hover,
.project--featured:focus-visible {
  background: var(--black);
  color: var(--white);
}

.project__tag {
  display: inline-block;
  border: 1px solid var(--pink);
  color: var(--pink);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}

.project__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.7rem, 4.2vw, 3.25rem);
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 1.25rem;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  text-wrap: balance;
}

.project__desc {
  max-width: 44ch;
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  opacity: 0.85;
  margin-bottom: 2rem;
}

.project__cta { color: var(--pink); }

.project__visual {
  display: grid;
  place-items: center;
  background: var(--pink-soft);
  border: 1px dashed var(--pink);
  min-height: 220px;
  will-change: transform;
}

.project__glyph {
  font-size: clamp(3rem, 8vw, 6rem);
  color: var(--pink);
}

/* In the lab */
.lab {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--black);
  border: 1px solid var(--black);
}

.lab__item {
  background: var(--white);
  padding: 2rem 1.75rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.lab__item h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  text-transform: uppercase;
}

.lab__item p {
  font-size: 0.95rem;
  opacity: 0.75;
  flex: 1;
}

.lab__soon { color: var(--pink); }

/* ============ CONTACT (black act) ============ */

.contact {
  background: var(--black);
  color: var(--white);
  padding: clamp(6rem, 14vw, 12rem) var(--pad) 0;
  display: flex;
  flex-direction: column;
}

.contact__inner {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  padding-bottom: clamp(5rem, 12vw, 10rem);
}

.contact__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.75rem, 8vw, 6.5rem);
  line-height: 1.02;
  text-transform: uppercase;
  margin-bottom: 3rem;
}

.contact__title em { font-style: normal; color: var(--pink); }

.contact__mail {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.5vw, 1.6rem);
  border-bottom: 2px solid var(--pink);
  padding-bottom: 0.25rem;
  transition: color 0.3s var(--ease-out);
  overflow-wrap: anywhere;
}

.contact__mail:hover,
.contact__mail:focus-visible { color: var(--pink); }

.footer {
  display: flex;
  justify-content: space-between;
  padding: 1.5rem var(--pad);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  opacity: 0.6;
  margin: 0 calc(-1 * var(--pad));
  max-width: 100%;
}

/* ============ MAGIC WAND ============ */

.magic-wand {
  position: fixed;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  z-index: 40;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-120px, -120px, 0);
  transition: opacity 0.25s var(--ease-out);
}

.magic-wand.is-visible { opacity: 1; }

.magic-wand__icon {
  display: block;
  color: var(--pink);
  font-size: 1rem;
  line-height: 1;
  text-shadow:
    0 0 8px rgba(235, 129, 224, 0.9),
    0 0 18px rgba(235, 129, 224, 0.5);
}

body.has-magic-cursor,
body.has-magic-cursor a,
body.has-magic-cursor button,
body.has-magic-cursor input,
body.has-magic-cursor textarea,
body.has-magic-cursor select {
  cursor: none;
}

.wand-star {
  position: fixed;
  left: 0;
  top: 0;
  width: 8px;
  height: 8px;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 39;
  color: var(--pink);
  font-size: 0.55rem;
  line-height: 1;
  opacity: 0.95;
  transform: translate3d(-999px, -999px, 0);
  animation: wandStarPop 650ms var(--ease-out) forwards;
}

.wand-star::before { content: "✦"; }

@keyframes wandStarPop {
  0% {
    opacity: 0;
    transform: translate3d(var(--x), var(--y), 0) scale(0.3) rotate(0deg);
  }
  20% { opacity: 1; }
  100% {
    opacity: 0;
    transform: translate3d(calc(var(--x) + var(--dx)), calc(var(--y) + var(--dy)), 0) scale(1.35) rotate(85deg);
  }
}

/* ============ SCROLL REVEALS ============ */

[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.9s var(--ease-out),
    transform 0.9s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
}

[data-reveal].in {
  opacity: 1;
  transform: translateY(0);
}

/* ============ FOCUS & MOTION ============ */

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-load], .hero__line > span, [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
  .marquee__track, .hero__scroll-bar { animation: none !important; }
  [data-parallax] { transform: none !important; }
  .magic-wand, .wand-star { display: none !important; }
  body.has-magic-cursor,
  body.has-magic-cursor a,
  body.has-magic-cursor button,
  body.has-magic-cursor input,
  body.has-magic-cursor textarea,
  body.has-magic-cursor select {
    cursor: auto;
  }
}

@media (pointer: coarse) {
  .magic-wand,
  .wand-star { display: none !important; }

  body.has-magic-cursor,
  body.has-magic-cursor a,
  body.has-magic-cursor button,
  body.has-magic-cursor input,
  body.has-magic-cursor textarea,
  body.has-magic-cursor select {
    cursor: auto;
  }
}

/* ============ RESPONSIVE ============ */

@media (max-width: 820px) {
  .hero,
  .about,
  .work,
  .contact,
  .marquee {
    overflow-x: hidden;
  }
  .hero__inner { max-width: 94vw; }
  .nav {
    padding: 0.9rem var(--pad);
    align-items: flex-start;
  }
  .nav__links {
    gap: 0.9rem;
    font-size: 0.68rem;
  }
  .hero__title {
    font-size: clamp(2.5rem, 15vw, 4.3rem);
    line-height: 0.92;
  }
  .hero__tag { max-width: 100%; }
  .hero__eyebrow { max-width: 26ch; }
  .project--featured {
    grid-template-columns: 1fr;
    padding: 1.2rem;
  }
  .project__name {
    font-size: clamp(1.1rem, 7.2vw, 1.8rem);
    line-height: 0.98;
  }
  .project__desc {
    font-size: clamp(0.95rem, 4.5vw, 1.1rem);
  }
  .project__visual { min-height: 160px; }
  .lab { grid-template-columns: 1fr; }
  .hero__hare { right: -10%; top: 17%; width: clamp(200px, 62vw, 320px); opacity: 0.62; }
  .about__list li {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }
  .about__list .mono { min-width: 0; }
  .footer {
    margin: 0;
    padding-inline: var(--pad);
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
}

@media (max-width: 560px) {
  .nav {
    padding-top: 1rem;
  }
  .nav__links {
    gap: 0.7rem;
    font-size: 0.64rem;
  }
  .hero__inner { max-width: 92vw; }
  .about__title {
    font-size: clamp(1.5rem, 8.8vw, 2.2rem);
    line-height: 1.02;
    letter-spacing: -0.015em;
    max-width: 11ch;
  }
  .hero__scroll { display: none; }
  .hero { min-height: 92svh; }
  .hero__hare {
    right: -14%;
    top: 20%;
    width: clamp(180px, 60vw, 270px);
    opacity: 0.54;
  }
}

@media (max-width: 420px) {
  .about__title {
    font-size: clamp(1.35rem, 8.2vw, 1.85rem);
    line-height: 1.04;
    max-width: 10.5ch;
  }
}
