@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Fonts */
  --font-primary: "ivypresto-display", "Georgia", serif;
  --font-secondary: "Inter", "Helvetica Neue", Arial, sans-serif;

  /* Colors */
  --color-bg-primary: #0A0A0A;
  --color-bg-secondary: #FFFFFF;
  --color-text-primary: #FFFFFF;
  --color-text-secondary: #B0B0B0;
  --color-text-muted: #777777;
  --color-border: #222222;

  /* Brand colors as RGB triplets for rgba() usage */
  --color-brand-primary: 10, 10, 10;
  --color-brand-accent: 77, 35, 39;
  --color-brand-secondary: 54, 22, 29;

  /* Direct hex values */
  --color-accent: #4D2327;
  --color-accent-light: #6B3338;
  --color-accent-dark: #36161D;
}

body {
  font-family: var(--font-secondary);
  background-color: var(--color-bg-primary);
  color: var(--color-text-secondary);
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 500;
  line-height: 1.2;
  color: var(--color-text-primary);
}

.font-montserrat, nav {
  font-family: var(--font-secondary);
}

/* Make logo white on dark backgrounds */
img[src*="RISE ESTATE LOGO"] {
  filter: brightness(0) invert(1);
}

/* Active nav link indicator */
nav a.nav-active:not(.btn-accent):not(:has(img)) {
  color: #FFFFFF !important;
  border-bottom: 2px solid #4D2327;
  padding-bottom: 4px;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0A0A0A; }
::-webkit-scrollbar-thumb { background: #4D2327; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #6B3338; }

/* ===== Back to Top ===== */
#back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 36px;
  height: 36px;
  background: linear-gradient(168deg, #4D2327 0%, #36161D 100%);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 13px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, filter 0.2s ease;
  z-index: 9998;
  border: 1px solid rgba(155, 90, 96, 0.3);
  box-shadow: 0 4px 16px rgba(77, 35, 39, 0.4);
}
#back-to-top.btt-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
#back-to-top:hover {
  filter: brightness(1.25);
  transform: translateY(-3px);
  box-shadow: 0 6px 22px rgba(77, 35, 39, 0.6);
}

/* ===== Page Loader ===== */
#page-loader {
  position: fixed;
  inset: 0;
  background: #0A0A0A;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
#page-loader .loader-top-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, #36161D, #4D2327 40%, #C4787E 70%, #4D2327);
}
#page-loader.loader-fade-out {
  animation: loaderFadeOut 0.6s ease forwards;
  pointer-events: none;
}
@keyframes loaderFadeOut {
  to { opacity: 0; }
}
.loader-logo {
  height: 72px;
  width: auto;
  filter: brightness(0) invert(1) !important;
  opacity: 0;
  animation: loaderIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}
.loader-tagline {
  color: rgba(255, 255, 255, 0.3);
  font-family: 'Inter', 'Helvetica Neue', sans-serif;
  font-size: 9.5px;
  letter-spacing: 5px;
  text-transform: uppercase;
  margin-top: 16px;
  opacity: 0;
  animation: loaderIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.25s forwards;
}
.loader-bar-track {
  width: 150px;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin-top: 30px;
  overflow: hidden;
  opacity: 0;
  animation: loaderIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.35s forwards;
}
.loader-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #4D2327, #C4787E);
  animation: loaderBarFill 1.1s ease 0.45s forwards;
}
@keyframes loaderIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes loaderBarFill {
  0%   { width: 0%; }
  45%  { width: 60%; }
  100% { width: 100%; }
}
.loader-skyline {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 180px;
  color: rgba(255, 255, 255, 0.045);
  clip-path: inset(100% 0 0 0);
  animation: buildingsRise 1.6s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}
@keyframes buildingsRise {
  from { clip-path: inset(100% 0 0 0); }
  to   { clip-path: inset(0% 0 0 0); }
}
