/* ============================================================
   XANSHI — stylesheet
   Brand: neon lime #B8FF26 · leaf green #43A047/#7CB40B · warm dark #3D2E31
   Type:  Bebas Neue (display) · Nunito (everything else)
   ============================================================ */

/* --- self-hosted fonts (files live in the fonts/ folder) --- */
@font-face {
  font-family: 'Bebas Neue';
  src: url('../fonts/BebasNeue-Regular.ttf') format('truetype'), local('Bebas Neue');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('../fonts/Nunito-Regular.ttf') format('truetype'), local('Nunito');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('../fonts/Nunito-SemiBold.ttf') format('truetype'), local('Nunito SemiBold');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('../fonts/Nunito-Bold.ttf') format('truetype'), local('Nunito Bold');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('../fonts/Nunito-ExtraBold.ttf') format('truetype'), local('Nunito ExtraBold');
  font-weight: 800; font-style: normal; font-display: swap;
}

:root {
  --bg:        #2A2023;   /* warm dark page background */
  --bg-soft:   #3D2E31;   /* warm maroon-brown panels (matches header) */
  --card:      #473639;   /* warm raised cards / buttons */
  --ink:       #F3EEE9;   /* warm off-white text */
  --ink-dim:   #C4B6B4;   /* secondary warm text */
  --lime:      #B8FF26;   /* PRIMARY neon lime */
  --lime-dark: #A6E620;   /* lime hover */
  --green:     #9BD94A;   /* leaf green (brightened for dark bg) */
  --green-2:   #7CB40B;   /* bright leaf */
  --dark:      #211A1C;   /* deepest warm brown (buttons/footer) */
  --line:      rgba(243,238,233,.14);
  --shadow:    0 10px 28px rgba(0,0,0,.45);
  --font-display: 'Bebas Neue', 'Arial Narrow', Impact, sans-serif;
  --font-body:    'Nunito', 'Segoe UI', Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.65;
}

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

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-2); }

.container { width: min(1100px, 92%); margin-inline: auto; }
.narrow    { max-width: 720px; }

/* ================= NAVIGATION ================= */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(61,46,49,.95);
  backdrop-filter: blur(8px);
  /* soft dark seam under the nav — blends into the page instead of a line */
  border-bottom: 1px solid rgba(0,0,0,.5);
  box-shadow: 0 10px 24px rgba(0,0,0,.28);
}

.nav { display: flex; align-items: center; justify-content: space-between; padding: .9rem 0; }

.brand {
  font-family: var(--font-display);
  font-size: 1.8rem; font-weight: 400;
  color: #fff; letter-spacing: 2px;
  display: inline-flex; align-items: baseline; gap: .08rem;
}
.brand .brand-face {
  color: var(--lime);
  font-size: .41em;
  letter-spacing: 0;
  line-height: 1;
}

.nav-links { display: flex; gap: 1.6rem; list-style: none; }

.nav-links a {
  color: #fff; font-weight: 800; font-size: .85rem;
  letter-spacing: 1.2px; text-transform: uppercase;
  transition: color .2s;
  padding-bottom: 3px; border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--lime); border-bottom-color: var(--lime); }
.nav-links a.active { border-bottom-color: var(--lime); }

.nav-toggle {
  display: none; background: none; border: none;
  color: #fff; font-size: 1.6rem; cursor: pointer;
}

/* ================= HOME: 3 PORTALS ================= */

.portals {
  display: flex; gap: 0;
  height: calc(100vh - 58px);
  min-height: 520px;
  background: var(--dark);
}

.portal {
  position: relative; flex: 1; overflow: hidden;
  display: flex; align-items: flex-end;
  text-decoration: none; cursor: pointer;
  transition: flex .55s cubic-bezier(.25,.8,.3,1);
}
.portal:hover, .portal:focus-visible { flex: 1.7; outline: none; }
.portal:focus-visible .portal-title { color: var(--lime); }

/* soft dark seam where two portals meet — a transition, not a divider line */
.portal + .portal::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0;
  width: 90px; z-index: 3; pointer-events: none;
  background: linear-gradient(90deg, rgba(33,26,28,.85), rgba(33,26,28,0));
}

.portal-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transform: scale(1.02);
  transition: transform .65s ease;
}
.portal:hover .portal-bg { transform: scale(1.1); }

/* video portal background — same behaviour as .portal-bg, but it plays.
   Add class "portal-video" to a <video> inside .portal to use it. */
.portal-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform .65s ease;
}
.portal:hover .portal-video { transform: scale(1.1); }

.portal-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,12,8,.12) 25%, rgba(10,12,8,.88));
  transition: opacity .4s;
}
.portal:hover .portal-shade { opacity: .82; }

.portal-copy {
  position: relative; z-index: 2; width: 100%;
  padding: 2rem 1.8rem;
  animation: portalUp .7s both;
}
.portal:nth-child(2) .portal-copy { animation-delay: .12s; }
.portal:nth-child(3) .portal-copy { animation-delay: .24s; }

@keyframes portalUp {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}

.portal-number {
  display: block; color: var(--lime);
  font-weight: 800; font-size: .74rem; letter-spacing: 3.5px;
  margin-bottom: .35rem;
}

.portal-title {
  display: block; color: #fff;
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.8rem, 4.6vw, 4.8rem);
  line-height: .95; letter-spacing: 2.5px;
  transition: color .25s;
}
.portal:hover .portal-title { color: var(--lime); }

.portal-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: .7rem; color: #DDDEDA;
  font-weight: 700; font-size: .76rem; letter-spacing: 2.5px;
}
.portal-arrow { color: var(--lime); font-size: 1.15rem; transition: transform .3s; }
.portal:hover .portal-arrow { transform: translateX(9px); }

/* ================= SHARED PAGE PARTS ================= */

.page-hero {
  padding: 4.2rem 0 2.4rem; text-align: center;
  background:
    radial-gradient(560px 200px at 50% -40px, rgba(184,255,38,.20), transparent),
    #3D2E31;
  /* soft dark seam above and below, blending into the neighbouring bands */
  border-top: 1px solid rgba(0,0,0,.5);
  border-bottom: 1px solid rgba(0,0,0,.5);
  box-shadow: inset 0 18px 26px -26px rgba(0,0,0,.8), inset 0 -18px 26px -26px rgba(0,0,0,.8);
}
.page-hero h1 {
  font-family: var(--font-display); font-weight: 400;
  color: #fff;
  letter-spacing: 3px; font-size: clamp(2.6rem, 6vw, 4rem);
  line-height: 1;
}
.page-hero p { color: #E6E2E3; margin-top: .6rem; font-weight: 600; }

.section { padding: 4.5rem 0; }

/* neighbouring sections are separated by a soft dark seam, so they read as
   one continuous page rather than separate stacked boxes. */
.section + .section {
  border-top: 1px solid rgba(0,0,0,.45);
  box-shadow: inset 0 18px 26px -26px rgba(0,0,0,.75);
}
/* sections that alternate to a different background */
.section.alt { background: var(--bg-soft); }

.section-title {
  font-family: var(--font-display); font-weight: 400;
  letter-spacing: 2.5px; line-height: 1;
  font-size: clamp(2.1rem, 4.6vw, 3rem);
  text-align: center; margin-bottom: .6rem;
}
.section-title.left { text-align: left; }

.section-title::after {
  content: ""; display: block; width: 74px; height: 5px;
  background: var(--lime); border-radius: 3px;
  margin: .65rem auto 0;
}
.section-title.left::after { margin-left: 0; }

.section-sub { text-align: center; color: var(--ink-dim); margin-bottom: 2.5rem; font-weight: 600; }

/* ================= BUTTONS ================= */

.btn {
  display: inline-block;
  background: var(--lime);
  color: var(--dark); font-weight: 800; letter-spacing: .4px;
  padding: .8rem 1.9rem; border-radius: 8px; border: none;
  font-family: var(--font-body); font-size: .95rem;
  cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover {
  background: var(--lime-dark); color: var(--dark);
  transform: translateY(-2px); box-shadow: var(--shadow);
}

.btn.ghost {
  background: transparent; color: var(--lime);
  border: 2px solid var(--lime);
}
.btn.ghost:hover { background: var(--lime); color: var(--dark); }

.btn.dark { background: var(--dark); color: var(--lime); }
.btn.dark:hover { background: #000; color: var(--lime); }

/* ================= COMMISSION CTA BAND ================= */

.cta-band { background: var(--lime); color: var(--dark); padding: 2.6rem 0; }
.cta-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
}
.cta-band h2 {
  font-family: var(--font-display); font-weight: 400;
  letter-spacing: 2px; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1;
}
.cta-band p { font-weight: 700; opacity: .8; }

/* ================= GALLERY ================= */

.filters { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-bottom: 2.2rem; }

.filters button {
  background: var(--card); color: var(--ink);
  border: 2px solid rgba(243,238,233,.35); border-radius: 999px;
  padding: .45rem 1.2rem; cursor: pointer;
  font-family: var(--font-body); font-weight: 800; font-size: .8rem;
  letter-spacing: .8px; text-transform: uppercase;
  transition: all .2s;
}
.filters button:hover { border-color: var(--green-2); color: var(--lime); }
.filters button.active { background: var(--lime); border-color: var(--lime); color: var(--dark); }

.art-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.2rem;
}

.art-item {
  position: relative;
  border-radius: 14px; overflow: hidden; cursor: zoom-in;
  border: 2px solid transparent; background: var(--card);
  transition: transform .2s, box-shadow .2s, border-color .2s;
  box-shadow: 0 4px 14px rgba(15,17,14,.12);
  aspect-ratio: 1;
}
.art-item:hover { border-color: var(--lime); box-shadow: var(--shadow); }

/* the panning image: scaled up so it can move without leaving gaps */
.art-item .art-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.12);
  transform-origin: center;
  transition: transform .45s cubic-bezier(.25,.8,.3,1);
  will-change: transform;
}

/* title overlay, like Yuumei's tiles */
.art-item .art-caption {
  position: absolute; inset: auto 0 0 0;
  padding: 1.6rem .9rem .8rem;
  background: linear-gradient(180deg, transparent, rgba(10,12,8,.85));
  display: flex; align-items: flex-end; justify-content: space-between; gap: .5rem;
  opacity: 0; transform: translateY(8px);
  transition: opacity .3s, transform .3s;
  pointer-events: none;
}
.art-item:hover .art-caption { opacity: 1; transform: none; }

.art-caption .art-title {
  font-family: var(--font-display); font-weight: 400;
  letter-spacing: 1.5px; font-size: 1.15rem; line-height: 1;
  color: #fff;
}
.art-caption .art-cat {
  font-weight: 800; font-size: .62rem; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--lime);
  white-space: nowrap;
}
.art-caption .art-arrow { color: var(--lime); font-weight: 800; }

/* touch devices: no hover, so show the caption + skip panning */
@media (hover: none) {
  .art-item .art-img { transform: none; }
  .art-item .art-caption { opacity: 1; transform: none; }
}

/* ================= LIGHTBOX ================= */

.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(12,14,11,.95);
  display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }

.lightbox-content { max-width: 88vw; max-height: 88vh; text-align: center; }
.lightbox-content img { max-width: 88vw; max-height: 76vh; border-radius: 10px; margin-inline: auto; }
.lightbox-content p { margin-top: .8rem; color: var(--lime); font-weight: 800; font-size: 1.1rem; letter-spacing: 1px; }

.lightbox button {
  position: absolute; background: none; border: none;
  color: var(--lime); font-size: 2.2rem; cursor: pointer; opacity: .7;
}
.lightbox button:hover { opacity: 1; }
.lightbox-close { top: 1rem; right: 1.4rem; }
.lightbox-prev  { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 1rem; top: 50%; transform: translateY(-50%); }

/* ================= CONTACT PAGE ================= */

.contact-grid {
  display: grid; grid-template-columns: 1fr 1.15fr;
  gap: 2.2rem; align-items: start;
}

.contact-panel {
  background: var(--card); border-radius: 16px;
  padding: 2rem; box-shadow: 0 4px 14px rgba(15,17,14,.12);
}

.contact-panel h2 {
  font-family: var(--font-display); font-weight: 400;
  letter-spacing: 2px; font-size: 1.9rem; line-height: 1;
  margin-bottom: 1rem;
}

.portrait {
  width: 100%;
  border-radius: 14px; border: 3px solid var(--lime);
  box-shadow: 8px 8px 0 var(--dark);
}

.contact-panel .portrait.small {
  max-width: 200px; border-width: 3px;
  box-shadow: 6px 6px 0 var(--lime);
  margin-bottom: 1.2rem;
}

.contact-panel p { color: var(--ink-dim); margin-bottom: .9rem; }

.what-i-do { list-style: none; display: grid; gap: .45rem; margin-top: .4rem; }
.what-i-do li { font-weight: 700; color: var(--ink); }
.what-i-do li::before { content: "→ "; color: var(--green); font-weight: 800; }

.direct-links { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.2rem; }

.copy-email {
  position: relative;
  background: var(--dark); color: var(--lime);
  border: none; border-radius: 8px; padding: .8rem 1.6rem;
  font-family: var(--font-body); font-weight: 800; font-size: .95rem;
  cursor: pointer; transition: transform .15s, box-shadow .15s;
}
.copy-email:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.copy-feedback {
  position: absolute; left: 50%; top: -2rem;
  transform: translateX(-50%);
  background: var(--lime); color: var(--dark);
  font-weight: 800; font-size: .72rem; letter-spacing: 1.5px;
  padding: .2rem .7rem; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.copy-feedback.show { opacity: 1; }

/* ================= FORM ================= */

.contact-form { display: grid; gap: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }

.contact-form label { display: grid; gap: .4rem; font-size: .85rem; font-weight: 800; color: var(--ink); letter-spacing: .5px; }

.contact-form input,
.contact-form select,
.contact-form textarea {
  background: #211A1C; color: var(--ink);
  border: 2px solid var(--line); border-radius: 8px;
  padding: .7rem .9rem; font-family: var(--font-body); font-size: 1rem;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus { outline: none; border-color: var(--green-2); }

.form-note { color: var(--ink); font-weight: 800; font-size: .88rem; }

/* ================= FAQ ================= */

.faq {
  background: var(--card); border: 2px solid var(--line);
  border-radius: 10px; padding: 1rem 1.2rem; margin-bottom: .8rem;
}
.faq summary { cursor: pointer; font-weight: 800; color: var(--ink); }
.faq p { margin-top: .6rem; color: var(--ink-dim); }

/* ================= FOOTER ================= */

.site-footer {
  background: var(--dark); color: #C4B6B4;
  padding: 2rem 0; margin-top: 3rem;
  border-top: 1px solid rgba(0,0,0,.5);
  box-shadow: inset 0 18px 26px -26px rgba(0,0,0,.8);
}
.footer-inner { text-align: center; }
.footer-inner p { color: #A2948F; font-size: .85rem; }

.socials { display: flex; gap: 1.4rem; justify-content: center; margin-bottom: .8rem; }
.socials a { color: #D8CCC7; font-weight: 800; font-size: .85rem; letter-spacing: 1px; text-transform: uppercase; transition: color .2s; }
.socials a:hover { color: var(--lime); }

/* ================= PROJECT VIEWER (15% / 70% / 15%) ================= */

.viewer {
  display: grid;
  grid-template-columns: 15% 70% 15%;
  height: calc(100vh - 58px);
  min-height: 480px;
  overflow: hidden;
  background: #1A1315;
}

/* each side rail: its own column, separate from the image */
.viewer-rail {
  display: flex; flex-direction: column;
  gap: .5rem; padding: 1rem .85rem;
  overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin;
  background: var(--bg-soft);
}
.viewer-rail.left  { border-right: 1px solid var(--line); }
.viewer-rail.right { border-left: 1px solid var(--line); }

.viewer-rail-title {
  font-family: var(--font-display); font-weight: 400;
  letter-spacing: 2px; font-size: 1.1rem; line-height: 1;
  color: var(--ink);
  margin-bottom: .3rem;
  padding-bottom: .5rem;
  border-bottom: 3px solid var(--lime);
}

/* middle : the stage (image in its own 70% column) */
.stage {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  background: #1A1315;
  overflow: hidden;
}

.stage-frame {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.stage-frame img {
  width: 100%; height: 100%;
  object-fit: contain;
  cursor: zoom-in;
  background: #1A1315;
}
.stage-placeholder {
  color: #6E7175; font-weight: 800; letter-spacing: 2px; font-size: .85rem;
  position: relative; z-index: 2;
}

/* caption floats at the bottom of the image column */
.stage-caption {
  position: absolute; left: 50%; bottom: 1rem;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: .9rem;
  background: rgba(42,32,35,.82);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(184,255,38,.28);
  border-radius: 999px;
  padding: .45rem 1.15rem;
  white-space: nowrap;
  z-index: 3;
}
.stage-caption h2 {
  font-family: var(--font-display); font-weight: 400;
  letter-spacing: 1.5px; font-size: 1.25rem; line-height: 1;
  color: var(--lime);
}
.stage-caption p { color: #D8CCC7; font-size: .78rem; font-weight: 700; letter-spacing: .5px; }

/* left : project list */
.project-list { display: grid; gap: .55rem; align-content: start; }

.project-btn {
  display: flex; align-items: center; gap: .7rem;
  background: var(--card); border: 2px solid transparent;
  border-radius: 12px; padding: .5rem; cursor: pointer;
  text-align: left; font-family: var(--font-body);
  transition: border-color .2s, transform .2s, box-shadow .2s;
  box-shadow: 0 3px 10px rgba(15,17,14,.1);
}
.project-btn:hover { transform: translateX(3px); border-color: var(--green-2); }
.project-btn.active { border-color: var(--lime); box-shadow: var(--shadow); }

.project-btn .thumb {
  width: 46px; height: 46px; flex: 0 0 46px;
  border-radius: 8px; overflow: hidden; background: var(--bg-soft);
}
.project-btn .thumb img { width: 100%; height: 100%; object-fit: cover; }

.project-btn .p-info { display: grid; line-height: 1.25; min-width: 0; }
.project-btn .p-num { font-weight: 800; font-size: .64rem; letter-spacing: 2px; color: var(--green); }
.project-btn .p-name { font-weight: 800; font-size: .88rem; color: var(--ink); }

/* right : pages / frames */
.page-list { display: grid; gap: .45rem; align-content: start; }

.page-btn {
  display: flex; align-items: center; justify-content: space-between;
  gap: .4rem;
  background: var(--card); border: 2px solid transparent;
  border-radius: 10px; padding: .5rem .7rem; cursor: pointer;
  font-family: var(--font-body); font-weight: 800; font-size: .78rem;
  letter-spacing: .5px; color: var(--ink); text-align: left;
  transition: border-color .2s, background .2s;
  box-shadow: 0 3px 10px rgba(15,17,14,.1);
}
.page-btn:hover { border-color: var(--green-2); }
.page-btn.active { background: var(--lime); border-color: var(--lime); color: var(--dark); }
.page-btn .page-arrow { opacity: .5; }

@media (max-width: 900px) {
  .viewer { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .stage { order: -1; height: 52vh; }
  .viewer-rail { overflow: visible; }
  .viewer-rail.right { border-left: none; }
  .viewer-rail.left  { border-right: none; }
  .project-list, .page-list { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; padding-bottom: .4rem; }
  .project-btn { min-width: 190px; }
  .page-btn { min-width: 110px; }
  .stage-caption { bottom: .6rem; }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #3D2E31; border-bottom: 1px solid rgba(184,255,38,.25);
    flex-direction: column; gap: 0; padding: .5rem 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: .9rem 1.5rem; border-bottom: none; }

  .portals { flex-direction: column; height: auto; min-height: 0; }
  .portal { min-height: 34vh; }
  .portal:hover { flex: 1; }

  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .section { padding: 3rem 0; }
}
