/* Reset & Base */
html { scroll-behavior: smooth; overflow-x: hidden; }
body { overflow-x: hidden; }

/* Global Font Override */
:root {
  --font-primary: 'Google Sans', 'Inter', sans-serif;
}
body, html, h1, h2, h3, h4, h5, h6, p, a, span, button, input, div, .font-sans, .font-serif, .font-mono {
  font-family: var(--font-primary) !important;
}
::selection { background-color: #10B981; color: white; }

/* Custom Cursor */
@media (pointer: fine) {
  body { cursor: none; }
  .cursor-dot, .cursor-circle {
    display: block;
    position: fixed;
    top: 0; left: 0;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
  }
  .cursor-dot { width: 6px; height: 6px; background: #10B981; border-radius: 50%; }
  .cursor-circle {
    width: 40px; height: 40px;
    border: 1px solid #94a3b8; border-radius: 50%;
    transition: width 0.3s cubic-bezier(0.19, 1, 0.22, 1),
                height 0.3s cubic-bezier(0.19, 1, 0.22, 1),
                background-color 0.3s;
  }
  body.hover-active .cursor-circle {
    width: 80px; height: 80px;
    background-color: rgba(16, 185, 129, 0.1);
    border-color: transparent;
  }
}

/* Utilities */
.text-balance { text-wrap: balance; }
.glass-panel {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

/* Loader */
.loader {
  position: fixed; inset: 0; z-index: 10000;
  background: #0077A6;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
}
.loader-bar {
  width: 0%; height: 2px; background: #10B981;
  transition: width 0.1s linear;
}

/* Hide Scrollbar for Horizontal Scroll */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ── Rebrand splash ────────────────────────────────────────────────────────
   A 5s transition from the NOVAMBL identity to the Whitecrest one, played
   over the landing page. Every phase is a CSS animation keyed off the same
   5000ms clock, so the overlay clears itself even if JavaScript dies partway
   through - it can never trap someone on a blank screen.
   Percentages below are of 5000ms: 10% = 500ms.                            */
.rebrand-splash {
  position: fixed; inset: 0; z-index: 10010;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 24px;
  background: #FFFFFF;
  overflow: hidden;
  cursor: pointer;
  opacity: 0;
  animation: rb-shell 5000ms ease forwards;
}
.rebrand-splash[hidden] { display: none; }

/* A soft wash of brand blue so the white does not read as a blank page. */
.rebrand-splash__glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 55% at 50% 42%, rgba(0, 119, 166, 0.14), transparent 70%),
    radial-gradient(45% 40% at 50% 100%, rgba(0, 119, 166, 0.10), transparent 70%);
  animation: rb-glow 5000ms ease forwards;
}

.rebrand-splash__skip {
  position: absolute; top: 24px; right: 24px;
  padding: 8px 18px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: 999px;
  background: transparent;
  color: #64748B;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  transition: color 0.2s, border-color 0.2s;
  animation: rb-skip 5000ms ease forwards;
}
.rebrand-splash__skip:hover { color: #0F172A; border-color: rgba(15, 23, 42, 0.4); }

.rebrand-splash__stage {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  max-width: 760px; width: 100%;
}

/* Both logos share one cell, so the second resolves exactly where the first
   dissolved rather than sitting beside it. */
.rebrand-splash__slot {
  position: relative;
  display: grid; place-items: center;
  width: 100%;
  height: clamp(74px, 18vw, 118px);
}
/* Both files are cropped to their artwork and sit at roughly 3:1, so one
   height reads correctly for either mark. */
.rebrand-splash__logo {
  grid-area: 1 / 1;
  height: clamp(52px, 12.5vw, 86px);
  width: auto; max-width: 84vw;
  object-fit: contain;
}
.rebrand-splash__logo--old {
  opacity: 0;
  animation: rb-old 5000ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.rebrand-splash__logo--new {
  opacity: 0;
  animation: rb-new 5000ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* A blue line that wipes across at the handover between the two marks. */
.rebrand-splash__sweep {
  position: absolute; top: 50%; left: 0;
  width: 100%; height: 2px; margin-top: -1px;
  background: linear-gradient(90deg, transparent, #0077A6 20%, #0077A6 80%, transparent);
  opacity: 0; transform: scaleX(0); transform-origin: left center;
  animation: rb-sweep 5000ms ease-in-out forwards;
}

.rebrand-splash__eyebrow {
  margin: 0 0 20px;
  font-size: clamp(13px, 3vw, 18px); font-weight: 900;
  letter-spacing: 0.34em; text-transform: uppercase;
  color: #0F172A;
  opacity: 0;
}
.rebrand-splash__eyebrow--old { animation: rb-eyebrow 5000ms ease forwards; }

.rebrand-splash__caption {
  margin: 28px 0 0;
  font-size: clamp(15px, 3.4vw, 21px);
  font-weight: 300; line-height: 1.5;
  color: #475569;
  opacity: 0;
  animation: rb-caption 5000ms ease forwards;
}
.rebrand-splash__caption strong { font-weight: 600; color: #0F172A; white-space: nowrap; }


.rebrand-splash__progress {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: rgba(0, 119, 166, 0.12);
}
.rebrand-splash__progress span {
  display: block; height: 100%; width: 0;
  background: #0077A6;
  animation: rb-progress 5000ms linear forwards;
}

@keyframes rb-shell {
  0%   { opacity: 0; }
  4%   { opacity: 1; }
  90%  { opacity: 1; }
  100% { opacity: 0; visibility: hidden; pointer-events: none; }
}
@keyframes rb-glow {
  0%   { opacity: 0; transform: scale(1.1); }
  16%  { opacity: 1; transform: scale(1); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes rb-skip {
  0%, 10% { opacity: 0; }
  20%     { opacity: 1; }
  90%     { opacity: 1; }
  100%    { opacity: 0; }
}
/* NOVAMBL: in at 400ms, holds, dissolves away by 2300ms. */
@keyframes rb-old {
  0%   { opacity: 0; transform: scale(0.9) translateY(16px); filter: blur(8px); }
  8%   { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
  34%  { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
  46%  { opacity: 0; transform: scale(1.08) translateY(-14px); filter: blur(12px); }
  100% { opacity: 0; transform: scale(1.08) translateY(-14px); filter: blur(12px); }
}
/* Whitecrest: resolves from 2200ms and holds to the end. */
@keyframes rb-new {
  0%, 44% { opacity: 0; transform: scale(0.92) translateY(18px); filter: blur(10px); }
  60%     { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
  100%    { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}
/* Wipes right between 1700ms and 2500ms, then clears off to the right. */
@keyframes rb-sweep {
  0%, 34% { opacity: 0; transform: scaleX(0); transform-origin: left center; }
  37%     { opacity: 1; transform: scaleX(0); transform-origin: left center; }
  50%     { opacity: 1; transform: scaleX(1); transform-origin: left center; }
  50.01%  { opacity: 1; transform: scaleX(1); transform-origin: right center; }
  64%     { opacity: 0; transform: scaleX(0); transform-origin: right center; }
  100%    { opacity: 0; transform: scaleX(0); transform-origin: right center; }
}
@keyframes rb-eyebrow {
  0%, 4% { opacity: 0; }
  12%    { opacity: 1; }
  32%    { opacity: 1; }
  42%    { opacity: 0; }
  100%   { opacity: 0; }
}
@keyframes rb-caption {
  0%, 58% { opacity: 0; transform: translateY(10px); }
  72%     { opacity: 1; transform: translateY(0); }
  100%    { opacity: 1; transform: translateY(0); }
}
@keyframes rb-progress { from { width: 0; } to { width: 100%; } }

/* Anyone who asks for less motion gets the same message, stated plainly:
   both marks side by side, nothing moving, and a shorter stay. */
@media (prefers-reduced-motion: reduce) {
  .rebrand-splash { animation: rb-shell-still 3200ms ease forwards; }
  .rebrand-splash__glow { animation: none; opacity: 1; }
  .rebrand-splash__skip { animation: none; opacity: 1; }
  .rebrand-splash__slot {
    display: flex; flex-wrap: wrap;
    align-items: center; justify-content: center;
    gap: clamp(12px, 5vw, 44px);
    height: auto;
  }
  .rebrand-splash__logo {
    grid-area: auto; animation: none; opacity: 1; filter: none; transform: none;
    height: clamp(38px, 9vw, 60px);
  }
  .rebrand-splash__sweep { display: none; }
  .rebrand-splash__eyebrow--old { animation: none; opacity: 1; }
  .rebrand-splash__caption { animation: none; opacity: 1; transform: none; }
  .rebrand-splash__progress span { animation: rb-progress 3200ms linear forwards; }
}
@keyframes rb-shell-still {
  0%   { opacity: 0; }
  6%   { opacity: 1; }
  88%  { opacity: 1; }
  100% { opacity: 0; visibility: hidden; pointer-events: none; }
}
