/* nativescripts.com — apex platform chooser. Pure static, no framework.
   Glass-led: Plates (sharp photos + floating frosted plate, the default) and
   Panels (frosted-photo glass cards). Cinematic kept as a photo-split reference.
   Switchable via .vswitch + [data-v]. */

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

:root {
  --gold: #e3b94a;
  --cream: #f3e7c8;
  --silver: #e9ddc4;
  --ink: #070504;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

html { height: 100%; }
body {
  margin: 0; min-height: 100dvh; background: var(--ink); color: var(--silver);
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow: hidden;
}
a { text-decoration: none; color: inherit; }

/* Shared chrome ───────────────────────────────────────────────────────── */
.backdrop { display: none; position: fixed; inset: 0; z-index: -1; background: url("/redm-bg.webp") center/cover no-repeat; }
.grain {
  position: fixed; inset: 0; z-index: 40; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.brand {
  position: fixed; top: clamp(1.25rem, 3.5vh, 2.25rem); left: 50%; transform: translateX(-50%); z-index: 30;
  display: flex; align-items: center; gap: .6rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: .42em; text-transform: uppercase;
  color: rgba(243, 231, 200, .85); text-indent: .42em; white-space: nowrap; animation: fade-down .9s var(--ease) both;
}
.brand__dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px rgba(227,185,74,.8); }

/* Split + halves base (CINEMATIC) ─────────────────────────────────────── */
.split { position: relative; display: flex; min-height: 100vh; min-height: 100dvh; width: 100%; }
.half {
  position: relative; flex: 1 1 50%; overflow: hidden; display: block; isolation: isolate;
  transition: flex-grow .7s var(--ease), filter .55s var(--ease), transform .5s var(--ease), border-color .4s var(--ease), box-shadow .45s var(--ease);
}
.half__media {
  position: absolute; inset: -4%; z-index: 0; background-size: cover; background-position: center; transform: scale(1.02);
  transition: transform 1.1s var(--ease), filter .55s var(--ease), opacity .55s var(--ease);
}
.half--redm .half__media {
  background-image: url("/redm-bg.webp");
  filter: brightness(.6) saturate(.78) sepia(.28) hue-rotate(-12deg) contrast(1.02);
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 58%, transparent 96%); mask-image: linear-gradient(90deg, #000 0%, #000 58%, transparent 96%);
}
.half--fivem .half__media {
  background-image: url("/fivem-bg.webp"); background-position: center 72%;
  filter: brightness(.82) saturate(.88) sepia(.2) hue-rotate(-12deg) contrast(1.06);
  -webkit-mask-image: linear-gradient(90deg, transparent 4%, #000 42%, #000 100%); mask-image: linear-gradient(90deg, transparent 4%, #000 42%, #000 100%);
}
.half__scrim {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(7,5,4,.22) 0%, rgba(7,5,4,.44) 58%, rgba(7,5,4,.72) 100%), radial-gradient(120% 80% at 50% 42%, transparent 46%, rgba(7,5,4,.46) 100%);
}
.half--redm .half__scrim { box-shadow: inset 0 0 200px rgba(227,185,74,.12); }
.half--fivem .half__scrim { box-shadow: inset 0 0 200px rgba(227,185,74,.10); }

.half__content {
  position: relative; z-index: 2; min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.1rem; padding: 4rem 1.5rem; text-align: center;
}
.eyebrow { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; text-transform: uppercase; letter-spacing: .34em; text-indent: .34em; margin: 0; color: rgba(227,185,74,.82); }
.wordmark { margin: 0; line-height: .9; color: var(--cream); }
.wordmark--redm { font-family: 'Playfair Display', ui-serif, Georgia, serif; font-weight: 800; letter-spacing: -.01em; font-size: clamp(3.25rem, 8.5vw, 7rem); text-shadow: 0 2px 44px rgba(227,185,74,.32); }
.wordmark--fivem { font-family: 'Anton', 'Inter', sans-serif; font-weight: 400; letter-spacing: .01em; text-transform: uppercase; font-size: clamp(3.5rem, 9vw, 7.6rem); text-shadow: 0 2px 46px rgba(227,185,74,.30); }
.blurb { margin: .1rem 0 0; max-width: 22rem; font-size: .85rem; line-height: 1.55; color: rgba(233,221,196,.56); }
.enter {
  margin-top: .9rem; display: inline-flex; align-items: center; gap: .55rem; height: 2.9rem; padding: 0 1.5rem; border-radius: 9999px;
  border: 1px solid rgba(227,185,74,.42); color: var(--gold); font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .18em; text-indent: .18em; backdrop-filter: blur(2px);
  transition: background .3s var(--ease), color .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.enter svg { transition: transform .3s var(--ease); }
.diag-line { display: none; }

@media (min-width: 768px) and (hover: hover) {
  .split:hover .half { filter: brightness(.64); }
  .split .half:hover { flex-grow: 1.55; filter: none; }
  .half:hover .half__media { transform: scale(1.08); }
  .half--redm:hover .half__media { filter: brightness(.78) saturate(.85) sepia(.24) hue-rotate(-12deg); }
  .half--fivem:hover .half__media { filter: brightness(.92) saturate(.9) sepia(.18) hue-rotate(-12deg) contrast(1.06); }
  .half:hover .enter svg { transform: translateX(5px); }
  .half:hover .enter { background: var(--gold); color: #1a1305; border-color: var(--gold); box-shadow: 0 0 36px -6px rgba(227,185,74,.75); }
}

/* Entry reveal ─────────────────────────────────────────────────────────── */
.half__content > * { animation: rise .85s var(--ease) both; }
.half--redm .eyebrow{animation-delay:.15s} .half--redm .wordmark{animation-delay:.24s} .half--redm .blurb{animation-delay:.33s} .half--redm .enter{animation-delay:.42s}
.half--fivem .eyebrow{animation-delay:.22s} .half--fivem .wordmark{animation-delay:.31s} .half--fivem .blurb{animation-delay:.40s} .half--fivem .enter{animation-delay:.49s}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade-down { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* Shared glass type (Plates + Panels) ─────────────────────────────────── */
[data-v="plates"] .wordmark, [data-v="glass"] .wordmark { color: #fff; text-shadow: 0 2px 30px rgba(0,0,0,.5); }
[data-v="plates"] .eyebrow, [data-v="glass"] .eyebrow { color: var(--gold); }

/* ════════ PLATES — sharp photo split + floating frosted plate (default) ════════ */
[data-v="plates"] .half { display: flex; align-items: center; justify-content: center; perspective: 1200px; }
[data-v="plates"] .half--redm  .half__media { -webkit-mask-image: none; mask-image: none; filter: brightness(.72) saturate(.86) sepia(.2) hue-rotate(-12deg); }
[data-v="plates"] .half--fivem .half__media { -webkit-mask-image: none; mask-image: none; background-position: center 64%; filter: brightness(.86) saturate(.9) sepia(.16) hue-rotate(-12deg) contrast(1.04); }
[data-v="plates"] .half__scrim { background: linear-gradient(180deg, rgba(7,5,4,.28) 0%, rgba(7,5,4,.12) 45%, rgba(7,5,4,.42) 100%); box-shadow: none; }
[data-v="plates"] .half__content {
  min-height: auto; width: min(86%, 25rem); gap: 1rem;
  padding: clamp(2.25rem, 4vw, 3.25rem) clamp(1.75rem, 3.5vw, 2.75rem);
  border-radius: 26px;
  background: linear-gradient(160deg, rgba(255,255,255,.14), rgba(255,255,255,.04) 60%);
  -webkit-backdrop-filter: blur(22px) saturate(1.35); backdrop-filter: blur(22px) saturate(1.35);
  border: 1px solid rgba(255,255,255,.24);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), inset 0 -1px 0 rgba(255,255,255,.06), 0 44px 90px -40px rgba(0,0,0,.85);
  transform: perspective(1200px) rotateY(var(--tx, 0deg)) rotateX(var(--ty, 0deg));
  transition: transform .25s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
}
[data-v="plates"] .enter { border-color: rgba(255,255,255,.45); color: #fff; background: rgba(255,255,255,.06); }
@media (min-width: 768px) and (hover: hover) {
  [data-v="plates"] .split:hover .half { filter: brightness(.72); }
  [data-v="plates"] .split .half:hover { flex-grow: 1.45; filter: none; }
  [data-v="plates"] .half:hover .half__media { transform: scale(1.07); }
  [data-v="plates"] .half:hover .half__content { border-color: rgba(227,185,74,.5); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 50px 100px -40px rgba(0,0,0,.9), 0 0 60px -18px rgba(227,185,74,.4); }
  [data-v="plates"] .half:hover .enter { background: var(--gold); color: #1a1305; border-color: var(--gold); box-shadow: 0 0 34px -8px rgba(227,185,74,.7); }
}

/* ════════ PANELS — frosted-photo glass cards ════════ */
[data-v="glass"] .split { gap: clamp(1rem, 3vw, 2.25rem); padding: clamp(1.25rem, 5vh, 3.5rem); align-items: center; }
[data-v="glass"] .half {
  flex: 1 1 50%; border-radius: 28px;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), inset 0 -1px 0 rgba(255,255,255,.05), 0 40px 90px -42px rgba(0,0,0,.88);
}
[data-v="glass"] .half--redm .half__media { background-position: center; }
[data-v="glass"] .half--fivem .half__media { background-position: center 60%; }
[data-v="glass"] .half__media {
  inset: 0; -webkit-mask-image: none; mask-image: none; transform: scale(1.18);
  filter: blur(16px) brightness(.5) saturate(.95) sepia(.16) hue-rotate(-12deg);
}
[data-v="glass"] .half__scrim {
  background:
    linear-gradient(160deg, rgba(255,255,255,.16), rgba(255,255,255,.02) 46%),
    radial-gradient(120% 80% at 22% 0%, rgba(255,255,255,.18), transparent 46%),
    linear-gradient(180deg, transparent 40%, rgba(7,5,4,.4) 100%);
  box-shadow: none;
}
[data-v="glass"] .half__content { min-height: clamp(58vh, 86dvh, 86dvh); }
[data-v="glass"] .enter { border-color: rgba(255,255,255,.45); color: #fff; background: rgba(255,255,255,.06); }
@media (min-width: 768px) and (hover: hover) {
  [data-v="glass"] .split:hover .half { filter: brightness(.74); }
  [data-v="glass"] .split .half:hover { flex-grow: 1.2; filter: none; transform: translateY(-6px); border-color: rgba(227,185,74,.5); box-shadow: inset 0 1px 0 rgba(255,255,255,.32), 0 48px 100px -40px rgba(0,0,0,.92), 0 0 64px -18px rgba(227,185,74,.4); }
  [data-v="glass"] .half:hover .half__media { transform: scale(1.24); filter: blur(14px) brightness(.62) saturate(1) sepia(.14) hue-rotate(-12deg); }
  [data-v="glass"] .half:hover .enter { background: var(--gold); color: #1a1305; border-color: var(--gold); box-shadow: 0 0 34px -8px rgba(227,185,74,.7); }
}

/* ════════ HYBRID — western RedM (photo + gold frame) × glass FiveM ════════ */
[data-v="hybrid"] .half { display: flex; align-items: center; justify-content: center; }

/* RedM: rugged western, photo-direct, warm, framed */
[data-v="hybrid"] .half--redm .half__media { -webkit-mask-image: none; mask-image: none; filter: brightness(.64) saturate(.8) sepia(.36) hue-rotate(-14deg) contrast(1.05); }
[data-v="hybrid"] .half--redm .half__scrim { background: linear-gradient(180deg, rgba(20,12,3,.34) 0%, rgba(12,8,2,.5) 55%, rgba(8,5,2,.72) 100%); box-shadow: inset 0 0 220px rgba(227,185,74,.18); }
[data-v="hybrid"] .half--redm .half__content { min-height: 100dvh; }
[data-v="hybrid"] .half--redm .eyebrow { color: rgba(227,185,74,.85); }
[data-v="hybrid"] .half--redm .wordmark { color: var(--cream); }

/* FiveM: sleek frosted glass plate over the city photo */
[data-v="hybrid"] .half--fivem .half__media { -webkit-mask-image: none; mask-image: none; background-position: center 60%; filter: brightness(.94) saturate(.98) sepia(.1) hue-rotate(-12deg) contrast(1.05); }
[data-v="hybrid"] .half--fivem .half__scrim { background: linear-gradient(180deg, rgba(7,5,4,.22), rgba(7,5,4,.4)); box-shadow: none; }
[data-v="hybrid"] .half--fivem::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; z-index: 4; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(227,185,74,.4), transparent);
}
[data-v="hybrid"] .half--fivem .half__content {
  min-height: auto; width: min(78%, 20.5rem); gap: .85rem;
  padding: clamp(1.75rem, 2.8vw, 2.4rem) clamp(1.5rem, 2.6vw, 2.1rem); border-radius: 18px;
  background: linear-gradient(160deg, rgba(255,255,255,.22), rgba(255,255,255,.07) 65%);
  -webkit-backdrop-filter: blur(26px) saturate(1.6); backdrop-filter: blur(26px) saturate(1.6);
  border: 1px solid rgba(255,255,255,.32);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), inset 0 0 0 1px rgba(255,255,255,.04), 0 28px 60px -34px rgba(0,0,0,.75);
}
[data-v="hybrid"] .half--fivem .wordmark { color: #fff; font-size: clamp(2.6rem, 5.5vw, 4.6rem); text-shadow: 0 2px 24px rgba(0,0,0,.45); }
[data-v="hybrid"] .half--fivem .blurb { font-size: .8rem; }
[data-v="hybrid"] .half--fivem .eyebrow { color: var(--gold); }
[data-v="hybrid"] .half--fivem .enter { border-color: rgba(255,255,255,.45); color: #fff; background: rgba(255,255,255,.06); }
@media (min-width: 768px) and (hover: hover) {
  [data-v="hybrid"] .split:hover .half { filter: brightness(.66); }
  [data-v="hybrid"] .split .half:hover { flex-grow: 1.5; filter: none; }
  [data-v="hybrid"] .half--redm:hover .half__media { transform: scale(1.07); filter: brightness(.78) saturate(.85) sepia(.32) hue-rotate(-14deg); }
  [data-v="hybrid"] .half--fivem:hover .half__content { border-color: rgba(227,185,74,.5); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 50px 100px -40px rgba(0,0,0,.9), 0 0 60px -18px rgba(227,185,74,.4); }
  [data-v="hybrid"] .half:hover .enter { background: var(--gold); color: #1a1305; border-color: var(--gold); box-shadow: 0 0 34px -8px rgba(227,185,74,.7); }
}

/* Design switcher (preview tool) ───────────────────────────────────────── */
.vswitch {
  position: fixed; bottom: clamp(1rem, 3vh, 1.75rem); left: 50%; transform: translateX(-50%); z-index: 60;
  display: flex; gap: .25rem; padding: .35rem; background: rgba(10,8,6,.72); border: 1px solid rgba(227,185,74,.2);
  border-radius: 9999px; backdrop-filter: blur(10px); box-shadow: 0 10px 40px -12px rgba(0,0,0,.8);
}
.vswitch button {
  appearance: none; border: 0; cursor: pointer; background: transparent; color: rgba(233,221,196,.6);
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em;
  padding: .5rem .85rem; border-radius: 9999px; transition: color .2s, background .2s;
}
.vswitch button:hover { color: var(--cream); }
.vswitch button.is-active { background: var(--gold); color: #1a1305; }

/* Mobile ───────────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
  body { overflow-y: auto; }
  .split { flex-direction: column; min-height: 0; }
  .half { min-height: 56dvh; }
  .half__content { min-height: 56dvh; }
  .half--redm .half__media { -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 72%, transparent 100%); mask-image: linear-gradient(180deg, #000 0%, #000 72%, transparent 100%); }
  .half--fivem .half__media { -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 24%, #000 100%); mask-image: linear-gradient(180deg, transparent 0%, #000 24%, #000 100%); }
  /* plates: photo behind stays full; plate keeps frosted, drop tilt */
  [data-v="plates"] .half__media { -webkit-mask-image: none; mask-image: none; }
  [data-v="plates"] .half__content { min-height: auto; transform: none; width: min(88%, 24rem); }
  /* panels: cards stack */
  [data-v="glass"] .half__content { min-height: 56dvh; }
  /* hybrid: western photo on top, glass plate below */
  [data-v="hybrid"] .half--redm .half__media { -webkit-mask-image: none; mask-image: none; }
  [data-v="hybrid"] .half--redm .half__content { min-height: 56dvh; }
  [data-v="hybrid"] .half--fivem .half__content { min-height: auto; }
  [data-v="hybrid"] .half--fivem::before { display: none; }
  .vswitch { flex-wrap: wrap; justify-content: center; max-width: 92vw; }
}

/* Reduced motion ───────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .half__content > *, .brand { animation: none !important; }
  .half, .half__media, .enter, .enter svg, [data-v="plates"] .half__content { transition: none !important; }
}
