/* Base Typography & Variables */
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Base Typography & Variables */
:root {
  --color-bg: #FCFCFC;
  --color-surface: #FFFFFF;
  --color-text: #18181B;
  --color-text-muted: #52525B;
  --color-border: #E4E4E7;

  --color-primary: #09090B;
  --color-primary-light: #27272A;
  --color-accent: #2563EB;
  --color-accent-hover: #1D4ED8;
  --color-success: #16A34A;
  --color-error: #DC2626;
  --color-error-bg: #FEF2F2;

  --font-heading: 'Cabinet Grotesk', sans-serif;
  --font-body: 'Satoshi', sans-serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

  --max-width: 1200px;
  --header-height: 90px;
  --topbar-height: 40px;
}

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  line-height: 1.1;
  font-weight: 800;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1rem;
  color: var(--color-text-muted);
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 6rem 0;
}

.hero-section {
  padding: 8rem 0 6rem;
}

.hero-section-full {
  padding: 12rem 0 10rem;
}

.hero-home .hero-desktop-bg img {
  object-position: center 32%;
}

.section-sm {
  padding: 4rem 0;
}

.section-light {
  background-color: var(--color-surface);
}

.section-dark {
  background-color: #1E3A5F;
  color: white;
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark p {
  color: white;
}

.section-dark p {
  opacity: 0.9;
}

.section-accent {
  background-color: var(--color-accent);
  color: white;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-family: var(--font-heading);
  transition: all 0.2s ease;
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--color-accent);
  color: white;
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
}

.btn-outline {
  border: 2px solid var(--color-border);
  color: var(--color-primary);
}

.btn-outline:hover {
  border-color: var(--color-primary);
}

.btn-white {
  background-color: white;
  color: var(--color-primary);
}

.btn-white:hover {
  background-color: var(--color-bg);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Topbar */
.topbar {
  background-color: #1E3A5F;
  color: white;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  font-size: 0.875rem;
}

.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar-left,
.topbar-right {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.topbar a {
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.topbar a:hover {
  color: white;
}

@media (max-width: 768px) {
  .topbar {
    display: none;
  }
}

/* Header & Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.navbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--header-height);
}

.logo {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
  height: 100%;
}

.nav-links>li {
  height: 100%;
  display: flex;
  align-items: center;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--color-accent);
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  width: 30px;
  height: 24px;
  justify-content: center;
  position: relative;
  z-index: 60;
}

.hamburger-bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Hamburger to X */
.mobile-menu-toggle.active .hamburger-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.active .hamburger-bar:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active .hamburger-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Deep Dropdown */
.dropdown-parent {
  position: relative;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 500;
  height: 100%;
  cursor: pointer;
}

.dropdown-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  width: 600px;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.dropdown-parent:hover .dropdown-menu,
.dropdown-parent:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-parent:hover .dropdown-icon {
  transform: rotate(180deg);
}

.dropdown-col h4 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.5rem;
}

.dropdown-col a {
  display: block;
  padding: 0.5rem 0;
  color: var(--color-text);
  font-size: 0.95rem;
}

.dropdown-col a:hover {
  color: var(--color-accent);
  padding-left: 0.25rem;
  transition: padding 0.2s ease;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  transition: border-color 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(9, 9, 11, 0.1);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 0;
  }

  .form-row .form-group {
    margin-bottom: 1.5rem;
  }
}

/* Cards & Elements */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: box-shadow 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.action-card {
  text-align: center;
  display: block;
  padding: 27px;
}

.action-card i,
.action-card svg {
  margin: 0 auto 1rem !important;
  width: 24px;
  height: 24px;
  color: var(--color-accent);
  display: block !important;
}

.trust-row {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 2rem 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin: 2rem 0;
  background: var(--color-surface);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

/* Footer */
.site-footer {
  background-color: var(--color-primary);
  color: white;
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 2rem;
  margin-bottom: 2rem;
}

.footer-brand h3 {
  color: white;
  margin-bottom: 1rem;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.7);
}

.footer-links h4 {
  color: white;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.footer-links ul li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s;
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
}

/* WhatsApp Float */
.whatsapp-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.whatsapp-label {
  background: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.875rem;
  box-shadow: var(--shadow-md);
  color: var(--color-primary);
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.whatsapp-widget:hover .whatsapp-label {
  opacity: 1;
  transform: translateX(0);
}

.whatsapp-float {
  background-color: #25D366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: transform 0.2s ease;
}

.whatsapp-float:hover {
  transform: scale(1.05);
}

.whatsapp-float svg {
  width: 32px;
  height: 32px;
}

/* Cookie Preferences System */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  max-width: 600px;
  width: calc(100% - 48px);
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  z-index: 1000;
  transform: translateY(150%);
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cookie-banner.show {
  transform: translateY(0);
}

.cookie-banner h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.cookie-banner p {
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.cookie-prefs {
  display: none;
  margin-bottom: 1.5rem;
  border-top: 1px solid var(--color-border);
  padding-top: 1.5rem;
}

.cookie-prefs.active {
  display: block;
}

.cookie-category {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 1rem;
}

.cookie-category-info h4 {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.cookie-category-info p {
  margin-bottom: 0;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* Switch Toggle */
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #E4E4E7;
  transition: .4s;
  border-radius: 20px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked+.slider {
  background-color: var(--color-accent);
}

input:checked+.slider:before {
  transform: translateX(20px);
}

input:disabled+.slider {
  opacity: 0.5;
  cursor: not-allowed;
}

.cookie-footer-trigger {
  position: fixed;
  bottom: 24px;
  left: 24px;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  z-index: 99;
  color: var(--color-text-muted);
  transition: all 0.2s;
}

.cookie-footer-trigger:hover {
  color: var(--color-accent);
  transform: scale(1.1);
}

@media (max-width: 600px) {
  .cookie-banner {
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    padding: 1.5rem;
  }

  .cookie-actions {
    flex-direction: column;
  }

  .cookie-actions .btn {
    width: 100%;
  }
}

/* Mobile Nav */
@media (max-width: 768px) {
  .section {
    padding: 0.5rem 0 3rem;
  }

  .whatsapp-label {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  /* Fixed Mobile Menu */
  .nav-links {
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: white;
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    height: auto;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  }

  .nav-links.active {
    max-height: 85vh;
    visibility: visible;
    overflow-y: auto;
  }

  .nav-links>li {
    width: 100%;
    border-top: 1px solid var(--color-border);
    height: auto;
    display: block;
  }

  .nav-links a,
  .dropdown-toggle {
    padding: 1.25rem 1.5rem;
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
  }

  /* Mobile Dropdown Fix */
  .dropdown-menu {
    position: static !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 1.5rem 1.5rem !important;
    display: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    width: 100% !important;
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .dropdown-parent.active .dropdown-menu {
    display: grid !important;
  }

  .dropdown-parent.active .dropdown-icon {
    transform: rotate(180deg);
  }

  .dropdown-col h4 {
    margin-top: 1rem;
    border: none;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
  }

  .dropdown-col a {
    padding: 0.5rem 0;
    font-size: 1rem;
    border-bottom: 1px solid #f1f5f9;
  }

  .nav-cta {
    padding: 1.5rem;
  }

  .nav-cta a {
    display: flex;
    width: 100%;
  }

  /* Hero Responsive */
  .hero-section {
    padding: 2.5rem 0 !important;
    overflow: hidden !important;
  }

  /* Hero pages with only centered text — taller on mobile to show more image */
  .hero-section-full {
    min-height: 40vh !important;
  }

  /* Show hero-desktop-bg (picture element handles mobile src swap) */
  .hero-desktop-bg {
    display: block !important;
  }

  .hero-desktop-bg img {
    object-position: center 58% !important;
  }

  .hero-housing .hero-desktop-bg img {
    object-position: center 80% !important;
  }

  .hero-home .hero-desktop-bg img {
    object-position: center 87% !important;
  }

  .hero-home .hero-desktop-bg {
    height: 50% !important;
  }

  /* On mobile: change overlay to vertical gradient so image fades at bottom */
  .hero-overlay {
    background: linear-gradient(to bottom,
        rgba(248, 250, 252, 0.60) 0%,
        rgba(248, 250, 252, 0.60) 75%,
        rgba(248, 250, 252, 1) 100%) !important;
  }


  .hero-content h1 {
    font-size: 2rem !important;
    line-height: 1.2 !important;
  }

  .hero-content p {
    font-size: 0.9rem !important;
  }

  .hero-form {
    margin-top: 2rem;
    padding: 1.5rem !important;
  }

  /* Typography */
  h2 {
    font-size: 1.75rem !important;
  }

  h3 {
    font-size: 1.25rem !important;
  }

  /* Buttons */
  .btn {
    width: 100%;
    text-align: center;
  }

  .nav-cta a {
    width: 100%;
  }

  /* Grid 4 (Quick Actions) adjustment */
  .grid-4 {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .action-card {
    padding: 1.25rem 1rem;
  }

  .action-card h4 {
    font-size: 0.9rem;
  }

  .action-card i {
    width: 24px;
    height: 24px;
  }

  /* Trust Row Mobile */
  .trust-row {
    gap: 1.5rem;
    justify-content: center;
    padding: 1.5rem 0.5rem;
  }

  .trust-item {
    font-size: 0.85rem;
  }

  .trust-item span br {
    display: none;
  }

  .trust-item span small::before {
    content: " - ";
  }
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 21:9 Image Handling */
.banner-21-9 {
  width: 100%;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
}

.banner-21-9::before {
  content: '';
  display: block;
  padding-top: 42.85%;
  /* 21:9 Aspect Ratio */
}

.banner-21-9 img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-media-container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
}

/* Success Toast */
.toast-success {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 1000;
  background: var(--color-surface);
  border-left: 4px solid var(--color-success);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  max-width: 400px;
  transform: translateY(150%);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-success.show {
  transform: translateY(0);
}

.toast-success-close {
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color 0.2s;
}

.toast-success-close:hover {
  color: var(--color-primary);
}

/* Multi-Step Form UI */
.multistep-form .form-step {
  display: none;
  animation: fadeIn 0.4s ease;
}

.multistep-form .form-step.active {
  display: block;
}

.progress-container {
  margin-bottom: 2rem;
  background: var(--color-border);
  height: 6px;
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--color-accent);
  width: 25%;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-indicator {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  gap: 1rem;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.radio-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.2s;
  background: white;
}

.radio-card:hover {
  border-color: var(--color-accent);
}

.radio-card input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-accent);
}

.radio-card.selected {
  border-color: var(--color-accent);
  background: rgba(37, 99, 235, 0.03);
}

/* Text overlay on images */
.hero-text-shadow,
.hero-text-shadow h1,
.hero-text-shadow p {
  color: #000 !important;
  text-shadow: 0 0 10px rgba(255, 255, 255, 1), 0 0 20px rgba(255, 255, 255, 0.9), 0 0 30px rgba(255, 255, 255, 0.8);
}

.hero-text-shadow p {
  font-weight: 500;
}