/* ============================================================
   MATHIS CAT — ART DIRECTOR / PARIS
   System: #260491 purple · #FFFFFF · #000000 only. No gradients.
   ============================================================ */

:root {
  --purple: #260491;
  --white: #ffffff;
  --black: #000000;
  --ease: cubic-bezier(0.76, 0, 0.24, 1);
  --pad: clamp(20px, 5vw, 90px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

body {
  margin: 0;
  background: var(--purple);
  color: var(--white);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 300;
  overflow-x: hidden;
  cursor: none;
}

@media (max-width: 880px) {
  body { cursor: auto; }
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---- type primitives ---------------------------------------------------- */
.display {
  font-family: "Anton", "Arial Narrow", sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  line-height: 0.86;
  letter-spacing: -0.01em;
  margin: 0;
}
.script {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  text-transform: none;
  letter-spacing: -0.01em;
}
.label {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
}
.ast { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-weight: 400; }
.underline-stroke {
  display: inline-block;
  border-bottom: 6px solid currentColor;
  padding-bottom: 2px;
}

/* ---- custom cursor ------------------------------------------------------ */
#cursor {
  position: fixed;
  top: 0; left: 0;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--white);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width .35s var(--ease), height .35s var(--ease),
              background .35s var(--ease), opacity .3s;
  mix-blend-mode: difference;
}
#cursor.is-big { width: 48px; height: 48px; }
#cursor .cursor-label {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 700; font-size: 9px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--purple);
  opacity: 0; transition: opacity .3s;
  mix-blend-mode: normal;
}
#cursor.is-big .cursor-label { opacity: 1; }
@media (max-width: 880px) { #cursor { display: none; } }

/* ---- fixed chrome ------------------------------------------------------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px var(--pad);
  z-index: 200;
  mix-blend-mode: difference; color: #fff;
  pointer-events: none;
}
.topbar a { pointer-events: auto; }
.topbar .brand { font-weight: 700; letter-spacing: 0.06em; font-size: 13px; text-transform: uppercase; }
.topbar nav { display: flex; gap: 28px; }
.topbar nav a { font-weight: 700; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; position: relative; }
.topbar nav a::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 2px; width: 0;
  background: currentColor; transition: width .4s var(--ease);
}
.topbar nav a:hover::after { width: 100%; }
@media (max-width: 640px) { .topbar nav { display: none; } }

/* ============================================================
   1 · HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 120px var(--pad) 110px;
  overflow: hidden;
}
.hero__ast {
  position: absolute;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1; user-select: none; pointer-events: none;
  opacity: 0.9;
}
.hero__ast.a1 { top: 16%; right: 9%; font-size: clamp(60px, 12vw, 190px); }
.hero__ast.a2 { bottom: 14%; left: 6%; font-size: clamp(34px, 6vw, 90px); }

.hero__head {
  position: relative; z-index: 3;
  font-size: clamp(44px, 10.5vw, 168px);
  max-width: 14ch;
}
.hero__head .script {
  font-size: clamp(40px, 9.5vw, 152px);
  display: inline-block;
  transform: translateY(0.04em);
}
.hero__meta {
  position: relative; z-index: 3;
  display: flex; flex-wrap: wrap; gap: 10px 18px;
  margin-top: clamp(28px, 4vw, 52px);
  align-items: center;
}
.hero__meta .label { opacity: .85; }
.hero__meta .dot { width: 5px; height: 5px; border-radius: 50%; background: #fff; opacity:.7; }

.hero__cta {
  position: absolute;
  left: var(--pad); bottom: clamp(28px, 5vh, 56px);
  display: flex; align-items: center; gap: 16px; z-index: 5;
}
.hero__cta .label { font-size: 14px; }
.hero__cta .arrow {
  display: inline-block; font-size: 20px;
}
.scroll-cue {
  position: absolute; right: var(--pad); bottom: clamp(28px, 5vh, 56px);
  z-index: 5; display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.scroll-cue .line {
  width: 1px; height: 60px; background: #fff; transform-origin: top;
  animation: cue 1.8s var(--ease) infinite;
}
@keyframes cue { 0%{transform:scaleY(0);} 40%{transform:scaleY(1);} 100%{transform:scaleY(0); transform-origin:bottom;} }
.scroll-cue .label { writing-mode: vertical-rl; letter-spacing: 0.2em; opacity:.7; }

/* ============================================================
   2 · PROJECTS  (horizontal scroll)
   ============================================================ */
.projects-wrap { position: relative; }
.projects-pin { height: 100vh; overflow: hidden; }
.h-track {
  display: flex; height: 100vh; align-items: center;
  will-change: transform;
}
.h-intro {
  flex: 0 0 auto;
  width: min(46vw, 560px);
  padding: 0 var(--pad);
  display: flex; flex-direction: column; justify-content: center; gap: 22px;
}
.h-intro .kicker { font-size: clamp(36px, 5vw, 76px); }
.h-intro p { font-size: 13px; line-height: 1.7; max-width: 34ch; opacity: .85; }
.h-intro .scroll-hint {
  margin-top: 10px; display: flex; align-items: center; gap: 14px;
  font-weight: 700; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
}
.h-intro .scroll-hint span { opacity: .6; }

/* project card */
.card {
  flex: 0 0 auto;
  position: relative;
  width: clamp(320px, 38vw, 540px);
  height: 70vh;
  margin: 0 clamp(40px, 6vw, 100px) 0 0;
  transition: opacity .5s var(--ease);
}
.card:first-of-type { margin-left: clamp(20px, 4vw, 60px); }
.h-track.dimmed .card:not(:hover) { opacity: 0.45; }

.card__num {
  position: absolute;
  top: -8%; left: -6%;
  font-family: "Anton", sans-serif;
  font-size: clamp(120px, 20vw, 300px);
  line-height: 1; color: #fff; opacity: 0.10;
  z-index: 0; pointer-events: none; user-select: none;
}
.card__frame {
  position: absolute; inset: 0;
  overflow: hidden;
  z-index: 1;
  background: #888;
}
.card__img {
  position: absolute; inset: -12% 0; /* extra height for inner parallax */
  height: 124%;
  background: #888;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  will-change: transform;
}
.card__img::before {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    -45deg, rgba(0,0,0,0.05) 0 2px, transparent 2px 12px);
}
.card__img .ph {
  position: relative; z-index: 1;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #cfcfcf; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; font-size: 11px; line-height: 1.8;
  max-width: 70%;
}
.card__img .ph b { display:block; color:#eee; font-size: 13px; margin-bottom: 6px; }

/* client name overlapping image edge */
.card__client {
  position: absolute;
  left: -4%; bottom: 8%;
  z-index: 3;
  font-size: clamp(38px, 5.4vw, 78px);
  color: #fff; mix-blend-mode: normal;
  text-shadow: 0 2px 30px rgba(0,0,0,.25);
  pointer-events: none;
}
.card__tag {
  position: absolute; top: 18px; left: 18px; z-index: 3;
  background: #fff; color: var(--purple);
  padding: 7px 12px; font-weight: 700; font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase;
}

/* clip-path wipe reveal panel */
.card__reveal {
  position: absolute; inset: 0; z-index: 4;
  background: var(--purple);
  color: #fff;
  padding: 28px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 14px;
  clip-path: inset(100% 0 0 0);
  transition: clip-path .6s var(--ease);
}
.card:hover .card__reveal { clip-path: inset(0 0 0 0); }
.card__reveal .r-cat { font-weight: 700; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; opacity:.7; }
.card__reveal .r-title { font-size: clamp(30px, 3.4vw, 50px); }
.card__reveal .r-desc { font-size: 12.5px; line-height: 1.7; opacity: .85; max-width: 40ch; }
.card__reveal .r-year { font-weight: 700; font-size: 11px; letter-spacing: 0.14em; }
.card__reveal .r-rule { width: 46px; height: 4px; background: #fff; }

.h-end {
  flex: 0 0 auto;
  width: min(40vw, 460px);
  padding: 0 var(--pad);
  display: flex; flex-direction: column; justify-content: center; gap: 18px;
}
.h-end .display { font-size: clamp(40px, 5vw, 84px); }

/* progress bar for horizontal section */
.h-progress {
  position: absolute; left: var(--pad); right: var(--pad); bottom: 28px;
  height: 2px; background: rgba(255,255,255,.2); z-index: 50;
}
.h-progress i { display: block; height: 100%; width: 0; background: #fff; }

/* ============================================================
   3 · ABOUT  (white background)
   ============================================================ */
.about {
  background: var(--white);
  color: var(--black);
  padding: clamp(80px, 12vh, 160px) var(--pad);
  position: relative;
}
.about__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 6vw, 90px);
  max-width: 1400px; margin: 0 auto;
}
@media (min-width: 900px) {
  .about__grid { grid-template-columns: 0.9fr 1.3fr; align-items: start; }
}
.about__portrait {
  width: clamp(180px, 22vw, 300px);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: #888;
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.about__portrait::before {
  content:""; position:absolute; inset:0;
  background-image: repeating-linear-gradient(-45deg, rgba(0,0,0,0.05) 0 2px, transparent 2px 12px);
}
.about__portrait .ph { position: relative; z-index:1; color:#cfcfcf; font-weight:700; font-size:10px; letter-spacing:0.12em; text-transform:uppercase; }
.about__label { margin-bottom: 24px; }
.about__copy { font-size: clamp(20px, 2.4vw, 34px); font-weight: 300; line-height: 1.4; max-width: 22ch; }
.about__copy .script { font-weight: 600; }
.about__small { margin-top: 26px; font-size: 13px; line-height: 1.8; max-width: 46ch; opacity:.75; }
.about__quote {
  margin: 30px 0 0;
  padding-left: 18px;
  border-left: 4px solid var(--black);
  font-style: italic;
  font-size: clamp(14px, 1.3vw, 16px);
  line-height: 1.65;
  opacity: 0.55;
  max-width: 38ch;
}
.about__quote cite {
  display: block;
  font-style: normal;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 8px;
}
.about__stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px; margin-top: clamp(50px, 8vw, 90px);
}
.about__stats .stat .n { font-family:"Anton",sans-serif; font-size: clamp(48px, 9vw, 130px); line-height:.9; }
.about__stats .stat .k { font-weight:700; font-size:11px; letter-spacing:0.14em; text-transform:uppercase; margin-top:8px; opacity:.7; }

/* ============================================================
   4 · CONTACT  (purple background)
   ============================================================ */
.contact {
  background: var(--purple);
  color: var(--white);
  padding: clamp(90px, 16vh, 200px) var(--pad) clamp(50px, 8vh, 90px);
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden;
}
.contact__ast { position:absolute; top: 10%; right: 8%; font-size: clamp(70px, 14vw, 220px); opacity:.9; pointer-events:none; }
.contact__big { font-size: clamp(60px, 16vw, 280px); position: relative; z-index:2; }
.contact__big .script { font-size: clamp(50px, 13vw, 240px); }
.contact__links {
  display: flex; flex-wrap: wrap; gap: 14px 50px;
  margin-top: clamp(40px, 6vw, 70px); position: relative; z-index:2;
}
.contact__links a { font-size: clamp(15px, 1.6vw, 22px); border-bottom: 2px solid rgba(255,255,255,.4); padding-bottom: 4px; transition: border-color .3s; }
.contact__links a:hover { border-color: #fff; }
.contact__foot {
  margin-top: auto; padding-top: 60px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  font-weight: 700; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; opacity:.7;
  position: relative; z-index: 2;
}

/* ---- entrance helpers --------------------------------------------------- */
.reveal-up { opacity: 0; transform: translateY(40px); }
.is-in .reveal-up, .reveal-up.is-in { opacity: 1; transform: none; }

/* full-screen wipe overlay */
#wipe {
  position: fixed; inset: 0; z-index: 9000;
  background: var(--purple);
  transform: scaleY(0); transform-origin: bottom;
  pointer-events: none;
}

/* ============================================================
   PROJECT OVERLAY
   ============================================================ */
#project-overlay {
  position: fixed; inset: 0; z-index: 8000;
  overflow-y: auto; overflow-x: hidden;
  background: var(--white);
  color: var(--black);
  visibility: hidden;
  pointer-events: none;
}
#project-overlay.is-open {
  visibility: visible;
  pointer-events: auto;
}

.po-back {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 8100;
  display: flex; align-items: center; gap: 12px;
  padding: 22px var(--pad);
  background: none; border: none;
  mix-blend-mode: difference; color: #fff;
  pointer-events: none;
}
#project-overlay.is-open .po-back { pointer-events: auto; cursor: none; }
.po-back .po-arrow { font-size: 18px; line-height: 1; display: inline-block; }
.po-back .label { font-size: 11px; }

.po-hero {
  background: var(--purple);
  color: var(--white);
  padding: 110px var(--pad) 80px;
  min-height: 55vh;
  position: relative;
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.po-hero__num {
  position: absolute;
  top: -8%; right: -2%;
  font-size: clamp(180px, 30vw, 480px);
  line-height: 1; opacity: 0.07;
  pointer-events: none; user-select: none;
}
.po-hero__body { position: relative; z-index: 2; }
.po-hero__meta {
  display: flex; align-items: center; gap: 10px 18px;
  flex-wrap: wrap; margin-bottom: 18px;
}
.po-hero__meta .dot { width: 5px; height: 5px; border-radius: 50%; background: #fff; opacity: .7; }
.po-title { font-size: clamp(56px, 11vw, 160px); }
.po-desc {
  margin-top: 24px;
  font-size: clamp(13px, 1.4vw, 17px);
  line-height: 1.75; max-width: 58ch; opacity: .85;
  font-weight: 300;
}

.po-gallery {
  padding: clamp(60px, 10vw, 120px) var(--pad);
  display: flex; flex-direction: column;
  gap: clamp(32px, 5vw, 64px);
  max-width: 1400px; margin: 0 auto;
}
.po-gallery img {
  width: 100%; display: block;
  object-fit: cover;
}

/* ---- mobile: horizontal → vertical ------------------------------------- */
@media (max-width: 880px) {
  .projects-pin { height: auto; overflow: visible; }
  .h-track { display: block; height: auto; }
  .h-intro, .h-end { width: auto; padding: 70px var(--pad) 30px; }
  .card {
    width: auto; height: auto; aspect-ratio: 3/4;
    margin: 0 var(--pad) 60px !important;
  }
  .card__reveal { clip-path: inset(0 0 0 0); position: relative; inset:auto; height:auto; margin-top: -1px; }
  .card { height: auto; }
  .card__frame { position: relative; height: 60vh; }
  .card__img { inset: 0; height: 100%; }
  .h-progress { display: none; }
  .scroll-cue { display: none; }
}
