/* ═══════════════════════════════════════════════════════════════
   INITIUM Design System — Components
   Buttons, cards, navigation, footer
   ═══════════════════════════════════════════════════════════════ */

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
  border: 1px solid var(--accent);
}

.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.btn-outline {
  background: transparent;
  color: var(--dark);
  border: 1px solid var(--dark);
}

.btn-outline:hover {
  background: var(--dark);
  color: var(--white);
}

.btn-outline-light {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.4);
}

.btn-outline-light:hover {
  background: var(--white);
  color: var(--dark);
  border-color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: inherit;
  border: 1px solid transparent;
  padding-left: 0;
  padding-right: 0;
}

.btn-ghost:hover {
  opacity: 0.7;
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}

/* ─── Navigation ─── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: background var(--transition-base);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--dark);
  margin-left: calc(var(--page-pad-x) * -1);
}

.nav-logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav-link {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition-base);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-cta {
  margin-left: var(--space-4);
}

/* Mobile nav */
.nav-toggle {
  display: none;
  width: 32px;
  height: 32px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  background: transparent;
  border: none;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  z-index: 101;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--dark);
  transition: all var(--transition-base);
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    width: 100%;
    height: calc(100vh - 64px);
    background: #FFFFFF;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-8) var(--space-6);
    gap: var(--space-6);
    transform: translateX(100%);
    -webkit-transform: translateX(100%);
    transition: transform var(--transition-base), -webkit-transform var(--transition-base);
    box-shadow: -4px 0 24px rgba(0,0,0,0.08);
    overflow-y: auto;
    pointer-events: none;
  }

  .nav-links.open {
    transform: translateX(0);
    -webkit-transform: translateX(0);
    pointer-events: auto;
  }

  .nav-link {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--text-primary);
  }

  .nav-cta {
    margin-left: 0;
    margin-top: var(--space-4);
  }

  .nav-toggle {
    display: flex;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
}

/* ─── Footer ─── */
.footer {
  background: var(--dark);
  color: var(--text-on-dark-muted);
  padding-top: var(--space-16);
  padding-bottom: var(--space-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-8);
}

.footer-nav {
  display: flex;
  flex-direction: column;
}

.footer-links {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--space-6) var(--space-8);
  overflow-x: auto;
  scrollbar-width: none;
}
.footer-links::-webkit-scrollbar { display: none; }

.footer-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--text-on-dark-muted);
  transition: color var(--transition-fast);
  flex: 0 0 auto;
}

.footer-link-title {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--white);
}

.footer-link-desc {
  font-size: var(--text-xs);
  color: var(--text-on-dark-muted);
}

.footer-link:hover .footer-link-title {
  color: var(--accent);
}

.footer-link:hover .footer-link-desc {
  color: rgba(255,255,255,0.5);
}

.footer-brand {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--white);
  margin-bottom: var(--space-4);
}

.footer-brand span {
  color: var(--accent);
}

.footer-desc {
  font-size: var(--text-sm);
  line-height: 1.6;
  max-width: 280px;
  margin-bottom: var(--space-6);
}

.footer-socials {
  display: flex;
  gap: var(--space-4);
}

.footer-socials a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-on-dark-muted);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.footer-socials a:hover {
  color: var(--white);
  border-color: var(--accent);
  background: rgba(80,200,120,0.1);
}

.footer-socials svg {
  width: 16px;
  height: 16px;
}

.footer-heading {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-4);
}

.footer-bottom {
  margin-top: var(--space-12);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-2);
    text-align: center;
  }
}

/* ─── Cards ─── */
.card {
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: box-shadow var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.card:hover .card-image img {
  transform: scale(1.03);
}

.card-body {
  padding: var(--space-5);
}

.card-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.card-text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Property card variant */
.card-property .card-image {
  aspect-ratio: 3 / 2;
}

.card-price {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--accent);
  margin-top: var(--space-3);
}

.card-meta {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

/* ─── CTA Section ─── */
.cta-section {
  background: var(--dark);
  color: var(--white);
  padding: var(--space-24) var(--page-pad-x);
  text-align: center;
}

.cta-section .headline-md {
  margin-bottom: var(--space-4);
}

.cta-section .body-lg {
  color: var(--text-on-dark-muted);
  max-width: 560px;
  margin: 0 auto var(--space-8);
}

/* ─── Divider ─── */
.divider {
  height: 1px;
  background: rgba(0,0,0,0.08);
  border: none;
}

.divider-light {
  background: rgba(255,255,255,0.1);
}

/* ─── Badge ─── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--radius-sm);
}

.badge-accent {
  background: var(--accent);
  color: var(--white);
}

.badge-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid rgba(0,0,0,0.12);
}

.badge-dark {
  background: var(--dark);
  color: var(--white);
}

/* ─── Testimonial ─── */
.testimonial {
  max-width: 720px;
}

.testimonial-quote {
  font-family: var(--font-editorial);
  font-size: clamp(var(--text-xl), 2.5vw, var(--text-3xl));
  font-style: italic;
  line-height: 1.4;
  margin-bottom: var(--space-6);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.testimonial-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.testimonial-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
}

.testimonial-role {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

/* ─── Stat block ─── */
.stat {
  text-align: left;
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(var(--text-4xl), 4vw, var(--text-6xl));
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: var(--space-2);
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* Scroll reveal base — GSAP handles the hidden state inline */
.reveal {
  will-change: opacity, transform;
}
