/* ============================================================
   ENHANCEMENTS — Premium 21st.dev-inspired UI Upgrades
   Visit Sumba Island — Antigravity Project
   ============================================================ */

/* ── Scroll Progress Bar ── */
#scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #B0654A 0%, #D4886A 50%, #B0654A 100%);
  z-index: 9999;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(176, 101, 74, 0.7);
}

/* ── Particle Canvas ── */
#hero-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}
.hero {
  position: relative;
  overflow: hidden;
}
.hero-content {
  position: relative;
  z-index: 3;
}
.hero-bg {
  z-index: 0 !important;
}

/* ── Typewriter Cursor ── */
.typewriter-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: #B0654A;
  margin-left: 3px;
  vertical-align: middle;
  animation: blink-cursor 0.75s step-end infinite;
}
@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ── Marquee Ticker ── */
.marquee-section {
  background: #0D0D0D;
  border-top: 1px solid rgba(176, 101, 74, 0.3);
  border-bottom: 1px solid rgba(176, 101, 74, 0.3);
  overflow: hidden;
  padding: 14px 0;
  position: relative;
  z-index: 10;
}
.marquee-section::before,
.marquee-section::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}
.marquee-section::before {
  left: 0;
  background: linear-gradient(to right, #0D0D0D, transparent);
}
.marquee-section::after {
  right: 0;
  background: linear-gradient(to left, #0D0D0D, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 40s linear infinite;
}
.marquee-track:hover {
  animation-play-state: paused;
}
@keyframes marquee-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marquee-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 40px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}
.marquee-item strong {
  color: #B0654A;
  font-weight: 800;
}
.marquee-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(176, 101, 74, 0.5);
  flex-shrink: 0;
}

/* ── Scroll Reveal Animations ── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.reveal-left {
  transform: translateX(-40px);
}
.reveal.reveal-right {
  transform: translateX(40px);
}
.reveal.reveal-scale {
  transform: scale(0.92);
}
.reveal.in-view {
  opacity: 1;
  transform: none;
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ── Animated Number Counter ── */
.stat-number[data-target] {
  display: inline-block;
  transition: color 0.3s;
}

/* ── 3D Tilt Effect ── */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out, box-shadow 0.3s ease;
  will-change: transform;
}
.tilt-card:hover {
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(176, 101, 74, 0.15) !important;
}
.tilt-glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.12) 0%, transparent 70%);
}
.tilt-card:hover .tilt-glare {
  opacity: 1;
}

/* ── Shine Hover (enhanced) ── */
.shine-hover {
  position: relative;
  overflow: hidden;
}
.shine-hover::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -75%;
  width: 50%;
  height: 200%;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.06) 50%,
    transparent 60%
  );
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}
.shine-hover:hover::after {
  left: 125%;
}

/* ── Infrastructure Timeline ── */
.timeline-section {
  background: #0a0a0a;
  border-top: 1px solid rgba(255,255,255,0.05);
  position: relative;
  overflow: hidden;
}
.timeline-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, rgba(176,101,74,0.3) 20%, rgba(176,101,74,0.3) 80%, transparent);
}
.timeline-wrapper {
  position: relative;
  padding: 20px 0;
}
.timeline-item {
  display: grid;
  grid-template-columns: 1fr 60px 1fr;
  gap: 0 20px;
  align-items: center;
  margin-bottom: 60px;
  position: relative;
}
.timeline-item:last-child {
  margin-bottom: 0;
}
.timeline-content {
  padding: 28px 32px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  transition: border-color 0.3s, background 0.3s;
}
.timeline-content:hover {
  border-color: rgba(176,101,74,0.4);
  background: rgba(176,101,74,0.05);
}
.timeline-content.right {
  text-align: left;
}
.timeline-content.left {
  text-align: right;
}
.timeline-year {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #B0654A;
  margin-bottom: 6px;
  display: block;
}
.timeline-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 8px;
  font-weight: 600;
}
.timeline-desc {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
}
.timeline-dot-col {
  display: flex;
  justify-content: center;
  align-items: center;
}
.timeline-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0a0a0a;
  border: 2px solid #B0654A;
  position: relative;
  z-index: 2;
  transition: all 0.3s;
  flex-shrink: 0;
}
.timeline-dot::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #B0654A;
  transform: scale(0);
  transition: transform 0.3s;
}
.timeline-item:hover .timeline-dot::after {
  transform: scale(1);
}
.timeline-dot.active {
  border-color: #D4886A;
  box-shadow: 0 0 0 6px rgba(176,101,74,0.15);
}
.timeline-dot.active::after {
  transform: scale(1);
  background: #D4886A;
}
/* Mobile timeline */
@media (max-width: 767px) {
  .timeline-section::before {
    left: 28px;
  }
  .timeline-item {
    grid-template-columns: 56px 1fr;
    grid-template-rows: auto;
  }
  .timeline-content.left {
    display: none;
  }
  .timeline-content.right {
    grid-column: 2;
    grid-row: 1;
    text-align: left;
  }
  .timeline-dot-col {
    grid-column: 1;
    grid-row: 1;
    justify-content: center;
  }
}

/* ── Floating Back-to-Top Button ── */
#back-to-top {
  position: fixed;
  bottom: 36px;
  right: 36px;
  width: 48px;
  height: 48px;
  background: #B0654A;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s, background 0.2s;
  z-index: 999;
  box-shadow: 0 4px 20px rgba(176,101,74,0.4);
}
#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}
#back-to-top:hover {
  background: #8B4E38;
}

/* ── Glow Pulse on CTA Buttons ── */
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(176,101,74,0.4); }
  50%       { box-shadow: 0 0 40px rgba(176,101,74,0.7), 0 0 60px rgba(176,101,74,0.3); }
}
.btn-primary {
  animation: glow-pulse 3s ease-in-out infinite;
}
.btn-primary:hover {
  animation: none;
  box-shadow: 0 0 50px rgba(176,101,74,0.8) !important;
  transform: translateY(-2px);
}

/* ── Hero Typewriter Target ── */
#hero-typewriter-wrap {
  display: inline;
}

/* ── Domain Cards Enhanced ── */
.domain-card, .stat-item, .feature-card {
  position: relative;
  overflow: hidden;
}

/* ── Floating Orbs (Hero) ── */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  animation: orb-float 8s ease-in-out infinite;
}
.hero-orb-1 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(176,101,74,0.12) 0%, transparent 70%);
  top: -80px;
  right: 10%;
  animation-delay: 0s;
}
.hero-orb-2 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(176,101,74,0.08) 0%, transparent 70%);
  bottom: 20%;
  left: 5%;
  animation-delay: 3s;
}
@keyframes orb-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-20px) scale(1.05); }
}

/* ── Stats Counter Section Upgrade ── */
.stats-dashboard {
  position: relative;
}
.stat-item {
  cursor: default;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.3s,
              background 0.3s !important;
}
.stat-item:hover {
  transform: translateY(-8px) !important;
  border-color: rgba(176,101,74,0.5) !important;
  background: rgba(176,101,74,0.06) !important;
}

/* ── FAQ Accordion ── */
.faq-accordion {
  max-width: 880px;
  margin: 56px auto 0;
}

.faq-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.faq-item:first-child {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.faq-question {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 26px 4px;
  cursor: pointer;
  list-style: none;
  transition: background 0.2s;
}

.faq-question::-webkit-details-marker { display: none; }
.faq-question::marker { display: none; }

.faq-num {
  font-family: 'Playfair Display', serif;
  font-size: 11px;
  color: var(--primary);
  letter-spacing: 0.18em;
  font-weight: 700;
  min-width: 26px;
  flex-shrink: 0;
  opacity: 0.85;
}

.faq-q-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 700;
  flex: 1;
  line-height: 1.45;
  transition: color 0.25s;
}

.faq-item[open] .faq-q-text,
.faq-question:hover .faq-q-text {
  color: var(--primary);
}

.faq-chevron {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
  color: rgba(255, 255, 255, 0.35);
}

.faq-chevron svg {
  transition: transform 0.3s ease;
}

.faq-item[open] .faq-chevron {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.faq-item[open] .faq-chevron svg {
  transform: rotate(45deg);
}

.faq-question:hover .faq-chevron {
  border-color: rgba(176, 101, 74, 0.4);
  color: rgba(255, 255, 255, 0.6);
}

.faq-body {
  padding: 0 4px 28px calc(26px + 20px);
}

.faq-answer {
  border-left: 2px solid var(--primary);
  padding-left: 20px;
  color: rgba(255, 255, 255, 0.52);
  line-height: 1.85;
  font-size: 0.925rem;
  font-weight: 300;
}

.faq-answer strong {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 600;
}

.faq-answer .domain-tag {
  color: var(--primary);
  font-weight: 700;
}

/* ── Responsive ── */
@media (max-width: 767px) {
  #back-to-top {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
  }
  .marquee-item {
    padding: 0 24px;
  }
  .faq-q-text {
    font-size: 0.98rem;
  }
  .faq-body {
    padding-left: 20px;
  }
}
