/* Renew Auditory Design System - Bespoke v3.1
   Color Scheme: Deep Indigo (#312e81), Indigo (#4338ca), Crisp Emerald (#10b981), Mint (#34d399)
   Prefix: re-*
*/

:root {
    --primary: #312e81;
    --primary-light: #4338ca;
    --primary-dark: #1e1b4b;
    --accent: #10b981;
    --accent-light: #34d399;
    --accent-dark: #059669;
    --text-main: #0f172a;
    --text-muted: #475569;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border: #e2e8f0;
    --border-focus: #10b981;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.05);
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.65;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Container */
.re-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Topbar */
.re-topbar {
    background-color: var(--primary-dark);
    color: #e0e7ff;
    font-size: 13px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.re-topbar-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.re-topbar-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.re-topbar-link {
    color: var(--accent-light);
    text-decoration: none;
}
.re-topbar-link:hover {
    text-decoration: underline;
}

/* Header */
.re-header {
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.re-nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.re-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--primary);
    font-weight: 700;
    font-size: 22px;
    letter-spacing: -0.02em;
}

.re-brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.re-brand-sub {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    display: block;
    line-height: 1.1;
}

.re-nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
}

.re-nav-links a {
    color: var(--text-main);
    font-weight: 500;
    font-size: 15px;
    padding: 6px 0;
    position: relative;
    text-decoration: none;
}

.re-nav-links a:hover,
.re-nav-links a.active {
    color: var(--primary);
}

.re-nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--accent);
    border-radius: 2px;
}

/* Mobile Toggle */
.re-mobile-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--text-main);
}

/* Hero */
.re-hero {
    background: linear-gradient(180deg, #eef2ff 0%, var(--bg-light) 100%);
    padding: 64px 0 48px;
    border-bottom: 1px solid var(--border);
}

.re-hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 48px;
    align-items: center;
}

.re-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #d1fae5;
    color: #065f46;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 18px;
    border: 1px solid #a7f3d0;
}

.re-hero h1 {
    font-size: 40px;
    line-height: 1.2;
    font-weight: 800;
    color: var(--primary-dark);
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

.re-hero-lead {
    font-size: 18px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 28px;
}

.re-hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.re-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
}

.re-btn-primary {
    background-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 10px rgba(49, 46, 129, 0.25);
}

.re-btn-primary:hover {
    background-color: var(--primary-light);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

.re-btn-secondary {
    background-color: #fff;
    color: var(--primary);
    border: 1px solid var(--border);
}

.re-btn-secondary:hover {
    background-color: #f1f5f9;
    color: var(--primary-dark);
    text-decoration: none;
}

.re-hero-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--accent);
}

.re-hero-card h3 {
    font-size: 20px;
    color: var(--primary-dark);
    margin-bottom: 12px;
}

.re-hero-card p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.re-data-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.re-data-list li {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--border);
}

.re-data-list li span {
    color: var(--text-muted);
}

.re-data-list li strong {
    color: var(--primary);
    font-weight: 600;
}

/* Sections */
.re-section {
    padding: 64px 0;
}

.re-section-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 48px;
}

.re-section-header h2 {
    font-size: 32px;
    color: var(--primary-dark);
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.re-section-header p {
    font-size: 16px;
    color: var(--text-muted);
}

/* Grid */
.re-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
}

.re-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.re-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.re-card-body {
    padding: 28px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.re-card-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-dark);
    background: #ecfdf5;
    padding: 4px 10px;
    border-radius: 6px;
    margin-bottom: 14px;
    align-self: flex-start;
}

.re-card h3 {
    font-size: 20px;
    color: var(--primary-dark);
    margin-bottom: 12px;
    line-height: 1.35;
}

.re-card h3 a {
    color: inherit;
    text-decoration: none;
}
.re-card h3 a:hover {
    color: var(--primary-light);
}

.re-card p {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.re-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-muted);
}

/* Interactive Calculator Box */
.re-calc-box {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-md);
    max-width: 860px;
    margin: 0 auto;
    border-top: 4px solid var(--accent);
}

.re-calc-header {
    text-align: center;
    margin-bottom: 32px;
}

.re-calc-header h2 {
    font-size: 26px;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.re-slider-wrap {
    margin: 32px 0 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.re-slider {
    width: 100%;
    height: 10px;
    border-radius: 5px;
    background: #e2e8f0;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.re-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    border: 2px solid #fff;
}

.re-slider-val {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    text-align: center;
    font-family: var(--font-mono);
}

.re-calc-output {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-top: 24px;
}

.re-calc-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.re-calc-text {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Article / Content Pages */
.re-article-wrap {
    padding: 48px 0 64px;
}

.re-article-grid {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 48px;
}

.re-article-body {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 48px;
    box-shadow: var(--shadow-sm);
}

.re-article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
}

.re-article-body h1 {
    font-size: 34px;
    line-height: 1.25;
    color: var(--primary-dark);
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

.re-article-body h2 {
    font-size: 24px;
    color: var(--primary);
    margin: 36px 0 16px;
    letter-spacing: -0.01em;
}

.re-article-body h3 {
    font-size: 18px;
    color: var(--primary-dark);
    margin: 24px 0 12px;
}

.re-article-body p {
    font-size: 16px;
    line-height: 1.75;
    color: #334155;
    margin-bottom: 20px;
}

.re-article-body ul,
.re-article-body ol {
    margin: 0 0 24px 24px;
    color: #334155;
    line-height: 1.75;
}

.re-article-body li {
    margin-bottom: 8px;
}

.re-callout {
    background: #f0fdf4;
    border-left: 4px solid var(--accent);
    padding: 20px 24px;
    border-radius: 0 8px 8px 0;
    margin: 28px 0;
    font-size: 15px;
    line-height: 1.65;
    color: #166534;
}

/* Sidebar */
.re-sidebar {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.re-widget {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
    box-shadow: var(--shadow-sm);
}

.re-widget h3 {
    font-size: 18px;
    color: var(--primary-dark);
    margin-bottom: 16px;
    border-bottom: 2px solid #eef2ff;
    padding-bottom: 10px;
}

.re-sidebar-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.re-sidebar-links a {
    color: var(--text-main);
    font-size: 14px;
    font-weight: 500;
    display: block;
    padding: 6px 0;
    border-bottom: 1px solid #f1f5f9;
}

.re-sidebar-links a:hover {
    color: var(--primary);
    padding-left: 4px;
    text-decoration: none;
}

/* Forms */
.re-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 24px;
}

.re-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.re-form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.re-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.re-input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Footer */
.re-footer {
    background-color: var(--primary-dark);
    color: #cbd5e1;
    padding: 64px 0 32px;
    font-size: 14px;
    border-top: 4px solid var(--accent);
}

.re-footer-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr 1.2fr;
    gap: 40px;
    margin-bottom: 48px;
}

.re-footer h4 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 18px;
    font-weight: 600;
}

.re-footer p {
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 14px;
}

.re-footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.re-footer-links a {
    color: #cbd5e1;
    text-decoration: none;
}
.re-footer-links a:hover {
    color: var(--accent-light);
    text-decoration: underline;
}

.re-footer-bottom {
    padding-top: 28px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: #94a3b8;
}

/* Responsive */
@media (max-width: 900px) {
    .re-hero-grid,
    .re-article-grid {
        grid-template-columns: 1fr;
    }
    .re-footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 680px) {
    .re-nav-links {
        display: none;
    }
    .re-mobile-btn {
        display: block;
    }
    .re-nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: #fff;
        padding: 20px 24px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-md);
    }
    .re-footer-grid {
        grid-template-columns: 1fr;
    }
    .re-article-body {
        padding: 24px;
    }
}
