:root {
    --primary: #0ea5a4;
    --primary-dark: #0b8988;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --surface: #ffffff;
    --bg: #f8fafc;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
}

body {
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

a {
    color: inherit;
}

/* ===== HEADER ===== */
header {
    background: linear-gradient(135deg, #0ea5a4, #22c1c3);
    color: #fff;
    padding: 18px 60px;
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand img {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #fff;
    padding: 3px;
}

.brand-text .logo {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.15;
}

.brand-text .tagline {
    font-size: 11.5px;
    opacity: 0.85;
}

nav {
    display: flex;
    align-items: center;
    gap: 26px;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 14.5px;
    opacity: 0.92;
}

nav a:hover {
    opacity: 1;
    text-decoration: underline;
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-nav {
    display: inline-flex;
    align-items: center;
    padding: 9px 18px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
}

.btn-nav-primary {
    background: #fff;
    color: var(--primary-dark);
    border-color: #fff;
}

.btn-nav-primary:hover {
    background: #f0fdfa;
}

.btn-nav-ghost:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* ===== HERO ===== */
.hero-wrap {
    background: linear-gradient(160deg, #0ea5a4, #17b6b8 55%, #22c1c3);
    color: #fff;
}

.hero {
    max-width: 1180px;
    margin: 0 auto;
    padding: 70px 60px 90px;
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 48px;
    align-items: center;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 40px;
    line-height: 1.2;
    margin-bottom: 18px;
}

.hero p {
    font-size: 16.5px;
    line-height: 1.7;
    margin-bottom: 28px;
    opacity: 0.96;
    max-width: 52ch;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 22px;
}

.hero-buttons a {
    display: inline-block;
    padding: 14px 24px;
    background: #fff;
    color: var(--primary-dark);
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
}

.hero-buttons a.secondary {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.7);
    color: #fff;
}

.hero-note {
    font-size: 13.5px;
    opacity: 0.88;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-art {
    display: flex;
    justify-content: center;
}

.hero-art img {
    width: 100%;
    max-width: 340px;
    display: block;
    filter: drop-shadow(0 20px 40px rgba(15, 23, 42, 0.25));
}

/* ===== SECTION SHELL ===== */
section.block {
    padding: 76px 60px;
}

.section-head {
    max-width: 640px;
    margin: 0 auto 44px;
    text-align: center;
}

.section-eyebrow {
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.section-head h2 {
    font-size: 28px;
    margin-bottom: 10px;
    color: var(--text);
}

.section-head p {
    color: var(--muted);
    font-size: 15.5px;
    line-height: 1.6;
}

/* ===== HOW IT WORKS ===== */
.steps {
    background: var(--surface);
}

.step-grid {
    max-width: 1080px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.step-card {
    position: relative;
    padding: 26px 22px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--bg);
}

.step-number {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 14px;
}

.step-card h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--text);
}

.step-card p {
    font-size: 13.8px;
    color: var(--muted);
    line-height: 1.6;
}

/* ===== FEATURE SECTION ===== */
.features {
    background: var(--bg);
}

.feature-grid {
    max-width: 1080px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 26px;
}

.feature-card {
    background: var(--surface);
    padding: 28px 24px;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #ecfdfa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    margin-bottom: 14px;
}

.feature-card h3 {
    margin-bottom: 8px;
    color: var(--text);
    font-size: 16.5px;
}

.feature-card p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

/* ===== ROLES ===== */
.roles {
    background: var(--surface);
}

.role-grid {
    max-width: 1080px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.role-card {
    padding: 28px 24px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--bg);
}

.role-card .role-icon {
    font-size: 26px;
    margin-bottom: 12px;
}

.role-card h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--text);
}

.role-card ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.role-card li {
    font-size: 13.8px;
    color: var(--muted);
    padding-left: 18px;
    position: relative;
}

.role-card li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-dark);
    font-weight: 700;
}

/* ===== ARTICLES ===== */
.articles {
    background: var(--bg);
}

.article-preview-grid {
    max-width: 1080px;
    margin: 0 auto 32px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 26px;
}

.article-preview-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
}

.article-preview-thumb {
    display: block;
    aspect-ratio: 16 / 9;
    background: #ecfdfa;
    overflow: hidden;
}

.article-preview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.article-preview-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.article-preview-category {
    display: inline-flex;
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(14, 165, 164, 0.1);
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 11.5px;
}

.article-preview-body h3 {
    font-size: 16px;
    margin: 0;
}

.article-preview-body h3 a {
    color: var(--text);
    text-decoration: none;
}

.article-preview-body h3 a:hover {
    color: var(--primary-dark);
}

.article-preview-snippet {
    color: var(--muted);
    font-size: 13.8px;
    line-height: 1.6;
    flex: 1;
}

.article-preview-date {
    color: var(--muted);
    font-size: 12.5px;
}

.section-cta {
    text-align: center;
}

.section-cta a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 26px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    font-size: 14.5px;
}

.section-cta a:hover {
    background: var(--primary-dark);
}

/* ===== PUBLIC PAGE SHELL (non-home pages viewed while logged out) ===== */
.public-page-main {
    max-width: 1080px;
    margin: 0 auto;
    padding: 48px 24px;
    min-height: 60vh;
}

/* ===== FINAL CTA ===== */
.final-cta {
    background: linear-gradient(135deg, #0ea5a4, #0b8988);
    color: #fff;
    text-align: center;
}

.final-cta h2 {
    font-size: 26px;
    margin-bottom: 10px;
}

.final-cta p {
    opacity: 0.92;
    margin-bottom: 26px;
    font-size: 15.5px;
}

.final-cta .hero-buttons {
    justify-content: center;
}

/* ===== FOOTER ===== */
footer {
    background: #0f172a;
    color: #fff;
    padding: 44px 60px 24px;
}

.footer-grid {
    max-width: 1080px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.footer-brand .logo {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
}

.footer-brand p {
    color: #94a3b8;
    font-size: 13.5px;
    max-width: 34ch;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    gap: 56px;
    flex-wrap: wrap;
}

.footer-links h4 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-bottom: 12px;
}

.footer-links a {
    display: block;
    color: #e2e8f0;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 10px;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-bottom {
    max-width: 1080px;
    margin: 0 auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
    color: #94a3b8;
    text-align: center;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    header {
        padding: 16px 20px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
        text-align: center;
    }

    nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px 18px;
    }

    .hero {
        padding: 50px 20px 70px;
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero p {
        max-width: none;
    }

    .hero-buttons,
    .hero-note {
        justify-content: center;
    }

    .hero-art {
        order: -1;
    }

    section.block {
        padding: 56px 20px;
    }

    .step-grid,
    .role-grid {
        grid-template-columns: 1fr;
    }

    footer {
        padding: 40px 20px 20px;
    }
}
