/* style.css - Clean, exact mockup match with contact form popup */

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

/* ==========================================
   1. Design System & Custom Variables
   ========================================== */
:root {
  /* Colors matching the image and logo */
  --bg-primary: #020712;
  --gold-text: #dfc17b;       /* Warm gold from mockup */
  --gold-glow: rgba(223, 193, 123, 0.35);
  
  --glass-bg: rgba(6, 17, 39, 0.82);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-focus: rgba(223, 193, 123, 0.4);
  
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  
  /* Fonts */
  --font-sans: 'Plus Jakarta Sans', sans-serif;
  
  /* Transitions */
  --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
}

/* ==========================================
   2. Reset & General Styles
   ========================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select {
  font-family: inherit;
  outline: none;
}

/* ==========================================
   3. Single-Page Showcase Layout (Exact Spacing)
   ========================================== */
.showcase {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  background-image: url('hero.jpeg');
  background-size: cover;
  background-position: center;
  animation: slowZoom 25s ease-out infinite alternate;
}

/* Dark blue-black tint gradient matching sample exactly */
.showcase::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(2, 7, 18, 0.8) 0%,
    rgba(2, 7, 18, 0.5) 45%,
    rgba(2, 7, 18, 0.75) 80%,
    rgba(2, 7, 18, 0.95) 100%
  );
  z-index: 1;
}

/* Vertically distributes elements down the screen height */
.showcase-content {
  position: relative;
  z-index: 3; /* Lifted above canvas */
  width: 100%;
  height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  align-items: center;
  justify-items: center;
  padding: 6vh 2rem;
}

#bg-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2; /* Behind text, in front of city skyline background */
  pointer-events: none;
}

/* Top Center Logo */
.logo-container {
  grid-row: 1;
  align-self: start;
  opacity: 0;
  transform: translateY(-15px);
  animation: fadeInDown 2.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.showcase-logo {
  max-width: 180px; /* Slim, balanced logo size */
  height: auto;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  border-radius: 4px;
  transition: var(--transition-smooth);
}

.showcase-logo:hover {
  transform: scale(1.03);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.65), 0 0 15px rgba(223, 193, 123, 0.15);
}

/* Center Content block (Heading and CTA trigger) */
.center-content {
  grid-row: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5.5rem; /* Increased gap between title and CTA button */
  width: 100%;
  max-width: 900px;
}

.grid-spacer {
  grid-row: 3;
  height: 1px;
}

/* Heading: Sans-serif, exact casing, warm gold text color */
.showcase-title {
  font-family: var(--font-sans);
  font-size: clamp(2.2rem, 5.5vw, 2.8rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: var(--gold-text);
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  text-align: center; /* Explicit centering */
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Option 2: Continuous slow floating animation starting after text reveals */
  animation: floatTitle 9s ease-in-out infinite alternate;
  animation-delay: 3.2s;
}

.anim-line {
  display: block;
  overflow: hidden;
  position: relative;
  padding: 0.15rem 0; /* Prevents text bottom-cutoffs */
  width: 100%;
}

.anim-text {
  display: block;
}

/* Word-by-word fade-in reveal (sliding from right) */
.word-fade {
  display: inline-block;
  opacity: 0;
  transform: translateX(18px);
  animation: wordFadeIn 0.8s cubic-bezier(0.15, 0.85, 0.3, 1.08) forwards;
}

/* Staggered word entries with delayed start */
.showcase-title .word-fade:nth-child(1) { animation-delay: 1.2s; }
.showcase-title .word-fade:nth-child(2) { animation-delay: 1.35s; }
.showcase-title .word-fade:nth-child(3) { animation-delay: 1.50s; }
.showcase-title .word-fade:nth-child(4) { animation-delay: 1.65s; }
.showcase-title .word-fade:nth-child(5) { animation-delay: 1.80s; }

@keyframes wordFadeIn {
  0% {
    opacity: 0;
    transform: translateX(18px);
  }
  75% {
    transform: translateX(-3px); /* Soft premium overshoot to the left */
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.anim-text-typewriter {
  color: var(--gold-text);
  font-family: var(--font-sans);
  transition: text-shadow 0.8s ease-in-out;
  display: inline-block;
}

.anim-text-typewriter.typed-complete {
  text-shadow: 0 0 15px rgba(223, 193, 123, 0.6), 0 0 3px rgba(223, 193, 123, 0.35);
}

.typewriter-cursor {
  color: var(--gold-text);
  font-weight: 300;
  display: inline-block;
  margin-left: 2px;
  animation: blinkCursor 0.8s infinite;
  transition: opacity 0.5s ease;
}

.typewriter-cursor.fade-out {
  opacity: 0;
}

@keyframes revealText {
  0% {
    transform: translateY(100%);
    opacity: 0;
  }
  20% {
    opacity: 0;
  }
  75% {
    transform: translateY(-5px); /* Soft elastic overshoot */
    opacity: 1;
  }
  90% {
    transform: translateY(1px); /* Slight bounce back */
    opacity: 1;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes blinkCursor {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

@keyframes floatTitle {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-6px); /* Weightless 6px slow drift */
  }
}

/* Action: Gold button trigger */
.showcase-action {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 2.0s cubic-bezier(0.16, 1, 0.3, 1) 1.6s forwards;
}

.cta-link {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #ebd69b 0%, #dfc17b 50%, #b89a50 100%);
  color: var(--bg-primary);
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 1.1rem 2.5rem;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 5px 20px rgba(223, 193, 123, 0.3);
}

/* Glassy Shimmer sweep effect */
.cta-link::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -150%;
  width: 30%;
  height: 200%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.45) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(30deg);
  pointer-events: none;
  animation: shimmerSweep 6s infinite ease-in-out;
}

.cta-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(223, 193, 123, 0.45);
  background: transparent;
  color: var(--gold-text);
  border-color: var(--gold-text);
}

.cta-link:hover::after {
  animation: shimmerSweepActive 1.2s ease-in-out forwards;
}

@keyframes shimmerSweep {
  0% {
    left: -150%;
  }
  15% {
    left: 150%;
  }
  100% {
    left: 150%;
  }
}

@keyframes shimmerSweepActive {
  0% {
    left: -150%;
  }
  100% {
    left: 150%;
  }
}

/* ==========================================
   4. Contact Form Modal
   ========================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(2, 7, 18, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(223, 193, 123, 0.08);
}

.modal-container {
  width: 90%;
  max-width: 480px;
  padding: 2.5rem;
  position: relative;
  transform: scale(0.92) translateY(15px);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-container {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
  line-height: 1;
}

.modal-close:hover {
  color: var(--gold-text);
  transform: rotate(90deg);
}

.modal-header {
  margin-bottom: 1.75rem;
  text-align: center;
}

.modal-title {
  font-size: 1.8rem;
  color: var(--gold-text);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.modal-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Form Styling */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Staggered delay triggers for modal form fields */
.modal-overlay.active .form-group:nth-child(1) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.1s;
}

.modal-overlay.active .form-group:nth-child(2) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.20s;
}

.modal-overlay.active .form-group:nth-child(3) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.30s;
}

.modal-overlay.active .form-group:nth-child(4) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.40s;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold-text);
}

.form-input {
  background: rgba(2, 7, 18, 0.5);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  padding: 0.8rem 1rem;
  color: #fff;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.form-input:focus {
  border-color: var(--glass-border-focus);
  box-shadow: 0 0 10px rgba(223, 193, 123, 0.15);
  background: rgba(5, 16, 38, 0.7);
}

textarea.form-input {
  resize: none;
}

.submit-btn {
  background: linear-gradient(135deg, #ebd69b 0%, #dfc17b 50%, #b89a50 100%);
  color: var(--bg-primary);
  border: 1px solid transparent;
  padding: 0.9rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 15px rgba(223, 193, 123, 0.25);
  margin-top: 0.8rem;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(223, 193, 123, 0.45);
  background: transparent;
  color: #fff;
  border-color: var(--gold-text);
}

.submit-btn:active {
  transform: translateY(0);
}

/* Direct Contact Info Details */
.modal-contact-details {
  margin-top: 1.8rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: 0.5s;
}

.modal-overlay.active .modal-contact-details {
  opacity: 1;
  transform: translateY(0);
}

.contact-caption {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem;
}

.direct-contact-link {
  font-size: 0.85rem;
  color: var(--gold-text);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition-fast);
}

.direct-contact-link svg {
  stroke: var(--gold-text);
  transition: var(--transition-fast);
}

.direct-contact-link:hover {
  color: #fff;
}

.direct-contact-link:hover svg {
  stroke: #fff;
  transform: translateY(-1px);
}

/* Success View */
.form-success-message {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.2rem;
}

.form-success-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(223, 193, 123, 0.1);
  border: 1.5px solid var(--gold-text);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-text);
  animation: pulseSuccess 2s infinite;
}

.success-title {
  font-size: 1.6rem;
  color: var(--gold-text);
}

/* ==========================================
   5. Keyframe Animations
   ========================================== */
@keyframes slowZoom {
  from {
    transform: scale(1.01);
  }
  to {
    transform: scale(1.07);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseSuccess {
  0% {
    box-shadow: 0 0 0 0 rgba(223, 193, 123, 0.4);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(223, 193, 123, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(223, 193, 123, 0);
  }
}

/* ==========================================
   5.5 Preloader Overlay Style
   ========================================== */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-primary);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.6s;
}

#preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.preloader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.preloader-logo {
  max-width: 120px;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
  animation: logoPulse 2.5s ease-in-out infinite;
}

.preloader-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(223, 193, 123, 0.1);
  border-top-color: var(--gold-text);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes logoPulse {
  0%, 100% {
    opacity: 0.6;
    transform: scale(0.96);
  }
  50% {
    opacity: 1;
    transform: scale(1.03);
    filter: drop-shadow(0 0 15px rgba(223, 193, 123, 0.25));
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================
   6. Mobile Adaptation
   ========================================== */
@media (max-width: 600px) {
  .showcase-content {
    padding: 7vh 1rem 11vh 1rem; /* Slightly reduced horizontal padding for more text width */
  }
  .showcase-logo {
    max-width: 140px; /* Perfect scale for phone screens */
  }
  .showcase-title {
    font-size: clamp(1.4rem, 5.8vw, 1.7rem); /* Prevent wrapping of the word 'Trust' */
    line-height: 1.35;
    padding: 0 0.5rem;
  }
  .cta-link {
    font-size: 1rem;
    padding: 0.9rem 2rem;
  }
  .modal-container {
    padding: 2rem 1.5rem;
  }
  .modal-title {
    font-size: 1.5rem;
  }
  .contact-links {
    flex-direction: column;
    gap: 0.6rem;
    align-items: center;
  }
}
