/* Shared base — fonts, tokens, stage, nav, buttons, cards */
/* DigitalX Exhibition — Phase 2 visual system (1920x1080 first) */

@font-face {
  font-family: "Poppins";
  src: url("../../assets/fonts/Poppins-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("../../assets/fonts/Poppins-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("../../assets/fonts/Poppins-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("../../assets/fonts/Poppins-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --teal: #008489;
  --teal-dark: #066068;
  --teal-title: #0a7a84;
  --blue: #1e88e5;
  --blue-dark: #0b5cad;
  --blue-bright: #0096eb;
  --blue-nav: #1e9af0;
  --green: #2d9a5a;
  --green-soft: #58ad78;
  --green-light: #70c18d;
  --text: #222222;
  --text-muted: #4a5568;
  --card-bg: #ffffff;
  --shadow: 0 8px 22px rgba(20, 50, 80, 0.12);
  --shadow-soft: 0 4px 14px rgba(20, 50, 80, 0.08);
  --radius: 20px;
  --radius-lg: 28px;
  --radius-sm: 14px;
  --nav-size: 44px;
  --page-pad-x: 48px;
  --page-pad-y: 28px;
  --font: Arial, Helvetica, sans-serif;
  --font-display: "Poppins", Arial, Helvetica, sans-serif;
  --gradient-title: linear-gradient(90deg, #328999 0%, #0291f7 100%);
  --transition: 260ms ease;
  /*
   * Design artboard: 1920×1080 (100% reference).
   * Contain-scale keeps the full UI visible at the correct size.
   *   1920×1080 → 1
   *   2560×1440 → ≈1.333
   *   3840×2160 → 2
   * Letterbox gaps (if any) are filled by .bg-layer cover — not white bars.
   */
  --artboard-w: 1920;
  --artboard-h: 1080;
  --stage-scale: min(100vw / 1920px, 100vh / 1080px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body,
#app {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

html,
body {
  font-family: var(--font);
  color: var(--text);
  background: #f4fafd;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

body {
  user-select: none;
  -webkit-user-select: none;
}

img,
svg {
  display: block;
  pointer-events: none;
}

/* Fluid images outside fixed artboard assets */
.listing-media,
.mascot,
.media-placeholder img,
.detail-media:not(.video-player) img {
  max-width: 100%;
  height: auto;
}

button {
  font-family: inherit;
  border: none;
  cursor: pointer;
  user-select: none;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(30, 136, 229, 0.55);
  outline-offset: 3px;
}

.app {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Full-viewport background — always edge-to-edge on any screen size */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  background-color: #f4fafd;
  background-image: url("../../assets/images/background/digitalx-bg.svg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.bg-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 40%, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.08) 50%, rgba(210, 235, 245, 0.18) 100%);
  pointer-events: none;
}

/* Centers the 16:9 stage; gaps show the full-bleed background */
.stage-shell {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
  background: transparent;
}

/*
 * Fixed 1920×1080 design canvas, contain-scaled to the viewport.
 * Prefer `zoom` over `transform: scale` — Chrome/Safari rasterize much sharper
 * (transform-scale caused soft → snap-sharp on page changes).
 */
.stage {
  position: relative;
  width: calc(var(--artboard-w) * 1px);
  height: calc(var(--artboard-h) * 1px);
  aspect-ratio: 16 / 9;
  flex-shrink: 0;
  zoom: var(--stage-scale);
  transform: none;
  transform-origin: center center;
  pointer-events: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
}

@supports not (zoom: 1) {
  .stage {
    zoom: unset;
    transform: scale(var(--stage-scale));
  }
}

.pages {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.page {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: var(--page-pad-y) var(--page-pad-x);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  /* Instant switch — no fade/scale (avoids soft-then-sharp paint) */
  transition: none;
}

.page.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.page-title {
  margin: 0;
  text-align: center;
  font-size: 48px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.15;
  color: #111111;
}

.page-title.teal {
  color: var(--teal-title);
}

.page-subtitle {
  margin: 6px 0 0;
  text-align: center;
  font-size: 22px;
  color: var(--text);
  font-weight: 600;
}

.page-header {
  flex: 0 0 auto;
  margin-bottom: 18px;
}


.page-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.page-body-center {
  align-items: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.8rem 1.8rem;
  border-radius: 999px;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  transition:
    transform 140ms ease,
    filter 140ms ease,
    box-shadow 140ms ease;
  box-shadow: 0 6px 16px rgba(15, 60, 120, 0.18);
}

.btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.btn:active {
  transform: scale(0.97);
  filter: brightness(0.98);
}

.btn-blue {
  background: linear-gradient(90deg, #1e88e5 0%, #42a5f5 100%);
}

.btn-green {
  background: linear-gradient(90deg, #70c18d 0%, #49a56f 100%);
}

.btn-teal {
  background: linear-gradient(90deg, #14a39a 0%, #2d9a5a 100%);
}

.btn-wide {
  width: 100%;
  max-width: 100%;
}

/* Listing More Info — CSS chrome (no SVG) · r63 · inset #FFFFFF66 */
.btn-more-info {
  position: relative;
  width: 449px;
  max-width: 100%;
  height: 90.0113525390625px;
  min-height: 90.0113525390625px;
  padding: 0;
  border: none;
  border-radius: 63px;
  background: linear-gradient(213.04deg, #0291f7 23.89%, #00adee 135.2%);
  box-shadow: inset 0 4px 1px 0 #ffffff66;
  overflow: visible;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 180ms ease,
    filter 180ms ease;
}

.btn-more-info::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(180deg, #80dd72 0%, #0291f7 100%);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.btn-more-info span {
  position: relative;
  z-index: 1;
  color: #fff;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.05;
}

.btn-more-info:hover,
.btn-more-info:focus,
.btn-more-info:focus-visible {
  outline: none;
  filter: brightness(1.05);
}

.btn-more-info:active {
  transform: scale(0.97);
  filter: none;
}

/* Agents More Info — Figma 448.53×88 · green fill / border */
.btn-more-info--agent {
  width: 448.5273132324219px;
  height: 88px;
  min-height: 88px;
  background: linear-gradient(213.04deg, #68c085 23.89%, #328999 135.2%);
}

.btn-more-info--agent::before {
  background: linear-gradient(180deg, #80dd72 0%, #4db7a9 100%);
}

/* Circular nav controls — bottom right of artboard
   Assets (home.svg / arrow-right.svg) already include the blue circle. */
.nav-controls {
  position: absolute;
  right: 40px;
  bottom: 32px;
  z-index: 20;
  display: flex;
  gap: 14px;
}

.nav-btn {
  width: var(--nav-size);
  height: var(--nav-size);
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  transition: filter 280ms cubic-bezier(0.22, 1, 0.36, 1);
  filter: drop-shadow(0 4px 10px rgba(22, 119, 210, 0.28));
}

.nav-btn--back img {
  transform: scaleX(-1);
}

.nav-btn:hover,
.nav-btn:focus,
.nav-btn:focus-visible {
  outline: none;
  transform: translateY(-2px);
}

.nav-btn:hover img,
.nav-btn:focus-visible img {
  filter:
    brightness(1.06)
    drop-shadow(0 8px 16px rgba(22, 119, 210, 0.35));
}

.nav-btn:active {
  transform: translateY(0) scale(0.96);
}

.nav-btn.is-hidden {
  display: none;
}

/* Detail routes — smaller nav so controls don't cover footnote / side cards */
.app.is-detail-view .nav-controls {
  --nav-size: 44px;
  gap: 10px;
  right: 28px;
  bottom: 22px;
}

/* Cards */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.card-clickable {
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.card-clickable:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(15, 40, 70, 0.14);
}

.card-clickable:active {
  transform: scale(0.985);
}

