/* ========== RESET & BASE ========== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 16px);
  font-size: 16px;
}
/* Theme color transitions only on tokenized surfaces, not every element */
body, .navbar, .footer, .prop-card,
.email-form input[type="email"], .email-form .submit-btn,
.badge, .theme-toggle, .theme-toggle .knob {
  transition: background-color var(--transition-fast),
              border-color var(--transition-fast),
              color var(--transition-fast);
}
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ========== CUSTOM PROPERTIES — LIGHT ========== */
:root {
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 80px;
  --space-5xl: 100px;

  /* Layout */
  --max-width: 1120px;
  --content-padding: 24px;
  --nav-height: 64px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* Typography */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --leading-tight: 1.2;
  --leading-normal: 1.5;
  --leading-relaxed: 1.6;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Light mode colors */
  --color-bg: #F7F8FA;
  --color-surface: #FFFFFF;
  --color-surface-hover: #F0F2F5;
  --color-border: #E2E5EA;
  --color-border-focus: #2B6F4C;
  --color-text-primary: #1A1D23;
  --color-text-secondary: #4A5260;
  --color-text-tertiary: #5F6776;
  --color-accent: #2B6F4C;
  --color-accent-hover: #235C3E;
  --color-accent-light: #E8F5EF;
  --color-amber: #C87D2F;
  --color-amber-light: #FDF6EC;
  --color-success: #2B6F4C;
  --color-error: #C13A3A;
}

/* ========== DARK MODE ========== */
.dark {
  --color-bg: #0D0F12;
  --color-surface: #16191E;
  --color-surface-hover: #1E2229;
  --color-border: #2A2F38;
  --color-border-focus: #3DA06C;
  --color-text-primary: #EDEEF0;
  --color-text-secondary: #B8BFCB;
  --color-text-tertiary: #969DAA;
  --color-accent: #3DA06C;
  --color-accent-hover: #4DB77B;
  --color-accent-light: #1F3A2B;
  --color-amber: #E8973A;
  --color-amber-light: #2A2214;
  --color-success: #4DB77B;
  --color-error: #E55353;
}

/* ========== UTILITY CLASSES ========== */
.text-white { color: #FFFFFF; }
.bg-bg-primary { background: var(--color-bg); }
.bg-bg-secondary { background: var(--color-surface); }
.bg-surface-dark { background: var(--color-surface-hover); }
.bg-brand-green { background: var(--color-accent); }
.border-border-light { border-color: var(--color-border); }

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--content-padding);
  padding-right: var(--content-padding);
}

/* ========== SKIP LINK ========== */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-accent);
  color: #FFFFFF;
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top var(--transition-fast);
}
.skip-link:focus {
  top: var(--space-sm);
  outline: 2px solid var(--color-amber);
  outline-offset: 2px;
}

/* ========== NAVBAR ========== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  animation: fadeIn 400ms ease-out 0ms both, slideDown 400ms ease-out 0ms both;
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text-primary);
}
.logo svg {
  flex-shrink: 0;
}
.logo-subtitle {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--color-accent);
  display: block;
  margin-top: -2px;
}
/* Logo image theme swap — inline SVGs replaced by <img> logos */
.logo-light-img { display: block; }
.logo-dark-img { display: none; }
.dark .logo-light-img { display: none; }
.dark .logo-dark-img { display: block; }
.logo a img,
.logo img {
  height: 62px;
  width: auto;
}
.footer-logo a img,
.footer-logo img {
  height: 72px;
  width: auto;
}
.footer-logo .flogo-light { display: block; }
.footer-logo .flogo-dark { display: none; }
.dark .footer-logo .flogo-light { display: none; }
.dark .footer-logo .flogo-dark { display: block; }
@media (max-width: 768px) {
  .logo a img,
  .logo img {
    height: 44px;
  }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}
.nav-links a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-tertiary);
  position: relative;
  padding: var(--space-xs) 0;
  transition: color var(--transition-fast);
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width var(--transition-base);
}
.nav-links a:hover,
.nav-links a:focus-visible { color: var(--color-text-primary); }
.nav-links a:hover::after { width: 100%; }
.nav-links a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
  border-radius: 4px;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}
.hamburger:hover {
  background: var(--color-surface-hover);
}
.hamburger:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
.hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text-primary);
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}
.hamburger.active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.active .hamburger-line:nth-child(2) {
  opacity: 0;
}
.hamburger.active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Theme Toggle */
.theme-toggle {
  position: relative;
  width: 48px;
  height: 28px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 3px;
  animation: fadeIn 300ms ease-out 600ms both;
}
.theme-toggle:hover {
  border-color: var(--color-accent);
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
.theme-toggle:active {
  background: var(--color-surface-hover);
}
.theme-toggle .knob {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-base);
  transform: translateX(0);
  flex-shrink: 0;
}
.dark .theme-toggle .knob {
  transform: translateX(20px);
}
.theme-toggle .knob svg {
  width: 11px;
  height: 11px;
  fill: #FFFFFF;
}
.theme-toggle .sun-icon { display: block; }
.theme-toggle .moon-icon { display: none; }
.dark .theme-toggle .sun-icon { display: none; }
.dark .theme-toggle .moon-icon { display: block; }

/* ========== FOOTER ========== */
.footer {
  padding: var(--space-2xl) 0 var(--space-2xl);
  border-top: 1px solid var(--color-border);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}
.footer-logo {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: 0.04em;
  transition: color var(--transition-fast);
}
.footer-logo:hover,
.footer-logo:focus-visible { color: var(--color-accent); }
.footer-logo:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
  border-radius: 4px;
}
.footer-links {
  display: flex;
  gap: var(--space-lg);
}
.footer-links a {
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  transition: color var(--transition-fast);
}
.footer-links a:hover { color: var(--color-text-primary); }
.footer-links a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
  border-radius: 4px;
}
.footer-copy {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
}
.footer-tag {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
}

/* ========== BADGE ========== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  background: var(--color-accent-light);
  color: var(--color-accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-lg);
  animation: badgePulse 3s ease-in-out 3, fadeIn 400ms ease-out 100ms both, slideUp 400ms ease-out 100ms both;
}
.badge .badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 0 0 var(--color-accent);
  animation: dotPulse 2s ease-in-out 3;
}
.dark .badge {
  animation: badgePulseDark 3s ease-in-out 3, fadeIn 400ms ease-out 100ms both, slideUp 400ms ease-out 100ms both;
}

/* ========== SPINNER ========== */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes gradientShift {
  0%, 100% { background-position: 0% 0%, 100% 100%; }
  50%      { background-position: 100% 0%, 0% 100%; }
}
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(43, 111, 76, 0); }
  50%      { box-shadow: 0 0 0 8px rgba(43, 111, 76, 0.08); }
}
@keyframes badgePulseDark {
  0%, 100% { box-shadow: 0 0 0 0 rgba(61, 160, 108, 0); }
  50%      { box-shadow: 0 0 0 8px rgba(61, 160, 108, 0.12); }
}
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(43, 111, 76, 0.5); }
  50%      { box-shadow: 0 0 0 4px rgba(43, 111, 76, 0); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Scroll-triggered animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}
/* Cards stagger */
.prop-card.animate-on-scroll:nth-child(1) { transition-delay: 0ms; }
.prop-card.animate-on-scroll:nth-child(2) { transition-delay: 100ms; }
.prop-card.animate-on-scroll:nth-child(3) { transition-delay: 200ms; }

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 3 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .animate-on-scroll {
    opacity: 1;
    transform: none;
  }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .container { max-width: 90vw; }
}

@media (max-width: 768px) {
  :root {
    --space-4xl: 48px;
    --space-5xl: 60px;
  }
  .container {
    max-width: 100%;
    padding-left: var(--content-padding);
    padding-right: var(--content-padding);
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    gap: 0;
    padding: var(--space-md) 0;
    box-shadow: 0 8px 16px rgba(0,0,0,0.08);
    animation: slideDown 250ms ease-out both;
  }
  .nav-links.open,
  .nav-links.active {
    display: flex;
  }
  .nav-links a {
    padding: var(--space-md) var(--content-padding);
    font-size: var(--text-base);
    width: 100%;
  }
  .nav-links a::after {
    display: none;
  }
  .hamburger {
    display: flex;
  }

  .footer {
    padding: var(--space-xl) 0 var(--space-xl);
  }
  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: var(--space-sm);
  }
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-md);
  }
  .footer-logo,
  .footer-links a {
    font-size: 0.8125rem;
  }
  .footer-copy,
  .footer-tag {
    font-size: 0.75rem;
  }
  .badge {
    font-size: 0.6875rem;
  }
}

@media (max-width: 480px) {
  .prop-icon {
    width: 48px;
    height: 48px;
  }
  .prop-icon svg {
    width: 26px;
    height: 26px;
  }
}
