/* ═══════════════════════════════════════════════════════════
   Regler Therapeutics — Sage on Parchment
   Warm, grounding, human color palette
   No gradient text — clean editorial style
   ═══════════════════════════════════════════════════════════ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    /* Palette — slightly deeper, less bright */
    --charcoal: #2A2A28;
    --deep-sage: #3A5045;
    --sage: #6A9E8E;
    --muted-sage: #8AAB9B;
    --sage-tint: #CDD9D2;
    --sage-wash: #DDE6E0;
    --mist: #E6EBE8;
    --parchment: #EDEBE7;
    --stone: #5E5E5B;
    --warm-charcoal: #2A2A28;

    /* Semantic */
    --bg-page: var(--parchment);
    --bg-section: var(--mist);
    --bg-card: #F5F4F1;
    --bg-card-hover: #F0EFEC;
    --border: var(--sage-tint);
    --border-accent: var(--muted-sage);
    --text-heading: var(--charcoal);
    --text-body: var(--stone);
    --text-muted: #8A8A86;
    --accent: var(--deep-sage);
    --accent-light: var(--sage);
    --gradient: linear-gradient(135deg, var(--deep-sage), var(--sage));
    --glow: rgba(106,158,142,0.10);

    /* Fonts */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Space Grotesk', 'Inter', sans-serif;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--bg-page);
    color: var(--text-body);
    line-height: 1.7;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
strong { color: var(--text-heading); font-weight: 600; }
img { max-width: 100%; display: block; }

/* ── Preloader ──────────────────────────────────────────── */
#preloader {
    position: fixed; inset: 0;
    background: var(--bg-page);
    display: flex; align-items: center; justify-content: center;
    z-index: 10000;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
#preloader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.preloader-inner { position: relative; width: 80px; height: 80px; }

.pulse-ring {
    position: absolute; inset: 0;
    border: 2px solid var(--muted-sage);
    border-radius: 50%;
    animation: pulseRing 2s ease-out infinite;
}
.pulse-ring.delay-1 { animation-delay: 0.4s; }
.pulse-ring.delay-2 { animation-delay: 0.8s; }

@keyframes pulseRing {
    0% { transform: scale(0.5); opacity: 1; }
    100% { transform: scale(1.8); opacity: 0; }
}

/* ── Background Canvas ──────────────────────────────────── */
#bg-canvas {
    position: fixed; inset: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.35;
}

/* ── Container ──────────────────────────────────────────── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Navigation ─────────────────────────────────────────── */
.navbar {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: all 0.4s var(--ease-out);
}
.navbar.scrolled {
    padding: 12px 0;
    background: rgba(237,235,231,0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--sage-tint);
    box-shadow: 0 1px 12px rgba(42,42,40,0.05);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex; align-items: center; gap: 12px;
    z-index: 1001;
}
.logo-icon { width: 40px; height: 40px; }
.logo-text {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-heading);
}
.logo-accent { color: var(--deep-sage); }

.nav-links {
    display: flex; align-items: center; gap: 8px;
    list-style: none;
}
.nav-links a {
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-body);
    border-radius: 8px;
    transition: all 0.3s ease;
}
.nav-links a:hover { color: var(--text-heading); background: rgba(106,158,142,0.08); }
.nav-links a.active { color: var(--deep-sage); font-weight: 600; }

.nav-cta {
    background: var(--deep-sage) !important;
    color: #fff !important;
    font-weight: 600 !important;
    padding: 8px 20px !important;
    border-radius: 8px !important;
}
.nav-cta:hover { background: #2E4239 !important; transform: translateY(-1px); }

/* Mobile Toggle */
.nav-toggle {
    display: none;
    flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer;
    padding: 8px; z-index: 1001;
}
.nav-toggle span {
    display: block; width: 24px; height: 2px;
    background: var(--text-heading);
    border-radius: 2px;
    transition: all 0.3s ease;
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── Hero ───────────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 24px 80px;
    max-width: 1200px;
    margin: 0 auto;
    gap: 60px;
    z-index: 1;
}

.hero-content { flex: 1; max-width: 640px; }

.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 16px 6px 12px;
    background: var(--sage-wash);
    border: 1px solid var(--sage-tint);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--deep-sage);
    margin-bottom: 24px;
}
.badge-dot {
    width: 8px; height: 8px;
    background: var(--muted-sage);
    border-radius: 50%;
    animation: dotPulse 2s ease-in-out infinite;
}
@keyframes dotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
    color: var(--text-heading);
}

/* Accent text — simple color, no gradient */
.gradient-text {
    color: var(--deep-sage);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-body);
    line-height: 1.8;
    margin-bottom: 36px;
    max-width: 540px;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s var(--ease-out);
    cursor: pointer;
    border: none;
    font-family: var(--font-body);
}
.btn-primary {
    background: var(--deep-sage);
    color: #fff;
}
.btn-primary:hover {
    background: #2E4239;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(58,80,69,0.18);
}

.btn-outline {
    background: transparent;
    color: var(--text-heading);
    border: 1px solid var(--sage-tint);
}
.btn-outline:hover {
    border-color: var(--muted-sage);
    background: var(--sage-wash);
}

/* Hero Visual */
.hero-visual { flex: 1; max-width: 500px; }

.hrv-monitor {
    background: var(--bg-card);
    border: 1px solid var(--sage-tint);
    border-radius: 20px;
    padding: 32px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(42,42,40,0.06), 0 1px 4px rgba(42,42,40,0.03);
}
.hrv-monitor::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(106,158,142,0.04), transparent 70%);
    pointer-events: none;
}

.hrv-wave { width: 100%; height: 160px; }

.hrv-stats {
    display: flex; gap: 32px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--sage-tint);
}
.hrv-stat { display: flex; flex-direction: column; gap: 4px; }
.stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; }
.stat-value { font-family: var(--font-heading); font-size: 1.8rem; font-weight: 700; color: var(--text-heading); }
.stat-unit { font-size: 0.8rem; color: var(--text-muted); }
.status-ok { color: var(--deep-sage); font-size: 1rem; }

/* ── Sections ───────────────────────────────────────────── */
.section {
    position: relative;
    padding: 120px 0;
    z-index: 1;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 64px;
}

.section-tag {
    display: inline-block;
    padding: 4px 14px;
    background: var(--sage-wash);
    border: 1px solid var(--sage-tint);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--deep-sage);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-heading);
}

/* ── About ──────────────────────────────────────────────── */
.about { background: var(--bg-page); }

.about-content {
    max-width: 800px;
    margin: 0 auto;
}
.about-text {
    text-align: center;
    margin-bottom: 40px;
}
.about-text p {
    font-size: 1.1rem;
    color: var(--text-body);
    margin-bottom: 16px;
    line-height: 1.8;
}

.about-features {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}
.feature-pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 20px;
    background: var(--sage-wash);
    border: 1px solid var(--sage-tint);
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--deep-sage);
    transition: all 0.3s ease;
}
.feature-pill:hover {
    border-color: var(--muted-sage);
    background: var(--sage-tint);
}
.feature-pill svg { color: var(--muted-sage); flex-shrink: 0; }

/* ── How It Works ───────────────────────────────────────── */
.how-it-works { background: var(--mist); }

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.step-card {
    background: var(--bg-card);
    border: 1px solid var(--sage-tint);
    border-radius: 20px;
    padding: 36px 28px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s var(--ease-out);
    box-shadow: 0 2px 12px rgba(42,42,40,0.03);
}
.step-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--deep-sage);
    opacity: 0;
    transition: opacity 0.4s ease;
}
.step-card:hover {
    border-color: var(--muted-sage);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(42,42,40,0.07);
}
.step-card:hover::before { opacity: 1; }

.step-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    color: var(--sage-tint);
    line-height: 1;
    margin-bottom: 20px;
}

.step-icon {
    width: 56px; height: 56px;
    margin-bottom: 20px;
}
.step-icon svg { width: 100%; height: 100%; }

.step-card h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-heading);
}

.step-card p {
    font-size: 0.92rem;
    color: var(--text-body);
    line-height: 1.7;
}

/* ── Difference ─────────────────────────────────────────── */
.difference { background: var(--bg-page); }

.difference-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin-bottom: 48px;
}

.diff-card {
    border-radius: 20px;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.diff-others {
    background: var(--bg-card);
    border: 1px solid var(--sage-tint);
    box-shadow: 0 2px 12px rgba(42,42,40,0.03);
}
.diff-us {
    background: var(--sage-wash);
    border: 1px solid var(--muted-sage);
}

.diff-label {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(107,107,104,0.08);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}
.diff-label-us {
    background: rgba(58,80,69,0.1);
    color: var(--deep-sage);
}

.diff-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-heading);
}
.diff-card p {
    color: var(--text-body);
    margin-bottom: 24px;
    line-height: 1.7;
}

.diff-list {
    list-style: none;
    display: flex; flex-direction: column; gap: 10px;
}
.diff-list li {
    display: flex; align-items: center; gap: 10px;
    font-size: 0.92rem;
    color: var(--text-body);
}
.diff-list li::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
}
.diff-list-us li::before {
    background: var(--deep-sage);
}

.diff-summary {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}
.diff-summary p {
    font-size: 1.05rem;
    color: var(--text-body);
    line-height: 1.8;
}

/* ── Vision ─────────────────────────────────────────────── */
.vision { background: var(--mist); }

.vision-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 40px;
    background: var(--bg-card);
    border: 1px solid var(--sage-tint);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(42,42,40,0.05);
}
.vision-content::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(106,158,142,0.04), transparent 60%);
    pointer-events: none;
}

.vision-content h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
    margin-top: 16px;
    color: var(--text-heading);
}

.vision-text {
    font-size: 1.1rem;
    color: var(--text-body);
    line-height: 1.8;
    position: relative;
}

/* ── Status ─────────────────────────────────────────────── */
.status { background: var(--bg-page); }

.status-card {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    padding: 60px 40px;
}

.status-icon {
    position: relative;
    width: 80px; height: 80px;
    margin: 0 auto 32px;
}
.status-icon svg { width: 100%; height: 100%; position: relative; z-index: 1; }
.status-pulse {
    position: absolute; inset: -10px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--glow), transparent 70%);
    animation: statusPulse 3s ease-in-out infinite;
}
@keyframes statusPulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.3); opacity: 0.15; }
}

.status-card h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-heading);
}
.status-card p {
    font-size: 1.05rem;
    color: var(--text-body);
    line-height: 1.8;
    margin-bottom: 32px;
}

/* ── Contact ────────────────────────────────────────────── */
.contact { background: var(--mist); }

.contact-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}
.contact-intro {
    font-size: 1.05rem;
    color: var(--text-body);
    margin-bottom: 40px;
}

.contact-details {
    display: flex; flex-direction: column; gap: 20px;
}
.contact-item {
    display: flex; align-items: center; gap: 16px;
    padding: 20px 24px;
    background: var(--bg-card);
    border: 1px solid var(--sage-tint);
    border-radius: 16px;
    text-align: left;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(42,42,40,0.03);
}
.contact-item:hover {
    border-color: var(--muted-sage);
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(42,42,40,0.06);
}
.contact-item svg { flex-shrink: 0; }

.contact-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 2px;
}
.contact-value {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-heading);
}
a.contact-value:hover { color: var(--deep-sage); }

/* ── Footer ─────────────────────────────────────────────── */
.footer {
    position: relative;
    z-index: 1;
    padding: 48px 0 32px;
    border-top: 1px solid var(--sage-tint);
    background: var(--bg-page);
}
.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}
.footer-logo {
    display: flex; align-items: center; gap: 12px;
}
.footer-logo .logo-icon { width: 32px; height: 32px; }
.footer-logo .logo-text { font-size: 1rem; }
.footer-tagline {
    font-size: 0.9rem;
    color: var(--text-muted);
}
.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--sage-tint);
    text-align: center;
}
.footer-bottom p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ── Animations ─────────────────────────────────────────── */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
[data-animate="fade-in"] { transform: none; }
[data-animate].visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1024px) {
    .hero { flex-direction: column; text-align: center; padding-top: 140px; }
    .hero-content { max-width: 100%; }
    .hero-subtitle { margin-left: auto; margin-right: auto; }
    .hero-actions { justify-content: center; }
    .hero-visual { max-width: 100%; width: 100%; }
    .steps-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .nav-links {
        position: fixed; top: 0; right: -100%;
        width: 80%; max-width: 360px; height: 100vh;
        flex-direction: column; align-items: flex-start;
        padding: 100px 32px 32px;
        background: var(--bg-page);
        border-left: 1px solid var(--sage-tint);
        transition: right 0.4s var(--ease-out);
        gap: 4px;
        box-shadow: -8px 0 30px rgba(42,42,40,0.08);
    }
    .nav-links.open { right: 0; }
    .nav-links a { width: 100%; padding: 12px 16px; font-size: 1rem; }

    .section { padding: 80px 0; }
    .section-header { margin-bottom: 48px; }

    .steps-grid { grid-template-columns: 1fr; }
    .difference-grid { grid-template-columns: 1fr; }

    .hero h1 { font-size: 2rem; }
    .hero { padding-top: 120px; gap: 40px; }

    .footer-content { flex-direction: column; gap: 12px; text-align: center; }

    .vision-content { padding: 40px 24px; }
}

@media (max-width: 480px) {
    .hero-actions { flex-direction: column; width: 100%; }
    .btn { width: 100%; justify-content: center; }
    .hrv-monitor { padding: 20px; }
    .hrv-stats { gap: 20px; }
    .diff-card { padding: 28px 20px; }
}

/* ── Selection ──────────────────────────────────────────── */
::selection {
    background: rgba(106,158,142,0.2);
    color: var(--text-heading);
}

/* ── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-page); }
::-webkit-scrollbar-thumb {
    background: var(--sage-tint);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--muted-sage); }
