/* =============================================
   Orange Homes — Shared Design System
   ============================================= */

/* ===== DESIGN TOKENS ===== */
:root {
  --oh-orange: #E8672A;
  --oh-orange-light: #F28C5A;
  --oh-orange-dark: #C4511A;
  --oh-orange-glow: #FFB088;
  --oh-cream: #FDF8F3;
  --oh-sand: #F5EDE4;
  --oh-stone: #E2D8CD;
  --oh-warm-gray: #6B6259;
  --oh-charcoal: #2C2520;
  --oh-ink: #1A1512;
  --oh-teal: #2A8E8A;
  --oh-teal-light: #3FB5B0;
  --oh-gold: #D4A853;
  --oh-gold-light: #EBC97A;
  --oh-sky: #5BA4D9;
  --oh-success: #4CAF50;
  --oh-error: #E53935;
  --oh-border: #E8DFD6;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --shadow-soft: 0 2px 8px rgba(44, 37, 32, 0.06);
  --shadow-card: 0 4px 20px rgba(44, 37, 32, 0.08);
  --shadow-elevated: 0 8px 40px rgba(44, 37, 32, 0.12);
  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --header-height: 4.5rem;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-behavior: smooth; overflow-x: hidden; }
body {
  background: var(--oh-cream);
  color: var(--oh-ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { border: none; cursor: pointer; font-family: inherit; }
input, select { font-family: inherit; }
::selection { background: var(--oh-orange); color: white; }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--oh-charcoal);
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }

/* ===== UTILITIES ===== */
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
@media (min-width: 768px) { .container { padding: 0 2rem; } }
.hidden { display: none !important; }
.section-pad { padding-top: 1.5rem; }
.text-muted { color: var(--oh-warm-gray); font-size: 0.95rem; }
.text-gradient-orange {
  background: linear-gradient(135deg, var(--oh-orange) 0%, var(--oh-orange-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.8); opacity: 0; }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.anim-up { opacity: 0; animation: fadeInUp 0.75s var(--ease-out-expo) forwards; }
.anim-up-d1 { animation-delay: 100ms; }
.anim-up-d2 { animation-delay: 200ms; }
.anim-up-d3 { animation-delay: 300ms; }
.anim-up-d4 { animation-delay: 400ms; }
.anim-up-d5 { animation-delay: 500ms; }

.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo); }
.reveal.visible { opacity: 1 !important; transform: translateY(0) !important; }
.reveal-d1 { transition-delay: 80ms; }
.reveal-d2 { transition-delay: 160ms; }
.reveal-d3 { transition-delay: 240ms; }
.reveal-d4 { transition-delay: 320ms; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--oh-sand); }
::-webkit-scrollbar-thumb { background: var(--oh-stone); border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: var(--oh-warm-gray); }

/* ===== WHATSAPP FAB ===== */
.whatsapp-fab {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 90;
  width: 60px; height: 60px; border-radius: 50%;
  background: #25D366;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  transition: transform 0.3s, box-shadow 0.3s;
}
.whatsapp-fab:hover { transform: scale(1.1); box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5); }
.whatsapp-fab svg { width: 28px; height: 28px; fill: white; }

/* ===== FOCUS ACCESSIBILITY ===== */
:focus-visible { outline: 2px solid var(--oh-orange); outline-offset: 2px; }

/* Skip link for accessibility */
.skip-link { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; z-index: 999; padding: 0.5rem 1rem; background: var(--oh-orange); color: white; font-family: var(--font-body); text-decoration: none; border-radius: 0 0 8px 0; font-size: 0.9rem; font-weight: 600; }
.skip-link:focus { left: 0; width: auto; height: auto; overflow: visible; }

/* ===== SKELETON LOADING ===== */
.skeleton { background: linear-gradient(90deg, var(--oh-sand) 25%, var(--oh-stone) 50%, var(--oh-sand) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-md); }
.skeleton-card { height: 320px; border-radius: var(--radius-lg); }
.skeleton-text { height: 1rem; margin-bottom: 0.5rem; }
.skeleton-text-sm { height: 0.75rem; width: 60%; }

/* =============================================
   SHARED HEADER / NAV
   ============================================= */
.oh-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(253, 248, 243, 0.92);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.oh-nav--scrolled {
  border-bottom-color: var(--oh-border);
  box-shadow: 0 2px 20px rgba(44, 37, 32, 0.06);
}
.oh-nav__inner {
  max-width: 1280px; margin: 0 auto;
  padding: 0 1.5rem;
  height: var(--header-height);
  display: flex; align-items: center; justify-content: space-between;
}
.oh-nav__logo {
  display: flex; align-items: center; gap: 0.6rem;
  text-decoration: none; flex-shrink: 0;
}
.oh-nav__logo-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--oh-orange);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.oh-nav__logo-icon span {
  color: white; font-family: 'Fraunces', Georgia, serif;
  font-weight: 700; font-size: 1.2rem;
}
.oh-nav__logo-text {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700; font-size: 1.1rem; color: var(--oh-charcoal);
}
.oh-nav__links {
  display: flex; gap: 0.25rem; align-items: center;
}
.oh-nav__link {
  padding: 0.4rem 0.75rem; border-radius: var(--radius-full);
  font-family: var(--font-body); font-size: 0.875rem; font-weight: 500;
  color: var(--oh-warm-gray); text-decoration: none;
  transition: color 0.2s, background 0.2s;
}
.oh-nav__link:hover { color: var(--oh-charcoal); background: var(--oh-sand); }
.oh-nav__link--active { color: var(--oh-orange); font-weight: 600; }
.oh-nav__right { display: flex; align-items: center; gap: 0.75rem; }
.oh-nav__cta {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 1rem; border-radius: var(--radius-full);
  background: var(--oh-orange); color: white;
  font-family: var(--font-body); font-size: 0.85rem; font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}
.oh-nav__cta:hover { background: var(--oh-orange-dark); transform: translateY(-1px); }
.oh-nav__cta svg { flex-shrink: 0; }

/* Hamburger toggle */
.oh-nav__toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; padding: 8px;
  background: none; border: none; cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}
.oh-nav__toggle:hover { background: var(--oh-sand); }
.oh-nav__toggle-bar {
  display: block; width: 100%; height: 2px;
  background: var(--oh-charcoal); border-radius: 2px;
  transition: transform 0.3s var(--ease-out-expo), opacity 0.2s;
  transform-origin: center;
}
.oh-nav__toggle--open .oh-nav__toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.oh-nav__toggle--open .oh-nav__toggle-bar:nth-child(2) { opacity: 0; }
.oh-nav__toggle--open .oh-nav__toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.oh-mobile-menu {
  display: none; flex-direction: column;
  background: var(--oh-cream);
  padding: 0.5rem 1.5rem 1.5rem;
  border-top: 1px solid var(--oh-border);
  max-height: 0; overflow: hidden;
  transition: max-height 0.4s var(--ease-out-expo), padding 0.3s;
}
.oh-mobile-menu--open {
  max-height: 420px; padding: 1rem 1.5rem 1.5rem;
}
.oh-mobile-menu__link {
  display: block; padding: 0.75rem 0;
  font-family: var(--font-body); font-size: 1rem; font-weight: 500;
  color: var(--oh-charcoal); text-decoration: none;
  border-bottom: 1px solid var(--oh-border);
  transition: color 0.2s;
}
.oh-mobile-menu__link:last-of-type { border-bottom: none; }
.oh-mobile-menu__link:hover { color: var(--oh-orange); }
.oh-mobile-menu__link--active { color: var(--oh-orange); font-weight: 600; }
.oh-mobile-menu__divider { height: 1px; background: var(--oh-border); margin: 0.5rem 0; }
.oh-mobile-menu__wa {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.25rem; margin-top: 0.5rem;
  background: #25D366; color: white; border-radius: var(--radius-full);
  font-family: var(--font-body); font-size: 0.95rem; font-weight: 600;
  text-decoration: none; justify-content: center;
  transition: background 0.2s;
}
.oh-mobile-menu__wa:hover { background: #1fba59; }

/* =============================================
   SHARED FOOTER
   ============================================= */
.oh-footer {
  background: var(--oh-charcoal); color: rgba(255,255,255,0.7);
  padding: 3rem 1.5rem 2rem;
}
.oh-footer__inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 1.5rem;
  text-align: center;
}
.oh-footer__brand {
  display: flex; align-items: center; gap: 0.75rem;
}
.oh-footer__brand-name {
  font-family: 'Fraunces', Georgia, serif; font-size: 1.1rem; color: white;
}
.oh-footer__brand-tagline {
  font-family: var(--font-body); font-size: 0.8rem; color: rgba(255,255,255,0.5); margin-top: 0.15rem;
}
.oh-footer__links {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; justify-content: center;
}
.oh-footer__links a {
  font-family: var(--font-body); font-size: 0.85rem;
  color: rgba(255,255,255,0.6); text-decoration: none;
  transition: color 0.2s;
}
.oh-footer__links a:hover { color: var(--oh-orange-light); }
.oh-footer__copy {
  font-family: var(--font-body); font-size: 0.8rem; color: rgba(255,255,255,0.75);
}
.oh-footer__copy a { color: var(--oh-orange-light); text-decoration: none; }

/* =============================================
   SHARED PAGE CONTENT (inner/editorial pages)
   ============================================= */
.page-content {
  max-width: 800px; margin: 0 auto;
  padding: calc(var(--header-height) + 2rem) 1.5rem 4rem;
}
.page-content h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin-bottom: 1.5rem; color: var(--oh-charcoal);
}
.page-content h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  margin: 2rem 0 0.75rem; color: var(--oh-charcoal);
}
.page-content h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.05rem, 2.5vw, 1.2rem);
  margin: 1.5rem 0 0.5rem; color: var(--oh-charcoal);
}
.page-content p, .page-content li {
  font-family: var(--font-body); line-height: 1.8; color: #444;
}
.page-content ul { padding-left: 1.25rem; margin: 0.5rem 0 1rem; }
.page-content li { margin-bottom: 0.5rem; }
.page-content a { color: var(--oh-orange); }
.back-link {
  display: inline-flex; align-items: center; gap: 0.25rem;
  font-family: var(--font-body); font-size: 0.9rem;
  color: var(--oh-orange); text-decoration: none; margin-bottom: 1.5rem;
}
.back-link:hover { text-decoration: underline; }
.last-updated { font-size: 0.85rem; color: #999; margin-top: 3rem; }

/* =============================================
   RESPONSIVE: TABLET & MOBILE
   ============================================= */
@media (max-width: 768px) {
  /* Nav: hide desktop links, show hamburger */
  .oh-nav__links { display: none; }
  .oh-nav__toggle { display: flex; }
  .oh-mobile-menu { display: flex; }
  .oh-nav__cta span { display: none; }
  .oh-nav__cta { padding: 0.5rem; border-radius: 50%; }

  /* Page content adjustments */
  .page-content { padding: calc(var(--header-height) + 1rem) 1rem 2.5rem; }

  /* Comparison table: horizontal scroll */
  .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.5rem -1rem; padding: 0 1rem; }
  .comparison-table { min-width: 500px; font-size: 0.8rem; }
  .comparison-table thead th, .comparison-table tbody td { padding: 0.6rem 0.75rem; }

  /* FAQ details */
  details summary { padding: 0.875rem 1rem; font-size: 0.95rem; }
  details div { padding: 0.875rem 1rem; }

  /* Profile boxes / cost examples */
  .profile-box { padding: 1.25rem; }
  .cost-example { padding: 1.25rem; }

  /* CTA sections */
  .cta-section { padding: 1.5rem 1rem; margin: 2rem 0; }
  .cta-button { padding: 0.65rem 1.25rem; font-size: 0.9rem; }
  .cta-buttons { flex-direction: column; align-items: stretch; }

  /* Footer */
  .oh-footer { padding: 2rem 1rem 1.5rem; }
  .oh-footer__brand { flex-direction: column; text-align: center; }
  .oh-footer__links { gap: 0.4rem 1rem; }

  /* WhatsApp FAB: smaller on mobile */
  .whatsapp-fab { width: 52px; height: 52px; bottom: 1.25rem; right: 1.25rem; }
  .whatsapp-fab svg { width: 24px; height: 24px; }
}

@media (max-width: 480px) {
  .oh-nav__inner { padding: 0 1rem; }
  .oh-nav__logo-text { font-size: 1rem; }
  .page-content { padding: calc(var(--header-height) + 0.75rem) 0.875rem 2rem; }
  .page-content h1 { margin-bottom: 1rem; }
}
