/* ============================================================
   COSMO PHOTOBOOTH — Landing Page CSS
   Celestial / Royal Cosmic Theme
   Colors matched precisely to the reference image:
     Navy exterior:   #1E2468 → #090C30
     Dark disc:       #141520 → #07080F
     Gold art:        #D2C285
     Gear lines:      #7880B8
     Frame border:    #C8BB7A
   ============================================================ */

/* ──────────────────────────────────────────
   LANDING DESIGN TOKENS
   Aligns with the root photobooth design system
   ────────────────────────────────────────── */
:root {
  --gold:           #C8B87A;
  --gold-lt:        #E8D5A3;
  --gold-dim:       rgba(200, 184, 122, 0.5);
  --gold-border:    rgba(200, 184, 122, 0.3);
  --font-body:      'Inter', system-ui, sans-serif;
  --font-display:   'Cormorant Garamond', Georgia, serif;
  --font-accent:    'Chakra Petch', monospace;
  --txt:            #E8DFC8;
  --txt-2:          rgba(232, 223, 200, 0.65);
  --txt-3:          rgba(232, 223, 200, 0.35);
}

/* ──────────────────────────────────────────
   BODY
   ────────────────────────────────────────── */
.landing-body {
  overflow: hidden;
  height: 100dvh;
  /* Outer frame gradient */
  background: linear-gradient(to bottom, #2b2f5c, #101227);
}

/* ──────────────────────────────────────────
   BACKGROUND IMAGE LAYER
   ────────────────────────────────────────── */
.landing-bg-image {
  position: fixed;
  inset: 16px;
  z-index: 0;
  background: #0D1138 url("../assets/photobooth/background.webp") no-repeat center center;
  background-size: cover;

  -webkit-mask-image:
    radial-gradient(circle at 0 0, transparent 31.5px, black 32px),
    radial-gradient(circle at 100% 0, transparent 31.5px, black 32px),
    radial-gradient(circle at 0 100%, transparent 31.5px, black 32px),
    radial-gradient(circle at 100% 100%, transparent 31.5px, black 32px);
  -webkit-mask-size: 51% 51%;
  -webkit-mask-position: top left, top right, bottom left, bottom right;
  -webkit-mask-repeat: no-repeat;

  mask-image:
    radial-gradient(circle at 0 0, transparent 31.5px, black 32px),
    radial-gradient(circle at 100% 0, transparent 31.5px, black 32px),
    radial-gradient(circle at 0 100%, transparent 31.5px, black 32px),
    radial-gradient(circle at 100% 100%, transparent 31.5px, black 32px);
  mask-size: 51% 51%;
  mask-position: top left, top right, bottom left, bottom right;
  mask-repeat: no-repeat;
}

.landing-bg-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(9, 12, 48, 0.3); /* Dark blue overlay */
  z-index: 1;
}

#starfield-canvas {
  position: fixed;
  inset: 16px;
  width: calc(100vw - 32px);
  height: calc(100dvh - 32px);
  pointer-events: none;
  z-index: 1;
}

/* ──────────────────────────────────────────
   HERO LAYOUT — Full Screen 3-Column Grid
   ────────────────────────────────────────── */
.landing-hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background: transparent;
}

/* ──────────────────────────────────────────
   PANELS
   ────────────────────────────────────────── */
.left-panel, .center-panel, .right-panel {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

/* ──────────────────────────────────────────
   LEFT PANEL CONTENT
   ────────────────────────────────────────── */
.left-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 16px;
  padding: 40px 32px 40px 48px;
  max-width: 480px;
}

/* ── Logo Row ── */
.left-title.logo-title {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  margin: 0;
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  background-clip: unset;
  filter: none;
}

.title-logo {
  height: clamp(50px, 7vw, 80px);
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 12px rgba(200, 184, 122, 0.2));
}

.logo-x-icon {
  color: #C8B87A;
  opacity: 0.85;
  flex-shrink: 0;
  margin: 0 2px;
}

/* ── Project Badge ── */
.project-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 14px;
  background: rgba(200, 184, 122, 0.1);
  border: 1px solid rgba(200, 184, 122, 0.3);
  border-radius: 999px;
  font-family: var(--font-accent);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ── Description ── */
.booth-description {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  line-height: 1.65;
  color: #e2e8f0;
  max-width: 380px;
  margin: 0;
}

/* ── Back Button (Muted) ── */
.enter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px 10px 20px;
  border-radius: 999px;
  font-family: var(--font-accent);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #94A3B8;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
  text-decoration: none;
  align-self: flex-start;
  margin-top: 8px;
}

.enter-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.enter-btn:active {
  transform: translateY(0);
}

.enter-btn svg {
  transition: transform 0.2s ease;
}

.enter-btn:hover svg {
  transform: translateX(-4px);
}

/* ──────────────────────────────────────────
   FLIP CONTAINER (Center Booth Image)
   ────────────────────────────────────────── */
.flip-container {
  perspective: 2000px;
  display: block;
  text-decoration: none;
  cursor: pointer;
  z-index: 2;
  position: relative;
}

.flipper {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

/* Hover on Desktop */
@media (hover: hover) and (pointer: fine) {
  .flip-container:hover .flipper {
    transform: rotateY(180deg);
  }
}

/* Mobile — flips when in view */
.flip-container.in-view .flipper {
  transform: rotateY(180deg);
}
@media (hover: hover) and (pointer: fine) {
  .flip-container.in-view .flipper {
    transform: none;
  }
  .flip-container.in-view:hover .flipper {
    transform: rotateY(180deg);
  }
}

.flip-front, .flip-back {
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.flip-back {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  transform: rotateY(180deg);
}

/* ── Booth Image ── */
.booth-display {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  z-index: 2;
}

.booth-image {
  height: min(80dvh, 600px);
  width: auto;
  object-fit: contain;
  animation: boothFloat 5s ease-in-out infinite;
  user-select: none;
}

.flip-front .booth-image {
  filter:
    drop-shadow(0 0 30px rgba(255, 255, 255, 0.5))
    drop-shadow(0 15px 40px rgba(0, 0, 0, 0.9));
}

.flip-back .booth-image {
  filter:
    drop-shadow(0 0 30px rgba(200, 184, 122, 0.7))
    drop-shadow(0 15px 40px rgba(0, 0, 0, 0.9));
}

@keyframes boothFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

/* ── Secret Chamber Text ── */
.secret-chamber-text {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.2rem, 2.2vw, 1.9rem);
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
  background: linear-gradient(160deg, #F0E4C0 0%, #C8B87A 50%, #E8D5A3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.8));
  z-index: 5;
}

.secret-chamber-text span {
  display: block;
}

/* ──────────────────────────────────────────
   PRINTER (Right Panel)
   ────────────────────────────────────────── */
.printer-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.printer-body {
  width: 200px;
  background: linear-gradient(160deg, #131448 0%, #0C0E38 50%, #08092A 100%);
  border: 1.5px solid rgba(210, 194, 133, 0.5);
  border-bottom: none;
  border-radius: 14px 14px 0 0;
  box-shadow:
    0 -6px 40px rgba(210, 194, 133, 0.08),
    inset 0 1px 0 rgba(210, 194, 133, 0.12),
    inset 0 0 30px rgba(0, 0, 50, 0.5);
  position: relative;
  z-index: 2;
}

.printer-arch { padding: 8px 12px 0; }
.arch-deco { width: 100%; height: 18px; }

.printer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 16px 8px;
}

.printer-brand {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-accent);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--gold);
  opacity: 0.8;
}

.printer-status-led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ADE80;
  box-shadow: 0 0 8px #4ADE80;
  animation: ledPulse 2.5s ease-in-out infinite;
}

@keyframes ledPulse {
  0%, 100% { opacity: 1;   box-shadow: 0 0 8px  #4ADE80; }
  50%       { opacity: 0.3; box-shadow: 0 0 3px  #4ADE80; }
}

.printer-orbital {
  padding: 8px 16px;
  border-top:    1px solid rgba(210, 194, 133, 0.15);
  border-bottom: 1px solid rgba(210, 194, 133, 0.15);
}

.printer-orbital svg { width: 100%; height: 28px; }

.printer-slot-row {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
}

.printer-slot-line {
  flex: 1;
  height: 1px;
  background: rgba(210, 194, 133, 0.3);
}

.printer-slot-opening {
  width: 100px;
  height: 6px;
  background: #020310;
  border-radius: 3px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.9), 0 0 6px rgba(210, 194, 133, 0.2);
}

/* ── Strip Output ── */
.strip-output {
  position: relative;
  z-index: 2;
}

.strip-clip-window {
  width: 130px;
  height: 380px;
  overflow: hidden;
  background: #040410;
  border: 1.5px solid rgba(210, 194, 133, 0.4);
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.7),
    inset 0 0 20px rgba(0, 0, 20, 0.8);
}

.strip-animate {
  transform: translateY(-100%);
  animation: stripEmerge 12s cubic-bezier(0.32, 0.72, 0.28, 1) infinite;
  will-change: transform;
}

@keyframes stripEmerge {
  0%   { transform: translateY(-100%); }
  15%  { transform: translateY(-100%); }
  55%  { transform: translateY(0); }
  80%  { transform: translateY(0); }
  100% { transform: translateY(-100%); }
}

.sample-strip-img {
  width: 130px;
  display: block;
  object-fit: contain;
}

.printer-caption {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-accent);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--gold);
  opacity: 0.62;
  animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.62; }
  50%       { opacity: 1; }
}

/* ──────────────────────────────────────────
   CENTER DIVIDER
   ────────────────────────────────────────── */
.center-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  height: 50%;
  z-index: 2;
  padding: 0 16px;
}

.divider-line {
  flex: 1;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(200, 184, 122, 0.4) 30%,
    rgba(200, 184, 122, 0.4) 70%,
    transparent
  );
}

.divider-gem {
  font-size: 0.7rem;
  color: var(--gold);
  opacity: 0.7;
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────────────────────────
   RESPONSIVE — MOBILE & TABLET PORTRAIT
   Single-column, fullscreen-section scroll
   ───────────────────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) and (orientation: portrait), (max-width: 900px) {
  .landing-body {
    overflow-y: auto;
    height: auto;
  }

  .landing-bg-image {
    background-position: 73% center;
  }

  .landing-hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 0;
    height: auto;
    min-height: 100dvh;
    overflow-y: auto;
    padding: 0;
  }

  /* ── Left panel: first full screen ── */
  .left-panel {
    order: 1;
    min-height: 100dvh;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 32px;
    height: auto;
  }

  .left-content {
    padding: 0;
    max-width: 100%;
    width: 100%;
    align-items: center;
    text-align: center;
    gap: 24px; /* Increased vertical spacing */
  }

  /* Logos stacked vertically, centered, bigger */
  .left-title.logo-title {
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
  }

  .title-logo {
    width: 50%;
    max-width: 200px;
    height: auto;
  }

  .logo-x-icon {
    width: 26px;
    height: 26px;
  }

  .project-badge {
    align-self: center;
    font-size: 0.65rem;
    margin-top: 8px;
  }

  .booth-description {
    font-size: clamp(1.15rem, 5vw, 1.4rem); /* Increased font-size */
    text-align: center;
    max-width: 100%;
    line-height: 1.7;
    padding: 0 16px; /* Extra padding for description */
  }

  .enter-btn {
    align-self: center;
    padding: 13px 40px;
    font-size: 0.78rem;
    margin-top: 12px;
  }

  /* ── Center panel: second full screen ── */
  .center-panel {
    order: 2;
    min-height: 100dvh;
    height: auto;
    margin: 0;
    padding: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .booth-image {
    height: min(75dvh, 700px);
  }

  .secret-chamber-text {
    font-size: clamp(1.5rem, 6vw, 2.2rem);
  }

  /* ── Right panel: third full screen ── */
  .right-panel {
    order: 3;
    min-height: 100dvh;
    height: auto;
    margin: 0;
    padding: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .printer-body           { width: 220px; }
  .strip-clip-window      { width: 150px; height: 420px; }
  .sample-strip-img       { width: 150px; }
  .printer-slot-opening   { width: 120px; }

  .center-divider { display: none; }
}

/* ──────────────────────────────────────────
   RESPONSIVE — SMALL MOBILE (≤ 480px)
   ────────────────────────────────────────── */
@media (max-width: 480px) {
  .left-panel  { margin: 0; padding: 24px; }
  .center-panel { margin: 0; padding: 24px; }
  .right-panel { margin: 0; padding: 24px 48px 48px; }

  .title-logo {
    width: 75%;
  }

  .logo-x-icon {
    width: 22px;
    height: 22px;
  }

  .booth-description {
    font-size: clamp(1.1rem, 5.5vw, 1.3rem);
    padding: 0 12px;
  }

  .secret-chamber-text {
    font-size: clamp(1.6rem, 7vw, 1.9rem);
  }

  .printer-body           { width: 200px; }
  .strip-clip-window      { width: 134px; height: 390px; }
  .sample-strip-img       { width: 134px; }
  .printer-slot-opening   { width: 110px; }
}

/* ──────────────────────────────────────────
   COSMO BORDERS (Overlay)
   ────────────────────────────────────────── */
.cosmo-borders {
  position: fixed;
  inset: 16px;
  z-index: 1;
  pointer-events: none;
}

.border-line {
  position: absolute;
  background: rgba(200, 187, 122, 0.5);
}

.outer-top    { top: 0; left: 31px; right: 31px; height: 1.2px; }
.outer-bottom { bottom: 0; left: 31px; right: 31px; height: 1.2px; }
.outer-left   { top: 31px; bottom: 31px; left: 0; width: 1.2px; }
.outer-right  { top: 31px; bottom: 31px; right: 0; width: 1.2px; }

.corner-svg {
  position: absolute;
  width: 32px;
  height: 32px;
}
.outer-tl { top: 0; left: 0; }
.outer-tr { top: 0; right: 0; }
.outer-bl { bottom: 0; left: 0; }
.outer-br { bottom: 0; right: 0; }

.inner-frame {
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(200, 187, 122, 0.25);
}

.star-svg {
  position: absolute;
  width: 16px;
  height: 16px;
  transform: translate(-50%, -50%);
}
.inner-tl { top: 0; left: 0; }
.inner-tr { top: 0; left: 100%; }
.inner-bl { top: 100%; left: 0; }
.inner-br { top: 100%; left: 100%; }
