/* =============================================================
   Hope For Allergies — main stylesheet
   ============================================================= */

:root {
    --bg:        #F5F1E8;
    --bg-alt:    #EDE6D3;
    --ink:       #1F2A24;
    --ink-soft:  #4A5650;
    --sage:      #2F5D4E;
    --sage-mid:  #5C8A6F;
    --sage-soft: #C9D9CC;
    --terra:     #C66A4A;
    --terra-soft:#E8B89E;
    --line:      #2F2A24;
    --paper:     #FBF8F0;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', system-ui, sans-serif;
    background: var(--bg);
    color: var(--ink);
    font-size: 16px;
    line-height: 1.6;
    font-feature-settings: "ss01", "ss02";
    overflow-x: hidden;
}

/* Subtle grain overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 100;
    opacity: 0.4;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.12 0 0 0 0 0.16 0 0 0 0 0.14 0 0 0 0.08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: var(--sage); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

.display { font-family: 'Fraunces', Georgia, serif; font-weight: 400; letter-spacing: -0.02em; }
.display-tight { font-family: 'Fraunces', Georgia, serif; font-weight: 500; letter-spacing: -0.035em; line-height: 0.95; }

img { max-width: 100%; height: auto; }

/* Accessibility — skip link */
.screen-reader-text {
    border: 0;
    clip: rect(1px,1px,1px,1px);
    -webkit-clip-path: inset(50%);
            clip-path: inset(50%);
    height: 1px; width: 1px;
    overflow: hidden;
    position: absolute !important;
    word-wrap: normal !important;
}
.skip-link:focus {
    position: fixed;
    top: 12px; left: 12px;
    width: auto; height: auto;
    clip: auto; -webkit-clip-path: none; clip-path: none;
    background: var(--ink); color: var(--paper);
    padding: 12px 18px;
    z-index: 9999;
    border-radius: 8px;
    text-decoration: none;
}

/* ===== NAV ===== */
nav.topbar {
    position: sticky; top: 0; z-index: 50;
    background: rgba(245, 241, 232, 0.92);
    -webkit-backdrop-filter: blur(12px);
            backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(31, 42, 36, 0.08);
}
.nav-inner {
    max-width: 1280px; margin: 0 auto;
    padding: 18px 32px;
    display: flex; align-items: center; justify-content: space-between;
}
.logo {
    display: flex; align-items: center; gap: 12px;
    text-decoration: none; color: var(--ink);
}
.logo:hover { color: var(--ink); }
.logo-mark {
    width: 38px; height: 38px;
    background: var(--sage); color: var(--paper);
    border-radius: 50%;
    display: grid; place-items: center;
    font-family: 'Fraunces', serif; font-weight: 600;
    font-size: 18px; font-style: italic;
    flex-shrink: 0;
}
/* WordPress custom logo */
.custom-logo-link img,
.custom-logo {
    width: 38px; height: 38px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}
.logo-text {
    font-family: 'Fraunces', serif;
    font-size: 19px; font-weight: 500;
    letter-spacing: -0.02em;
}
.nav-links { display: flex; gap: 36px; align-items: center; }
.nav-links .nav-menu,
.nav-links ul {
    display: flex; gap: 36px; align-items: center;
    list-style: none; margin: 0; padding: 0;
}
.nav-links a {
    text-decoration: none; color: var(--ink-soft);
    font-size: 14px; font-weight: 500;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--sage); }
.nav-cta {
    background: var(--ink); color: var(--paper) !important;
    padding: 10px 20px; border-radius: 999px;
    font-size: 14px; font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
}
.nav-cta:hover { background: var(--sage); }

@media (max-width: 768px) {
    .nav-links .nav-menu,
    .nav-links ul {
        display: none;
    }
    .nav-inner { padding: 14px 20px; }
}

/* ===== HERO ===== */
.hero {
    max-width: 1280px; margin: 0 auto;
    padding: 80px 32px 60px;
    position: relative;
}

.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--terra);
    margin-bottom: 28px;
}
.hero-eyebrow::before {
    content: ''; width: 32px; height: 1px; background: var(--terra);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 80px;
    align-items: end;
}

@media (max-width: 960px) {
    .hero-grid { grid-template-columns: 1fr; gap: 48px; }
}

.hero h1 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(48px, 7.5vw, 104px);
    font-weight: 400;
    line-height: 0.96;
    letter-spacing: -0.04em;
    color: var(--ink);
    margin-bottom: 32px;
}
.hero h1 em {
    font-style: italic;
    font-weight: 400;
    color: var(--sage);
}
.hero h1 .underline {
    position: relative;
    display: inline-block;
    z-index: 1;
}
.hero h1 .underline::after {
    content: '';
    position: absolute;
    bottom: 0.08em; left: 0; right: 0;
    height: 0.12em;
    background: var(--terra-soft);
    z-index: -1;
}

.hero-meta {
    border-left: 1px solid rgba(31, 42, 36, 0.18);
    padding-left: 28px;
    padding-bottom: 8px;
}
.hero-meta p {
    font-size: 17px;
    line-height: 1.55;
    color: var(--ink-soft);
    margin-bottom: 28px;
}
.hero-meta p strong { color: var(--ink); font-weight: 600; }

.hero-ctas {
    display: flex; gap: 14px; flex-wrap: wrap;
}
.btn-primary {
    background: var(--sage);
    color: var(--paper) !important;
    padding: 16px 28px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    display: inline-flex; align-items: center; gap: 10px;
    transition: all 0.25s;
    border: 1px solid var(--sage);
}
.btn-primary:hover { background: var(--ink); border-color: var(--ink); transform: translateY(-1px); }
.btn-primary svg { transition: transform 0.25s; }
.btn-primary:hover svg { transform: translateX(3px); }

.btn-ghost {
    background: transparent;
    color: var(--ink) !important;
    padding: 16px 24px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    border: 1px solid rgba(31, 42, 36, 0.2);
    transition: all 0.25s;
}
.btn-ghost:hover { border-color: var(--ink); background: var(--bg-alt); }

/* ===== STATS STRIP ===== */
.stats-strip {
    max-width: 1280px; margin: 100px auto 0;
    padding: 48px 32px;
    background: var(--ink);
    color: var(--paper);
    border-radius: 24px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    position: relative;
    overflow: hidden;
}
.stats-strip::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(198, 106, 74, 0.18), transparent 50%);
    pointer-events: none;
}
.stat { position: relative; z-index: 1; }
.stat-num {
    font-family: 'Fraunces', serif;
    font-size: 56px; font-weight: 400;
    line-height: 1; letter-spacing: -0.04em;
    margin-bottom: 8px;
}
.stat-num em { font-style: italic; color: var(--terra-soft); }
.stat-label {
    font-size: 13px;
    color: rgba(251, 248, 240, 0.65);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
@media (max-width: 768px) {
    .stats-strip { grid-template-columns: repeat(2, 1fr); gap: 28px; padding: 36px 28px; }
    .stat-num { font-size: 42px; }
}

/* ===== SECTIONS ===== */
.section {
    max-width: 1280px; margin: 0 auto;
    padding: 120px 32px;
}
.section-label {
    font-size: 12px; font-weight: 500;
    letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--terra);
    margin-bottom: 32px;
    display: flex; align-items: center; gap: 14px;
}
.section-label::before {
    content: '\00A7';
    font-family: 'Fraunces', serif;
    font-size: 18px; font-style: italic;
}
.section h2 {
    font-family: 'Fraunces', serif;
    font-size: clamp(40px, 5.5vw, 72px);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.035em;
    margin-bottom: 28px;
    max-width: 16ch;
}
.section h2 em { font-style: italic; color: var(--sage); }

.two-col {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}
@media (max-width: 900px) {
    .two-col { grid-template-columns: 1fr; gap: 48px; }
}
.two-col p {
    font-size: 18px;
    color: var(--ink-soft);
    line-height: 1.65;
    margin-bottom: 20px;
}
.two-col p:first-of-type::first-letter {
    font-family: 'Fraunces', serif;
    font-size: 64px;
    float: left;
    line-height: 0.85;
    padding: 6px 10px 0 0;
    color: var(--sage);
    font-weight: 500;
}

/* ===== BENEFITS ===== */
.benefits-section {
    background: var(--paper);
    padding: 120px 32px;
    border-top: 1px solid rgba(31, 42, 36, 0.06);
    border-bottom: 1px solid rgba(31, 42, 36, 0.06);
}
.benefits-inner { max-width: 1280px; margin: 0 auto; }
.benefits-heading {
    font-size: clamp(40px, 5.5vw, 72px);
    max-width: 16ch;
    margin-bottom: 28px;
}
.benefits-heading em { color: var(--sage); font-style: italic; }

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin-top: 60px;
    border-top: 1px solid rgba(31, 42, 36, 0.12);
    border-left: 1px solid rgba(31, 42, 36, 0.12);
}
@media (max-width: 900px) {
    .benefits-grid { grid-template-columns: 1fr; }
}

.benefit-card {
    padding: 48px 36px;
    border-right: 1px solid rgba(31, 42, 36, 0.12);
    border-bottom: 1px solid rgba(31, 42, 36, 0.12);
    background: var(--paper);
    transition: background 0.3s;
    position: relative;
}
.benefit-card:hover { background: var(--bg); }
.benefit-num {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-size: 14px;
    color: var(--terra);
    margin-bottom: 28px;
    letter-spacing: 0.05em;
}
.benefit-icon {
    width: 56px; height: 56px;
    background: var(--sage-soft);
    border-radius: 14px;
    display: grid; place-items: center;
    margin-bottom: 28px;
    color: var(--sage);
}
.benefit-icon svg { width: 28px; height: 28px; }
.benefit-card h3 {
    font-family: 'Fraunces', serif;
    font-size: 26px;
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
    color: var(--ink);
}
.benefit-card p {
    font-size: 15px;
    color: var(--ink-soft);
    line-height: 1.6;
}

/* ===== HOW IT WORKS ===== */
.how-section { padding: 120px 32px; }
.how-inner { max-width: 1280px; margin: 0 auto; }
.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin-top: 64px;
    position: relative;
}
@media (max-width: 900px) {
    .steps { grid-template-columns: 1fr; }
}

.step {
    padding: 0 28px;
    position: relative;
}
.step:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0; top: 36px;
    width: 1px; height: 80%;
    background: linear-gradient(to bottom, transparent, rgba(31, 42, 36, 0.18) 30%, rgba(31, 42, 36, 0.18) 70%, transparent);
}
@media (max-width: 900px) {
    .step:not(:last-child)::after { display: none; }
    .step { padding: 32px 0; border-bottom: 1px solid rgba(31, 42, 36, 0.1); }
}
.step-num {
    font-family: 'Fraunces', serif;
    font-size: 96px;
    font-weight: 300;
    line-height: 1;
    color: var(--sage);
    margin-bottom: 24px;
    letter-spacing: -0.05em;
}
.step-num em { font-style: italic; }
.step h3 {
    font-family: 'Fraunces', serif;
    font-size: 28px;
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}
.step p {
    font-size: 15px;
    color: var(--ink-soft);
    line-height: 1.6;
    max-width: 38ch;
}

/* ===== CTA BAND ===== */
.cta-band {
    background: var(--sage);
    color: var(--paper);
    padding: 100px 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta-band::before {
    content: '';
    position: absolute;
    top: -100px; left: 50%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(198, 106, 74, 0.25), transparent 60%);
    transform: translateX(-50%);
    pointer-events: none;
}
.cta-inner { max-width: 800px; margin: 0 auto; position: relative; z-index: 1; }
.cta-band h2 {
    font-family: 'Fraunces', serif;
    font-size: clamp(40px, 6vw, 72px);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.035em;
    margin-bottom: 24px;
    color: var(--paper);
    max-width: none;
}
.cta-band h2 em { font-style: italic; color: var(--terra-soft); }
.cta-band p {
    font-size: 19px;
    color: rgba(251, 248, 240, 0.78);
    margin-bottom: 40px;
    max-width: 56ch;
    margin-left: auto; margin-right: auto;
}
.btn-cta-band {
    background: var(--paper);
    color: var(--ink) !important;
    padding: 18px 36px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    display: inline-flex; align-items: center; gap: 12px;
    transition: all 0.25s;
}
.btn-cta-band:hover { background: var(--terra); color: var(--paper) !important; }

/* ===== INNER PAGES (page.php / single.php / index.php / 404.php) ===== */
.content-page {
    max-width: 880px;
}
.content-page .page-header {
    margin-bottom: 40px;
}
.content-page .page-header h1,
.content-page .page-header h2 {
    font-family: 'Fraunces', serif;
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.035em;
    max-width: 20ch;
}

.page-content,
.post-excerpt {
    font-size: 17px;
    line-height: 1.7;
    color: var(--ink-soft);
}
.page-content p,
.post-excerpt p { margin-bottom: 20px; }
.page-content h2 {
    font-family: 'Fraunces', serif;
    font-size: 36px; font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin: 48px 0 16px;
    color: var(--ink);
    max-width: 28ch;
}
.page-content h3 {
    font-family: 'Fraunces', serif;
    font-size: 26px; font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 36px 0 12px;
    color: var(--ink);
}
.page-content ul,
.page-content ol { margin: 0 0 24px 24px; }
.page-content li { margin-bottom: 8px; }
.page-content blockquote {
    border-left: 3px solid var(--sage);
    padding: 4px 0 4px 24px;
    margin: 32px 0;
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-size: 22px;
    color: var(--ink);
}

.post-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 36px;
}
.post-card {
    padding: 32px 0;
    border-bottom: 1px solid rgba(31, 42, 36, 0.12);
}
.post-card h3 {
    font-family: 'Fraunces', serif;
    font-size: 28px; font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 8px;
}
.post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h3 a:hover { color: var(--sage); }
.post-meta {
    font-size: 13px;
    color: var(--terra);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 16px;
}
.read-more {
    display: inline-block;
    margin-top: 12px;
    font-weight: 500;
    color: var(--sage);
    text-decoration: none;
    font-size: 15px;
}
.read-more:hover { color: var(--ink); }

.error-404 h1 {
    font-family: 'Fraunces', serif;
    font-size: clamp(40px, 6vw, 80px);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.035em;
    margin-bottom: 20px;
}
.error-404 p {
    font-size: 18px;
    color: var(--ink-soft);
    margin-bottom: 32px;
    max-width: 50ch;
}

/* Pagination */
.navigation.pagination {
    margin-top: 64px;
    display: flex;
    justify-content: center;
}
.navigation.pagination .nav-links {
    display: flex; gap: 8px; flex-wrap: wrap;
}
.navigation.pagination a,
.navigation.pagination span {
    padding: 8px 14px;
    border: 1px solid rgba(31, 42, 36, 0.18);
    border-radius: 999px;
    font-size: 14px;
    text-decoration: none;
    color: var(--ink);
}
.navigation.pagination a:hover {
    background: var(--ink); color: var(--paper); border-color: var(--ink);
}
.navigation.pagination .current {
    background: var(--sage); color: var(--paper); border-color: var(--sage);
}

/* WordPress core alignment classes */
.alignleft   { float: left;  margin: 0 24px 24px 0; }
.alignright  { float: right; margin: 0 0 24px 24px; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide   { max-width: 1100px; margin-left: auto; margin-right: auto; }
.alignfull   { width: 100vw; max-width: none; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }

/* WordPress caption */
.wp-caption {
    max-width: 100%;
    margin-bottom: 24px;
}
.wp-caption-text,
.wp-block-image figcaption {
    font-size: 13px;
    color: var(--ink-soft);
    font-style: italic;
    text-align: center;
    margin-top: 8px;
}

/* ===== FOOTER ===== */
footer {
    background: var(--ink);
    color: var(--paper);
    padding: 80px 32px 40px;
}
.footer-inner { max-width: 1280px; margin: 0 auto; }
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 60px;
    padding-bottom: 60px;
    border-bottom: 1px solid rgba(251, 248, 240, 0.12);
}
@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}
.footer-brand h3 {
    font-family: 'Fraunces', serif;
    font-size: 32px;
    font-weight: 400;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
    color: var(--paper);
}
.footer-brand p {
    color: rgba(251, 248, 240, 0.65);
    font-size: 15px;
    max-width: 36ch;
    line-height: 1.6;
}
.footer-col h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--terra-soft);
    margin-bottom: 20px;
    font-weight: 500;
}
.footer-col a, .footer-col p {
    display: block;
    color: rgba(251, 248, 240, 0.78) !important;
    text-decoration: none;
    font-size: 15px;
    margin-bottom: 10px;
    transition: color 0.2s;
}
.footer-col a:hover { color: var(--paper) !important; }
.footer-col .footer-menu {
    list-style: none; margin: 0; padding: 0;
}
.footer-col .footer-menu li { margin: 0; }
.footer-bottom {
    display: flex; justify-content: space-between;
    flex-wrap: wrap; gap: 16px;
    font-size: 13px;
    color: rgba(251, 248, 240, 0.5);
}
.footer-bottom a {
    color: rgba(251, 248, 240, 0.65);
    text-decoration: none;
    margin-left: 24px;
}
.footer-bottom a:hover { color: var(--paper); }

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.hero h1,
.hero-eyebrow,
.hero-meta,
.stats-strip {
    animation: fadeUp 0.9s ease-out both;
}
.hero-eyebrow { animation-delay: 0.05s; }
.hero h1      { animation-delay: 0.15s; }
.hero-meta    { animation-delay: 0.35s; }
.stats-strip  { animation-delay: 0.55s; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
