/* ============================================================
   LUNA CUSTOM HOMES — Components
   Custom cursor, scroll bar, shared buttons, reveal classes,
   section utilities, keyframes
   ============================================================ */

/* ── Custom Cursor ───────────────────────────────────────── */
.cursor {
  position: fixed;
  width: 8px; height: 8px;
  background: var(--white);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition: width .2s var(--ease), height .2s var(--ease), background .2s var(--ease), opacity .3s;
  will-change: transform;
}
.cursor-ring {
  position: fixed;
  width: 38px; height: 38px;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%);
  transition: width .35s var(--ease), height .35s var(--ease), border-color .35s var(--ease), opacity .3s;
  will-change: transform;
}
.cursor.hover  { width: 14px; height: 14px; background: var(--gold); }
.cursor-ring.hover { width: 62px; height: 62px; border-color: rgba(200,168,106,0.5); }
.cursor.hidden, .cursor-ring.hidden { opacity: 0; }

/* ── Scroll Progress Bar ─────────────────────────────────── */
.scroll-bar {
  position: fixed;
  top: 0; left: 0;
  width: 0%; height: 2px;
  background: var(--gold);
  z-index: 99997;
  transition: width .08s linear;
}

/* ── White CTA Button (hero, mobile menu CTA) ────────────── */
.btn-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: var(--dark);
  background: var(--white);
  height: 48px;
  padding: 12px 18px;
  border-radius: 200px;
  position: relative;
  overflow: hidden;
  transition: color .4s var(--ease);
}
.btn-white::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 200px;
  background: var(--dark);
  transform: translateX(-101%);
  transition: transform .4s var(--ease);
  z-index: 0;
}
.btn-white:hover { color: var(--white); }
.btn-white:hover::before { transform: translateX(0); }
.btn-white span { position: relative; z-index: 1; }

/* ── Ghost CTA Button (Our Work header) ──────────────────── */
.btn-ghost {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: var(--dark);
  background: var(--white);
  height: 48px;
  padding: 12px 18px;
  border-radius: 200px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: color .4s var(--ease);
  white-space: nowrap;
}
.btn-ghost::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--dark);
  border-radius: 200px;
  transform: translateX(-101%);
  transition: transform .4s var(--ease);
  z-index: 0;
}
.btn-ghost:hover { color: var(--white); }
.btn-ghost:hover::before { transform: translateX(0); }
.btn-ghost span { position: relative; z-index: 1; }

/* ── Section eyebrow label (e.g. "(THE PROCESS)") ────────── */
.section-label {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.05em;
  color: var(--white);
  margin: 0;
}

/* ── Scroll Reveal ───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .95s var(--ease), transform .95s var(--ease);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-36px);
  transition: opacity .95s var(--ease), transform .95s var(--ease);
}
.reveal-right {
  opacity: 0;
  transform: translateX(36px);
  transition: opacity .95s var(--ease), transform .95s var(--ease);
}
.reveal.visible,
.reveal-left.visible,
.reveal-right.visible {
  opacity: 1;
  transform: translate(0);
}
.d1 { transition-delay: .1s; }
.d2 { transition-delay: .2s; }
.d3 { transition-delay: .3s; }
.d4 { transition-delay: .4s; }
.d5 { transition-delay: .5s; }

/* ── Reveal-zoom: image Ken-Burns into place on scroll ────── */
/* Image starts slightly oversized and crops to natural size when the
   parent's overflow:hidden clip is in place. Used by scroll-effects.js. */
.reveal-zoom {
  transform: scale(1.06);
  transition: transform 1.4s var(--ease);
  will-change: transform;
}
.reveal-zoom.zoomed-in {
  transform: scale(1);
}

/* ── Keyframes ───────────────────────────────────────────── */
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  to { opacity: 1; }
}
@keyframes scrollPulse {
  0%   { top: -100%; }
  100% { top: 100%; }
}
@keyframes countUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive: hide custom cursor on touch devices ─────── */
@media (max-width: 900px) {
  body { cursor: auto; }
  .cursor, .cursor-ring { display: none; }
}

/* ── Form success state ──────────────────────────────────── */
.form-success {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 2.5rem 0;
  animation: formSuccessFade .5s var(--ease) both;
}

@keyframes formSuccessFade {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.form-success-icon { margin-bottom: 1.75rem; }
.form-success-icon svg { display: block; }

.form-success-eyebrow {
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.75rem;
}

.form-success-heading {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 400;
  font-style: italic;
  color: var(--white);
  line-height: 1.2;
  margin: 0 0 1.25rem;
}

.form-success-body {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.7;
  margin: 0 0 2rem;
  max-width: 28ch;
}

.form-success-rule {
  width: 48px;
  height: 1px;
  background: var(--gold);
  margin-bottom: 1.25rem;
  opacity: 0.5;
}

.form-success-sig {
  font-family: var(--serif);
  font-size: 0.95rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.3);
  margin: 0;
}
