/* ============================================================
   Arvena Sciences — Design System
   Palette:  paper #FAF8F3 · ink #16283D · teal #3F6B5E ·
             gold #A9813F · slate #5C6570
   Type:     'Source Serif 4' (headings) + 'IBM Plex Sans' (body/UI)
   ============================================================ */

:root {
    --paper: #FAF8F3;
    --paper-dim: #F1EEE5;
    --ink: #094396;
    --ink-soft: #24384F;
    --teal: #2596be;
    --teal-dim: #E9F0E;
    --gold: #A9813F;
    --slate: #5C6570;
    --line: #DCD6C8;
    --line-strong: #B9B29E;
    --danger: #9A3324;
    --radius: 3px;
    --max-w: 1120px;
    --serif: 'Source Serif 4', Georgia, serif;
    --sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--sans);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3, h4 {
    font-family: var(--serif);
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 0.5em;
    color: var(--ink);
}
h1 { font-size: clamp(2.1rem, 4vw, 3.4rem); font-weight: 500; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.25rem; }

p { max-width: 68ch; }
.lede { font-size: 1.15rem; color: var(--slate); max-width: 60ch; }

:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
}

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

/* ---------- layout helpers ---------- */

.wrap {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 28px;
}

section { padding: 88px 0; }
.section-tight { padding: 56px 0; }

.rule {
    border: none;
    border-top: 1px solid var(--line);
    margin: 0;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }

@media (max-width: 860px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    section { padding: 56px 0; }
}

/* ---------- header / nav ---------- */

.site-header {
    position: sticky; top: 0; z-index: 50;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}
.site-header .wrap {
    display: flex; align-items: center; justify-content: space-between;
    height: 76px;
}
.brand {
    font-family: var(--serif);
    font-size: 1.35rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--ink);
    letter-spacing: 0.01em;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.brand img { height: 30px; width: auto; display: block; }
.brand span { color: var(--teal); }

.main-nav { display: flex; align-items: center; gap: 36px; }
.main-nav a {
    text-decoration: none;
    color: var(--ink-soft);
    font-size: 0.95rem;
    padding: 6px 0;
    border-bottom: 1px solid transparent;
}
.main-nav a:hover { border-bottom-color: var(--teal); }
.main-nav a.active { color: var(--teal); border-bottom-color: var(--teal); }

.nav-actions { display: flex; align-items: center; gap: 14px; }

.nav-toggle {
    display: none;
    background: none; border: none; cursor: pointer;
    width: 40px; height: 40px;
    flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); display: block; }

@media (max-width: 900px) {
    .main-nav {
        position: fixed; top: 76px; left: 0; right: 0; bottom: 0;
        background: var(--paper);
        flex-direction: column; align-items: flex-start; gap: 0;
        padding: 8px 28px 28px;
        transform: translateY(-8px);
        opacity: 0; pointer-events: none;
        transition: opacity 0.18s ease, transform 0.18s ease;
        overflow-y: auto;
    }
    .main-nav.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
    .main-nav a { width: 100%; padding: 14px 0; border-bottom: 1px solid var(--line); }
    .nav-toggle { display: flex; }
}

/* ---------- buttons ---------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: var(--sans);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 12px 24px;
    border-radius: var(--radius);
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--gold); color: #FFFDF8; }
.btn-primary:hover { background: #93702F; }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink); }
.btn-ghost { background: transparent; color: var(--teal); padding: 12px 0; }
.btn-ghost:hover { text-decoration: underline; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---------- hero ---------- */

.hero {
    padding: 76px 0 64px;
    border-bottom: 1px solid var(--line);
}
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: start; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } }

.hero-eyebrow {
    font-size: 0.85rem; color: var(--teal); margin-bottom: 14px;
    font-weight: 500;
}
.hero h1 { margin-bottom: 22px; }
.hero-actions { display: flex; gap: 16px; margin-top: 30px; flex-wrap: wrap; }

.monograph {
    border: 1px solid var(--line-strong);
    padding: 26px 28px;
    background: #fff;
}
.monograph-title {
    font-family: var(--serif); font-size: 1rem; font-weight: 600;
    margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.monograph dl { margin: 0; }
.monograph .row {
    display: flex; justify-content: space-between; gap: 16px;
    padding: 9px 0; border-bottom: 1px solid var(--line);
    font-size: 0.92rem;
}
.monograph .row:last-child { border-bottom: none; }
.monograph dt { color: var(--slate); }
.monograph dd { margin: 0; text-align: right; font-weight: 500; }

/* ---------- cards ---------- */

.card {
    border: 1px solid var(--line);
    background: #fff;
    padding: 30px 28px;
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--slate); font-size: 0.96rem; margin-bottom: 0; }
.card .icon-mark {
    width: 36px; height: 36px;
    border: 1px solid var(--teal); color: var(--teal);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--serif); font-weight: 600;
    margin-bottom: 18px;
}

/* ---------- numbered process (only for genuine sequences) ---------- */

.steps { counter-reset: step; }
.step {
    display: grid; grid-template-columns: 56px 1fr; gap: 20px;
    padding: 26px 0; border-bottom: 1px solid var(--line);
}
.step:first-child { padding-top: 0; }
.step:last-child { border-bottom: none; }
.step-num {
    counter-increment: step;
    font-family: var(--serif); font-size: 1.3rem; color: var(--gold);
}
.step-num::before { content: counter(step, decimal-leading-zero); }

/* ---------- forms ---------- */

.field { margin-bottom: 20px; }
.field label {
    display: block; font-size: 0.9rem; font-weight: 500;
    margin-bottom: 7px; color: var(--ink-soft);
}
.field .hint { font-size: 0.82rem; color: var(--slate); margin-top: 6px; }
.field .error-text { font-size: 0.82rem; color: var(--danger); margin-top: 6px; display: none; }
.field.has-error .error-text { display: block; }
.field.has-error input, .field.has-error textarea, .field.has-error select {
    border-color: var(--danger);
}

input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
textarea, select {
    width: 100%;
    font-family: var(--sans);
    font-size: 0.98rem;
    padding: 11px 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
}
input:focus, textarea:focus, select:focus {
    outline: none; border-color: var(--teal);
    box-shadow: 0 0 0 3px var(--teal-dim);
}
textarea { resize: vertical; min-height: 120px; }

.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .form-row-2 { grid-template-columns: 1fr; } }

.form-alert {
    padding: 13px 16px; border-radius: var(--radius);
    font-size: 0.92rem; margin-bottom: 20px; display: none;
}
.form-alert.show { display: block; }
.form-alert.success { background: var(--teal-dim); color: var(--teal); border: 1px solid var(--teal); }
.form-alert.error { background: #FBEAE6; color: var(--danger); border: 1px solid var(--danger); }

/* honeypot field - hidden from real users, catches bots */
.hp-field { position: absolute; left: -9999px; top: -9999px; }

/* ---------- newsletter strip ---------- */

.newsletter-strip {
    background: var(--ink);
    color: #EFEAE0;
    padding: 56px 0;
}
.newsletter-strip h2 { color: #fff; }
.newsletter-strip p { color: #C2C9D1; }
.newsletter-form { display: flex; gap: 12px; max-width: 460px; margin-top: 22px; flex-wrap: wrap; }
.newsletter-form input {
    flex: 1; min-width: 220px;
    background: #1F3349; border-color: #35496080; color: #fff;
}
.newsletter-form input::placeholder { color: #8FA0AF; }

/* ---------- footer ---------- */

footer {
    border-top: 1px solid var(--line);
    padding: 48px 0 32px;
    font-size: 0.9rem; color: var(--slate);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { font-family: var(--sans); font-size: 0.85rem; font-weight: 600; color: var(--ink); margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 9px; }
.footer-grid a { text-decoration: none; color: var(--slate); }
.footer-grid a:hover { color: var(--teal); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* ---------- misc components ---------- */

.tag {
    display: inline-block; font-size: 0.78rem; padding: 4px 10px;
    border: 1px solid var(--line-strong); border-radius: 999px; color: var(--slate);
}
.status-badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.8rem; padding: 4px 10px; border-radius: 999px;
}
.status-new { background: #EAF0F7; color: #2A5187; }
.status-in_review { background: #FBF3E4; color: #8A6417; }
.status-in_progress { background: var(--teal-dim); color: var(--teal); }
.status-awaiting_client { background: #FBEAE6; color: var(--danger); }
.status-completed, .status-closed { background: #EAF0EA; color: #3F6B3F; }

.divider-lg { height: 1px; background: var(--line); margin: 40px 0; border: none; }

.article-card { padding-bottom: 24px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.article-card .meta { font-size: 0.82rem; color: var(--slate); margin-bottom: 8px; }
.article-card h3 { margin-bottom: 8px; }
.article-card a { text-decoration: none; color: var(--ink); }
.article-card a:hover { color: var(--teal); }

.fee-table { width: 100%; border-collapse: collapse; margin: 24px 0; }
.fee-table th, .fee-table td {
    text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line);
    font-size: 0.94rem;
}
.fee-table th { font-weight: 600; color: var(--ink); background: var(--paper-dim); }
.fee-table td.price { color: var(--gold); font-weight: 600; white-space: nowrap; }

.checklist-item {
    display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line);
}
.checklist-item input[type="checkbox"] { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--teal); }
.checklist-item label { font-size: 0.95rem; }
.checklist-item .note { font-size: 0.85rem; color: var(--slate); margin-top: 4px; }
