/* =========================================================
   STUDIO STEVIE — GLOBAL + HOME + PAGES
   ========================================================= */

/* =========================================================
   0) Base Reset + Globals
   ========================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  background: #000;
}

body {
  margin: 0;
  padding: 0;
  background: #000;
  color: #fff;
  font-family: "Montserrat", sans-serif;
  overflow-x: hidden;
  overscroll-behavior: none;
  min-height: 100dvh;
  min-height: 100svh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.page {
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
}

/* =========================================================
   1) Design Tokens
   ========================================================= */
:root {
  /* Mini gallery (mg) */
  --mg-radius: 18px;
  --mg-gap: 18px;

  --mg-btn-size: 44px;
  --mg-btn-bg: rgba(255, 255, 255, 0.10);
  --mg-btn-border: rgba(255, 255, 255, 0.18);

  --mg-dot: rgba(255, 255, 255, 0.35);
  --mg-dot-active: rgba(255, 255, 255, 0.90);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .mg__track,
  .mg__slide,
  .mg__slide img {
    transition: none !important;
  }
}

/* =========================================================
   2) HOME — Split Layout (Hero + Right Content)
   ========================================================= */
.layout {
  display: grid;
  width: 100%;
  height: 100dvh;
  height: 100svh;

  grid-template-columns: 45% 1fr;
  grid-template-rows: 1fr auto;

  position: relative;
  z-index: 0;

  overflow: clip;
  contain: paint;
}

@supports not (overflow: clip) {
  .layout {
    overflow: hidden;
  }
}

/* LEFT HERO */
.left-hero {
  position: relative;
  grid-column: 1;
  grid-row: 1 / -1;

  height: 100%;
  min-height: min(600px, 100%);

  overflow: hidden;
}

.left-hero img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 30%;
}

.fade-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;

  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0) 30%,
    rgba(0, 0, 0, 0.75) 85%,
    rgba(0, 0, 0, 1) 100%
  );
}

/* HOME */
.brand{
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 0;
}

/* logo link */
.brand__logo{
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

/* logo image */
.brand__logo img{
  display: block;
  height: clamp(120px, 12vw, 240px);
  width: auto;
  filter: drop-shadow(0 12px 40px rgba(0,0,0,0.65));
}

/* vertical divider */
.brand__divider{
  width: 1px;
  height: clamp(60px, 8vw, 100px);
  background: rgba(255,255,255,0.55);
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
  flex: 0 0 1px;
}

/* tagline */
.brand__tagline{
  margin: 0;
  font-size: 1.1rem;
  opacity: 0.85;
  letter-spacing: 0.04em;
  line-height: 1.25;
}

/* RIGHT CONTENT */
.right-content {
  grid-column: 2;
  grid-row: 1;

  min-width: 0;
  min-height: 0;
  height: 100%;

  position: relative;
  z-index: 3;

  text-align: left;
  padding: clamp(28px, 5vh, 60px) 40px 24px;

  display: grid;
  gap: 18px;
  grid-template-rows: auto auto minmax(0, 1fr);

  overflow: visible;
}

.right-content h1 {
  margin: 0;

  font-family: "League Spartan", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 400;
  font-size: clamp(4.2rem, 6.4vw, 6.4rem);

  letter-spacing: 0.02em;
  line-height: 0.88;

  text-shadow:
    0 12px 40px rgba(0, 0, 0, 0.65),
    0 2px 0 rgba(255, 255, 255, 0.06);

  -webkit-text-stroke: 0.6px rgba(255, 255, 255, 0.10);

  position: relative;
  display: inline-block;
  padding-bottom: 18px;
}

.right-content h1::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;

  width: clamp(120px, 18vw, 220px);
  height: 4px;

  background: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
}

.right-content p {
  margin: 10px 0 0;
  font-size: 1.1rem;
  opacity: 0.85;
  letter-spacing: 0.04em;
}

/* =========================================================
   3) HOME — Mini Gallery (3-up carousel)
   ========================================================= */
.mini-gallery {
  width: 100%;
  max-width: min(980px, 100%);
  min-height: 0;

  margin-top: clamp(18px, 4vh, 44px);

  position: relative;
  z-index: 20;

  overflow: hidden;
}

.mg {
  position: relative;
}

/* Viewport */
.mg__viewport {
  position: relative;
  width: 100%;

  height: clamp(260px, 44vh, 680px);
  max-height: calc(100svh - 360px);

  border-radius: 22px;
  background: transparent;

  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;

  isolation: isolate;
  contain: paint;
  transform: translateZ(0);

  touch-action: pan-y;
  scroll-snap-type: x proximity;
}

.mg__viewport::-webkit-scrollbar { display: none; }

/* Sliding strip */
.mg__track {
  height: 100%;
  display: flex;
  gap: var(--mg-gap, 18px);
  align-items: center;

  position: relative;
  backface-visibility: hidden;
  will-change: transform;
  transform: scale(0.98);
  transition: transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 420ms ease;
}

/* Slide sizing */
.mg__slide {
  height: 100%;
  flex: 0 0 calc((100% - (var(--mg-gap, 18px) * 2)) / 3);

  border-radius: var(--mg-radius, 18px);
  overflow: hidden;

  opacity: 0.55;
  transform: none;
  scroll-snap-align: center;
}

/* Image scaling */
.mg__slide img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;

  transform: scale(0.94);
  transition: transform 520ms cubic-bezier(.2,.8,.2,1), opacity 420ms ease;

  pointer-events: none;
  -webkit-user-drag: none;
}

.mg__slide.is-active {
  transform: scale(1.02);
  opacity: 1;
}

.mg__slide.is-active img {
  transform: scale(1.06);
}

.mg__viewport.is-jumping .mg__slide,
.mg__viewport.is-jumping .mg__slide img {
  transition: none !important;
}

/* Arrows */
.mg__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 60;

  width: var(--mg-btn-size, 44px);
  height: var(--mg-btn-size, 44px);
  padding: 0;

  display: grid;
  place-items: center;

  border-radius: 999px;
  border: 1px solid var(--mg-btn-border);
  background: var(--mg-btn-bg);

  cursor: pointer;
  touch-action: manipulation;

  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
  transition:
    transform 240ms cubic-bezier(.2,.8,.2,1),
    background 240ms ease,
    box-shadow 240ms ease;
}

.mg__btn--prev { left: 14px; }
.mg__btn--next { right: 14px; }

.mg__btn:hover {
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
  transform: translateY(-50%) scale(1.08);
}

.mg__btn:active {
  transform: translateY(-50%) scale(0.96);
}

.mg__btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.75);
  outline-offset: 3px;
}

/* Arrow icon */
.arrow {
  width: 14px;
  height: 14px;
  position: relative;
}

.arrow::before {
  content: "";
  position: absolute;
  inset: 0;

  border-right: 3px solid #fff;
  border-bottom: 3px solid #fff;

  transform-origin: center;
  transition: transform 220ms ease;
}

.arrow--left::before { transform: rotate(135deg); }
.arrow--right::before { transform: rotate(-45deg); }

/* Dots */
.mg__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding-top: 12px;
}

.mg__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  background: var(--mg-dot, rgba(255, 255, 255, 0.35));
  cursor: pointer;
}

.mg__dot.is-active {
  background: var(--mg-dot-active, rgba(255, 255, 255, 0.90));
}

/* Prevent native drag/selection issues */
.mg__viewport,
.mg__track,
.mg__slide,
.mg__slide img {
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

/* =========================================================
   4) HOME — Bottom Fade + Bottom Nav
   ========================================================= */
.bottom-light-fade {
  position: absolute;
  bottom: 0;
  left: 0;

  width: 100%;
  height: 45vh;

  pointer-events: none;
  overflow: hidden;

  grid-column: 1 / -1;
  grid-row: 1 / -1;

  z-index: 5;

  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(255, 255, 255, 0.20) 70%,
    rgba(255, 255, 255, 0.35) 100%
  );
}

/* Bottom nav overlay */
.bottom-nav {
  grid-column: 1 / -1;
  grid-row: 2;

  position: relative;
  left: auto;
  right: auto;
  bottom: auto;

  z-index: 20;
  width: 100%;
  padding: 18px 16px 22px;
  display: flex;
  justify-content: center;

  pointer-events: auto;

  isolation: isolate;
  transform: translateZ(0);
  backface-visibility: hidden;
  background: rgba(0, 0, 0, 0.001);
}

.bottom-nav__inner {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;

  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;

  pointer-events: auto;
}

/* Buttons */
.bottom-nav a {
  position: relative;

  width: clamp(180px, 22vw, 320px);
  aspect-ratio: 4 / 1;

  border-radius: 12px;
  overflow: hidden;

  text-decoration: none;
  color: #fff;

  background: rgba(255, 255, 255, 0.20);
  border: 1px solid rgba(255, 255, 255, 0.16);

  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
  pointer-events: auto;
}

@supports ((-webkit-backdrop-filter: blur(10px)) or (backdrop-filter: blur(10px))) {
  .bottom-nav a {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

.bottom-nav a::before {
  content: "";
  position: absolute;
  inset: 0;

  opacity: 0.8;
  pointer-events: none;

  background: radial-gradient(
    120% 180% at 20% 20%,
    rgba(255, 255, 255, 0.14),
    rgba(255, 255, 255, 0.02) 45%,
    rgba(0, 0, 0, 0) 70%
  );
}

.bottom-nav a:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.13);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.bottom-nav a:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.55);
  outline-offset: 3px;
}

.bottom-nav a span {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  white-space: nowrap;

  font-size: clamp(1.05rem, 1.6vw, 1.45rem);
  letter-spacing: 0.02em;
  font-weight: 500;

  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

/* =========================================================
   5) GALLERY PAGE
   ========================================================= */
.gallery-body {
  background: #000;
  color: #fff;
  padding: 10px;
  font-family: "Montserrat", sans-serif;
}

.gallery-title {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 3px;
  margin-bottom: 20px;
}

/* Tabs */
.gallery-tabs {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

.tab-btn {
  background: transparent;
  border: 1px solid #fff;
  padding: 10px 22px;
  cursor: pointer;
  color: #fff;
  font-family: "Montserrat", sans-serif;
  letter-spacing: 1px;
  transition: 0.3s;
}

.tab-btn.active,
.tab-btn:hover {
  background: #fff;
  color: #000;
}

/* Sections */
.gallery-section {
  display: none;
}

.gallery-section.active {
  display: block;
}

/* Horizontal scroll row */
.horizontal-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 20px;
  scroll-behavior: smooth;
  cursor: grab;
}

.horizontal-scroll.is-dragging { cursor: grabbing; }

.horizontal-scroll::-webkit-scrollbar {
  height: 8px;
}

.horizontal-scroll::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 4px;
}

.horizontal-scroll img {
  height: 550px;
  width: auto;
  border-radius: 8px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.horizontal-scroll img:hover {
  transform: scale(1.05);
}

/* =========================================================
   6) ABOUT PAGE
   ========================================================= */
.about-body {
  background: #000;
  color: #fff;
  font-family: "Montserrat", sans-serif;
  padding: 10px;
}

.about-title {
  text-align: center;
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: 3px;
  margin-bottom: 60px;
}

.about-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  margin-bottom: 80px;
}

.about-section.reverse {
  flex-direction: row-reverse;
}

.about-text {
  flex: 1;
  max-width: 600px;
}

.about-text h2 {
  font-size: 2.2rem;
  margin-bottom: 20px;
  letter-spacing: 2px;
}

.about-text p {
  font-size: 1.1rem;
  line-height: 1.7;
  opacity: 0.85;
}

.about-image-wrapper {
  flex: 1;
  max-width: 450px;
  overflow: hidden;
  border-radius: 10px;
}

.about-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.about-image-wrapper img:hover {
  transform: scale(1.03);
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInMove 0.8s ease-out forwards;
}

@keyframes fadeInMove {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================
   7) SHARED TOP NAV (About/Gallery/Contact pages)
   ========================================================= */
.top-nav {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 16px 0;
  box-sizing: border-box;
}

.nav-left-logo {
  display: inline-flex;
  align-items: flex-start;
  text-decoration: none;
  margin-top: 0;
  line-height: 0;
  padding: 0;
}

.nav-left-logo img {
  display: block;
  height: 100px;
  width: auto;
  transition: transform 0.2s ease;
}

.nav-left-logo:hover img {
  transform: scale(1.04);
}

.nav-right {
  display: flex;
  gap: 30px;
  margin-top: 6px;
}

.nav-right a {
  color: #fff;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 400;
  transition: opacity 0.2s ease;
}

.nav-right a:hover {
  opacity: 0.6;
}

/* =========================================================
   8) CONTACT PAGE
   ========================================================= */
.contact-body {
  background: #000;
  color: #fff;
  font-family: "Montserrat", sans-serif;
  padding: 10px;
}

.contact-title {
  text-align: center;
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: 3px;
  margin-bottom: 10px;
}

.contact-subtitle {
  text-align: center;
  opacity: 0.7;
  margin-bottom: 50px;
  font-size: 1.1rem;
}

.contact-options {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

.contact-card {
  display: block;
  background: #111;
  padding: 30px 40px;
  border-radius: 10px;
  text-decoration: none;
  color: #fff;
  width: 260px;
  text-align: center;
  border: 1px solid #222;
  transition: 0.3s ease;
}

.contact-card:hover {
  background: #222;
  transform: translateY(-4px);
}

.contact-card h2 {
  margin: 0 0 10px 0;
  font-size: 1.4rem;
}

.contact-card p {
  opacity: 0.8;
  font-size: 1rem;
}

/* =========================================================
   9) MOBILE (<= 900px)
   ========================================================= */
@media (max-width: 900px) {
  /* HOME */
  .layout {
    height: auto;
    overflow: visible;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  .left-hero {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    min-width: 0;

    height: 56svh;
    min-height: 360px;
  }

  .brand {
    justify-content: center;
    gap: 12px;
  }

  .brand__logo img {
    height: clamp(96px, 18vw, 180px);
  }

  .brand__divider {
    height: 34px;
  }

  .brand__tagline {
    font-size: 0.98rem;
    letter-spacing: 0.03em;
    text-align: left;
  }

  .right-content {
    grid-column: 1;
    grid-row: 2;

    height: auto;
    overflow: visible;
    min-height: 0;

    padding: 28px 18px 24px;
    text-align: center;

    display: block;
  }

  .right-content h1 {
    font-size: clamp(2.6rem, 9vw, 3.4rem);
    line-height: 1.05;
    margin: 0 auto 10px;
  }

  .right-content h1::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .right-content p {
    margin: 0 auto 18px;
    font-size: 1rem;
    letter-spacing: 0.03em;
  }

  .mini-gallery {
    max-width: 560px;
    margin: 18px auto 0;
  }

  .mg__viewport {
    height: auto;
    aspect-ratio: 4 / 5;
    border-radius: 18px;
    max-height: none;

    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;

    scroll-behavior: auto;
    scroll-snap-type: none;
  }

  .mg__track {
    transform: none;
  }

  .mg__slide {
    flex: 0 0 100%;
    scroll-snap-align: none;

    opacity: 0.85;
  }

  .mg__slide img {
    transform: scale(1);
  }

  .mg__slide.is-active {
    opacity: 1;
  }

  .mg__slide.is-active img {
    transform: scale(1.03);
  }

  .mg__btn {
    width: 46px;
    height: 46px;
  }

  .mg__btn--prev { left: 10px; }
  .mg__btn--next { right: 10px; }

  .mg__dots {
    gap: 10px;
    padding-top: 14px;
  }

  .mg__dot {
    width: 10px;
    height: 10px;
  }

  .bottom-light-fade {
    display: none !important;
  }

  .bottom-nav {
    grid-column: 1;
    grid-row: 3;

    position: static;
    margin: 22px 0 28px;
    padding: 0 16px;

    bottom: auto;
    right: auto;
    left: auto;
  }

  .bottom-nav__inner {
    max-width: 560px;
    margin: 0 auto;
    gap: 12px;
  }

  .bottom-nav a {
    width: 100%;
    max-width: 560px;
  }

  .top-nav {
    flex-direction: column;
    align-items: center;
    padding-top: 18px;
    gap: 8px;
  }

  .nav-left {
    font-size: 1.4rem;
    text-align: center;
  }

  .nav-right {
    gap: 20px;
    justify-content: center;
  }

  .nav-right a {
    font-size: 1.1rem;
  }

  .gallery-tabs {
    display: flex;
    gap: 10px;

    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;

    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    overscroll-behavior-x: contain;
    padding: 8px 2px 12px;
  }

  .tab-btn {
    flex: 0 0 auto;
  }

  .horizontal-scroll {
    display: block !important;
    overflow-x: visible !important;
    padding: 0;
  }

  .horizontal-scroll img {
    width: 90%;
    margin: 0 auto 20px auto;
    height: auto;
    display: block;
    border-radius: 12px;
  }

  /* About page */
  .about-section,
  .about-section.reverse {
    flex-direction: column;
    text-align: center;
  }

  .about-image-wrapper {
    max-width: 100%;
  }

  /* Contact page */
  .contact-options {
    flex-direction: column;
    align-items: center;
    gap: 25px;
  }

  .contact-card {
    width: 90%;
    max-width: 360px;
    padding: 25px;
  }
}
