/* ==========================================================================
   Turnkey Residences — Core Stylesheet
   Premium dark theme with metallic gold accents
   ========================================================================== */

:root {
  --ink-950: #0a0a0a;
  --ink-900: #111111;
  --ink-850: #161616;
  --ink-800: #1a1a1a;
  --ink-750: #1f1f1f;
  --ink-700: #222222;
  --ink-600: #2a2a2a;

  --gold-400: #f2d492;
  --gold-500: #e5c162;
  --gold-600: #d4af37;
  --gold-700: #a8852a;

  --gold-gradient: linear-gradient(135deg, #d4af37 0%, #f2d492 50%, #d4af37 100%);
  --gold-gradient-soft: linear-gradient(135deg, #d4af37 0%, #f2d492 100%);
  --gold-shimmer: linear-gradient(
    110deg,
    #a8852a 0%,
    #d4af37 25%,
    #f2d492 45%,
    #ffe8b0 50%,
    #f2d492 55%,
    #d4af37 75%,
    #a8852a 100%
  );

  --easing-elegant: cubic-bezier(0.65, 0, 0.35, 1);
  --easing-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Base ---------- */
html {
  scroll-behavior: smooth;
  background-color: var(--ink-900);
}

body {
  background-color: var(--ink-900);
  color: #e8e8e8;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', 'Times New Roman', serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

::selection {
  background: var(--gold-600);
  color: var(--ink-900);
}

/* ---------- Custom scrollbar ---------- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--ink-900);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--gold-700), var(--gold-600));
  border-radius: 6px;
  border: 2px solid var(--ink-900);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-gradient-soft);
}

/* ---------- Gold gradient utilities ---------- */
.text-gold-gradient {
  background: var(--gold-shimmer);
  background-size: 220% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  display: inline-block;
  padding-bottom: 0.2em;
  margin-bottom: -0.2em;
  animation: shimmer 9s linear infinite;
}

.text-gold-shimmer {
  background: var(--gold-shimmer);
  background-size: 200% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: shimmer 5s linear infinite;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes goldTextShimmer {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.18); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

@keyframes floatSlow {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33%      { transform: translate(20px, -25px) rotate(2deg); }
  66%      { transform: translate(-15px, 15px) rotate(-1deg); }
}

@keyframes goldPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.35); }
  50%      { box-shadow: 0 0 30px 6px rgba(212, 175, 55, 0.18); }
}

@keyframes scrollHint {
  0%   { transform: translateY(0); opacity: 0; }
  30%  { opacity: 1; }
  100% { transform: translateY(14px); opacity: 0; }
}

@keyframes hairlineSweep {
  0%   { background-position: -100% 0; }
  100% { background-position: 200% 0; }
}

@keyframes ambientGlow {
  0%, 100% { opacity: 0.18; transform: scale(1); }
  50%      { opacity: 0.32; transform: scale(1.08); }
}

/* ---------- Gold gradient border (border-image) ---------- */
.border-gold-gradient {
  border: 1px solid transparent;
  border-image: var(--gold-gradient-soft) 1;
}

/* Robust gradient border using mask (safer than border-image for rounded corners) */
.gold-frame {
  position: relative;
  border-radius: 4px;
  background-color: var(--ink-850);
}
.gold-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: var(--gold-gradient-soft);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

.gold-hairline {
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, transparent, var(--gold-600), transparent);
}

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.9rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  color: #fff;
  transition: all 0.5s var(--easing-elegant);
  overflow: hidden;
  text-decoration: none;
  white-space: nowrap;
}

.btn-gold {
  background: var(--gold-gradient-soft);
  background-size: 200% 200%;
  background-position: 0% 50%;
  color: #1a1408;
  border: 1px solid var(--gold-600);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2),
    0 8px 28px -10px rgba(212, 175, 55, 0.55);
}
.btn-gold::after {
  content: '';
  position: absolute;
  top: 0; left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg);
  transition: left 0.9s var(--easing-elegant);
}
.btn-gold:hover {
  background-position: 100% 50%;
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2),
    0 14px 38px -10px rgba(212, 175, 55, 0.7);
}
.btn-gold:hover::after {
  left: 140%;
}

.btn-outline-gold {
  color: var(--gold-400);
  border: 1px solid var(--gold-600);
  background: transparent;
}
.btn-outline-gold:hover {
  background: var(--gold-gradient-soft);
  color: #1a1408;
  border-color: var(--gold-400);
  transform: translateY(-2px);
}

.btn-ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.02);
}
.btn-ghost:hover {
  border-color: var(--gold-500);
  color: var(--gold-400);
}

/* ---------- Nav ---------- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: background-color 0.4s var(--easing-elegant),
              backdrop-filter 0.4s var(--easing-elegant),
              padding 0.4s var(--easing-elegant),
              border-color 0.4s var(--easing-elegant);
  border-bottom: 1px solid transparent;
}
.site-nav.is-scrolled {
  background-color: rgba(11, 11, 11, 0.78);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
          backdrop-filter: saturate(1.4) blur(14px);
  border-bottom-color: rgba(212, 175, 55, 0.18);
}

.nav-link {
  position: relative;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #d8d8d8;
  text-decoration: none;
  padding: 0.4rem 0;
  transition: color 0.3s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: var(--gold-gradient-soft);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--easing-elegant);
}
.nav-link:hover,
.nav-link.is-active {
  color: var(--gold-400);
}
.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 49;
  background: radial-gradient(ellipse at top, rgba(35, 25, 5, 0.55), var(--ink-950) 70%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--easing-elegant);
}
.mobile-menu.is-open {
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu .nav-link {
  font-size: 1.4rem;
  font-family: 'Playfair Display', serif;
  letter-spacing: 0.12em;
  text-transform: none;
}

.hamburger {
  width: 32px;
  height: 24px;
  position: relative;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
.hamburger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--gold-gradient-soft);
  transition: all 0.4s var(--easing-elegant);
}
.hamburger span:nth-child(1) { top: 4px; }
.hamburger span:nth-child(2) { top: 50%; transform: translateY(-50%); width: 70%; }
.hamburger span:nth-child(3) { bottom: 4px; }
.hamburger.is-active span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.hamburger.is-active span:nth-child(2) { opacity: 0; transform: translateX(20px); }
.hamburger.is-active span:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: -10% 0 -10% 0;
  background-size: cover;
  background-position: center;
  will-change: transform;
  z-index: -2;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(11, 11, 11, 0.55) 50%, var(--ink-900) 100%),
    radial-gradient(ellipse at 70% 30%, rgba(212, 175, 55, 0.12), transparent 50%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold-400);
}
.eyebrow::before,
.eyebrow.center::after {
  content: '';
  display: inline-block;
  width: 40px;
  height: 1px;
  background: var(--gold-gradient-soft);
}

/* ---------- Reveal helpers (used alongside GSAP & AOS) ---------- */
.reveal-mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.2em;
  margin-bottom: -0.2em;
}
.reveal-mask > span {
  display: inline-block;
  will-change: transform;
}

/* ---------- Cards ---------- */
.pillar-card {
  position: relative;
  padding: 2.25rem 1.75rem 2rem;
  background: linear-gradient(180deg, var(--ink-850), var(--ink-900));
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.5s var(--easing-elegant),
              border-color 0.5s var(--easing-elegant),
              box-shadow 0.5s var(--easing-elegant);
  overflow: hidden;
}
.pillar-card::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  background: var(--gold-gradient-soft);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.5s var(--easing-elegant);
  pointer-events: none;
}
.pillar-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 60px -30px rgba(212, 175, 55, 0.5),
              0 8px 24px -12px rgba(0, 0, 0, 0.7);
}
.pillar-card:hover::before {
  opacity: 1;
}
.pillar-card .pillar-icon {
  width: 48px;
  height: 48px;
  color: var(--gold-500);
  margin-bottom: 1.25rem;
  transition: transform 0.5s var(--easing-elegant);
}
.pillar-card:hover .pillar-icon {
  transform: scale(1.08) rotate(-3deg);
}
.pillar-card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.6rem;
}
.pillar-card p {
  font-size: 0.92rem;
  color: #b3b3b3;
  line-height: 1.65;
}
.pillar-card .pillar-num {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  font-family: 'Playfair Display', serif;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: rgba(212, 175, 55, 0.35);
}

/* ---------- Process timeline ---------- */
.process-track {
  position: relative;
}
.process-step {
  position: relative;
  padding-left: 5.5rem;
  padding-bottom: 3.5rem;
}
.process-step:last-child { padding-bottom: 0; }
.process-step .step-num {
  position: absolute;
  left: 0;
  top: 0;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  background: var(--ink-850);
  color: var(--gold-400);
  border-radius: 50%;
  z-index: 2;
}
.process-step .step-num::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  padding: 1px;
  background: var(--gold-gradient-soft);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
}
.process-step::before {
  content: '';
  position: absolute;
  left: 31px;
  top: 64px;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, var(--gold-600), transparent);
  opacity: 0.4;
}
.process-step:last-child::before { display: none; }
.process-step h3 {
  font-size: 1.55rem;
  margin-bottom: 0.5rem;
}
.process-step p {
  color: #b3b3b3;
  max-width: 56ch;
}

/* ---------- Section helpers ---------- */
.section {
  position: relative;
  padding: 6rem 0;
}
@media (min-width: 1024px) {
  .section { padding: 8rem 0; }
}

.section-title {
  font-size: clamp(2rem, 4vw, 3.25rem);
  margin-bottom: 1rem;
}

/* ---------- Parallax image frame ---------- */
.parallax-wrap {
  position: relative;
  overflow: hidden;
}
.parallax-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
  transform: scale(1.15);
}

/* ---------- Form ---------- */
.field {
  position: relative;
  margin-bottom: 1.5rem;
}
.field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: 0.5rem;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--ink-850);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.3s, box-shadow 0.3s, background-color 0.3s;
  border-radius: 2px;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold-500);
  background: var(--ink-800);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}
.field textarea { min-height: 140px; resize: vertical; }
.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1l5 5 5-5' stroke='%23D4AF37' stroke-width='1.5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}
.field .error-msg {
  display: none;
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: #ff6b6b;
}
.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: #ff6b6b; }
.field.has-error .error-msg { display: block; }

.form-status {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 2px;
  font-size: 0.9rem;
  display: none;
}
.form-status.is-visible { display: block; }
.form-status.is-success {
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: var(--gold-400);
}
.form-status.is-error {
  background: rgba(255, 107, 107, 0.08);
  border: 1px solid rgba(255, 107, 107, 0.35);
  color: #ff9b9b;
}

.honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* ---------- File drop / picker ---------- */
.file-drop {
  position: relative;
  background: var(--ink-850);
  border: 1px dashed rgba(212, 175, 55, 0.4);
  border-radius: 2px;
  padding: 1.1rem 1.2rem;
  cursor: pointer;
  transition: border-color 0.3s var(--easing-elegant),
              background-color 0.3s var(--easing-elegant);
}
.file-drop:hover {
  border-color: var(--gold-500);
  background: var(--ink-800);
}
.file-drop.is-dragover {
  border-color: var(--gold-400);
  background: rgba(212, 175, 55, 0.06);
}
.file-drop.is-dragover .file-drop-icon {
  background: var(--gold-gradient-soft);
  color: #1a1408;
}
.file-input-hidden {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.file-drop-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  pointer-events: none;
}
.file-drop-icon {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--gold-400);
  border: 1px solid var(--gold-600);
  border-radius: 50%;
  transition: background 0.3s var(--easing-elegant),
              color 0.3s var(--easing-elegant);
}
.file-drop-title {
  color: #fff;
  font-size: 0.95rem;
  margin: 0;
}
.file-drop-hint {
  color: #888;
  font-size: 0.78rem;
  margin: 0.15rem 0 0;
}

.file-list {
  list-style: none;
  padding: 0;
  margin: 0.65rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.file-list:empty { display: none; }
.file-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: 2px;
  font-size: 0.85rem;
  color: #ddd;
}
.file-list li .file-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}
.file-list li .file-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-list li .file-size {
  color: var(--gold-400);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.file-list li .file-remove {
  background: transparent;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
  padding: 0 0.25rem;
  transition: color 0.2s ease, transform 0.2s ease;
}
.file-list li .file-remove:hover {
  color: #ff6b6b;
  transform: scale(1.1);
}

/* ---------- Gallery ---------- */
.gallery-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 3rem;
}
.filter-chip {
  padding: 0.55rem 1.1rem;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cfcfcf;
  cursor: pointer;
  transition: all 0.4s var(--easing-elegant);
  border-radius: 999px;
}
.filter-chip:hover {
  color: var(--gold-400);
  border-color: var(--gold-500);
}
.filter-chip.is-active {
  background: var(--gold-gradient-soft);
  color: #1a1408;
  border-color: var(--gold-400);
}

/* ---------- Bento gallery grid ---------- */
.bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: 220px;
  grid-auto-flow: dense;
  gap: 0.85rem;
}
@media (min-width: 640px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 200px;
    gap: 1rem;
  }
}
@media (min-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 220px;
    gap: 1.1rem;
  }
}
@media (min-width: 1280px) {
  .bento-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 230px;
    gap: 1.15rem;
  }
}
@media (min-width: 1600px) {
  .bento-grid {
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 220px;
  }
}

.bento-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: var(--ink-850);
  border-radius: 3px;
  grid-column: span 1;
  grid-row: span 1;
  transition: opacity 0.4s var(--easing-elegant),
              transform 0.4s var(--easing-elegant);
}
.bento-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.8s var(--easing-elegant), filter 0.4s ease;
}
.bento-item:hover img {
  transform: scale(1.06);
  filter: brightness(0.62);
}
.bento-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
  opacity: 0.55;
  transition: opacity 0.5s var(--easing-elegant);
  pointer-events: none;
}
.bento-item:hover::after { opacity: 0; }

.bento-item .item-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem 1.35rem;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.88));
  opacity: 0;
  transition: opacity 0.5s var(--easing-elegant);
  z-index: 2;
}
.bento-item:hover .item-overlay { opacity: 1; }
.bento-item .item-overlay h4 {
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 0.25rem;
}
.bento-item .item-overlay span {
  font-size: 0.7rem;
  color: var(--gold-400);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* Span variants — bento rhythm.
   These apply from tablet width upwards; on mobile (<640px) every tile is 1x1
   so the grid stays readable on small screens. */
@media (min-width: 640px) {
  .bento-item.is-wide { grid-column: span 2; }
  .bento-item.is-tall { grid-row:    span 2; }
  .bento-item.is-lg   { grid-column: span 2; grid-row: span 2; }
}
@media (min-width: 1024px) {
  /* On 3- and 4-column grids, large tiles really shine */
  .bento-item.is-lg   { grid-column: span 2; grid-row: span 2; }
  .bento-item.is-xl   { grid-column: span 2; grid-row: span 2; }
}
@media (min-width: 1280px) {
  .bento-item.is-xl   { grid-column: span 2; grid-row: span 2; }
}
@media (min-width: 1600px) {
  .bento-item.is-lg   { grid-column: span 3; grid-row: span 2; }
  .bento-item.is-xl   { grid-column: span 3; grid-row: span 3; }
  .bento-item.is-wide { grid-column: span 3; }
}

/* Filtered-out items collapse from the grid so dense flow can repack. */
.bento-item.is-hidden {
  display: none;
}

/* Backwards-compat alias (older markup) */
.masonry { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.masonry-item { position: relative; overflow: hidden; background: var(--ink-850); cursor: pointer; }
.masonry-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 5, 0.92);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: 88vh;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
}
.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--gold-600);
  color: var(--gold-400);
  cursor: pointer;
  font-size: 1.4rem;
  transition: all 0.3s ease;
  border-radius: 50%;
}
.lightbox-close:hover {
  background: var(--gold-gradient-soft);
  color: #1a1408;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink-950);
  padding: 4.5rem 0 2rem;
  position: relative;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-600), transparent);
}
.footer-link {
  display: block;
  color: #a5a5a5;
  font-size: 0.92rem;
  padding: 0.3rem 0;
  text-decoration: none;
  transition: color 0.3s, padding-left 0.3s;
}
.footer-link:hover {
  color: var(--gold-400);
  padding-left: 0.4rem;
}

.kova-mark {
  font-family: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  text-decoration: none;
  transition: opacity 0.25s ease;
  vertical-align: baseline;
  line-height: 1;
}
.kova-mark:hover {
  opacity: 0.85;
}
.kova-dot {
  color: #ffffff;
  display: inline-block;
  animation: kova-dot-pulse 2s ease-in-out infinite;
}
@keyframes kova-dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(1.2); }
}
@media (prefers-reduced-motion: reduce) {
  .kova-dot { animation: none; }
}

/* ---------- Services in-page nav ---------- */
.svc-jumper {
  position: sticky;
  top: 120px;
  z-index: 30;
  background: rgba(11, 11, 11, 0.85);
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
  border-block: 1px solid rgba(212, 175, 55, 0.18);
  margin-bottom: 4rem;
}
@media (min-width: 1024px) {
  .svc-jumper {
    top: 144px;
  }
}
.svc-jumper-track {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.85rem 0;
  scrollbar-width: thin;
}
.svc-jumper-track::-webkit-scrollbar { height: 0; }
.svc-jumper a {
  flex-shrink: 0;
  padding: 0.5rem 1.1rem;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  color: #cfcfcf;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.3s ease;
}
.svc-jumper a:hover,
.svc-jumper a.is-active {
  color: var(--gold-400);
  border-color: var(--gold-500);
  background: rgba(212, 175, 55, 0.06);
}

/* ---------- Misc helpers ---------- */
.noise-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* AOS-compatible fallback if AOS fails to load */
[data-aos] {
  opacity: 1 !important;
  transform: none !important;
}
html.aos-ready [data-aos] {
  opacity: 0;
}
html.aos-ready [data-aos].aos-animate {
  opacity: 1;
}

/* ---------- Scroll progress bar ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  background: transparent;
  z-index: 100;
  pointer-events: none;
}
.scroll-progress::after {
  content: '';
  display: block;
  height: 100%;
  width: var(--progress, 0%);
  background: var(--gold-gradient-soft);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.6);
  transition: width 0.08s linear;
}

/* ---------- Magnetic button ---------- */
.btn {
  --mx: 0px;
  --my: 0px;
}
.btn.is-magnetic {
  transform: translate3d(var(--mx), var(--my), 0);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.5s var(--easing-elegant),
              background-position 0.5s var(--easing-elegant),
              background-color 0.5s var(--easing-elegant),
              color 0.5s var(--easing-elegant),
              border-color 0.5s var(--easing-elegant);
}
.btn.is-magnetic.is-tracking {
  transition: transform 0.12s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.5s var(--easing-elegant),
              background-position 0.5s var(--easing-elegant),
              background-color 0.5s var(--easing-elegant),
              color 0.5s var(--easing-elegant),
              border-color 0.5s var(--easing-elegant);
}
.btn.is-magnetic:hover {
  transform: translate3d(var(--mx), calc(var(--my) - 2px), 0);
}

/* ---------- Pillar card 3D tilt ---------- */
.pillar-card {
  perspective: 1000px;
  transform-style: preserve-3d;
}
.pillar-card.is-tilting {
  transform:
    perspective(1000px)
    rotateX(var(--rx, 0deg))
    rotateY(var(--ry, 0deg))
    translateY(-6px);
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.5s var(--easing-elegant),
              box-shadow 0.5s var(--easing-elegant);
}
.pillar-card.is-tilting .pillar-icon,
.pillar-card.is-tilting h3 {
  transform: translateZ(28px);
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Word-by-word reveal helper ---------- */
.word-wrap {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.2em;
  margin-bottom: -0.2em;
}
.word-wrap > .word-inner {
  display: inline-block;
  will-change: transform;
}

/* ---------- Floating ambient orbs ---------- */
.ambient-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(40px);
  background: radial-gradient(circle, rgba(212, 175, 55, 0.4), transparent 70%);
  animation: floatSlow 18s ease-in-out infinite, ambientGlow 8s ease-in-out infinite;
  will-change: transform, opacity;
}
.ambient-orb.orb-sm { width: 220px; height: 220px; }
.ambient-orb.orb-md { width: 360px; height: 360px; }
.ambient-orb.orb-lg { width: 520px; height: 520px; }

/* ---------- Eyebrow line sweep ---------- */
.eyebrow::before,
.eyebrow.center::after {
  background: linear-gradient(90deg,
    rgba(212, 175, 55, 0.15) 0%,
    var(--gold-500) 35%,
    var(--gold-400) 50%,
    var(--gold-500) 65%,
    rgba(212, 175, 55, 0.15) 100%);
  background-size: 200% 100%;
  background-position: 0% 0;
  animation: hairlineSweep 5.5s linear infinite;
}

/* ---------- Process step pulse on connecting line ---------- */
.process-step .step-num {
  transition: transform 0.5s var(--easing-elegant), box-shadow 0.5s var(--easing-elegant);
}
.process-step:hover .step-num {
  transform: scale(1.08);
  box-shadow: 0 0 0 8px rgba(212, 175, 55, 0.06), 0 0 24px rgba(212, 175, 55, 0.25);
}

/* ---------- Stat hover sparkle ---------- */
[data-counter] {
  display: inline-block;
  transition: transform 0.4s var(--easing-elegant);
}
[data-counter]:hover { transform: translateY(-2px) scale(1.04); }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .ambient-orb, .text-gold-gradient { animation: none !important; }
}
