:root {
    --rp-ink: #102a2e;
    --rp-muted: #607276;
    --rp-line: rgba(16, 42, 46, .10);
    --rp-brand: #087f72;
    --rp-accent: #ff6b35;
    --rp-surface: rgba(255,255,255,.92);
    --rp-shadow: 0 18px 50px rgba(18, 38, 42, .09);
    --rp-radius: 22px;
}

html { font-size: 16px; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body:not(.admin-body) { color: var(--rp-ink); }

/* Modern, restrained typography across every public blade. */
body:not(.admin-body) h1 { font-size: clamp(2rem, 5vw, 4.25rem) !important; line-height: 1.05 !important; letter-spacing: -.055em !important; }
body:not(.admin-body) h2 { font-size: clamp(1.45rem, 2.7vw, 2.35rem) !important; line-height: 1.18 !important; letter-spacing: -.035em !important; }
body:not(.admin-body) h3 { font-size: clamp(1.08rem, 1.6vw, 1.35rem) !important; }
body:not(.admin-body) p { line-height: 1.7; }

/* Unified sticky navigation. */
.home-header,.front-header,.modern-header,.dark-header,.wave-header,.neo-header,.paper-header,
.studio-header,.lumen-header,.civic-header,.showcase-header {
    position: sticky !important; top: 0; z-index: 50;
    border-bottom: 1px solid rgba(16,42,46,.08) !important;
    background: rgba(250,252,251,.82) !important;
    backdrop-filter: blur(18px) saturate(150%);
    box-shadow: 0 8px 28px rgba(16,42,46,.04) !important;
}

/* Hero is intentionally compact: content first, decoration second. */
.hero-section,.default-hero,.modern-hero,.dark-hero,.wave-hero,.neo-hero,.paper-hero,
.studio-hero,.lumen-hero,.civic-hero,.showcase-hero { padding-block: clamp(2rem, 5vw, 4.5rem) !important; min-height: 0 !important; }
.hero-panel,.lumen-hero-panel,.studio-hero-panel,.civic-hero-card,.showcase-hero-shell {
    border-radius: clamp(22px,3vw,36px) !important; overflow: hidden;
    border: 1px solid rgba(255,255,255,.6) !important;
    box-shadow: 0 28px 80px rgba(16,42,46,.15) !important;
}
.hero-grid,.lumen-hero-grid,.studio-hero-grid,.civic-hero-grid,.showcase-hero-grid { gap: clamp(1.5rem,4vw,4rem) !important; }
.hero-copy p,.lumen-hero-copy,.studio-hero-copy,.civic-hero-copy,.showcase-hero-copy { max-width: 44rem; font-size: clamp(.96rem,1.2vw,1.08rem) !important; }

/* Cards and content surfaces. */
.surface-card,.facility-card,.sidebar-card,.lumen-sidebar-card,.studio-sidebar-card,.civic-sidebar-card,
.showcase-sidebar-card,.showcase-content-card,.lumen-content-card,.studio-content-card,.civic-content-card,
body:not(.admin-body) main > .bg-white {
    border: 1px solid var(--rp-line) !important;
    border-radius: var(--rp-radius) !important;
    background: var(--rp-surface) !important;
    box-shadow: var(--rp-shadow) !important;
}
.facility-card { transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease !important; }
.facility-card:hover { transform: translateY(-5px) !important; border-color: rgba(8,127,114,.24) !important; box-shadow: 0 25px 60px rgba(18,38,42,.14) !important; }

/* Consistent controls. */
body:not(.admin-body) button,body:not(.admin-body) a[class*="button"],body:not(.admin-body) a[class*="btn"] { border-radius: 12px !important; }
body:not(.admin-body) input:not([type=checkbox]):not([type=radio]),body:not(.admin-body) select,body:not(.admin-body) textarea {
    min-height: 48px; border: 1px solid var(--rp-line) !important; border-radius: 13px !important;
    background: rgba(255,255,255,.94) !important; box-shadow: 0 1px 2px rgba(15,23,42,.03);
}
body:not(.admin-body) input:focus,body:not(.admin-body) select:focus,body:not(.admin-body) textarea:focus {
    outline: none; border-color: rgba(8,127,114,.5) !important; box-shadow: 0 0 0 4px rgba(8,127,114,.1) !important;
}

/* Main landing page: clearer information hierarchy. */
body.home-modern { background: #f4f7f5 !important; }
.hero-side { align-self: stretch; }
.hero-quick { gap: .5rem !important; }
.hero-pill { padding: .55rem .85rem !important; border-radius: 999px !important; font-size: .78rem !important; }
.stats-grid { gap: 1rem !important; }
.places-grid,.facility-grid { gap: 1.25rem !important; }

@media (max-width: 768px) {
    body:not(.admin-body) h1 { font-size: clamp(1.9rem,10vw,2.75rem) !important; }
    .hero-section,.default-hero,.modern-hero,.dark-hero,.wave-hero,.neo-hero,.paper-hero,
    .studio-hero,.lumen-hero,.civic-hero,.showcase-hero { padding-block: 1.75rem !important; }
    .hero-panel,.lumen-hero-panel,.studio-hero-panel,.civic-hero-card,.showcase-hero-shell { border-radius: 20px !important; }
    .hero-side,.hero-card { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
    *,*::before,*::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Admin internal pages share the same Modern V2 system. */
body.admin-body {
    background: linear-gradient(145deg, #f4f8f7 0%, #edf3f1 52%, #e7efed 100%) !important;
    color: var(--rp-ink) !important;
}
body.admin-body .admin-shell { max-width: 1680px; margin: 0 auto; padding: 1rem !important; gap: 1rem !important; }
body.admin-body .admin-sidebar { border-radius: 1.25rem !important; box-shadow: 0 20px 55px rgba(16,42,46,.16) !important; }
body.admin-body .admin-header { border-radius: 1.25rem !important; background: rgba(255,255,255,.82) !important; box-shadow: 0 12px 30px rgba(16,42,46,.07) !important; }
body.admin-body .admin-header-title { font-size: clamp(1.35rem, 2.2vw, 1.9rem) !important; letter-spacing: -.045em !important; }
body.admin-body .admin-content { padding: .25rem 0 .9rem !important; }
body.admin-body .admin-content h1 { font-size: clamp(1.45rem, 2.1vw, 2rem) !important; line-height: 1.2 !important; }
body.admin-body .admin-content h2 { font-size: clamp(1.12rem, 1.65vw, 1.45rem) !important; line-height: 1.3 !important; }
body.admin-body .admin-content h3 { font-size: 1.05rem !important; line-height: 1.35 !important; }
body.admin-body .admin-content p { color: #627477; }
body.admin-body .admin-content .premium-card,
body.admin-body .admin-content .pro-table-container,
body.admin-body .admin-content .bg-white {
    border: 1px solid rgba(16,42,46,.09) !important;
    border-radius: 1.15rem !important;
    background: rgba(255,255,255,.88) !important;
    box-shadow: 0 14px 35px rgba(16,42,46,.07) !important;
}
body.admin-body .admin-content .premium-card:hover { border-color: rgba(8,127,114,.22) !important; }
body.admin-body .admin-content .text-3xl { font-size: 1.75rem !important; }
body.admin-body .admin-content .text-2xl { font-size: 1.45rem !important; }
body.admin-body .admin-content .text-xl { font-size: 1.2rem !important; }
body.admin-body .admin-content .text-lg { font-size: 1.05rem !important; }
body.admin-body .admin-content .text-sm { font-size: .88rem !important; }
body.admin-body .admin-content table { border: 1px solid rgba(16,42,46,.09) !important; border-radius: 1rem !important; background: rgba(255,255,255,.9) !important; }
body.admin-body .admin-content table thead th { background: #eaf2f0 !important; color: #436168 !important; font-size: .72rem !important; padding: .82rem .95rem !important; }
body.admin-body .admin-content table tbody td { padding: .82rem .95rem !important; font-size: .88rem !important; }
body.admin-body .admin-content input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
body.admin-body .admin-content select,
body.admin-body .admin-content textarea {
    border-radius: .75rem !important; border-color: rgba(16,42,46,.14) !important; background: rgba(255,255,255,.95) !important;
}
body.admin-body .admin-content .btn-primary,
body.admin-body .admin-content .btn-secondary,
body.admin-body .admin-content .btn-danger,
body.admin-body .admin-content .btn-premium-blue,
body.admin-body .admin-content .btn-premium-gray,
body.admin-body .admin-content .btn-premium-white,
body.admin-body .admin-content .btn-premium-rose { min-height: 2.65rem !important; padding: .68rem 1rem !important; border-radius: .75rem !important; font-size: .84rem !important; }

@media (max-width: 1080px) {
    body.admin-body .admin-shell { padding: .65rem !important; }
    body.admin-body .admin-sidebar { border-radius: 1rem !important; }
}
