/* Veils of Color — studio wall, not NFT template */

:root {
  --paper: #ede6da;
  --paper-dark: #e0d6c6;
  --ink: #1c1917;
  --ink-soft: #57534e;
  --sea: #2081e2;
  --sea-dark: #1868b7;
  --rust: #a0522d;
  --moss: #4a6741;
  --cream: #faf7f2;
  --font-serif: 'Newsreader', Georgia, serif;
  --font-sans: 'Outfit', system-ui, sans-serif;
  --font-scrawl: 'Caveat', cursive;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(160, 82, 45, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(74, 103, 65, 0.07) 0%, transparent 45%);
  overflow-x: hidden;
  min-width: 0;
}

body.loading { overflow: hidden; }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.paper-edge {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  z-index: 200;
  background: repeating-linear-gradient(
    90deg,
    var(--rust) 0px, var(--rust) 40px,
    var(--moss) 40px, var(--moss) 80px,
    #7ba3b8 80px, #7ba3b8 120px,
    #d4a843 120px, #d4a843 160px
  );
  opacity: 0.85;
}

/* ── Intro curtain loader ── */
.intro {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.intro__veil {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 20%;
  transition: transform 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.intro__veil--1 { left: 0;    background: #2a3a5c; transition-delay: 0s; }
.intro__veil--2 { left: 20%; background: #c75b39; transition-delay: 0.08s; }
.intro__veil--3 { left: 40%; background: #e8b84a; transition-delay: 0.16s; }
.intro__veil--4 { left: 60%; background: #5a8f6a; transition-delay: 0.24s; }
.intro__veil--5 { left: 80%; background: #7ba3b8; transition-delay: 0.32s; }

.intro__word {
  position: relative;
  z-index: 1;
  font-family: var(--font-serif);
  font-size: clamp(3.5rem, 12vw, 8rem);
  font-weight: 400;
  font-style: italic;
  color: white;
  opacity: 1;
  transition: opacity 0.6s, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.45);
}

.intro--done .intro__veil--1 { transform: translateY(-100%); }
.intro--done .intro__veil--2 { transform: translateY(100%); }
.intro--done .intro__veil--3 { transform: translateY(-100%); }
.intro--done .intro__veil--4 { transform: translateY(100%); }
.intro--done .intro__veil--5 { transform: translateY(-100%); }
.intro--done .intro__word { opacity: 0; transform: scale(1.15); }

/* ── Header ── */
.header {
  position: sticky;
  top: 6px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem clamp(1.25rem, 4vw, 2.5rem);
  background: rgba(237, 230, 218, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(28, 25, 23, 0.08);
}

.header__name {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 500;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.header__nav a {
  font-size: 0.88rem;
  color: var(--ink-soft);
  transition: color 0.2s;
}

.header__nav a:hover { color: var(--ink); }

.header__os {
  color: var(--sea) !important;
  font-weight: 500;
}

.header__menu {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  margin: -10px;
  z-index: 602;
  position: relative;
}

.header__menu span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 400;
  border-radius: 3px;
  transition: transform 0.2s, background 0.2s;
}

.btn:hover { transform: translateY(-1px); }

.btn--sea {
  background: var(--sea);
  color: white;
}

.btn--sea:hover { background: var(--sea-dark); }

.btn--plain {
  border: 1px solid rgba(28, 25, 23, 0.2);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.35);
}

.btn--wide {
  width: 100%;
  padding: 1rem;
  font-size: 0.95rem;
}

.btn__os-icon { flex-shrink: 0; }

/* ── Splash ── */
.splash {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  min-height: calc(100vh - 60px);
  padding: 3rem clamp(1.25rem, 4vw, 2.5rem) 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.splash__tag {
  font-family: var(--font-scrawl);
  font-size: 1.35rem;
  color: var(--rust);
  margin-bottom: 0.75rem;
}

.splash__title {
  font-family: var(--font-serif);
  font-size: clamp(3.5rem, 9vw, 6rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.splash__lead {
  color: var(--ink-soft);
  max-width: 400px;
  margin-bottom: 1.75rem;
}

.splash__lead strong {
  color: var(--ink);
  font-weight: 500;
}

.splash__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.splash__piece {
  position: relative;
}

.frame {
  background: white;
  padding: 10px 10px 36px;
  box-shadow:
    4px 6px 0 rgba(28, 25, 23, 0.06),
    8px 14px 30px rgba(28, 25, 23, 0.1);
}

.frame--tilt { transform: rotate(1.5deg); }

.frame__cap {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-scrawl);
  font-size: 1.4rem;
  color: var(--ink-soft);
}

.frame__hash { opacity: 0.5; }
.frame__of { font-size: 1rem; margin-left: 0.25rem; opacity: 0.7; }

.splash__img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  transition: opacity 0.35s ease;
}

.splash__pick {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.splash__pick button {
  width: 48px;
  height: 48px;
  padding: 2px;
  border: 2px solid transparent;
  background: white;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}

.splash__pick button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.splash__pick button.active,
.splash__pick button:hover {
  border-color: var(--rust);
  transform: translateY(-2px);
}

/* ── Work rail ── */
.work {
  padding: 4rem 0 5rem;
  background: var(--ink);
  color: var(--cream);
}

.work__top {
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  max-width: 1200px;
  margin: 0 auto 2rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.work__heading {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 400;
}

.scribble {
  font-family: var(--font-scrawl);
  font-size: 1.5rem;
  color: #d4a843;
  font-weight: 600;
}

.work__note {
  font-size: 0.85rem;
  color: rgba(250, 247, 242, 0.45);
}

.work__rail-wrap {
  overflow-x: auto;
  cursor: grab;
  scrollbar-width: none;
  padding: 0.5rem 0 1.5rem;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  overscroll-behavior-x: contain;
}

.work__rail-wrap::-webkit-scrollbar { display: none; }
.work__rail-wrap.dragging { cursor: grabbing; }

.work__rail {
  display: flex;
  gap: 1rem;
  width: max-content;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

.strip__card {
  flex-shrink: 0;
  width: 170px;
  background: white;
  padding: 6px 6px 28px;
  box-shadow: 3px 5px 16px rgba(0, 0, 0, 0.35);
  transform: rotate(var(--rot, 0deg));
  transition: transform 0.25s;
  position: relative;
}

.strip__card:nth-child(3n+1) { --rot: -1.5deg; }
.strip__card:nth-child(3n+2) { --rot: 0.8deg; }
.strip__card:nth-child(3n) { --rot: -0.5deg; }

.strip__card:hover {
  transform: rotate(0deg) scale(1.04);
  z-index: 2;
}

.strip__card img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
}

.strip__card-num {
  position: absolute;
  bottom: 6px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-scrawl);
  font-size: 1.1rem;
  color: var(--ink-soft);
}

/* ── Collect / OpenSea ── */
.collect {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem clamp(1.25rem, 4vw, 2.5rem);
}

.collect__paper {
  position: relative;
  background: var(--cream);
  padding: 2.5rem 2rem 2rem;
  box-shadow: 2px 3px 0 rgba(28, 25, 23, 0.08), 6px 10px 24px rgba(28, 25, 23, 0.07);
  transform: rotate(-0.6deg);
}

.collect__tape {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 90px;
  height: 28px;
  background: rgba(212, 168, 67, 0.45);
  border: 1px solid rgba(160, 120, 40, 0.2);
}

.collect__label {
  font-family: var(--font-scrawl);
  font-size: 1.3rem;
  color: var(--rust);
  margin-bottom: 0.25rem;
}

.collect__title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.collect__facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
  margin-bottom: 1.75rem;
}

.collect__facts dt {
  font-size: 0.72rem;
  text-transform: lowercase;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

.collect__facts dd {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 500;
}

.collect__tba {
  font-style: italic;
  color: var(--sea);
  font-weight: 400 !important;
}

.collect__fine {
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.collect__stack {
  position: relative;
  height: 380px;
}

.collect__thumb {
  position: absolute;
  width: 55%;
  aspect-ratio: 3/4;
  object-fit: cover;
  background: white;
  padding: 5px;
  box-shadow: 3px 5px 18px rgba(28, 25, 23, 0.15);
}

.collect__thumb--a { top: 0; left: 5%; transform: rotate(-4deg); z-index: 1; }
.collect__thumb--b { top: 12%; right: 0; transform: rotate(3deg); z-index: 2; }
.collect__thumb--c { bottom: 0; left: 20%; transform: rotate(-1deg); z-index: 3; width: 50%; }

/* ── About ── */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem clamp(1.25rem, 4vw, 2.5rem) 5rem;
  border-top: 1px solid rgba(28, 25, 23, 0.1);
}

.about__img-wrap {
  position: relative;
}

.about__img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  box-shadow: 5px 8px 24px rgba(28, 25, 23, 0.12);
  transform: rotate(-1deg);
}

.about__years {
  position: absolute;
  bottom: -12px;
  right: -8px;
  background: var(--ink);
  color: var(--cream);
  padding: 0.85rem 1rem;
  font-family: var(--font-scrawl);
  font-size: 1.15rem;
  line-height: 1.2;
  text-align: center;
  transform: rotate(3deg);
}

.about__years span {
  display: block;
  font-size: 2.2rem;
  font-weight: 600;
  line-height: 1;
}

.about__text h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.about__text p {
  color: var(--ink-soft);
  margin-bottom: 1rem;
}

.about__list {
  list-style: none;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px dashed rgba(28, 25, 23, 0.15);
}

.about__list li {
  font-family: var(--font-scrawl);
  font-size: 1.25rem;
  color: var(--moss);
  padding: 0.2rem 0;
}

.about__list li::before {
  content: '— ';
  opacity: 0.5;
}

/* ── Viewer / lightbox ── */
.viewer,
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 8000;
  border: none;
  padding: 0;
  max-width: 100vw;
  max-height: 100vh;
  width: 100%;
  height: 100%;
  background: rgba(28, 25, 23, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
}

.viewer[open],
.lightbox[open] {
  display: flex;
}

.viewer__x,
.lightbox__close {
  position: absolute;
  top: max(0.75rem, env(safe-area-inset-top));
  right: max(0.75rem, env(safe-area-inset-right));
  font-size: 2rem;
  color: rgba(250, 247, 242, 0.6);
  line-height: 1;
  z-index: 2;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.viewer__x:hover,
.lightbox__close:hover { color: white; }

.viewer__arrow,
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  color: rgba(250, 247, 242, 0.5);
  padding: 1rem;
  z-index: 2;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.viewer__arrow:hover,
.lightbox__nav:hover { color: white; }

.viewer__arrow--l,
.lightbox__nav--prev { left: 0.5rem; }
.viewer__arrow--r,
.lightbox__nav--next { right: 0.5rem; }

.viewer__fig,
.lightbox__figure {
  text-align: center;
  max-width: 90vw;
}

.viewer__fig img,
.lightbox__img {
  max-height: 78vh;
  max-width: 88vw;
  object-fit: contain;
  background: white;
  padding: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.viewer__fig figcaption,
.lightbox__cap {
  margin-top: 0.75rem;
  font-family: var(--font-scrawl);
  font-size: 1.25rem;
  color: rgba(250, 247, 242, 0.7);
}

/* ── Footer ── */
.foot {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1.5rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  border-top: 1px solid rgba(28, 25, 23, 0.1);
}

.foot a {
  color: var(--sea);
  font-weight: 500;
}

.foot a:hover { text-decoration: underline; }

.foot__x {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  line-height: 0;
}

.foot__x:hover {
  text-decoration: none;
  opacity: 0.65;
}

.foot__x svg {
  display: block;
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  z-index: 11000;
  transform: translateX(-50%) translateY(120%);
  opacity: 0;
  pointer-events: none;
  padding: 0.85rem 1.5rem;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-scrawl);
  font-size: 1.35rem;
  border-radius: 3px;
  box-shadow: 0 8px 28px rgba(28, 25, 23, 0.25);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s;
  white-space: nowrap;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Mobile nav backdrop */
.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 550;
  background: rgba(28, 25, 23, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.nav-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

body.nav-open {
  overflow: hidden;
}

/* ── Responsive ── */
@media (max-width: 860px) {
  .splash,
  .collect,
  .about {
    grid-template-columns: 1fr;
  }

  .splash {
    min-height: auto;
    padding-top: 2rem;
    padding-bottom: 3rem;
    gap: 2rem;
  }

  .splash__piece {
    order: -1;
    max-width: min(340px, 100%);
    margin: 0 auto;
    width: 100%;
  }

  .frame--tilt { transform: none; }

  .splash__copy {
    text-align: center;
  }

  .splash__lead {
    max-width: none;
    margin-left: auto;
    margin-right: auto;
  }

  .splash__btns {
    justify-content: center;
  }

  .collect {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
    gap: 2rem;
  }

  .collect__paper {
    transform: none;
    padding: 2rem 1.25rem 1.75rem;
  }

  .collect__stack {
    height: 260px;
    max-width: 320px;
    margin: 0 auto;
    width: 100%;
  }

  .about {
    padding-top: 3rem;
    padding-bottom: 3.5rem;
    gap: 2.5rem;
  }

  .about__img-wrap {
    max-width: 360px;
    margin: 0 auto;
    width: 100%;
    padding-bottom: 1rem;
  }

  .about__img { transform: none; }

  .about__years {
    bottom: 0;
    right: 0;
  }
}

@media (max-width: 600px) {
  body { font-size: 1rem; }

  .header {
    padding: 0.85rem 1rem;
  }

  .header__name {
    font-size: 1rem;
    max-width: 55vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header__nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(82vw, 280px);
    height: 100%;
    height: 100dvh;
    background: var(--paper);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1.75rem;
    padding: 2rem;
    padding-top: max(2rem, env(safe-area-inset-top));
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
    transition: right 0.3s ease;
    z-index: 601;
  }

  .header__nav.open { right: 0; }

  .header__nav a {
    font-size: 1rem;
    width: 100%;
    padding: 0.25rem 0;
  }

  .header__menu { display: flex; }

  .splash {
    padding: 1.5rem 1rem 2.5rem;
  }

  .splash__title {
    font-size: clamp(2.75rem, 14vw, 3.75rem);
  }

  .splash__tag { font-size: 1.15rem; }

  .splash__btns {
    flex-direction: column;
    width: 100%;
  }

  .splash__btns .btn {
    width: 100%;
  }

  .splash__pick button {
    width: 44px;
    height: 44px;
  }

  .work {
    padding: 2.5rem 0 3rem;
  }

  .work__top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    margin-bottom: 1.5rem;
  }

  .work__heading { font-size: 1.5rem; }

  .scribble {
    display: block;
    font-size: 1.25rem;
    margin-top: 0.15rem;
  }

  .strip__card { width: 145px; }

  .collect {
    padding: 2.5rem 1rem;
  }

  .collect__title { font-size: 1.65rem; }

  .collect__facts {
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem 1rem;
  }

  .collect__facts dd { font-size: 1.15rem; }

  .collect__stack {
    height: 220px;
    max-width: 280px;
  }

  .about {
    padding: 2.5rem 1rem 3rem;
  }

  .about__text h2 { font-size: 1.65rem; }

  .about__years {
    padding: 0.65rem 0.85rem;
    font-size: 1rem;
  }

  .about__years span { font-size: 1.85rem; }

  .viewer__fig img,
  .lightbox__img {
    max-height: 65vh;
    max-width: 92vw;
    padding: 4px;
  }

  .viewer__arrow--l,
  .lightbox__nav--prev { left: 0; }

  .viewer__arrow--r,
  .lightbox__nav--next { right: 0; }

  .foot {
    gap: 1rem 1.25rem;
    padding: 1.25rem 1rem;
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
    font-size: 0.8rem;
  }

  .toast {
    left: 1rem;
    right: 1rem;
    transform: translateY(120%);
    max-width: none;
    white-space: normal;
    text-align: center;
    font-size: 1.15rem;
    bottom: max(1rem, env(safe-area-inset-bottom));
  }

  .toast.show {
    transform: translateY(0);
  }
}

@media (max-width: 380px) {
  .collect__facts {
    grid-template-columns: 1fr;
  }

  .collect__stack { display: none; }

  .strip__card { width: 130px; }
}
