
/* =========================================
   NDLSTO — THREE-PANEL PORTFOLIO
   ========================================= */

   
:root {
  --ink: #171714;
  --paper: #f1efe8;
  --muted: #eabf00;
  --line: rgba(23, 23, 20, 0.2);
  --accent: #7ffe57;
  --gutter: clamp(22px, 5vw, 76px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  background: var(--ink);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Space Grotesk", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

/* TOP NAVIGATION */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  padding: 22px var(--gutter);
  color: var(--paper);
  mix-blend-mode: difference;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  opacity: 1;
  visibility: visible;
}

.topcar.header-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .topbar {
    transition: none;
  }
}

.mini-logo {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -2px;
}

.topbar-label,
.topbar-link {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.13em;
}

.topbar-link {
  border-bottom: 1px solid currentColor;
  padding-bottom: 4px;
}

/* ALL PANELS */

.panel {
  position: relative;
  min-height: 100svh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  isolation: isolate;
}

.eyebrow {
  margin: 0 0 21px;
  font-size: 25px;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.6;
}

.panel-number {
  position: absolute;
  z-index: 3;
  right: var(--gutter);
  bottom: 26px;
  font-size: 12px;
  letter-spacing: 0.12em;
  mix-blend-mode: difference;
  color: white;
}

/* =========================================
   PANEL 01 — HERO
   ========================================= */

.hero {
  display: flex;
  align-items: flex-end;
  height: 100svh;
  color: white;
  background: #37372f;
}

.hero-background {
  position: absolute;
  inset: 0;
  z-index: -2;

  background-image: url("images/landscape.jpg");
  background-size: cover;
  background-position: center;
  transform: scale(1.02);

  animation: hero-zoom 1.4s ease-out both;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;

  background:
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.25) 0%,
      transparent 35%,
      rgba(0, 0, 0, 0.08) 48%,
      rgba(0, 0, 0, 0.72) 100%
    );
}

.hero-top {
  position: absolute;
  top: 100px;
  left: var(--gutter);
  right: var(--gutter);

  display: flex;
  justify-content: space-between;
  gap: 16px;

  font-size: 10px;
  letter-spacing: 0.12em;
}

.hero-content {
  width: 100%;
  padding: 0 var(--gutter) 65px;
  animation: fade-up 900ms 150ms both;
}

.hero-content .eyebrow {
  margin-bottom: 8px;
}

.hero h1 {
  margin: 0 0 25px;
  font-size: clamp(90px, 19vw, 270px);
  font-weight: 700;
  letter-spacing: -0.105em;
  line-height: 0.85;
}

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

.hero-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.hero-bottom > p {
  margin: 0;
  font-size: clamp(13px, 1.5vw, 17px);
  line-height: 1.6;
}

.scroll-cue {
  display: flex;
  align-items: center;
  gap: 20px;

  padding-bottom: 7px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);

  font-size: 10px;
  letter-spacing: 0.1em;
}

.scroll-arrow {
  color: var(--accent);
  font-size: 18px;
  animation: arrow-bob 1.5s ease-in-out infinite;
}

@keyframes hero-zoom {
  from { transform: scale(1.09); }
  to { transform: scale(1.02); }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes arrow-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* =========================================
   PANEL 03 — SOCIAL LINKS
   ========================================= */

.socials {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 105px var(--gutter) 75px;
  background: var(--accent);
}

.socials-content {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: clamp(36px, 8vw, 130px);
  width: 100%;
  max-width: 1500px;
  margin: auto;
  mix-blend-mode: difference;
  color: white;
}

.socials h2 {
  font-size: clamp(70px, 9vw, 132px);
}

.socials-description {
  margin: 26px 0 0;
  font-size: 14px;
  line-height: 1.7;
}

.social-list {
  border-top: 1px solid rgba(23, 23, 20, 0.4);
}

.social-list a {
  display: grid;
  grid-template-columns: 30px minmax(110px, 1fr) minmax(80px, auto) 20px;
  align-items: center;
  gap: 12px;

  min-height: 67px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(23, 23, 20, 0.4);

  transition: padding 250ms ease;
}

.social-list a:hover {
  padding-left: 10px;
}

.social-index,
.social-handle {
  font-size: 9px;
  letter-spacing: 0.07em;
  mix-blend-mode: difference;
  color: white;
}

.social-index {
  mix-blend-mode: difference;
  color: white;
}

.social-name {
  font-size: clamp(15px, 1.6vw, 21px);
  font-weight: 500;
  letter-spacing: -0.04em;
}

.social-handle {
  text-align: right;
  mix-blend-mode: difference;
  color: white;
}

.social-arrow {
  font-size: 19px;
  text-align: right;
  transition: transform 200ms ease;
}

.social-list a:hover .social-arrow {
  transform: translate(3px, -3px);
}

.socials-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 60px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  mix-blend-mode: difference;
  color: white;
}

.socials-footer a {
  border-bottom: 1px solid transparent;
}

.socials-footer a:hover {
  border-bottom-color: currentColor;
}

.socials-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  pointer-events: none;
}

.socials::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(128, 255, 87, 0.25);
  z-index: -1;
  pointer-events: none;
}

/* =========================================
   TABLET & MOBILE
   ========================================= */

@media (max-width: 760px) {
  :root {
    --gutter: 22px;
  }

  .topbar {
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .topbar-label,
  .topbar-link {
    font-size: 9px;
  }

  .hero-top {
    top: 78px;
    font-size: 8px;
  }

  .hero-background {
    background-position: center;
  }

  .hero-content {
    padding-bottom: 68px;
  }

  .hero h1 {
    font-size: clamp(74px, 19vw, 145px);
    letter-spacing: -0.095em;
  }

  .hero-bottom > p {
    font-size: 12px;
  }

  .scroll-cue {
    gap: 8px;
    font-size: 8px;
  }

  .works {
    padding-top: 95px;
    padding-bottom: 58px;
  }

  .works-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 22px;
  }

  .works h2 {
    font-size: clamp(58px, 15vw, 90px);
  }

  .gallery {
    width: calc(100% + var(--gutter));
  }

  .gallery-card {
    width: min(72vw, 320px);
  }

  .gallery-card-tall {
    height: 40vh;
  }

  .gallery-card-short {
    height: 32vh;
  }

  .socials {
    padding-top: 100px;
    padding-bottom: 32px;
  }

  .socials-content {
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .socials h2 {
    font-size: clamp(68px, 16vw, 100px);
  }

  .socials-description {
    margin-top: 17px;
    font-size: 12px;
  }

  .social-list a {
    grid-template-columns: 24px minmax(0, 1fr) auto 18px;
    gap: 8px;
    min-height: 57px;
  }

  .social-name {
    font-size: 15px;
  }

  .social-handle {
    font-size: 8px;
  }

  .socials-footer {
    flex-wrap: wrap;
    margin-top: 38px;
    font-size: 8px;
  }

  .socials-footer span {
    display: none;
  }
}

/* Short screens: keep the final panel comfortable to read */

@media (max-height: 700px) and (min-width: 761px) {
  .socials {
    padding-top: 85px;
    padding-bottom: 35px;
  }

  .socials-content {
    gap: 40px;
  }

  .social-list a {
    min-height: 51px;
  }

  .socials-footer {
    margin-top: 30px;
  }

  .gallery-card-tall {
    height: 40vh;
  }

  .gallery-card-short {
    height: 32vh;
  }
}

/* Accessibility: respect reduced-motion settings */

@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;
  }
}


/* =========================================
   PANEL 02 — CHARACTER INTRODUCTIONS
   ========================================= */

.characters {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100svh;
  padding: 105px var(--gutter) 60px;
  background: #e8e5dc;
}

.characters-heading {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  column-gap: 30px;
  margin-bottom: 28px;
}

.characters-heading .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: 12px;
}

.characters-heading h2 {
  margin: 0;
  font-size: clamp(48px, 6.5vw, 88px);
  font-weight: 600;
  letter-spacing: -0.085em;
  line-height: 0.88;
}

.characters-heading h2 span {
  color: #ef1c1c;
}

.characters-intro {
  max-width: 220px;
  margin: 0 0 5px;
  font-size: 12px;
  line-height: 1.7;
  color: #69685f;
}

.character-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 42px);
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.character-card {
  min-width: 0;
}

.character-image {
  position: relative;
  height: clamp(210px, 36vh, 340px);
  overflow: hidden;
  background: #d6d2c7;
  border-radius: 25px;
}

.character-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 500ms ease;
}

.character-card:hover .character-image img {
  transform: scale(1.035);
}

.character-number {
  position: absolute;
  top: 14px;
  left: 14px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #f1efe8;
  background: #171714;
  font-size: 10px;
}

.character-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 18px;
  padding-top: 16px;
}

.character-label {
  margin: 0 0 6px;
  color: #77766d;
  font-size: 9px;
  letter-spacing: 0.12em;
}

.character-info h3 {
  margin: 0;
  font-size: clamp(17px, 2vw, 27px);
  letter-spacing: -0.06em;
  overflow-wrap: anywhere;
}

.character-info h3 span {
  color: #8a9f22;
}

.character-description {
  margin: 0;
  font-size: 11px;
  line-height: 1.8;
  color: #5d5c54;
}

/* Mobile layout */

@media (max-width: 760px) {
  .characters {
    justify-content: flex-start;
    padding-top: 100px;
    padding-bottom: 65px;
    overflow-y: auto;
  }

  .characters-heading {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 24px;
  }

  .characters-heading h2 {
    font-size: clamp(52px, 13vw, 78px);
  }

  .characters-intro {
    max-width: 260px;
    margin-top: 4px;
  }

  .character-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .character-image {
    height: clamp(230px, 36vh, 320px);
  }

  .character-info {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .character-info h3 {
    font-size: clamp(17px, 5vw, 23px);
  }
}

/* Short desktop screens */

@media (min-width: 761px) and (max-height: 720px) {
  .characters {
    padding-top: 85px;
    padding-bottom: 45px;
  }

  .characters-heading {
    margin-bottom: 18px;
  }

  .character-image {
    height: 30vh;
  }
}


/* =========================================
   MAGNETIC PANEL SCROLLING
   ========================================= */

html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  scroll-padding-top: 0;
  background: #171714;
}

.panel {
  scroll-snap-align: start;
  scroll-snap-stop: normal;
}

/* Avoid snapping during reduced-motion browsing */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
    scroll-snap-type: y proximity;
  }

  .panel {
    scroll-snap-stop: normal;
  }
}


/* =========================================
   SOFT PANEL ENTRANCES
   ========================================= */

.characters-heading,
.character-grid,
.works-heading,
.gallery,
.gallery-footer,
.socials-content,
.socials-footer {
  opacity: 0;
  transform: translate3d(0, 26px, 0) scale(0.99);

  transition:
    opacity 650ms ease,
    transform 800ms cubic-bezier(0.22, 1, 0.36, 1);

  will-change: opacity, transform;
}

/* The active panel settles into place */
.panel.is-active .characters-heading,
.panel.is-active .character-grid,
.panel.is-active .works-heading,
.panel.is-active .gallery,
.panel.is-active .gallery-footer,
.panel.is-active .socials-content,
.panel.is-active .socials-footer {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

/* Slightly stagger elements for a more editorial feel */
.panel.is-active .character-grid {
  transition-delay: 100ms;
}

.panel.is-active .gallery {
  transition-delay: 100ms;
}

.panel.is-active .gallery-footer,
.panel.is-active .socials-footer {
  transition-delay: 180ms;
}

/* Gentle background movement on the first panel */
.hero-background {
  transition:
    transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero.is-active .hero-background {
  transform: scale(1.02);
}

@media (prefers-reduced-motion: reduce) {
  .characters-heading,
  .character-grid,
  .works-heading,
  .gallery,
  .gallery-footer,
  .socials-content,
  .socials-footer,
  .hero-background {
    opacity: 1;
    transform: none;
    transition: none;
    will-change: auto;
  }
}


/* Full-screen landscape video */

.hero {
  position: relative;
  overflow: hidden;
  background: #171714;
}

.hero-video {
  position: absolute;
  top: -2px;
  left: 0;
  z-index: -2;
  width: 100%;
  height: calc(100% + 4px);
  object-fit: cover;
  object-position: center;
  transform: scale(1.02);
}

/* Keep the dark overlay above the video */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;

  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.25) 0%,
    transparent 35%,
    rgba(0, 0, 0, 0.08) 48%,
    rgba(0, 0, 0, 0.72) 100%
  );
}


@media (prefers-reduced-motion: reduce) {
  .hero-video {
    display: none;
  }

  .hero {
    background: #37372f url("images/landscape.jpg")
      center / cover no-repeat;
  }
}

/* Desktop: fill the screen and crop the vertical video */
.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 10%;
}

/* Mobile: show the entire vertical video */
@media (max-width: 760px) {
  .hero-video {
    object-fit: contain;
    background: #000000;
  }
}


/* The works panel becomes a scroll-driven scene */
#works {
  height: 500svh;
  min-height: 500svh;
  position: relative;
  scroll-snap-align: start;
  scroll-snap-stop: normal;
  padding: 0;
  overflow: clip;
}

.photo-scene {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 600px;
  overflow: hidden;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-heading {
  position: absolute;
  top: 10%;
  left: var(--gutter);
  z-index: 10;
}

.photo-heading .eyebrow {
  font-size: 11px;
  letter-spacing: 0.16em;
  margin-bottom: 18px;
}

.photo-heading h2 {
  font-size: clamp(36px, 5.5vw, 76px);
  line-height: 0.92;
  letter-spacing: -0.065em;
  margin: 0;
}

.photo-heading h2 span {
  color: var(--muted);
}

.photo-hint {
  font-size: 10px;
  letter-spacing: 0.12em;
  margin-top: 22px;
}


.photo-stage {
  position: relative;
  width: min(76vw, 900px);
  height: min(65vh, 570px);
  margin-top: 100px;
  perspective: 1200px;
}

.polaroid {
  position: absolute;
  inset: auto;
  box-sizing: border-box;
  padding: 10px 10px 40px;
  background: #fffefa;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18);
  transform-origin: center center;
  will-change: transform, opacity;
}

/* Different sizes, positions, and starting angles */
.photo-1 {
  width: 34%;
  height: 90%;
  left: 5%;
  top: 13%;
  transform: rotate(-12deg);
}

.photo-2 {
  width: 29%;
  height: 55%;
  left: 29%;
  top: 3%;
  transform: rotate(8deg);
}

.photo-3 {
  width: 31%;
  height: 85%;
  left: 53%;
  top: 18%;
  transform: rotate(-6deg);
}

.photo-4 {
  width: 25%;
  height: 35%;
  left: 70%;
  top: 0;
  transform: rotate(13deg);
}

.photo-5 {
  width: 27%;
  height: 55%;
  left: 17%;
  top: 43%;
  transform: rotate(7deg);
}

.photo-6 {
  width: 30%;
  height: 60%;
  left: 43%;
  top: 39%;
  transform: rotate(-10deg);
}

.photo-7 {
  width: 23%;
  height: 46%;
  left: 72%;
  top: 49%;
  transform: rotate(9deg);
}

.polaroid img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}


.polaroid p {
  position: absolute;
  bottom: 12px;
  left: 12px;
  margin: 0;
  color: #36352f;
  font-size: 9px;
  letter-spacing: 0.08em;
}

@media (max-width: 760px) {
  .photo-stage {
    width: 94vw;
    height: 54vh;
    margin-top: 130px;
  }

  .polaroid {
    padding: 6px 6px 28px;
    height: auto;
  }

  .polaroid img {
    width: 100%;
    height: auto;
    aspect-ratio: auto;
    object-fit: contain;
  }

  .polaroid p {
    bottom: 8px;
    left: 7px;
    font-size: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .polaroid {
    will-change: auto;
  }
}