/* ==========================================================================
   Signature Elite Group — Global Stylesheet
   Tailwind CDN handles utilities; this file covers fonts, custom
   animations, and the handful of components Tailwind utilities alone
   can't express cleanly (modal, custom scrollbar, focus rings, etc).
   ========================================================================== */

:root {
  --se-black: #080808;
  --se-soft-black: #111111;
  --se-charcoal: #1A1A1A;
  --se-gold: #C9A227;
  --se-gold-light: #D8B44A;
  --se-warm-white: #F7F6F2;
  --se-white: #FFFFFF;
  --se-gray: #A5A5A5;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--se-warm-white);
  color: var(--se-soft-black);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, .font-serif {
  font-family: 'Playfair Display', Georgia, serif;
}

/* Prevent horizontal scroll anywhere */
html, body { max-width: 100%; }

/* ---------------------------------------------------------------------
   Selection & focus
   --------------------------------------------------------------------- */
::selection {
  background: var(--se-gold);
  color: var(--se-black);
}

a, button, input, textarea, select, [tabindex] {
  outline-offset: 3px;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--se-gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------------------------------------------------------------------
   Custom scrollbar (progressive enhancement — webkit + firefox)
   --------------------------------------------------------------------- */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--se-gold) var(--se-black);
}
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
*::-webkit-scrollbar-track {
  background: var(--se-black);
}
*::-webkit-scrollbar-thumb {
  background-color: var(--se-gold);
  border-radius: 0;
}

/* ---------------------------------------------------------------------
   Reveal-on-scroll (Intersection Observer driven)
   --------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.24s; }
.reveal-delay-3 { transition-delay: 0.36s; }
.reveal-delay-4 { transition-delay: 0.48s; }

/* ---------------------------------------------------------------------
   Image zoom-on-hover container
   --------------------------------------------------------------------- */
.img-zoom {
  overflow: hidden;
}
.img-zoom img {
  transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}
.img-zoom:hover img {
  transform: scale(1.06);
}

/* ---------------------------------------------------------------------
   Header
   --------------------------------------------------------------------- */
.site-header {
  background-color: rgba(8, 8, 8, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(201, 162, 39, 0.18);
  transition: background-color 0.4s ease, border-color 0.4s ease, padding 0.4s ease;
}
.site-header.is-scrolled {
  background-color: rgba(8, 8, 8, 0.96);
  border-bottom-color: rgba(201, 162, 39, 0.35);
}

.nav-link {
  position: relative;
  letter-spacing: 0.08em;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 1px;
  background: var(--se-gold);
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-link:hover::after,
.nav-link.is-active::after {
  width: 100%;
}
.nav-link.is-active {
  color: var(--se-gold-light);
}

/* Mobile nav */
.mobile-nav {
  transform: translateY(-100%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.mobile-nav.is-open {
  transform: translateY(0);
}

/* ---------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------- */
.btn-gold {
  background-color: var(--se-gold);
  color: var(--se-black);
  letter-spacing: 0.08em;
  transition: background-color 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
}
.btn-gold:hover {
  background-color: var(--se-gold-light);
  transform: translateY(-1px);
}

.btn-outline {
  border: 1px solid rgba(255,255,255,0.4);
  color: var(--se-white);
  letter-spacing: 0.08em;
  transition: border-color 0.35s ease, background-color 0.35s ease, color 0.35s ease;
}
.btn-outline:hover {
  border-color: var(--se-gold);
  background-color: rgba(201, 162, 39, 0.08);
  color: var(--se-gold-light);
}

.btn-outline-dark {
  border: 1px solid rgba(8,8,8,0.25);
  color: var(--se-soft-black);
  letter-spacing: 0.08em;
  transition: border-color 0.35s ease, background-color 0.35s ease, color 0.35s ease;
}
.btn-outline-dark:hover {
  border-color: var(--se-gold);
  background-color: rgba(201, 162, 39, 0.06);
  color: #9a7c1c;
}

/* Gold underline accent */
.gold-rule {
  width: 56px;
  height: 1px;
  background: var(--se-gold);
}

/* ---------------------------------------------------------------------
   Service Modal
   --------------------------------------------------------------------- */
.service-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(5, 5, 5, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.service-modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.service-modal-panel {
  position: fixed;
  inset: 0;
  z-index: 101;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.service-modal-panel.is-open {
  opacity: 1;
  pointer-events: auto;
}

.service-modal-card {
  transform: translateY(32px) scale(0.98);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.service-modal-panel.is-open .service-modal-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

body.modal-open {
  overflow: hidden;
}

/* On short viewports there isn't room for every block inside the service
   modal without introducing scroll. Drop the least essential block (Why
   Choose Us) and tighten spacing so Key Services + the quote CTA always
   stay visible without scrolling. The image-height and padding tweaks are
   scoped to the sub-md stacked layout only — on md+ (the two-column
   layout) the image uses md:h-full and must never be capped, or it
   collapses to a sliver while the row stays tall. A short but WIDE
   desktop window (browser zoom, OS display scaling) still hits the
   max-height condition, so width must gate these two rules. */
@media (max-height: 700px) {
  .service-modal-card [data-modal-optional] {
    display: none;
  }
  .service-modal-card [data-modal-content] {
    padding: 14px 20px;
  }
  .service-modal-card [data-modal-title] {
    margin-bottom: 6px;
  }
  .service-modal-card [data-modal-description] {
    margin-bottom: 10px;
  }
  .service-modal-card [data-view="details"] > .gold-rule {
    margin-bottom: 10px;
  }
  .service-modal-card [data-modal-services] {
    margin-bottom: 10px;
  }
}

/* Image-height cap belongs ONLY to the sub-md stacked layout (image row
   above content row) — never the md+ side-by-side layout, where the image
   must keep filling its column via md:h-full. */
@media (max-height: 700px) and (max-width: 767px) {
  .service-modal-card [data-modal-image-wrap] {
    height: 64px;
  }
}

/* ---------------------------------------------------------------------
   Reduced motion
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .img-zoom img { transition: none; }
  .img-zoom:hover img { transform: none; }
  .service-modal-card,
  .service-modal-overlay,
  .service-modal-panel,
  .site-header,
  .mobile-nav,
  .nav-link::after {
    transition-duration: 0.01ms !important;
  }
  .animate-bounce,
  .animate-pulse,
  .animate-spin {
    animation: none !important;
  }
}

/* ---------------------------------------------------------------------
   Hero scroll indicator
   --------------------------------------------------------------------- */
@keyframes se-scroll-down {
  0% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(8px); opacity: 1; }
  100% { transform: translateY(0); opacity: 0.4; }
}
.scroll-indicator {
  animation: se-scroll-down 2.2s ease-in-out infinite;
}

/* Eyebrow label */
.eyebrow {
  letter-spacing: 0.22em;
  font-weight: 600;
  color: var(--se-gold);
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--se-gold);
  color: var(--se-black);
  padding: 0.75rem 1.25rem;
  font-weight: 600;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}
