/* ============================================================
   THE GALLERY — Shared Stylesheet
   ============================================================ */

/* ── CSS VARIABLES ── */
:root {
  --bg: #f8f8f6;
  --black: #0a0a0a;
  --white: #f8f8f6;
  --blue: #2b4eff;
  --red: #ff3d3d;
  --grey: #b0b0b0;
  --grey-light: #e2e2e0;
  --grey-dark: #555;
  --floor-top: #d4d4d0;
  --floor-bot: #bfbfba;
}

/* ── RESET ── */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { height: 100%; }

/* ── BODY VARIANTS ── */
body {
  font-family: 'Inter', sans-serif;
  color: var(--black);
  -webkit-font-smoothing: antialiased;
}

/* Entrance & Museum: fullscreen locked */
body.is-entrance,
body.is-museum {
  height: 100%;
  overflow: hidden;
  background: var(--black);
}

/* Content pages: scrollable, fade in */
body.is-page {
  min-height: 100%;
  overflow-x: hidden;
  background: var(--bg);
  animation: pageIn 0.6s ease forwards;
}

/* ── KEYFRAMES ── */
@keyframes fadeIn  { to { opacity: 1; } }
@keyframes lineGrow { to { transform: scaleX(1); } }
@keyframes pageIn  { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse   { 0%, 100% { opacity: 0.3; transform: translateX(0); } 50% { opacity: 1; transform: translateX(8px); } }


/* ============================================================
   SHARED CHROME (used on every page)
   ============================================================ */

/* ── DOT PATTERN OVERLAY ── */
.dot-overlay {
  position: fixed; inset: 0; z-index: 5; pointer-events: none;
  background-image: radial-gradient(circle, rgba(0,0,0,0.06) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* ── CEILING ── */
.ceiling {
  position: fixed; top: 0; left: 0; right: 0;
  height: 10vh; z-index: 10; pointer-events: none;
  background: linear-gradient(180deg, #eaeae7 0%, var(--bg) 100%);
}
.ceiling::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 1px; background: var(--grey-light);
}

/* ── FLOOR (tall — entrance & museum) ── */
.floor {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 18vh; z-index: 10; pointer-events: none;
  background: linear-gradient(180deg, var(--floor-top) 0%, var(--floor-bot) 100%);
}
.floor::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 2px; background: rgba(0,0,0,0.08);
}

/* ── FLOOR (short — content pages) ── */
.floor--sm {
  height: 10vh;
}

/* ── NAV LOGO ── */
.nav-fixed {
  position: fixed; top: 2rem; left: 2rem; z-index: 30;
}
.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 0.7rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--black); text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.55rem;
}
.nav-logo span { color: var(--blue); }
.nav-logo .nav-icon { width: 20px; height: 20px; flex-shrink: 0; }


/* ── PAGE TRANSITION OVERLAY (circle expand) ── */
.page-transition {
  position: fixed; inset: 0; z-index: 2000;
  background: var(--bg);
  clip-path: circle(0% at var(--ox, 50%) var(--oy, 50%));
  transition: clip-path 0.75s cubic-bezier(0.65, 0, 0.35, 1);
  pointer-events: none;
}
.page-transition.active { clip-path: circle(150% at var(--ox, 50%) var(--oy, 50%)); }


/* ============================================================
   ENTRANCE PAGE (gallery-website.html)
   ============================================================ */

/* ── LOADER ── */
.loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--black);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}
.loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader .l-tag {
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem; letter-spacing: 0.5em;
  text-transform: uppercase; color: var(--grey);
  opacity: 0; animation: fadeIn 0.8s ease 0.2s forwards;
}
.loader h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: clamp(2rem, 6vw, 4.5rem);
  color: var(--white); letter-spacing: -0.02em;
  margin-top: 0.5rem; text-transform: uppercase;
  opacity: 0; animation: fadeIn 1s ease 0.5s forwards;
}
.loader h1 span { color: var(--blue); }
.loader .l-line {
  width: 60px; height: 2px; background: var(--blue);
  margin-top: 1.5rem; transform: scaleX(0); transform-origin: left;
  animation: lineGrow 1.8s ease 1s forwards;
}
.loader .l-motto {
  font-family: 'Space Mono', monospace;
  font-size: 0.55rem; letter-spacing: 0.3em;
  color: var(--grey-dark); margin-top: 1rem;
  text-transform: uppercase;
  opacity: 0; animation: fadeIn 0.8s ease 1.4s forwards;
}

/* ── ENTRANCE HERO ── */
.entrance {
  min-width: 100vw; height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  flex-shrink: 0; padding: 10vh 2rem 18vh;
  position: relative;
}
.e-content {
  text-align: center;
  opacity: 0; animation: fadeIn 1s ease 1.4s forwards;
}
.e-tag {
  font-family: 'Space Mono', monospace;
  font-size: 0.55rem; letter-spacing: 0.6em;
  text-transform: uppercase; color: var(--grey-dark);
  margin-bottom: 1rem;
}
.e-content h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: clamp(2rem, 5.5vw, 4.5rem);
  letter-spacing: -0.03em; text-transform: uppercase;
  line-height: 0.95;
}
.e-content h1 .dot { color: var(--blue); }
.e-motto {
  font-family: 'Space Mono', monospace;
  font-size: clamp(0.55rem, 1vw, 0.7rem);
  letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--grey-dark); margin-top: 1.5rem;
  border-top: 1px solid var(--grey-light);
  padding-top: 1rem; display: inline-block;
}

/* ── SCROLL / ENTER CUE ── */
.scroll-cue,
.enter-cue {
  position: absolute; bottom: calc(18vh + 2rem);
  display: flex; align-items: center; gap: 0.8rem;
  opacity: 0; animation: fadeIn 1s ease 3.4s forwards;
  background: none; border: none; cursor: pointer;
  text-decoration: none;
}
.scroll-cue span,
.enter-cue span {
  font-family: 'Space Mono', monospace;
  font-size: 0.5rem; letter-spacing: 0.5em;
  text-transform: uppercase; color: var(--grey);
}
.scroll-cue .arrow,
.enter-cue .arrow {
  width: 40px; height: 1.5px; background: var(--blue);
  position: relative; animation: pulse 2.5s ease infinite;
}
.scroll-cue .arrow::after,
.enter-cue .arrow::after {
  content: ''; position: absolute; right: 0; top: -3.5px;
  width: 8px; height: 8px;
  border-right: 1.5px solid var(--blue);
  border-bottom: 1.5px solid var(--blue);
  transform: rotate(-45deg);
}


/* ============================================================
   MUSEUM PAGE (museum.html)
   ============================================================ */

/* ── PROGRESS BAR ── */
.progress {
  position: fixed; bottom: calc(18vh - 3px);
  left: 0; height: 3px; background: var(--blue);
  z-index: 20; width: 0%;
  transition: width 0.05s linear;
}

/* ── NAV DOTS ── */
.nav-dots {
  position: fixed; bottom: calc(18vh + 16px);
  left: 50%; transform: translateX(-50%);
  display: flex; gap: 16px; z-index: 20;
  opacity: 0;
}
.nav-dot {
  width: 8px; height: 8px; border: 1.5px solid var(--black);
  cursor: pointer; transition: all 0.3s ease;
  background: transparent; padding: 0;
}
.nav-dot.active { background: var(--blue); border-color: var(--blue); }
.nav-dot:hover  { border-color: var(--blue); }

/* ── MUSEUM SCROLL ── */
.museum {
  width: 100%; height: 100vh;
  overflow-x: auto; overflow-y: hidden;
  cursor: grab; position: relative;
}
.museum:active { cursor: grabbing; }
.museum::-webkit-scrollbar { display: none; }

.room {
  display: flex; align-items: stretch;
  height: 100vh; background: var(--bg);
}

/* ── WALL GAPS ── */
.gap { flex-shrink: 0; height: 100vh; }
.gap--m { width: clamp(100px, 12vw, 200px); }
.gap--l { width: clamp(160px, 18vw, 320px); }

/* ── PAINTING SECTION ── */
.p-section {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  height: 100vh; padding: 10vh 0 18vh;
  position: relative;
}

/* ── PAINTING ── */
.painting {
  position: relative; cursor: pointer;
  transition: transform 0.5s cubic-bezier(0.33, 1, 0.68, 1);
  flex-shrink: 0;
}
.painting:hover { transform: translateY(-4px); }
.painting:hover .p-glow   { opacity: 1; }
.painting:hover .p-label  { opacity: 1; }

.painting:hover .p-number { opacity: 1; }

/* Track light */
.p-track {
  position: absolute; top: -6vh; left: 50%; transform: translateX(-50%);
  width: 2px; height: 4vh;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.1));
  pointer-events: none;
}
.p-track::after {
  content: ''; position: absolute; bottom: -3px; left: 50%; transform: translateX(-50%);
  width: 16px; height: 5px; background: #222; border-radius: 0 0 2px 2px;
}

/* Spotlight glow */
.p-glow {
  position: absolute; top: -4vh; left: 50%; transform: translateX(-50%);
  width: 130%; height: 6vh;
  background: radial-gradient(ellipse at center bottom, rgba(255,255,255,0.5), transparent 70%);
  opacity: 0.3; transition: opacity 0.5s ease; pointer-events: none;
}

/* Frame */
.p-frame {
  border: 2px solid var(--black);
  position: relative; overflow: hidden;
  transition: border-color 0.4s ease;
}
.painting:hover .p-frame { border-color: var(--blue); }

.p-canvas {
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}

/* ── CANVAS ART — About ── */
.painting--about .p-canvas {
  width: clamp(240px, 22vw, 360px);
  height: clamp(320px, 34vw, 480px);
  background: var(--white);
}
.painting--about .art-dots {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, var(--black) 2px, transparent 2px);
  background-size: 14px 14px;
  mask-image: radial-gradient(ellipse 60% 50% at 40% 45%, black 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 40% 45%, black 0%, transparent 100%);
}
.painting--about .art-line {
  position: absolute; top: 65%; left: 10%; right: 10%;
  height: 2px; background: var(--blue);
}

/* ── CANVAS ART — Work ── */
.painting--work .p-canvas {
  width: clamp(400px, 38vw, 580px);
  height: clamp(240px, 22vw, 340px);
  background: var(--black);
}
.painting--work .art-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 30px 30px;
}
.painting--work .art-block {
  position: absolute; top: 20%; right: 15%;
  width: 35%; height: 55%;
  border: 1.5px solid var(--blue); opacity: 0.6;
}
.painting--work .art-block::after {
  content: ''; position: absolute;
  top: 12px; left: 12px; right: -12px; bottom: -12px;
  background: var(--blue); opacity: 0.08;
}
.painting--work .art-text {
  position: absolute; bottom: 18%; left: 12%;
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: clamp(1.4rem, 2.5vw, 2.2rem);
  color: rgba(255,255,255,0.08); text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ── CANVAS ART — Team ── */
.painting--team .p-canvas {
  width: clamp(260px, 26vw, 400px);
  height: clamp(260px, 26vw, 400px);
  background: var(--blue);
}
.painting--team .art-circle {
  position: absolute;
  width: 70%; height: 70%; top: 15%; left: 15%;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 50%;
}
.painting--team .art-label {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: clamp(2.5rem, 4vw, 4rem);
  color: rgba(255,255,255,0.15);
  letter-spacing: -0.02em;
}
.painting--team .art-dot-sm {
  position: absolute; top: 22%; right: 22%;
  width: 10px; height: 10px;
  background: rgba(255,255,255,0.4); border-radius: 50%;
}

/* ── CANVAS ART — Contact ── */
.painting--contact .p-canvas {
  width: clamp(200px, 18vw, 290px);
  height: clamp(300px, 32vw, 440px);
  background: var(--white);
}
.painting--contact .art-cross {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.painting--contact .art-cross::before {
  content: ''; position: absolute;
  width: 1px; height: 80px; background: var(--black);
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  opacity: 0.12;
}
.painting--contact .art-cross::after {
  content: ''; position: absolute;
  width: 80px; height: 1px; background: var(--black);
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  opacity: 0.12;
}
.painting--contact .art-dot-red {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 8px; height: 8px;
  background: var(--red); border-radius: 50%;
}
.painting--contact .art-corner {
  position: absolute; bottom: 15%; right: 15%;
  width: 40%; height: 1px; background: rgba(0,0,0,0.06);
}
.painting--contact .art-contact-text {
  position: absolute; bottom: 18%; right: 12%;
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: clamp(0.85rem, 1.6vw, 1.2rem);
  text-transform: uppercase; letter-spacing: -0.01em;
  text-align: right; line-height: 1.1;
  color: rgba(0,0,0,0.1);
}

/* ── Exhibition number ── */
.p-number {
  position: absolute; top: -40px; right: 0;
  font-family: 'Space Mono', monospace;
  font-size: 0.5rem; letter-spacing: 0.3em;
  color: var(--grey); opacity: 0.4;
  transition: opacity 0.4s ease;
}

/* ── Museum label ── */
.p-label {
  position: absolute; bottom: -80px; left: 0;
  opacity: 0.85; transition: opacity 0.4s ease;
}
.p-label h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--black);
}
.p-label p {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem; color: var(--grey-dark);
  margin-top: 0.3rem; letter-spacing: 0.08em;
}

/* ── End of exhibition ── */
.end-section {
  flex-shrink: 0; min-width: 80vw; height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 10vh 2rem 18vh; text-align: center;
}
.end-section .end-tag {
  font-family: 'Space Mono', monospace;
  font-size: 0.5rem; letter-spacing: 0.5em;
  text-transform: uppercase; color: var(--grey);
  margin-bottom: 0.8rem;
}
.end-section p {
  font-family: 'Syne', sans-serif;
  font-weight: 600; font-size: clamp(1rem, 2vw, 1.6rem);
  color: var(--black); letter-spacing: 0.02em;
}
.end-section p span { color: var(--blue); }


/* ============================================================
   CONTENT PAGES (about, work, team, contact)
   ============================================================ */

/* ── Back button ── */
.pg-back {
  position: fixed; top: 2rem; right: 2rem; z-index: 30;
  background: none; border: 1.5px solid var(--black);
  padding: 0 1.2rem; height: 44px; cursor: pointer;
  display: flex; align-items: center; gap: 0.5rem;
  transition: all 0.3s ease; text-decoration: none;
  font-family: 'Space Mono', monospace;
  font-size: 0.5rem; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--black);
}
.pg-back:hover { background: var(--black); color: var(--white); }
.pg-back .back-arrow {
  width: 14px; height: 1.5px; background: currentColor;
  position: relative; flex-shrink: 0;
}
.pg-back .back-arrow::before {
  content: ''; position: absolute; left: 0; top: -3.5px;
  width: 8px; height: 8px;
  border-left: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}

/* ── Page content wrapper ── */
.pg-content {
  max-width: 720px; margin: 0 auto;
  padding: calc(10vh + 4rem) 2rem calc(10vh + 3rem);
}
.pg-tag {
  font-family: 'Space Mono', monospace;
  font-size: 0.55rem; letter-spacing: 0.5em;
  text-transform: uppercase; color: var(--blue); font-weight: 400;
}
.pg-content h2 {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: clamp(2rem, 5vw, 3.5rem);
  margin: 0.4rem 0 1.2rem; line-height: 1.05;
  letter-spacing: -0.02em; text-transform: uppercase;
}
.pg-line { width: 40px; height: 2px; background: var(--blue); margin-bottom: 2rem; }
.pg-content p {
  font-size: 0.95rem; line-height: 1.85;
  color: var(--grey-dark); margin-bottom: 1.2rem; font-weight: 300;
}
.callout {
  font-family: 'Syne', sans-serif;
  font-size: 1.2rem; font-weight: 600;
  color: var(--black); line-height: 1.5;
  border-left: 3px solid var(--blue);
  padding-left: 1.5rem; margin: 2rem 0;
  letter-spacing: -0.01em;
}

/* ── Team grid ── */
.team-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 2rem; margin-top: 2rem;
}
.tm { text-align: center; }
.tm-avatar {
  width: 80px; height: 80px;
  margin: 0 auto 0.8rem;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 1.4rem; color: var(--white);
  background: var(--black);
}
.tm h4 { font-family: 'Syne', sans-serif; font-size: 0.8rem; font-weight: 600; margin-bottom: 0.1rem; }
.tm p  { font-family: 'Space Mono', monospace; font-size: 0.55rem; color: var(--grey-dark); letter-spacing: 0.1em; text-transform: uppercase; margin: 0; }

/* ── Work cards ── */
.wk-grid { display: grid; gap: 1.2rem; margin-top: 2rem; }
.wk-card {
  border: 1.5px solid var(--grey-light); padding: 1.8rem;
  transition: all 0.3s ease; position: relative;
  overflow: hidden;
}
.wk-card::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 3px; height: 100%; background: var(--blue);
  transform: scaleY(0); transform-origin: top;
  transition: transform 0.4s ease;
}
.wk-card:hover { border-color: var(--black); }
.wk-card:hover::before { transform: scaleY(1); }
.wk-card .wk-tag {
  font-family: 'Space Mono', monospace;
  font-size: 0.5rem; letter-spacing: 0.35em;
  text-transform: uppercase; color: var(--blue);
  margin-bottom: 0.5rem; display: inline-block;
}
.wk-card h4 {
  font-family: 'Syne', sans-serif; font-size: 1.1rem;
  font-weight: 700; margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}
.wk-card p { font-size: 0.85rem; line-height: 1.7; color: var(--grey-dark); font-weight: 300; }

/* ── Contact form ── */
.ct-form { margin-top: 2rem; }
.ct-form .fg { margin-bottom: 1.5rem; }
.ct-form label {
  display: block; font-family: 'Space Mono', monospace;
  font-size: 0.5rem; letter-spacing: 0.4em;
  text-transform: uppercase; color: var(--grey-dark);
  margin-bottom: 0.5rem;
}
.ct-form input, .ct-form textarea {
  width: 100%; padding: 0.8rem 0;
  border: none; border-bottom: 1.5px solid var(--grey-light);
  background: transparent; font-family: 'Inter', sans-serif;
  font-size: 0.95rem; font-weight: 300; color: var(--black);
  transition: border-color 0.3s ease; outline: none;
}
.ct-form input:focus, .ct-form textarea:focus { border-bottom-color: var(--blue); }
.ct-form textarea { resize: vertical; min-height: 100px; }
.ct-form button {
  background: var(--black); color: var(--white);
  border: none; padding: 0.9rem 2.5rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem; letter-spacing: 0.3em;
  text-transform: uppercase; cursor: pointer;
  transition: all 0.3s ease;
}
.ct-form button:hover { background: var(--blue); }


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  /* Museum paintings */
  .painting--about .p-canvas   { width: 200px; height: 280px; }
  .painting--work .p-canvas    { width: 320px; height: 200px; }
  .painting--team .p-canvas    { width: 220px; height: 220px; }
  .painting--contact .p-canvas { width: 170px; height: 260px; }
  .gap--m { width: 70px; }
  .gap--l { width: 120px; }
  .p-label { bottom: -70px; }

  /* Nav & buttons */
  .nav-fixed { top: 1.2rem; left: 1.2rem; }
  .pg-back   { top: 1rem; right: 1rem; height: 38px; }

  /* Content page padding */
  .pg-content { padding: calc(10vh + 3rem) 1.5rem calc(10vh + 2rem); }
}
