/* ============================================================
   My Ajo App — /learn article design system.
   Shared by the guides hub and every article page. Reuses the
   landing page palette + self-hosted fonts (public/fonts/), so
   the guides read as the same product, not a bolt-on blog.
   ============================================================ */

/* Self-hosted fonts (latin + latin-ext) — same set the landing page uses. */
@font-face {
    font-family: 'Fraunces';
    font-style: italic;
    font-weight: 700;
    font-display: swap;
    src: url(/fonts/fraunces-700-italic-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Fraunces';
    font-style: italic;
    font-weight: 700;
    font-display: swap;
    src: url(/fonts/fraunces-700-italic-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(/fonts/fraunces-700-normal-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(/fonts/fraunces-700-normal-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(/fonts/space-grotesk-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(/fonts/space-grotesk-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url(/fonts/space-grotesk-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url(/fonts/space-grotesk-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(/fonts/space-grotesk-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(/fonts/space-grotesk-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --ink: #111515;
    --forest: #18342a;
    --forest-deep: #091411;
    --paper: #f6efe4;
    --paper-soft: #F2F1F1;
    --clay: #bf6e43;
    --clay-strong: #9e4f25;
    --gold: #d7ad63;
    --line: rgba(17, 21, 21, 0.08);
    --ink-muted: rgba(17, 21, 21, 0.64);
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 999px;
    --measure: 42rem;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: "Space Grotesk", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top right, rgba(215, 173, 99, 0.16), transparent 24%),
        linear-gradient(180deg, #faf5ec 0%, #f6efe4 60%, #f1e7d6 100%);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

a {
    color: var(--clay-strong);
    text-underline-offset: 3px;
    transition: color 0.18s ease;
}

a:hover {
    color: #854019;
}

.container {
    width: min(72rem, calc(100% - 2.5rem));
    margin: 0 auto;
}

/* ---- Nav (matches the landing header) ---- */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 1rem 0;
    background: rgba(251, 247, 241, 0.86);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    color: var(--ink);
}

.brand-mark {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 0.85rem;
    display: grid;
    place-items: center;
    background: linear-gradient(150deg, #e8c87f, #d2a755);
    color: var(--forest);
    box-shadow: 0 14px 30px rgba(159, 122, 47, 0.26);
    flex: 0 0 auto;
}

.brand-mark svg {
    width: 1.45rem;
    height: 1.45rem;
}

.brand-copy strong {
    display: block;
    font-size: 0.98rem;
    letter-spacing: -0.03em;
}

.brand-copy span {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    border-radius: var(--radius-sm);
    padding: 0.8rem 1.2rem;
    background: var(--forest);
    color: var(--paper-soft);
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 16px 32px rgba(24, 52, 42, 0.18);
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.nav-cta:hover {
    background: var(--forest-deep);
    color: var(--paper-soft);
    transform: translateY(-2px);
    box-shadow: 0 22px 40px rgba(24, 52, 42, 0.24);
}

@media (max-width: 460px) {
    .brand-copy span {
        display: none;
    }
}

/* ---- Headings & prose ---- */
h1, h2, h3, h4 {
    font-family: "Fraunces", serif;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.02;
    color: var(--ink);
}

.article-hero {
    padding: 3.5rem 0 1.5rem;
}

.breadcrumbs {
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    color: var(--ink-muted);
    margin-bottom: 1.4rem;
}

.breadcrumbs a {
    color: var(--ink-muted);
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: var(--forest-deep);
    text-decoration: underline;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--clay-strong);
    margin-bottom: 1.1rem;
}

.eyebrow::before {
    content: "";
    width: 2.2rem;
    height: 1px;
    background: currentColor;
    opacity: 0.5;
}

.article-hero h1 {
    font-size: clamp(2.4rem, 5.5vw, 4rem);
    max-width: 20ch;
    margin-bottom: 1.1rem;
}

.article-dek {
    font-size: clamp(1.05rem, 2vw, 1.22rem);
    color: rgba(17, 21, 21, 0.74);
    max-width: var(--measure);
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.1rem;
    margin-top: 1.4rem;
    font-size: 0.84rem;
    color: var(--ink-muted);
}

.article-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.article-body {
    max-width: var(--measure);
    padding: 1.5rem 0 2rem;
}

.article-body > p,
.article-body > ul,
.article-body > ol,
.article-body > h2,
.article-body > h3,
.article-body > .callout,
.article-body > .key-takeaways,
.article-body > figure,
.article-body > blockquote {
    margin: 0 auto;
}

.article-body h2 {
    font-size: clamp(1.7rem, 3.4vw, 2.3rem);
    margin: 2.6rem 0 0.9rem;
}

.article-body h3 {
    font-size: 1.3rem;
    margin: 1.8rem 0 0.6rem;
}

.article-body p {
    color: rgba(17, 21, 21, 0.82);
    margin-bottom: 1.15rem;
    font-size: 1.05rem;
}

.article-body ul,
.article-body ol {
    margin: 0 0 1.15rem 1.2rem;
    color: rgba(17, 21, 21, 0.82);
}

.article-body li {
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}

.article-body strong {
    color: var(--ink);
}

.article-body a {
    font-weight: 600;
    text-decoration: underline;
}

/* Callout + key-takeaways cards */
.callout {
    border-radius: var(--radius-md);
    padding: 1.3rem 1.4rem;
    margin: 1.8rem 0;
    background: #fffdf9;
    border: 1px solid var(--line);
    border-left: 4px solid var(--gold);
    box-shadow: 0 16px 40px rgba(17, 21, 21, 0.05);
}

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

.callout strong {
    color: var(--forest);
}

.key-takeaways {
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.6rem;
    margin: 2rem 0;
    background: linear-gradient(180deg, #13271f, #091411);
    color: rgba(255, 248, 239, 0.86);
    box-shadow: 0 24px 60px rgba(9, 20, 17, 0.22);
}

.key-takeaways h2 {
    color: var(--paper-soft);
    font-size: 1.3rem;
    margin: 0 0 0.9rem;
}

.key-takeaways ul {
    margin: 0;
    padding-left: 1.1rem;
    color: rgba(255, 248, 239, 0.86);
}

.key-takeaways li {
    margin-bottom: 0.55rem;
}

.key-takeaways strong {
    color: var(--gold);
}

blockquote {
    margin: 1.8rem 0;
    padding-left: 1.2rem;
    border-left: 3px solid var(--clay);
    font-family: "Fraunces", serif;
    font-style: italic;
    font-size: 1.3rem;
    line-height: 1.35;
    color: var(--forest);
}

/* CTA band */
.cta-band {
    margin: 2.5rem 0 1rem;
    border-radius: var(--radius-lg);
    padding: 1.8rem;
    background:
        radial-gradient(circle at top right, rgba(215, 173, 99, 0.18), transparent 40%),
        linear-gradient(145deg, #1b352b, #10211b);
    color: var(--paper-soft);
    box-shadow: 0 24px 60px rgba(9, 20, 17, 0.2);
}

.cta-band h2 {
    color: var(--paper-soft);
    font-size: 1.6rem;
    margin-bottom: 0.6rem;
}

.cta-band p {
    color: rgba(255, 248, 239, 0.8);
    margin-bottom: 1.2rem;
    max-width: 40rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.95rem 1.4rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 700;
    background: var(--clay-strong);
    color: #fff8f1;
    box-shadow: 0 20px 44px rgba(158, 79, 37, 0.24);
    transition: transform 0.22s ease, background 0.22s ease;
}

.btn:hover {
    background: #854019;
    color: #fff8f1;
    transform: translateY(-2px);
}

/* Related / hub cards */
.related {
    padding: 1rem 0 2rem;
    border-top: 1px solid var(--line);
    margin-top: 2.5rem;
}

.related h2 {
    font-size: 1.4rem;
    margin-bottom: 1.2rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 1rem;
}

.guide-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-radius: var(--radius-lg);
    padding: 1.3rem 1.4rem;
    background: #fffdf9;
    border: 1px solid var(--line);
    box-shadow: 0 16px 40px rgba(17, 21, 21, 0.05);
    text-decoration: none;
    color: var(--ink);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.guide-card:hover {
    color: var(--ink);
    transform: translateY(-3px);
    box-shadow: 0 24px 50px rgba(17, 21, 21, 0.1);
}

.guide-card span {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--clay-strong);
}

.guide-card h3,
.guide-card h2 {
    font-size: 1.3rem;
    line-height: 1.1;
}

.guide-card p {
    font-size: 0.95rem;
    color: var(--ink-muted);
    margin: 0;
}

.guide-card em {
    font-style: normal;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--clay-strong);
    margin-top: 0.2rem;
}

/* Comparison table */
.table-wrap {
    margin: 1.8rem 0;
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    box-shadow: 0 16px 40px rgba(17, 21, 21, 0.05);
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    background: #fffdf9;
    font-size: 0.96rem;
    min-width: 34rem;
}

.compare-table th,
.compare-table td {
    text-align: left;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.compare-table thead th {
    font-family: "Fraunces", serif;
    font-size: 1.05rem;
    color: var(--forest);
    background: rgba(24, 52, 42, 0.06);
    border-bottom: 2px solid rgba(24, 52, 42, 0.14);
}

.compare-table tbody th {
    font-weight: 700;
    color: var(--ink);
    width: 34%;
}

.compare-table td {
    color: rgba(17, 21, 21, 0.82);
}

.compare-table tr:last-child th,
.compare-table tr:last-child td {
    border-bottom: none;
}

/* Footer (matches landing) */
footer {
    padding: 2.5rem 0 3rem;
    margin-top: 1rem;
}

.footer-shell {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1.5rem 2rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--line);
}

.footer-note {
    font-size: 0.86rem;
    color: var(--ink-muted);
    max-width: 32rem;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem 1.2rem;
    align-items: flex-start;
}

.footer-nav a {
    text-decoration: none;
    color: rgba(17, 21, 21, 0.62);
    font-size: 0.9rem;
}

.footer-nav a:hover {
    color: var(--forest-deep);
    text-decoration: underline;
}

/* Accessibility */
.skip-link {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translate(-50%, -140%);
    z-index: 60;
    background: var(--forest);
    color: var(--paper-soft);
    padding: 0.7rem 1.1rem;
    border-radius: 0 0 0.8rem 0.8rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.skip-link:focus {
    transform: translate(-50%, 0);
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

a:focus-visible,
.btn:focus-visible,
.nav-cta:focus-visible,
.table-wrap:focus-visible {
    outline: 3px solid var(--forest);
    outline-offset: 3px;
    border-radius: 4px;
}

main:focus {
    outline: none;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        transition-duration: 0.01ms !important;
    }
}

/* Perf: drop nav backdrop-blur on small screens (budget Androids). */
@media (max-width: 620px) {
    .site-nav {
        background: rgba(251, 247, 241, 0.96);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
}
