/* Variant 4 — calm editorial learning journal.
   Warm ivory paper, deep navy type, restrained amber and teal.
   Visible copy is unchanged; this file is presentation only. */

:root {
    --primary: #1c2c4a;
    --primary-hover: #152238;
    --secondary: #2f6f6a;
    --accent: #9a6b32;
    --navy: #1c2c4a;
    --teal: #2f6f6a;
    --amber: #9a6b32;
    --text-main: #1a2740;
    --text-muted: #5e584e;
    --bg-body: #f6f1e7;
    --bg-white: #fbf7f0;
    --paper: #fbf7f0;
    --border-light: #e3d9c8;
    --shadow-sm: none;
    --shadow-md: 0 1px 0 rgba(28, 44, 74, 0.04);
    --shadow-lg: none;
    --radius: 2px;
    --transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
    --serif: "Source Serif 4", "Iowan Old Style", Palatino, Georgia, serif;
    --sans: "Source Sans 3", "Segoe UI", sans-serif;
    --measure: 42rem;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--sans);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.65;
    overflow-x: hidden;
    font-size: 1.0625rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

::selection {
    background: #efe2c4;
    color: var(--navy);
}

h1,
h2,
h3,
h4,
.font-heading {
    font-family: var(--serif);
    font-weight: 560;
    color: var(--text-main);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

a {
    text-decoration-thickness: 1px;
    text-underline-offset: 0.16em;
    color: inherit;
}

p {
    hanging-punctuation: first;
}

ul {
    list-style: none;
}

.container {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1.75rem;
}

.hidden {
    display: none !important;
}

:focus {
    outline: none;
}

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

/* --- Header --- */
header {
    background: #f6f1e7;
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.9rem 0;
}

header.scrolled {
    background: #fbf7f0;
    border-bottom-color: #d4c7b2;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.logo {
    font-family: var(--serif);
    font-size: 1.65rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--navy);
    display: flex;
    align-items: baseline;
    gap: 0;
    text-decoration: none;
}

.logo span {
    color: var(--teal);
    font-style: italic;
    font-weight: 500;
}

nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.35rem;
    align-items: center;
    justify-content: flex-end;
}

nav ul a {
    font-weight: 500;
    font-size: 0.98rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.35rem 0;
}

nav ul a:hover {
    color: var(--navy);
}

nav ul a.active {
    color: var(--navy);
    box-shadow: inset 0 -1px 0 var(--amber);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.2rem;
    border-radius: 2px;
    font-family: var(--sans);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    font-size: 1rem;
    gap: 0.5rem;
    line-height: 1.3;
    text-decoration: none;
    min-height: 44px;
}

.btn-primary {
    background: var(--navy);
    color: #f7f3ea;
    box-shadow: none;
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: #fffdf8;
}

.btn-outline {
    background: transparent;
    border: 1px solid #cfc3ae;
    color: var(--navy);
}

.btn-outline:hover {
    border-color: var(--navy);
    color: var(--navy);
    background: rgba(28, 44, 74, 0.04);
}

.btn-lg {
    padding: 0.85rem 1.45rem;
    font-size: 1.0625rem;
}

.btn-block {
    width: 100%;
}

.btn:disabled,
.donation-cta:disabled,
#contact-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* --- Hero --- */
#hero {
    padding: 5.25rem 0 3.75rem;
    text-align: left;
    background:
        linear-gradient(180deg, rgba(47, 111, 106, 0.06), rgba(246, 241, 231, 0) 42%),
        var(--bg-body);
    border-bottom: 1px solid var(--border-light);
}

.hero-content {
    max-width: 44rem;
    margin: 0;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 5.4vw, 4.35rem);
    line-height: 1.08;
    margin-bottom: 1.35rem;
    font-weight: 560;
}

.hero-content h1 span {
    font-style: italic;
    color: var(--teal);
    background: none;
    -webkit-text-fill-color: currentColor;
    background-clip: border-box;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin: 0 0 2rem;
    max-width: 38rem;
    line-height: 1.6;
}

.hero-btns {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.75rem;
}

/* --- Features --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem 2rem;
    padding: 2.75rem 0 1rem;
}

.feature-card {
    background: transparent;
    padding: 0 0 0.5rem;
    border-radius: 0;
    border: none;
    border-top: 1px solid var(--border-light);
    box-shadow: none;
    padding-top: 1.35rem;
}

.feature-card:hover {
    transform: none;
    box-shadow: none;
    border-top-color: var(--amber);
}

.icon-box {
    width: 2.25rem;
    height: 2.25rem;
    background: transparent;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 0.9rem;
    color: var(--teal);
}

.icon-box svg {
    width: 1.65rem;
    height: 1.65rem;
}

.feature-card h3 {
    font-size: 1.45rem;
    margin-bottom: 0.55rem;
    font-weight: 560;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 36rem;
}

/* --- Sections --- */
.section-head {
    text-align: left;
    max-width: var(--measure);
    margin: 0 0 1.5rem;
}

.section-head h2 {
    font-size: clamp(2rem, 3vw, 2.7rem);
    margin-bottom: 0.75rem;
}

.section-head p {
    color: var(--text-muted);
    font-size: 1.08rem;
}

main > section.container {
    padding-top: 2.75rem;
    padding-bottom: 0.5rem;
}

.content-box {
    background: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
    margin-bottom: 0.5rem;
    max-width: 46rem;
}

.content-box h2 {
    font-size: clamp(1.85rem, 3vw, 2.45rem);
    margin-bottom: 1rem;
}

.content-box p {
    color: var(--text-main);
    font-size: 1.05rem;
    margin-bottom: 1rem;
    max-width: 42rem;
}

.content-box p:last-child {
    margin-bottom: 0;
}

.content-box a {
    color: var(--teal);
    text-decoration: underline;
}

.content-box a.btn {
    color: var(--navy);
    text-decoration: none;
}

.content-box a.btn-primary {
    color: #f7f3ea;
}

section[id] {
    scroll-margin-top: 5.5rem;
}

#pricing {
    padding: 3.5rem 0 4.5rem;
    margin-top: 2rem;
    border-top: 1px solid var(--border-light);
    scroll-margin-top: 5.5rem;
}

/* --- FAQ --- */
.faq-item {
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 0;
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 1.15rem 0;
    background: none;
    border: none;
    font-family: var(--serif);
    font-size: 1.22rem;
    font-weight: 560;
    letter-spacing: -0.015em;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    min-height: 44px;
}

.faq-question:hover {
    color: var(--teal);
}

.faq-toggle-icon {
    font-family: var(--sans);
    font-size: 1.35rem;
    font-weight: 400;
    color: var(--amber);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.faq-item.active .faq-toggle-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease-out;
    color: var(--text-muted);
}

.faq-answer p {
    padding-bottom: 1.25rem;
    max-width: 42rem;
}

/* --- Pricing --- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    max-width: 52rem;
    margin: 0;
}

.pricing-card {
    background: var(--paper);
    border-radius: 2px;
    padding: 2rem 1.75rem 1.75rem;
    border: 1px solid var(--border-light);
    text-align: left;
    position: relative;
    box-shadow: none;
}

.pricing-card.featured {
    border-color: #e0c89a;
    box-shadow: inset 0 2px 0 var(--amber);
}

.badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    color: var(--amber);
    padding: 0.15rem 0.45rem;
    border-radius: 2px;
    border: 1px solid #e0c89a;
    font-family: var(--sans);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.price {
    font-family: var(--serif);
    font-size: 3rem;
    font-weight: 560;
    color: var(--navy);
    margin: 0.75rem 0 0.35rem;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.price span {
    display: inline-block;
    font-family: var(--sans);
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.2;
    margin-left: 0.7rem;
    vertical-align: 0.9em;
    white-space: nowrap;
}

.features-list {
    text-align: left;
    margin: 1.25rem 0 1.5rem;
}

.features-list li {
    padding: 0.4rem 0;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.7rem;
    border-top: 1px solid rgba(227, 217, 200, 0.7);
}

.features-list li svg {
    color: var(--teal);
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0;
}

/* --- Footer --- */
footer {
    background: #1a2740;
    color: #f3ecdf;
    padding: 4rem 0 2.25rem;
    margin-top: 4.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2.5rem 2rem;
    margin-bottom: 2.75rem;
}

.footer-col h4 {
    color: #f7f3ea;
    margin-bottom: 1rem;
    font-size: 1.15rem;
    font-weight: 560;
}

.footer-col ul li {
    margin-bottom: 0.55rem;
}

.footer-col ul a {
    color: #d9d0c2;
    text-decoration: none;
}

.footer-col ul a:hover {
    color: #fffdf8;
    text-decoration: underline;
}

.footer-col p {
    color: #d9d0c2 !important;
    line-height: 1.6;
}

.footer-disclaimer {
    border-top: 1px solid rgba(243, 236, 223, 0.16);
    padding-top: 1.5rem;
    color: #d5cec2;
    font-size: 0.92rem;
    text-align: left;
    max-width: 52rem;
}

/* --- Unused home test shell (kept hidden) --- */
.test-card {
    background: var(--paper);
    max-width: 46rem;
    margin: 3rem auto;
    padding: 2.5rem 0;
    border-radius: 0;
    box-shadow: none;
    border-top: 1px solid var(--border-light);
}

.progress-container {
    background: #e7dfd1;
    height: 0.35rem;
    border-radius: 0;
    margin-top: 1.5rem;
    overflow: hidden;
}

#progress {
    background: var(--teal);
    height: 100%;
    width: 0;
    transition: width 0.3s ease;
}

.option-btn,
.option-item {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border-light);
    background: var(--paper);
    border-radius: 2px;
    text-align: left;
    font-size: 1.05rem;
    font-family: var(--sans);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-main);
    min-height: 48px;
}

.option-btn:hover,
.option-item:hover {
    border-color: var(--teal);
    background: #f3efe4;
}

.loader {
    width: 2.25rem;
    height: 2.25rem;
    border: 2px solid var(--border-light);
    border-top-color: var(--teal);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- Research (stylesheet retained for existing hooks) --- */
#research {
    background: transparent;
    padding: 4rem 0;
    margin-top: 2rem;
}

.research-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.research-content h2 {
    font-size: 2.4rem;
    margin-bottom: 1rem;
}

.research-content p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.research-stat {
    display: flex;
    gap: 2.5rem;
    margin-top: 2rem;
}

.stat-item h4 {
    font-size: 2.4rem;
    color: var(--navy);
    line-height: 1;
    margin-bottom: 0.4rem;
}

.stat-item span {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.image-canvas {
    background: #ebe4d6;
    border-radius: 2px;
    height: 320px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.location-tag {
    position: absolute;
    bottom: 1.25rem;
    left: 1.25rem;
    background: var(--paper);
    padding: 0.55rem 0.9rem;
    border-radius: 2px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* --- Popups --- */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 39, 64, 0.46);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 1.5rem;
    overflow-y: auto;
}

.popup-card {
    background: #fbf7f0;
    border-radius: 2px;
    padding: 2.25rem 2rem 2rem;
    max-width: 32rem;
    width: 100%;
    max-height: min(88vh, 720px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    text-align: left;
    position: relative;
    border: 1px solid #e7dcc8;
    box-shadow: 0 18px 50px rgba(26, 39, 64, 0.16);
    animation: popupIn 0.25s ease;
}

@keyframes popupIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.popup-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
}

.popup-close:hover {
    color: var(--navy);
    background: rgba(28, 44, 74, 0.05);
}

.popup-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: transparent;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: 0 0 0.75rem;
    color: var(--teal);
}

.popup-icon svg {
    width: 1.75rem;
    height: 1.75rem;
}

.popup-card h2 {
    font-size: 1.85rem;
    margin-bottom: 0.75rem;
}

.popup-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* --- Donation --- */
.donation-preview-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 4000;
    background: var(--navy);
    color: #f3ecdf;
    text-align: center;
    font-size: 0.85rem;
    padding: 0.6rem 1rem;
}

body[data-quiz="donation-preview"] {
    padding-top: 2.4rem;
}

.donation-popup-card {
    max-width: 28rem;
    padding: 1.75rem 1.6rem 1.4rem;
    text-align: left;
    max-height: min(92vh, 860px);
}

.donation-popup-icon {
    width: 2rem;
    height: 2rem;
    margin-bottom: 0.65rem;
    background: transparent;
    color: var(--amber);
}

.donation-popup-icon svg {
    width: 1.45rem;
    height: 1.45rem;
}

.donation-popup-card h2 {
    font-size: 1.7rem;
    margin-bottom: 0.45rem;
}

.donation-lead {
    margin-bottom: 0.9rem;
    font-size: 1rem;
    line-height: 1.55;
}

.donation-perks {
    list-style: none;
    margin: 0 0 1.15rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.donation-perks li {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.98rem;
    color: var(--text-main);
    line-height: 1.45;
}

.donation-perk-check {
    flex-shrink: 0;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 50%;
    background: transparent;
    color: var(--teal);
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.15rem;
}

.donation-cta {
    width: 100%;
}

.donation-custom {
    margin-top: 0.75rem;
    text-align: left;
}

.donation-custom-toggle {
    background: none;
    border: none;
    padding: 0.35rem 0;
    font-size: 0.95rem;
    color: var(--teal);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 0.15em;
    font-family: inherit;
    min-height: 44px;
}

.donation-custom-toggle:hover {
    color: var(--navy);
}

.donation-custom-form {
    margin-top: 0.35rem;
}

.donation-custom-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.donation-currency {
    font-weight: 600;
    color: var(--navy);
    font-size: 1.15rem;
}

.donation-custom-row input,
.contact-form input,
.contact-form select,
.contact-form textarea,
input[type="text"],
input[type="email"],
input[type="number"],
select,
textarea {
    font-family: var(--sans);
    color: var(--text-main);
    background: #fffdf8;
}

.donation-custom-row input {
    flex: 1;
    min-width: 0;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: 2px;
    font-size: 1rem;
    min-height: 44px;
}

.donation-custom-row input:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(47, 111, 106, 0.18);
}

.donation-custom-row .btn {
    padding: 0.6rem 1rem;
    flex-shrink: 0;
}

.donation-custom-hint {
    margin-top: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.donation-custom-error,
.donation-pay-error {
    margin-top: 0.4rem;
    font-size: 0.85rem;
    color: #8c3a32;
}

.donation-payment-icons {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1.1rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--border-light);
}

.donation-pay-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 2rem;
    padding: 0 0.5rem;
    background: #fffdf8;
    border: 1px solid var(--border-light);
    border-radius: 2px;
}

.donation-pay-badge svg {
    height: 1rem;
    width: auto;
    display: block;
}

.donation-secure-note {
    margin-top: 0.65rem;
    text-align: left;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.donation-popup-card.is-checkout {
    max-width: 32rem;
    max-height: min(94vh, 860px);
}

.donation-checkout {
    margin-top: 0.25rem;
}

#donation-payment-element {
    margin: 0.75rem 0 1rem;
}

.donation-processing {
    text-align: left;
    padding: 0.25rem 0 0.15rem;
}

.donation-processing h2 {
    margin-bottom: 0.5rem;
}

.donation-processing p {
    margin-bottom: 1rem;
}

.contact-form label {
    font-family: var(--sans);
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

.contact-honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.contact-notice {
    margin-top: 1rem;
    padding: 0.75rem 0;
    border-top: 1px solid var(--border-light);
    border-radius: 0;
    font-size: 1rem;
}

.contact-notice.ok {
    background: transparent;
    color: #21584a;
}

.contact-notice.bad {
    background: transparent;
    color: #8c3a32;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 900px) {
    .features-grid,
    .research-grid,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.15rem;
    }

    section[id],
    #pricing {
        scroll-margin-top: 8.75rem;
    }

    nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.55rem;
    }

    nav ul {
        display: flex;
        width: 100%;
        gap: 0.35rem 1rem;
    }

    .hero-content h1 {
        font-size: 2.35rem;
    }

    #hero {
        padding: 2.75rem 0 2.25rem;
    }

    .features-grid,
    .pricing-grid,
    .research-grid,
    .footer-grid,
    .research-stat {
        grid-template-columns: 1fr;
        display: grid;
    }

    .research-stat {
        gap: 1.5rem;
    }

    .pricing-card,
    .popup-card {
        padding: 1.35rem 1.15rem;
    }
}

@media (max-width: 480px) {
    .popup-overlay {
        padding: 0.75rem;
        align-items: flex-end;
    }

    .popup-card,
    .donation-popup-card {
        max-height: min(94vh, 760px);
        padding: 1.35rem 1.1rem 1.15rem;
    }

    .hero-btns,
    .hero-btns .btn {
        width: 100%;
    }
}

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