/* =========================================================
   ZARGEL portfolio v2
   Desktop: real horizontal scrolling
   Mobile: native vertical scrolling
   ========================================================= */

:root {
  --black: #0a0a0a;
  --white: #f1efe9;
  --muted: #98948d;
  --paper: #e8e3d9;
  --ink: #111111;
  --pad: clamp(1.25rem, 3vw, 3.2rem);
  --header: 4.8rem;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  background: var(--black);
  color: var(--white);
  font-family: "DM Sans", Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  overflow: hidden;
}

button,
a {
  font: inherit;
}

button {
  border: 0;
  padding: 0;
  background: none;
  color: inherit;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

/* ---------- fixed chrome ---------- */

.site-header {
  position: fixed;
  z-index: 100;
  inset: 0 0 auto;
  height: var(--header);
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
  mix-blend-mode: difference;
  pointer-events: none;
}

.site-header button {
  pointer-events: auto;
  cursor: pointer;
}

.brand {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .18em;
}

.site-nav {
  display: flex;
  gap: clamp(1rem, 2.8vw, 2.8rem);
}

.site-nav button {
  position: relative;
  font-size: .72rem;
  letter-spacing: .11em;
  text-transform: uppercase;
  opacity: .75;
}

.site-nav button:hover {
  opacity: 1;
}


/* ---------- page dots ---------- */

.page-dots {
  --dot-color: rgba(255,255,255,.78);
  position: fixed;
  z-index: 120;
  left: 50%;
  bottom: 1.55rem;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: .72rem;
  padding: .55rem .72rem;
  border-radius: 999px;
  pointer-events: auto;
  transition: color .28s ease;
}

.page-dots[data-tone="dark"] {
  --dot-color: rgba(12,12,12,.72);
}

.page-dots[data-tone="light"] {
  --dot-color: rgba(255,255,255,.8);
}

.page-dot {
  position: relative;
  width: .56rem;
  height: .56rem;
  border-radius: 50%;
  background: var(--dot-color);
  border: 0;
  padding: 0;
  cursor: pointer;
  opacity: .68;
  transition:
    transform .28s cubic-bezier(.22,1,.36,1),
    opacity .22s ease,
    background-color .28s ease,
    box-shadow .28s ease;
}

.page-dot::before {
  content: "";
  position: absolute;
  inset: -.46rem;
  border-radius: 50%;
}

.page-dot:hover {
  transform: scale(1.45);
  opacity: 1;
}

.page-dot.is-active {
  background: #2f6bff;
  opacity: 1;
  transform: scale(1.42);
  box-shadow: 0 0 0 .22rem rgba(47,107,255,.16);
}


/* ---------- real horizontal viewport ---------- */

.portfolio-scroll {
  width: 100vw;
  height: 100svh;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: none;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.portfolio-scroll::-webkit-scrollbar {
  display: none;
}

.panel {
  position: relative;
  flex: 0 0 100vw;
  width: 100vw;
  height: 100svh;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: normal;
  padding: calc(var(--header) + 1rem) var(--pad) 4.4rem;
}

/* Invisible anchor attached to the real scroll strip. */
.anchor-marker {
  width: 0;
  flex: 0 0 0;
}

/* ---------- intro ---------- */

.panel--intro {
  background:
    radial-gradient(circle at 72% 42%, rgba(255,255,255,.065), transparent 28%),
    var(--black);
}

.intro-copy {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(88vw, 1380px);
}

.eyebrow,
.project-number {
  margin: 0 0 1.3rem;
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow--light {
  color: rgba(255,255,255,.65);
}

.hero-title {
  display: flex;
  flex-direction: column;
  width: max-content;
  margin: 0;
  font-size: clamp(5rem, 13.6vw, 13rem);
  line-height: .72;
  letter-spacing: -.075em;
  font-weight: 500;
}

.hero-title__serif {
  margin-left: clamp(2.2rem, 12vw, 11rem);
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -.045em;
}

.hero-copy {
  margin: clamp(2.4rem, 5vh, 4rem) 0 0;
  font-size: clamp(1rem, 1.5vw, 1.45rem);
  line-height: 1.5;
}

.hero-copy span {
  display: block;
  color: var(--muted);
}

.scroll-cue {
  position: absolute;
  right: var(--pad);
  bottom: 4rem;
  display: flex;
  gap: .8rem;
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- projects ---------- */

.panel--project {
  color: var(--ink);
}

.project-shell {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(300px, .8fr) minmax(500px, 1.2fr);
  gap: clamp(3rem, 7vw, 8rem);
  align-items: center;
}

.project-shell--reverse {
  grid-template-columns: minmax(500px, 1.2fr) minmax(300px, .8fr);
}

.project-shell--reverse .project-visual {
  grid-column: 1;
  grid-row: 1;
}

.project-shell--reverse .project-copy {
  grid-column: 2;
  grid-row: 1;
}

.project-copy {
  max-width: 38rem;
}

.project-copy h2 {
  margin: 0;
  font-size: clamp(4rem, 7.6vw, 8.2rem);
  line-height: .84;
  letter-spacing: -.062em;
  font-weight: 500;
}

.project-meta {
  margin: 1.3rem 0 0;
  font-size: .72rem;
  letter-spacing: .105em;
  text-transform: uppercase;
  opacity: .58;
}

.project-summary {
  max-width: 35rem;
  margin: clamp(2rem, 4vh, 3rem) 0 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(1.4rem, 2.15vw, 2.15rem);
  line-height: 1.13;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  margin-top: 2.1rem;
  padding-bottom: .25rem;
  border-bottom: 1px solid currentColor;
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.project-link span {
  transition: transform .25s var(--ease);
}

.project-link:hover span {
  transform: translate(.18rem, -.18rem);
}

.project-visual {
  width: min(46vw, 760px);
  height: min(72svh, 860px);
  margin: 0;
  justify-self: center;
  overflow: hidden;
  background: rgba(0,0,0,.08);
  box-shadow: 0 20px 70px rgba(0,0,0,.08);
}

.theme-seder { background: #e6e4dc; }
.theme-frootie { background: #111; color: #f0eee8; }
.theme-pure { background: #d8d0c3; }
.theme-bt { background: #ece8df; }
.theme-selected { background: #d9d9d4; }

.theme-frootie .project-number,
.theme-frootie .project-meta {
  color: rgba(255,255,255,.55);
}

.theme-frootie .project-summary {
  color: #eae6de;
}

/* ---------- statement ---------- */

.panel--statement {
  display: grid;
  place-items: center;
  background: #b43b29;
  color: #f0e8dc;
}

.statement-copy {
  width: min(82vw, 1200px);
}

.statement-copy h2 {
  margin: 0;
  font-size: clamp(4.7rem, 9.5vw, 10rem);
  line-height: .83;
  letter-spacing: -.07em;
  font-weight: 500;
}

.statement-copy em {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
}

/* ---------- about ---------- */

.panel--about {
  background: #d8d0c3;
  color: #111;
}

.about-grid {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8vw;
  align-items: center;
}

.about-grid h2 {
  margin: 0;
  font-size: clamp(4rem, 7vw, 7.6rem);
  line-height: .88;
  letter-spacing: -.06em;
  font-weight: 500;
}

.about-grid h2 em {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
}

.about-copy {
  max-width: 43rem;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(1.45rem, 2.3vw, 2.3rem);
  line-height: 1.17;
}

.about-copy p {
  margin: 0 0 1.35rem;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: 2rem;
  font-family: "DM Sans", Arial, sans-serif;
}

.tag-cloud span {
  padding: .6rem .78rem;
  border: 1px solid rgba(0,0,0,.18);
  border-radius: 999px;
  font-size: .66rem;
  letter-spacing: .085em;
  text-transform: uppercase;
}

/* ---------- contact ---------- */

.panel--contact {
  display: grid;
  place-items: center;
  background: #070707;
  color: var(--white);
}

.contact-copy {
  text-align: center;
}

.contact-kicker {
  margin: 0;
  font-size: .7rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: #77736d;
}

.contact-copy h2 {
  margin: .55rem 0 1.1rem;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(6rem, 12.5vw, 13rem);
  line-height: .8;
  letter-spacing: -.055em;
  font-weight: 400;
  font-style: italic;
}

.contact-copy > p:not(.contact-kicker) {
  color: #9d9992;
  font-size: clamp(1.1rem, 1.7vw, 1.65rem);
}

.contact-copy a {
  display: inline-block;
  margin-top: 1rem;
  padding-bottom: .25rem;
  border-bottom: 1px solid rgba(255,255,255,.45);
  font-size: clamp(1.15rem, 1.9vw, 1.9rem);
}

.copyright {
  position: absolute;
  left: var(--pad);
  bottom: 3.6rem;
  margin: 0;
  font-size: .62rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #615f5b;
}

/* ---------- case study ---------- */

.case-body {
  overflow: auto;
  background: #e7e2d8;
  color: #111;
}

.case-header {
  height: var(--header);
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.case-study {
  padding: 5vw var(--pad) 8vw;
}

.case-hero {
  width: min(1100px, 92vw);
  margin: 0 auto 5vw;
}

.case-hero h1 {
  margin: 0;
  font-size: clamp(5rem, 12vw, 12rem);
  line-height: .8;
  letter-spacing: -.07em;
  font-weight: 500;
}

.case-meta {
  margin-top: 1.5rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .75rem;
  color: #77726b;
}

.case-intro {
  width: min(760px, 90vw);
  margin: 3rem 0 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(1.6rem, 2.8vw, 2.8rem);
  line-height: 1.12;
}

.case-image {
  width: min(1500px, 94vw);
  height: min(78vh, 900px);
  margin: 0 auto;
  overflow: hidden;
}

.case-placeholder {
  width: min(900px, 90vw);
  margin: 7vw auto 0;
}

.case-placeholder h2 {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.7rem, 5vw, 5rem);
  line-height: .98;
}

.case-placeholder > p:last-child {
  max-width: 650px;
  font-size: 1.1rem;
  line-height: 1.7;
  color: #59554f;
}

/* ---------- mobile/tablet ---------- */

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .portfolio-scroll {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
    scroll-snap-type: none;
  }

  .panel {
    width: 100%;
    min-height: 100svh;
    height: auto;
    padding: calc(var(--header) + 2rem) var(--pad) 4rem;
    scroll-snap-align: none;
  }

  .page-dots {
    bottom: .85rem;
    gap: .55rem;
    padding: .45rem .58rem;
    background: rgba(255,255,255,.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .page-dot {
    width: .48rem;
    height: .48rem;
  }

  .hero-title {
    font-size: clamp(4.6rem, 20vw, 8rem);
  }

  .hero-title__serif {
    margin-left: 7vw;
  }

  .scroll-cue {
    left: var(--pad);
    right: auto;
  }

  .scroll-cue span:first-child::after {
    content: " ↓";
  }

  .scroll-cue span:last-child {
    display: none;
  }

  .project-shell,
  .project-shell--reverse,
  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .project-shell--reverse .project-visual,
  .project-shell--reverse .project-copy {
    grid-column: auto;
    grid-row: auto;
  }

  .project-shell--reverse .project-copy {
    order: 0;
  }

  .project-shell--reverse .project-visual {
    order: 1;
  }

  .project-visual {
    width: 100%;
    height: min(68svh, 760px);
  }

  .project-copy h2 {
    font-size: clamp(3.9rem, 16vw, 7rem);
  }

  .statement-copy h2 {
    font-size: clamp(4rem, 15vw, 7rem);
  }

  .about-grid h2 {
    font-size: clamp(3.6rem, 14vw, 6rem);
  }

  .contact-copy h2 {
    font-size: clamp(5.5rem, 23vw, 9rem);
  }

  .site-nav {
    gap: 1rem;
  }

  .site-nav button {
    font-size: .64rem;
  }

  .anchor-marker {
    display: none;
  }
}

@media (max-width: 540px) {
  .site-nav button[data-target="about"] {
    display: none;
  }

  .hero-copy span {
    margin-top: .35rem;
  }

  .project-summary,
  .about-copy {
    font-size: 1.5rem;
  }
}

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

  * {
    transition-duration: .001ms !important;
    animation-duration: .001ms !important;
  }
}
