/* Server-rendered pages: landing pages, journal, posts, 404.
   Matches the React homepage: cream background, emerald accent,
   Outfit headings, Crimson Pro body. The nav and footer are the homepage's
   React components (src/chrome.tsx, styled by Tailwind), so element rules
   here are scoped to #main to leave them alone. .site-header/.site-footer
   style only the no-JS fallback. */

:root {
    --iwd-bg: #F5F1EB;
    --iwd-bg-alt: #EDE7DD;
    --iwd-ink: #1f2937;
    --iwd-text: #4b5563;
    --iwd-muted: #6b7280;
    --iwd-accent: #059669;
    --iwd-accent-dark: #047857;
    --iwd-line: rgba(31, 41, 55, 0.12);
    --iwd-sans: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --iwd-serif: 'Crimson Pro', Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--iwd-bg);
    color: var(--iwd-text);
    font-family: var(--iwd-serif);
    font-size: 1.25rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

:where(#main) h1, :where(#main) h2, :where(#main) h3 {
    font-family: var(--iwd-sans);
    font-weight: 500;
    color: var(--iwd-ink);
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin: 0 0 0.6em;
}
:where(#main) h1 { font-size: clamp(2.5rem, 6vw, 4.75rem); letter-spacing: -0.035em; }
:where(#main) h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
:where(#main) h3 { font-size: 1.4rem; }

:where(#main) a { color: var(--iwd-accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
:where(#main) a:hover { color: var(--iwd-accent-dark); }
:where(#main) img { max-width: 100%; height: auto; display: block; }
:where(#main) p { margin: 0 0 1em; }

/* Room for the fixed site nav (h-20) */
.js #main { padding-top: 5rem; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 10; background: #fff; padding: 0.5rem 1rem; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.wrap--narrow { max-width: 780px; }

.eyebrow {
    font-family: var(--iwd-sans);
    font-size: 0.8rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--iwd-accent);
    margin: 0 0 1rem;
    font-weight: 500;
}
.eyebrow a { text-decoration: none; }
.lead { font-size: clamp(1.3rem, 2.2vw, 1.6rem); max-width: 46rem; }
.muted { color: var(--iwd-muted); }

/* Header */
.site-header { padding: 1.5rem 0; border-bottom: 1px solid var(--iwd-line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 0.25rem; color: var(--iwd-accent); text-decoration: none; font-family: var(--iwd-sans); font-weight: 500; font-size: 1.3rem; }
.logo span { color: var(--iwd-ink); }
.logo .logo__light { color: var(--iwd-muted); font-weight: 300; letter-spacing: 0.15em; text-transform: uppercase; font-size: 0.75rem; margin-left: 0.25rem; }
.site-nav { display: flex; gap: 1.5rem; flex-wrap: wrap; font-family: var(--iwd-sans); font-size: 0.85rem; letter-spacing: 0.15em; text-transform: uppercase; }
.site-nav a { color: var(--iwd-ink); text-decoration: none; }
.site-nav a:hover { color: var(--iwd-accent); }
.site-nav .site-nav__cta { color: var(--iwd-accent); }

/* Sections */
.hero { padding: clamp(4rem, 10vw, 8rem) 0 clamp(3rem, 6vw, 5rem); }
.hero--compact { padding: clamp(3rem, 7vw, 5rem) 0 2rem; }
.section { padding: clamp(3rem, 7vw, 6rem) 0; }
.section--alt { background: var(--iwd-bg-alt); }
.prose-p { max-width: 46rem; }

.button {
    display: inline-block;
    margin-top: 1rem;
    padding: 1rem 2rem;
    background: var(--iwd-accent);
    color: #fff;
    font-family: var(--iwd-sans);
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
}
.button:hover { background: var(--iwd-accent-dark); color: #fff; }
.button--light { background: #fff; color: var(--iwd-accent-dark); }
.button--light:hover { background: var(--iwd-bg); color: var(--iwd-accent-dark); }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 2.5rem 3rem; margin: 2.5rem 0 1rem; }
.feature { border-top: 3px solid var(--iwd-accent); padding-top: 1.25rem; }
.feature p { font-size: 1.15rem; }

.cases { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 2.5rem; margin-top: 2rem; }
.case { display: block; color: var(--iwd-text); text-decoration: none; }
.case img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; margin-bottom: 1.25rem; }
.case h3 { font-size: 1.75rem; }
.case p { font-size: 1.1rem; }
.case__more { font-family: var(--iwd-sans); font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--iwd-accent); }
.case:hover h3 { color: var(--iwd-accent); }

.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.5rem; margin: 2rem 0; }
.tier { background: #fff; padding: 2rem; }
.tier--featured { outline: 2px solid var(--iwd-accent); }
.tier__price { font-family: var(--iwd-sans); font-size: 1.6rem; color: var(--iwd-accent); }

.faq { border-bottom: 1px solid var(--iwd-line); padding: 1.25rem 0; }
.faq summary { cursor: pointer; font-family: var(--iwd-sans); font-size: 1.2rem; color: var(--iwd-ink); font-weight: 500; }
.faq p { margin: 1rem 0 0; }

.cta { background: var(--iwd-accent); color: #ecfdf5; padding: clamp(4rem, 8vw, 6rem) 0; }
.cta h2 { color: #fff; }

/* Journal */
.posts { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 3rem; }
.post-card h2 { font-size: 1.6rem; }
.post-card h2 a { color: var(--iwd-ink); text-decoration: none; }
.post-card h2 a:hover { color: var(--iwd-accent); }
.post-card img { aspect-ratio: 16 / 10; object-fit: cover; margin-bottom: 1rem; }
.byline { color: var(--iwd-muted); }
.article__image { margin-bottom: 2rem; }
.prose { padding-bottom: 4rem; }
.prose h2 { font-size: 2rem; margin-top: 2em; }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose ul, .link-list { list-style: disc; }
.prose ol { list-style: decimal; }
.link-list { padding-left: 1.25em; }
.prose li { margin-bottom: 0.4em; }
.prose blockquote { border-left: 3px solid var(--iwd-accent); margin: 2rem 0; padding-left: 1.5rem; font-style: italic; }
.nav-links { display: flex; gap: 1.5rem; margin-top: 3rem; font-family: var(--iwd-sans); }
.link-list { font-size: 1.25rem; }

/* Footer */
.site-footer { padding: 4rem 0 2rem; border-top: 1px solid var(--iwd-line); font-size: 1.1rem; }
.site-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 2.5rem; }
.site-footer h2.eyebrow { color: var(--iwd-muted); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.6rem; }
.site-footer a { color: var(--iwd-text); text-decoration: none; }
.site-footer a:hover { color: var(--iwd-accent); }
.site-footer__lead { font-size: 1.35rem; max-width: 24rem; }
.site-footer__base { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--iwd-line); color: var(--iwd-muted); }

@media (max-width: 800px) {
    .site-footer__grid { grid-template-columns: 1fr 1fr; }
    .site-nav { gap: 1rem; font-size: 0.75rem; }
}
@media (max-width: 520px) {
    .site-footer__grid { grid-template-columns: 1fr; }
}
