/*
Theme Name: Altept
Description: An editorial theme for Altept.com with a compact navigation and a homepage that surfaces vehicle coverage and news.
Version: 1.0.5
Requires at least: 6.2
Requires PHP: 7.4
Text Domain: altept
*/

:root {
    --ink: #19252b;
    --muted: #4b5a5e;
    --paper: #faf8f3;
    --line: #dcded8;
    --accent: #28594d;
    --dark: #172a30;
    --pale: #d9e6dc;
    --width: 73rem;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.65 system-ui, sans-serif; }
a { color: var(--accent); text-underline-offset: .19em; overflow-wrap: anywhere; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid #c18132; outline-offset: 4px; }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
figcaption { color: var(--muted); font-size: .875rem; }
h1, h2, h3 { margin: 0 0 .6em; line-height: 1.13; text-wrap: balance; }
h1, h2 { font-family: Georgia, serif; font-weight: 500; }
h1 { font-size: clamp(2.35rem, 5.5vw, 4.85rem); letter-spacing: -.045em; }
h2 { font-size: clamp(1.65rem, 3.2vw, 2.5rem); letter-spacing: -.025em; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--width), calc(100% - 2.5rem)); margin-inline: auto; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-row, .footer-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.header-row { min-height: 4.5rem; padding-block: .75rem; }
.brand { color: var(--ink); font-size: 1.5rem; font-weight: 800; letter-spacing: -.055em; text-decoration: none; }
.site-nav ul, .footer-nav ul { display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; list-style: none; padding: 0; margin: 0; }
.site-nav ul ul, .footer-nav ul ul { display: none; }
.site-nav a, .footer-nav a { color: var(--ink); display: inline-block; padding-block: .45rem; font-size: .9rem; text-decoration: none; }
.site-nav a[aria-current], .site-nav a:hover, .footer-nav a:hover { color: var(--accent); text-decoration: underline; }
.skip-link { position: absolute; inset: 1rem auto auto 1rem; z-index: 10; padding: .6rem 1rem; background: #fff; transform: translateY(-300%); }
.skip-link:focus { transform: translateY(0); }
.hero { background: var(--dark); color: #fff; }
.hero-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .95fr); align-items: center; gap: clamp(1.4rem, 4vw, 4rem); padding-block: clamp(1.65rem, 4vw, 3rem); }
.hero h1 { font-size: clamp(2.35rem, 4.4vw, 3.7rem); }
.hero-layout:only-child h1 { margin-bottom: .25em; }
.hero-layout > div:only-child { grid-column: 1 / -1; }
.hero p { max-width: 37ch; margin: .7rem 0 0; color: var(--pale); font-size: clamp(1rem, 2vw, 1.2rem); }
.hero img { border-radius: .5rem; aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.hero figcaption { margin-top: .5rem; color: var(--pale); }
.eyebrow { display: block; margin-bottom: .75rem; color: var(--accent); font-size: .78rem; font-weight: 750; letter-spacing: .085em; text-transform: uppercase; }
.hero .eyebrow { color: #c6dfcd; }
.hero-link { display: inline-flex; gap: .6rem; margin-top: 1.15rem; padding: .55rem .85rem; color: #17342b; background: #d7ebdd; border-radius: .35rem; font-weight: 700; text-decoration: none; }
.home-body { padding-block: clamp(1.7rem, 4vw, 3rem); }
.home-body > p { max-width: 70ch; }
.home-body .altept-archive-links, .home-body .altept-editorial-links { margin-top: 2rem; }
.article-body .altept-archive-links, .article-body .altept-editorial-links { margin-top: 2rem; padding: 1.35rem; border: 1px solid var(--line); background: #fff; border-radius: .5rem; }
.altept-archive-links ul, .altept-editorial-links ul, .card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: .75rem; margin: 0; padding: 0; list-style: none; }
.altept-archive-links a, .altept-editorial-links a { display: flex; height: 100%; align-items: center; justify-content: space-between; gap: .75rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: .4rem; background: #fff; font-weight: 650; text-decoration: none; }
.altept-archive-links a::after, .altept-editorial-links a::after { content: '→'; }
.altept-archive-links a:hover, .altept-editorial-links a:hover { border-color: var(--accent); background: #edf2ee; }
.section { padding-block: clamp(1.7rem, 4vw, 3.5rem); border-top: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .5rem 1rem; margin-bottom: .75rem; }
.section-heading h2 { margin: 0; }
.card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: #fff; border: 1px solid var(--line); border-radius: .5rem; padding: 1.25rem; min-width: 0; }
.card h2, .card h3 { font: 650 1.22rem/1.3 system-ui, sans-serif; }
.card h2 a, .card h3 a { color: var(--ink); text-decoration: none; }
.card a:hover { text-decoration: underline; }
.card p { margin: 0; color: var(--muted); }
.card img { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; border-radius: .3rem; margin-bottom: 1rem; }
.article { max-width: 53rem; padding-block: clamp(2rem, 5vw, 4.75rem); }
.article-header { margin-bottom: 2rem; border-bottom: 1px solid var(--line); }
.article-body { font-size: 1.055rem; overflow-wrap: anywhere; }
.article-body :where(h2, h3, figure, table, pre) { margin-block: 1.4em .6em; }
.article-body .altept-archive-links h2, .article-body .altept-editorial-links h2 { margin-top: 0; }
.article-body :where(figcaption, .wp-caption-text) { margin-top: .35rem; }
.article-body :where(pre, .wp-block-table) { overflow-x: auto; }
.listing { padding-block: clamp(2rem, 5vw, 4rem); }
.listing .section { margin-top: 2rem; }
.pagination { margin-top: 1.75rem; }
.nav-links { display: flex; flex-wrap: wrap; gap: 1rem; }
.site-footer { background: #e9ece6; border-top: 1px solid var(--line); }
.footer-row { padding-block: 1.4rem; }
.footer-row p { margin: 0; }
.site { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; min-width: 0; }

@media (max-width: 49rem) {
    .header-row { align-items: flex-start; flex-direction: column; gap: .25rem; }
    .site-nav ul, .footer-nav ul { gap: .05rem 1rem; }
    .hero-layout { grid-template-columns: 1fr; }
    .hero img { aspect-ratio: 16 / 9; }
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 34rem) {
    .wrap { width: calc(100% - 2rem); }
    .card-grid { grid-template-columns: 1fr; }
    .footer-row { align-items: flex-start; flex-direction: column; gap: .5rem; }
}
