/*******************************************************
 * BRINK XR v2 - HOME PAGE STYLES
 *******************************************************/




/************************
 * TYPOGRAPHY OVERRIDES *
 ************************/
h2 {
  font-size: var(--fs-title-lg);
}




/********
 * HERO *
 ********/
#hero {
  position: relative;
  height: 100svh;
  min-height: 680px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Multi-layer depth parallax */
.hero-parallax {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-layer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  will-change: transform;
}

/* Inner wrapper handles Ken-Burns entrance scale, separate from 
   parallax translateY set on the outer .hero-layer by JS. */
.hero-layer-img {
  width: 100%;
  height: 100%;
  transform: scale(1.1);
  transition: transform 5s ease-out;
}

.hero-parallax.loaded .hero-layer-img {
  transform: scale(1);
}

.hero-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
}

.hero-parallax::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      to bottom,
      rgba(10, 10, 10, 0.20) 0%,
      rgba(10, 10, 10, 0.05) 20%,
      rgba(10, 10, 10, 0.40) 80%,
      rgba(10, 10, 10, 0.90) 100%
    );
}

.hero-cover {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #080808;
  transition: opacity 0.8s ease;
  pointer-events: none;
}

.hero-parallax.loaded ~ .hero-cover {
  opacity: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 2rem;
  max-width: 920px;
}

.hero-content h1 {
  font-size: var(--fs-title-xl);
  color: var(--text);
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.6), 0 1px 8px rgba(0, 0, 0, 0.25);
  margin: 1rem 0;
}

.hero-content h1 em {
  color: var(--gold-dark);
}

.hero-content .hero-subtitle {
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.05em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
  margin-bottom: 6rem;
}

.hero-content .hero-ctas {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-dim);
  font-size: var(--fs-body-xs);
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  user-select: none;
}

.scroll-line {
  width: 1px;
  height: 52px;
  background: linear-gradient(to bottom, transparent, var(--gold));
  animation: scrollPulse 2.2s ease-in-out infinite;
}

.scroll-label { order: -1; }

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1);    }
  50%      { opacity: 0.9; transform: scaleY(0.85); }
}




/**************
 * TECHNOLOGY *
 **************/
#technology {
  padding: 8rem 0 0;
  background: var(--bg-2);
  overflow-x: clip;
}

.tech-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7rem;
  align-items: start;
}

.tech-text h2 {
  margin-bottom: 2rem;
}

.tech-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.tech-feature {
  display: grid;
  grid-template-columns: 30px 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.875rem;
  align-items: center;
  transition: border-color 0.3s, background 0.3s, opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}

.tech-feature-icon {
  grid-row: 1;
  grid-column: 1;
  width: 30px;
  height: 30px;
  color: var(--gold);
}

.tech-feature-icon svg {
  width: 100%;
  height: 100%;
}

.tech-feature .eyebrow {
  grid-row: 1;
  grid-column: 2;
  letter-spacing: 0.05em;
  color: var(--text);
  margin-bottom: 0;
}

.tech-feature p {
  grid-row: 2;
  grid-column: 1 / -1;
  font-size: var(--fs-body-sm);
  color: var(--text-mid);
  line-height: 1.65;
  margin-top: 0.75rem;
  margin-bottom: 0;
}

/* Technology word marquee */
.tech-marquee {
  border-top: 1px solid var(--border);
  padding: 1.4rem 0;
  background: var(--bg-2);
}

.tech-marquee .marquee-track {
  animation: marqueeLeft 80s linear infinite;
}

.tech-marquee .marquee-set {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-shrink: 0;
  padding-right: 1.5rem;
}

.tech-marquee .marquee-set span {
  font-size: var(--fs-body-xs);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}

.tech-marquee .marquee-set .sep {
  color: var(--gold);
  opacity: 0.5;
}

/* 3D Model Viewer */
.model-viewer {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-bottom: 2rem;
}

.model-callout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}
.model-callout-ring {
  width: clamp(180px, 20vw, 240px);
  height: clamp(180px, 20vw, 240px);
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--gold-border);
  flex-shrink: 0;
}
.model-callout-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.model-callout-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: center;
}
.model-callout-body p {
  font-size: var(--fs-body-xs);
  color: var(--text-mid);
  line-height: 1.5;
  max-width: 260px;
}

.model-canvas-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: center;
}

.model-canvas {
  display: block;
  width: 100%;
  cursor: grab;
  touch-action: none;
}

.model-canvas:active {
  cursor: grabbing;
}

.model-location-label {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  pointer-events: none;
  white-space: nowrap;
}

.model-location-label h3 {
  text-shadow: 0 2px 8px rgba(0,0,0,0.9), 0 4px 32px rgba(0,0,0,0.7);
}

.model-location-label .eyebrow {
  text-shadow: 0 1px 6px rgba(0,0,0,0.95), 0 2px 16px rgba(0,0,0,0.8);
  margin: 0.25rem 0 0;
}

.model-hint {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.6rem;
  color: var(--text-dim);
  font-size: var(--fs-body-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  user-select: none;
  pointer-events: none;
}

.model-hint .arrow {
  width: 14px;
  height: 14px;
}

/* Carousel wrapper */
.model-carousel {
  position: relative;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
}

.model-carousel-viewport {
  width: 100%;
  overflow: hidden;
  position: relative;
}

/* Arrow buttons — sit outside the max-width on desktop */
.model-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #888;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
  z-index: 2;
}
.model-carousel-arrow--prev {
  right: 100%; 
}
.model-carousel-arrow--next { 
  left: 100%;
}
.model-carousel-arrow:hover {
  color: var(--gold);
}
.model-carousel-arrow .arrow {
  width: 50px;
  height: 50px;
}

/* Index dots */
.model-carousel-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 1.25rem 0 0;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto 3rem;
}
.model-carousel-dot {
  position: relative;
  width: 24px;
  height: 20px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: width 0.25s;
}
.model-carousel-dot::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 2px;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.12);
  transition: background 0.25s;
}
.model-carousel-dot.active {
  width: 40px;
}
.model-carousel-dot.active::before {
  background: var(--gold);
}
.model-carousel-dot:hover:not(.active)::before {
  background: rgba(255,255,255,0.28);
}

/* Loading spinner overlay */
.model-canvas-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8,8,8,0.45);
  z-index: 2;
}
.model-canvas-spinner {
  width: 30px;
  height: 30px;
  border: 2px solid rgba(255,255,255,0.08);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spinner-rotate 0.75s linear infinite;
}
@keyframes spinner-rotate {
  to { transform: rotate(360deg); }
}




/***********
 * LIBRARY *
 ***********/
#library {
  padding: 8rem 0 0;
}

.locations-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  background: #000;
  margin-top: 5rem;
  padding: 0 10px;
  mask-image: linear-gradient(to bottom, black 75%, transparent 95%);
  -webkit-mask-image: linear-gradient(to bottom, black 75%, transparent 95%);
}

.library-more {
  text-align: center;
  padding: 0 1rem 3rem;
  font-size: var(--fs-body-sm);
  color: var(--text-mid);
}

.library-more em {
  font-style: normal;
  color: var(--gold);
}

.location-card {
  position: relative;
  aspect-ratio: 4 / 2;
  overflow: hidden;
  cursor: default;
  background: var(--bg-3);
  border-radius: 2px;
}

.location-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.95;
  transition: transform 0.9s var(--ease), filter 0.6s var(--ease);
  will-change: transform;
}

.location-card:hover img {
  transform: scale(1.05);
  filter: brightness(1.05);
}

.location-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0.2) 45%,
    transparent 70%
  );
  opacity: 0.8;
  transition: opacity 0.3s var(--ease);
}

.location-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 1.25rem 1.4rem;
  transform: translateY(6px);
  transition: transform 0.3s var(--ease);
}

.location-card:hover .location-info {
  transform: translateY(0);
}

.location-name {
  font-family: var(--font-title);
  font-size: var(--fs-body-lg);
  font-weight: 400;
  color: #fff;
  line-height: 1.2;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

.location-coords {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--fs-body-xs);
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-top: 0.3rem;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
}




/********
 * APP  *
 ********/
#app {
  padding: 8rem 0;
  background: var(--bg-2);
}

.app-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
}

/* Device visual */
.app-visual {
  display: flex;
  flex-direction: column;
  max-width: 680px;
  margin: 0 auto;
}

.app-device-wrap {
  position: relative;
  overflow: hidden;
}

.app-device-wrap img {
  width: 100%;
}

.app-stat-row {
  display: flex;
  border-top: 1px solid var(--border);
}
.app-stat-pill {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 0.75rem;
}
.app-stat-src {
  font-size: var(--fs-body-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.app-stat-score {
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
}
.app-stat-num,
.app-stat-unit {
  font-family: var(--font-title);
  font-weight: 400;
  line-height: 1;
}
.app-stat-num  {
  font-size: 3rem;   color: var(--text);
}
.app-stat-unit {
  font-size: 1.5rem; color: var(--gold); 
}
.app-stat-lbl {
  font-size: var(--fs-body-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  color: var(--text-dim);
  margin-top: 0.5rem;
}

/* App text */
.app-text h2 {
  margin-bottom: 1.75rem;
}

.app-text {
  transition-delay: .15s;
}

.app-trailer {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2rem;
  border: 1px solid var(--border);
}

.app-cta {
  margin-top: 3rem;
}




/*******************
 * REVIEWS / PRESS *
 *******************/
#reviews {
  padding: 8rem 0;
  background: var(--bg);
  overflow: hidden;
}

.reviews-marquee {
  margin-top: 4rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-bottom: 4px;
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.reviews-marquee .marquee-track { gap: 1.25rem; }

/* One row of all twenty quotes. The cards are a fixed width, so the track is
   twice the length it was when these ran as two rows of ten - hence 400s
   rather than 200s, which is the same speed across the screen. */
.reviews-marquee .marquee-track-left  { animation: marqueeLeft  400s linear infinite; }
.reviews-marquee:hover .marquee-track  { animation-play-state: paused; }

.review-card {
  flex-shrink: 0;
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.review-stars {
  color: var(--gold);
  font-size: var(--fs-body-xs);
  letter-spacing: 0.08em;
}
.review-text {
  font-size: var(--fs-body-sm);
  color: var(--text);
  line-height: 1.6;
  flex: 1;
  font-style: italic;
}

/* PRESS */
.reviews-press {
  margin-top: 5rem;
}

.press-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem 3rem;
  margin-bottom: 2.5rem;
  padding: 2.5rem 2.5rem 2rem;
  border-top: 1px solid var(--border);
}
.press-logos-label {
  font-size: var(--fs-body-xs);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  flex-basis: 100%;
  text-align: center;
  margin-bottom: 0.75rem;
}
.press-logo-img {
  height: 28px;
  width: auto;
  object-fit: contain;
  opacity: 0.5;
  filter: grayscale(1) brightness(2);
  transition: opacity 0.2s, filter 0.2s;
}
.press-logo-img:hover {
  opacity: 0.8;
  filter: grayscale(0.3) brightness(1.5);
}

.press-quotes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.press-quote {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: border-color 0.3s, background 0.3s, opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}
.press-quote-text {
  font-family: var(--font-title);
  font-size: var(--fs-body-lg);
  font-weight: 400;
  font-style: italic;
  line-height: 1.5;
  color: var(--text);
}
.press-quote-source {
  font-size: var(--fs-body-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  font-style: normal;
}




/*********
 * ABOUT *
 *********/
#about {
  padding: 8rem 0;
  background:
    linear-gradient(
      rgba(10, 10, 10, 0.85),
      rgba(10, 10, 10, 0.9)
    ),
    url('/assets/images/backgrounds/bg_dune.webp') center / cover no-repeat;
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4.5rem;
  align-items: center;
}

.about-img {
  display: flex;
  flex-direction: column;
}
.about-img img {
  width: 100%;
  height: auto;
}

.about-text h2 {
  margin-bottom: 2rem;
}
.about-text { 
  transition-delay: .15s; 
}




/***********
 * CONTACT *
 ***********/
#contact {
  padding: 8rem 0;
}




/**************************
 * RESPONSIVE BREAKPOINTS *
 **************************/

/* DESKTOP */
@media (max-width: 1600px) {
  /* Library */
  .locations-grid { grid-template-columns: repeat(4, 1fr); }
  .locations-grid .location-card:nth-child(25) { display: none; }
}

/* SMALL DESKTOPS / LARGE TABLETS */
@media (max-width: 1280px) {
  /* Technology */
  .tech-info { gap: 4rem; }

  /* Library */
  .locations-grid { grid-template-columns: repeat(3, 1fr); mask-image: linear-gradient(to bottom, black 85%, transparent 100%); -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%); }

  /* Reviews / Press */
  .press-quotes { grid-template-columns: repeat(2, 1fr); }
  .press-quotes .press-quote:nth-child(3) { display: none; }
}

/* TABLETS / PHONES */
@media (max-width: 960px) {
  /* Main Layout */
  #app, #reviews, #about, #contact { padding: 6rem 0; }
  #library, #technology { padding-top: 6rem; }

  /* Hero */
  #hero { min-height: 620px; }
  .hero-content { padding: 0 1.5rem; }

  /* Technology */
  .tech-info { grid-template-columns: 1fr; gap: 3.5rem; }
  .tech-features { grid-template-columns: 1fr 1fr; }
  .tech-text { text-align: center; }
  .model-viewer { flex-wrap: wrap; gap: 1.5rem; align-items: flex-start; }
  .model-canvas-wrap { order: -1; flex: 0 0 100%; }
  .model-callout { flex: 1; min-width: 130px; }
  .model-callout-ring { width: clamp(130px, 30vw, 250px); height: clamp(130px, 30vw, 250px); }
  .model-callout-body p { max-width: 220px; }
  .model-carousel-arrow { display: none; }

  /* Library */
  .locations-grid { grid-template-columns: repeat(2, 1fr); gap: 2px; }
  .location-card::after { opacity: 1; }
  .location-info { transform: translateY(0); }
  .location-coords { opacity: 1; }

  /* App */
  .app-inner { grid-template-columns: 1fr; gap: 3.5rem; }
  .app-visual { order: 1; }
  .app-text { text-align: center; }
  .app-stat-pill { padding: 1rem 0.5rem; }

  /* Reviews / Press */
  .press-quotes { grid-template-columns: 1fr; }
  .press-logos { gap: 1.5rem 2rem; }
  .press-logo-img { height: 25px; }
  .review-card { width: 260px; }

  /* About */
  .about-inner { grid-template-columns: 1fr; gap: 3rem; }
  .about-img { order: 1; }
  .about-img img:last-child { display: none; }
  .about-text { text-align: center; }
}

/* PHONES */
@media (max-width: 640px) {
  /* Hero */
  .hero-ctas { flex-direction: column; align-items: center; }

  /* Technology */
  .tech-features { grid-template-columns: 1fr; }

  /* Library */
  .location-gps { display: none; }
  .location-card { aspect-ratio: 5 / 4; }
}