/* ════════════════════════════════════════════════════════════════
   NBRE · base.css — :root tokens, reset, .btn/.eyebrow, overlays, loader
   Tách từ styles.css. THỨ TỰ NỐI (cascade) trong index.html:
   base → layout → components → estate-detail → editorial → detail-modules → overlays → theme-light. KHỐI light-theme override
   nằm CUỐI theme-light.css — đừng đảo thứ tự <link>.
   ════════════════════════════════════════════════════════════════ */
/* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
   NAM BÁ SƠN — Private Real Estate
   Aesthetic: nocturnal · quiet luxury · midnight ink + champagne gold
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ */

:root {
  --ink: #07090e;
  --ink-2: #0b0e15;
  --ink-3: #11151f;
  --line: rgba(200, 169, 114, 0.16);
  --gold: #c8a972;
  --gold-soft: #d8c195;
  --gold-bright: #f0ddb4;
  --cyan: #6fb6c4;
  --text: #ece8df;
  --muted: #8c8d94;
  --muted-2: #6a6c74;

  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Be Vietnam Pro", system-ui, sans-serif;

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

  /* ── master content column ───────────────────────────────
     every section aligns to ONE centred column of this width.
     --pad-x = a gutter that grows to centre content inside --shell
     on wide screens, but never drops below --gutter on small ones.
     Apply `padding-inline: var(--pad-x)` instead of ad-hoc clamps. */
  --shell: 1240px;
  --gutter: clamp(1.4rem, 5vw, 3.2rem);
  --pad-x: max(var(--gutter), calc((100% - var(--shell)) / 2));
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection {
  background: var(--gold);
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
}
em {
  font-style: italic;
}

/* refined keyboard focus — champagne hairline, never a default blue box */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* honour reduced-motion: keep the design, drop the movement */
@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-rise],
  .reveal,
  .hero__line > span {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ── shared bits ─────────────────────────────────────────── */
.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.9em;
}
.eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--gold);
  opacity: 0.6;
}
.eyebrow--dark {
  color: var(--gold-soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 1.05em 2.1em;
  border-radius: 2px;
  transition: all 0.5s var(--ease);
  position: relative;
  overflow: hidden;
  background: transparent; /* reset nền mặc định của <button> */
  border: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
}
.btn--gold {
  background: var(--gold);
  color: #1a140a;
}
.btn--gold:hover {
  background: var(--gold-bright);
  transform: translateY(-2px);
  box-shadow: 0 14px 40px -12px rgba(200, 169, 114, 0.6);
}
.btn--ghost {
  border: 1px solid var(--line);
  color: var(--text);
}
.btn--ghost:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
}

/* ── overlays ────────────────────────────────────────────── */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  opacity: 0.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='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
.vignette {
  position: fixed;
  inset: 0;
  z-index: 8999;
  pointer-events: none;
  background: radial-gradient(
    120% 80% at 50% 40%,
    transparent 55%,
    rgba(0, 0, 0, 0.55) 100%
  );
}

/* ── loader ──────────────────────────────────────────────── */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background:
    radial-gradient(
      64% 50% at 52% 60%,
      rgba(200, 169, 114, 0.14),
      transparent 60%
    ),
    radial-gradient(
      120% 90% at 50% 26%,
      rgba(26, 29, 39, 0.85),
      transparent 72%
    ),
    linear-gradient(180deg, #070910 0%, #0a0e16 46%, #0d1017 100%);
  display: grid;
  place-items: center;
  transition:
    opacity 1s var(--ease),
    visibility 1s;
}
.loader.is-done {
  opacity: 0;
  visibility: hidden;
}
.loader__inner {
  text-align: center;
}
.loader__mark {
  margin-bottom: 1.6rem;
  animation: pulseMark 2.4s var(--ease) infinite;
}
.loader__mark img {
  width: clamp(140px, 22vw, 200px);
  height: auto;
  display: block;
  margin: 0 auto;
}
@keyframes pulseMark {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
    text-shadow: 0 0 30px rgba(200, 169, 114, 0.6);
  }
}
.loader__bar {
  width: 180px;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 auto 1.3rem;
  overflow: hidden;
}
.loader__bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--gold);
  transition: width 0.3s linear;
}
.loader__txt {
  font-size: 0.62rem;
  letter-spacing: 0.4em;
  color: var(--muted-2);
  text-transform: uppercase;
}
