/* ============================================================
   THE CUBE CONCEPT — one-page site
   Design language: architectural plaster + olive, modular grid.
   Runalto reserved for titles only; quiet grotesque for the rest.
   ============================================================ */

@font-face {
  font-family: 'Runalto';
  src: url('../assets/font/Runalto.otf') format('opentype'),
       url('../assets/font/Runalto.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --plaster: #ffffff;   /* page background — white */
  --paper:   #ffffff;   /* raised surfaces / cards */
  --ink:     #1f211a;   /* near-black with a green cast */
  --muted:   #5f6155;   /* secondary text (AA on plaster + paper) */
  --sand:    #d6d4c8;   /* hairlines / borders */
  --olive:   #636b2e;   /* brand accent (mandated) */
  --olive-deep: #4a5122;/* accent depth / hover */
  --olive-soft: rgba(99,107,46,0.10);

  --title: 'Runalto', 'Helvetica Neue', serif;
  --sans: 'Helvetica Neue', 'Inter', Arial, system-ui, sans-serif;

  --wrap: 1240px;
  --gap: clamp(1.25rem, 3vw, 2.5rem);
  --sect-pad: clamp(4.5rem, 9vw, 8.5rem);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--plaster);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(0.98rem, 1.05vw, 1.06rem);
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- layout helpers ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1.15rem, 5vw, 3.5rem); }
.wrap--narrow { max-width: 760px; }
.wrap--wide { max-width: 1500px; }

.section { padding-block: var(--sect-pad); position: relative; }

/* ---------- shared type ---------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.4rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--olive);
}
.eyebrow--center { justify-content: center; }
.eyebrow--light { color: rgba(255,255,255,0.92); }

/* the "module" — isometric cube glyph that tags every section */
.cube-tag {
  width: 13px; height: 15px; flex: none;
  background: no-repeat center / contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 30' fill='none' stroke='%23636b2e' stroke-width='1.6' stroke-linejoin='round'%3E%3Cpath d='M13 1 25 8v14L13 29 1 22V8z'/%3E%3Cpath d='M13 1v14M13 15 25 8M13 15 1 8'/%3E%3C/svg%3E");
}
.cube-tag--light {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 30' fill='none' stroke='%23ffffff' stroke-width='1.6' stroke-linejoin='round'%3E%3Cpath d='M13 1 25 8v14L13 29 1 22V8z'/%3E%3Cpath d='M13 1v14M13 15 25 8M13 15 1 8'/%3E%3C/svg%3E");
}

.title {
  font-family: var(--title);
  font-weight: 400;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  line-height: 1.05;
  letter-spacing: 0.005em;
  margin: 0 0 1rem;
  color: var(--ink);
}
.title--lg { font-size: clamp(1.9rem, 3.8vw, 2.7rem); }
.title--center { text-align: center; }
.title--light { color: #fff; }

.lead {
  font-size: clamp(1.02rem, 1.35vw, 1.2rem);
  line-height: 1.55;
  color: var(--ink);
  max-width: 46ch;
  margin: 0 0 1rem;
}
.lead--center { margin-inline: auto; text-align: center; }
.body { color: var(--muted); max-width: 52ch; margin: 0 0 1rem; }

/* reveal-on-scroll — JS-gated (.js) so a failed/blocked script never hides content */
.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ============================================================
   HEADER — logo only, no menu / no CTA
   ============================================================ */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center;
  padding: clamp(1rem, 2.4vw, 1.7rem) clamp(1.15rem, 5vw, 3.5rem);
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease), padding 0.4s var(--ease);
}
.site-header__logo img {
  height: clamp(30px, 4vw, 42px); width: auto;
  transition: height 0.4s var(--ease), filter 0.4s var(--ease);
}
/* over the dark hero, drop the olive logo to white for legibility */
.site-header--over-hero .site-header__logo img {
  filter: brightness(0) invert(1);
}
.site-header--scrolled {
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--sand);
  padding-block: clamp(0.65rem, 1.6vw, 1rem);
}

/* ============================================================
   HERO — scroll-scrubbed frame-by-frame
   ============================================================ */
.hero { position: relative; }
.hero__scroll { height: 380vh; }              /* scroll distance drives the scrub */
.hero__stage {
  position: sticky; top: 0;
  height: 100vh; width: 100%;
  overflow: hidden;
  background: #101109;
}
.hero__media { position: absolute; inset: 0; }
.hero__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s linear;
}
.hero__video.is-active { opacity: 1; }
.hero__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,11,6,0.55) 0%, rgba(10,11,6,0.12) 34%, rgba(10,11,6,0) 60%);
  pointer-events: none;
}
.hero__label {
  position: absolute; left: clamp(1.15rem, 5vw, 3.5rem); bottom: clamp(2.2rem, 6vh, 4rem);
  color: #fff; z-index: 2;
}
.hero__title {
  font-family: var(--title);
  font-weight: 400;
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  line-height: 1;
  margin: 0;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 30px rgba(0,0,0,0.35);
}
.hero__sub {
  margin: 0.5rem 0 0;
  font-size: clamp(0.95rem, 1.5vw, 1.2rem);
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.88);
  min-height: 1.4em;
}
@keyframes heroSubIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.hero__cue {
  position: absolute; left: 50%; bottom: 1.6rem; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  color: rgba(255,255,255,0.7); z-index: 2;
  font-size: 0.62rem; letter-spacing: 0.28em; text-transform: uppercase;
}
.hero__cue i { width: 1px; height: 34px; background: rgba(255,255,255,0.55); transform-origin: top; animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { 0% { transform: scaleY(0); } 40% { transform: scaleY(1); } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ============================================================
   THE CONCEPT
   ============================================================ */
.concept__text { max-width: 62ch; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.concept__media { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1rem, 2.5vw, 1.8rem); align-items: start; }
.concept__media img { width: 100%; height: auto; border-radius: 3px; }

/* ============================================================
   CUSTOMISABILITY — intro band
   ============================================================ */
.band { text-align: center; border-block: 1px solid var(--sand); }
.band__inner { display: flex; flex-direction: column; align-items: center; }
.band .eyebrow { justify-content: center; }

/* ============================================================
   INTERACTIVE — 2D PLAN
   ============================================================ */
.plan__head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 2rem; flex-wrap: wrap; margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}
.plan__controls { display: inline-flex; gap: 0.4rem; padding: 0.35rem; border: 1px solid var(--sand); border-radius: 100px; background: var(--paper); }
.plan__btn {
  border: none; background: transparent; color: var(--muted);
  padding: 0.55rem 1.15rem; border-radius: 100px;
  font-size: 0.82rem; letter-spacing: 0.08em; font-weight: 500;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.plan__btn.is-active { background: var(--olive); color: #fff; }
.plan__btn:not(.is-active):hover { color: var(--ink); }
.plan__stage {
  position: relative; width: 100%; aspect-ratio: 16/9;
  background: var(--paper); border-radius: 4px; overflow: hidden;
  border: 1px solid var(--sand);
}
.plan__video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; opacity: 0; transition: opacity 0.3s linear;
}
.plan__video.is-active { opacity: 1; }

/* ============================================================
   BUILDING VIDEO
   ============================================================ */
/* building video centered, text above; the source has ~260px black pillarbox
   bars each side (portrait building in a 4:3 canvas), so we crop to the exact
   content aspect (919x1080) with object-fit: cover to remove the black edges */
.build__grid { display: block; }
.build__text { max-width: 58ch; margin: 0 auto clamp(2rem, 4vw, 3rem); text-align: center; }
.build__media { max-width: 580px; margin: 0 auto; aspect-ratio: 919 / 1080; border-radius: 4px; overflow: hidden; }
.build__media video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ============================================================
   INTERACTIVE — COLOR PALETTE
   ============================================================ */
.palette__head { max-width: 60ch; margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.palette__stage { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.palette__img { margin: 0; border-radius: 4px; overflow: hidden; background: var(--paper); aspect-ratio: 16/10; }
.palette__img img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.45s var(--ease); }
.palette__img img.is-swapping { opacity: 0; }
.palette__swatches { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-top: 1.6rem; }
.swatch {
  width: 46px; height: 52px; padding: 0; border: none; background: transparent;
  border-radius: 4px; overflow: hidden; opacity: 0.6;
  transform: translateY(0); transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  box-shadow: 0 0 0 0 var(--olive);
}
.swatch img { width: 100%; height: 100%; object-fit: cover; }
.swatch:hover { opacity: 1; transform: translateY(-3px); }
.swatch.is-active { opacity: 1; box-shadow: 0 0 0 2px var(--plaster), 0 0 0 4px var(--olive); }

/* ============================================================
   INTERACTIVE — FURNITURE toggles
   ============================================================ */
.furniture__title { margin-bottom: clamp(1.8rem, 4vw, 3rem); }
.furni { display: flex; flex-direction: column; gap: clamp(2.5rem, 6vw, 5rem); }
.furni__card { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
/* mirror the columns so the video keeps the SAME (wide) size, just on the right */
.furni__card--rev { grid-template-columns: 0.7fr 1.3fr; }
.furni__card--rev .furni__media { order: 2; }
/* all cards share one fixed-ratio frame; video is cover-scaled slightly to
   crop any black letterbox baked into the source clips */
.furni__media { position: relative; border-radius: 4px; overflow: hidden; background: var(--ink); aspect-ratio: 16/10; }
.furni__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); }
.furni__name { font-family: var(--title); font-weight: 400; font-size: clamp(1.35rem, 2.4vw, 1.9rem); line-height: 1.1; margin: 0 0 0.65rem; }
.furni__desc { color: var(--muted); max-width: 34ch; margin: 0 0 1.5rem; }

/* sliding open/close switch */
.furni__switch { display: inline-flex; align-items: center; gap: 0.85rem; border: 0; background: none; padding: 0; }
.furni__switch-track { position: relative; width: 58px; height: 30px; border-radius: 100px; background: var(--sand); transition: background 0.3s var(--ease); flex: none; }
.furni__switch-thumb { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.28); transition: transform 0.35s var(--ease); }
.furni__switch[aria-checked="true"] .furni__switch-track { background: var(--olive); }
.furni__switch[aria-checked="true"] .furni__switch-thumb { transform: translateX(28px); }
.furni__switch-text { font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 500; color: var(--muted); transition: color 0.3s var(--ease); }
.furni__switch[aria-checked="true"] .furni__switch-text { color: var(--olive); }

/* ============================================================
   SERVICES
   ============================================================ */
.services__text { max-width: 68ch; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.services__media { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1rem, 2.5vw, 1.8rem); align-items: start; }
.services__media img { width: 100%; height: auto; border-radius: 3px; }

/* ============================================================
   AMENITIES — parallax cover
   ============================================================ */
.cover { position: relative; height: clamp(60vh, 80vh, 760px); overflow: hidden; display: grid; place-items: center; }
.cover__media { position: absolute; inset: -12% 0; will-change: transform; }
.cover__media img { width: 100%; height: 100%; object-fit: cover; }
.cover::after { content: ""; position: absolute; inset: 0; background: rgba(20,22,14,0.42); }
.cover__inner { position: relative; z-index: 2; text-align: center; padding-inline: 1.5rem; }
.cover__inner .eyebrow { justify-content: center; }

/* ============================================================
   AMENITIES CARDS
   ============================================================ */
.amgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(0.8rem, 1.6vw, 1.2rem); }
.amcard {
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  padding: clamp(1.8rem, 3.5vw, 2.8rem) 1rem;
  background: var(--paper); border: 1px solid var(--sand); border-radius: 5px;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}
.amcard img { width: clamp(38px, 4vw, 52px); height: clamp(38px, 4vw, 52px); object-fit: contain; }
.amcard span { font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.amcard:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(31,33,26,0.08); border-color: var(--olive); }

/* ============================================================
   AMENITIES — curved panoramic slider
   ============================================================ */
.slider-sec { overflow: hidden; }
.slider-sec .eyebrow { margin-bottom: clamp(1.6rem, 3vw, 2.4rem); }
.pano { position: relative; perspective: 1800px; padding-block: 1rem; }
/* track height matches the slide height (slideWidth * 10/16) so no empty white shows below */
.pano__track { display: flex; align-items: center; justify-content: center; gap: 0; height: clamp(188px, 32.5vw, 488px); transform-style: preserve-3d; }
.pano__slide {
  position: absolute; width: clamp(300px, 52vw, 780px); aspect-ratio: 16/10;
  border-radius: 5px; overflow: hidden; background: transparent;
  box-shadow: 0 24px 60px rgba(31,33,26,0.22);
  transition: transform 0.6s var(--ease), opacity 0.6s var(--ease), filter 0.6s var(--ease);
  will-change: transform, opacity;
}
.pano__slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pano__cap {
  position: absolute; left: 0; bottom: 0; margin: 0.9rem;
  padding: 0.3rem 0.7rem; background: rgba(20,22,14,0.55); color: #fff;
  font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; border-radius: 3px;
  opacity: 0; transition: opacity 0.5s var(--ease);
}
.pano__slide.is-center .pano__cap { opacity: 1; }
.pano__nav { display: flex; justify-content: center; gap: 0.8rem; margin-top: clamp(1.4rem, 3vw, 2.2rem); }
.pano__btn {
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--sand); background: var(--paper); color: var(--ink);
  font-size: 1.1rem; display: grid; place-items: center;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.pano__btn:hover { background: var(--olive); color: #fff; border-color: var(--olive); }

/* ============================================================
   AUDIENCE
   ============================================================ */
.audience__head { max-width: 60ch; margin-bottom: clamp(1.8rem, 4vw, 3rem); }
.audience__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.8rem, 3.5vw, 3rem) clamp(1rem, 2.5vw, 2rem); }
.aud { margin: 0; background: none; border: 0; text-align: center; }
.aud img { width: 100%; max-width: 180px; height: auto; display: block; margin: 0 auto; }
.aud figcaption { margin-top: 0.55rem; }
.aud__name { display: block; font-size: 0.92rem; letter-spacing: 0.03em; font-weight: 600; color: var(--ink); }
.aud__desc { display: block; margin-top: 0.15rem; font-size: 0.76rem; letter-spacing: 0.01em; color: var(--muted); }

/* ============================================================
   360 PANORAMA
   ============================================================ */
.pano360 .title { text-align: center; }
.pano360__frame { margin-top: clamp(1.8rem, 4vw, 3rem); width: 100%; height: clamp(420px, 68vh, 760px); background: #101109; }
.pano360__frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ============================================================
   ANIMATION VIDEO (YouTube embed)
   ============================================================ */
.anim__frame {
  width: min(1000px, calc(100% - 2.3rem));
  margin: clamp(1.8rem, 4vw, 3rem) auto 0;
  aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: #000;
}
.anim__frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ============================================================
   FOOTER — solid accent
   ============================================================ */
.site-footer {
  background: var(--olive);
  color: rgba(255,255,255,0.9);
  text-align: center;
  padding: clamp(3.5rem, 8vw, 6rem) 1.5rem clamp(2.5rem, 5vw, 3.5rem);
  display: flex; flex-direction: column; align-items: center; gap: 1.6rem;
}
.site-footer__logo { height: clamp(46px, 6vw, 68px); width: auto; }
.site-footer__copy { margin: 0; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.9); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .concept__grid,
  .build__grid,
  .services__grid { grid-template-columns: 1fr; }
  .concept__media img:first-child,
  .services__media img:last-child { margin-top: 0; }
  .build__media { order: -1; }
  .plan__head { align-items: flex-start; }
  .amgrid { grid-template-columns: repeat(2, 1fr); }
  .audience__grid { grid-template-columns: repeat(2, 1fr); }
  .furni__card,
  .furni__card--rev { grid-template-columns: 1fr; gap: 1.25rem; }
  .furni__card--rev .furni__media { order: 0; }
  .palette__stage { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .hero__scroll { height: 300vh; }
  .hero__cue { display: none; }              /* avoid crowding the hero label */
  .amgrid { grid-template-columns: repeat(2, 1fr); }
  .audience__grid { grid-template-columns: 1fr 1fr; }
  .plan__controls { width: 100%; justify-content: space-between; }
  .concept__media { grid-template-columns: 1fr 1fr; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .hero__scroll { height: 100vh; }
  .hero__stage { position: relative; }
}
