/*
Theme Name: Devon Ajman
Description: The Devon Ajman author website.
Version: 1.1.1
Requires at least: 6.5
Requires PHP: 7.4
Text Domain: devon-ajman
*/

@font-face { font-family: 'DM Sans'; src: url(assets/dm-sans.woff2) format('woff2'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url(assets/instrument-serif.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url(assets/instrument-serif-italic.woff2) format('woff2'); font-style: italic; font-weight: 400; font-display: swap; }

:root {
    --ink: #17191c;
    --paper: #f3efe7;
    --teal: #234848;
    --coral: #c86650;
    --amber: #c9934a;
    --muted: #4e514e;
    --light-muted: #d0ccc4;
    --line: #d2c9bb;
    --display: 'Instrument Serif', Georgia, serif;
    --body: 'DM Sans', system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.65 var(--body); }
figure, h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: .98; }
a { color: inherit; text-underline-offset: .21em; }
button, input, textarea { font: inherit; }
main { min-height: 55vh; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
[id] { scroll-margin-top: 1.5rem; }
.wrap { width: min(100% - 7.5rem, 76rem); margin-inline: auto; }
.skip-link { position: fixed; inset: .6rem auto auto .6rem; z-index: 100000; translate: 0 -200%; background: var(--paper); color: var(--ink); padding: .6em 1em; }
.skip-link:focus { translate: 0; }

.site-header { border-bottom: 1px solid var(--line); }
.theme-home .site-header { background: var(--ink); color: var(--paper); border-color: #414141; }
.header-inner { min-height: 5.1rem; display: flex; align-items: center; justify-content: space-between; gap: .65rem 2rem; }
.wordmark { font: 400 2rem/.95 var(--display); text-decoration: none; white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: clamp(1rem, 3.5vw, 3.2rem); }
.site-nav a { min-height: 44px; display: inline-flex; align-items: center; font-size: .9rem; font-weight: 500; text-decoration: none; position: relative; white-space: nowrap; }
.site-nav a:hover { text-decoration: underline; }
.site-nav a[aria-current="page"]::after { content: ''; position: absolute; inset: auto 0 .3rem; height: 2px; background: var(--teal); }
.theme-home .site-nav a[aria-current="page"]::after { background: var(--amber); }

.hero { background: var(--ink); color: var(--paper); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); grid-template-areas: "lead art" "body art"; grid-template-rows: auto auto; gap: 1.6rem clamp(2.5rem, 6vw, 6rem); padding-block: clamp(4rem, 7vw, 6.75rem); }
.hero-lead { grid-area: lead; align-self: end; }
.hero-body { grid-area: body; }
.hero-lead::before { content: ''; display: block; background: var(--amber); width: 3.4rem; height: 2px; margin-bottom: 1.65rem; }
.hero h1 { font-size: clamp(4.1rem, 7.5vw, 7.1rem); letter-spacing: -.027em; }
.hero-question { font: italic 400 clamp(1.54rem, 2.4vw, 2.08rem)/1.13 var(--display); max-width: 24ch; color: #e6c59d; margin-top: 1.45rem; }
.hero-prose { max-width: 32rem; font-size: .98rem; line-height: 1.62; color: var(--light-muted); }
.hero-prose p + p { margin-top: .69em; }
.hero-actions { margin-top: 1.8rem; }
.hero-art { grid-area: art; align-self: center; width: min(91%, 24.4rem); position: relative; justify-self: center; z-index: 0; }
.hero-art::before { content: ''; pointer-events: none; position: absolute; inset: 1rem -1rem -1rem 1rem; border: 1px solid #8f6a48; z-index: -1; }
.cover { display: block; width: 100%; height: auto; }
.hero-art .cover { box-shadow: 0 16px 50px #090a0b65; }

.actions { display: flex; gap: .65rem; flex-wrap: wrap; align-items: center; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: .75rem; min-height: 3.05rem; border: 1px solid transparent; padding: .55rem .93rem; font-size: .88rem; font-weight: 600; text-decoration: none; cursor: pointer; }
.button--light { background: var(--paper); color: var(--ink); }
.button--light:hover { background: #e6c59d; }
.button--outline { border-color: #77736d; color: var(--paper); }
.button--outline:hover { border-color: var(--paper); }
.button--ink { background: var(--ink); color: var(--paper); }
.button--ink:hover { background: var(--teal); }
.button--edge { border-color: #77736d; color: var(--ink); }
.button--edge:hover { border-color: var(--ink); background: #e7ded1; }
.button:focus-visible { outline-color: var(--ink); }
.theme-home .hero .button:focus-visible { outline-color: var(--paper); }
.button:disabled { opacity: .7; cursor: default; }
.text-link { display: inline-flex; align-items: center; gap: .5em; min-height: 44px; font-size: .91rem; font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

.positioning { background: var(--teal); color: var(--paper); padding-block: 2.65rem; }
.positioning p { font: 400 clamp(1.85rem, 3vw, 3.1rem)/1.12 var(--display); text-align: center; }
.home-books { padding-block: clamp(3.5rem, 7vw, 6.25rem); }
.section-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: end; border-bottom: 1px solid var(--line); padding-bottom: 1.1rem; }
.section-heading h2, .home-about h2, .home-contact h2 { font-size: clamp(3rem, 5.2vw, 5.1rem); }
.book-deck { display: grid; grid-template-columns: 1.08fr 1fr; gap: clamp(1.6rem, 4vw, 4rem); margin-top: 2.15rem; }
.book-card { display: grid; grid-template-columns: minmax(6rem, 43%) minmax(0, 1fr); gap: 1.25rem; align-items: center; }
.book-card h3 { font-size: clamp(2.05rem, 3.1vw, 3.2rem); }
.book-card p { color: var(--muted); font-size: .9rem; margin-block: .8rem .65rem; line-height: 1.54; }
.card-links { display: flex; gap: 0 .9rem; flex-wrap: wrap; }
.card-links .text-link { min-height: 2.35rem; font-size: .83rem; }
.cover-link { display: block; }
.cover-link .cover { box-shadow: 5px 10px 20px #402b171d; }
.home-about { background: #e8dfd2; padding-block: clamp(3rem, 6vw, 5.15rem); }
.home-about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.22fr); gap: 1.4rem clamp(2rem, 7vw, 7rem); }
.home-about p { margin-bottom: .7rem; max-width: 39rem; }
.home-contact { padding-block: clamp(2.5rem, 5vw, 4rem); display: flex; gap: .8rem 2rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.home-contact h2 { font-size: clamp(2.6rem, 4vw, 4rem); }

.page-shell { padding-block: clamp(3.25rem, 7vw, 6.6rem); }
.page-title { font-size: clamp(3.8rem, 8.4vw, 7.3rem); letter-spacing: -.025em; }
.book-feature { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: clamp(2.1rem, 7vw, 7.4rem); padding-block: clamp(2.4rem, 5vw, 4.8rem); border-top: 1px solid var(--line); align-items: start; }
.page-shell > .page-title + .book-feature { margin-top: 2.3rem; }
.book-feature:last-child { padding-bottom: 0; }
.book-feature > figure, .book-feature > .cover-link { width: min(100%, 21rem); }
.book-feature h2 { font-size: clamp(3.2rem, 5.6vw, 5.2rem); margin-bottom: 1.15rem; }
.book-feature h2 > a { text-decoration: none; }
.book-feature h2 > a:hover { text-decoration: underline; }
.book-subtitle { font: italic 400 1.65rem/1.2 var(--display); color: var(--teal); margin-bottom: 1.2rem; }
.prose { max-width: 65ch; line-height: 1.75; }
.prose p + p { margin-top: 1em; }
.prose + .actions { margin-top: 1.4rem; }
.page-shell--detail { padding-top: clamp(1.6rem, 4vw, 3.15rem); }
.back-link { margin-bottom: 1.55rem; }
.book-feature--detail .page-title { font-size: clamp(3.75rem, 7.2vw, 6.8rem); margin-bottom: 1.15rem; }
.book-buy { margin-block: 1.5rem 1.9rem; }
.reading-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 1.75rem clamp(2rem, 7vw, 7rem); }
.reading-grid .page-title { max-width: 7ch; }
.reading-content { padding-top: .7rem; font-size: 1.08rem; }
.reading-content > p:first-child { font-size: 1.16rem; }
.contact-form { margin-top: 1.8rem; max-width: 37rem; }
.form-row { margin-bottom: 1.1rem; }
.form-row label { display: block; font-size: .92rem; font-weight: 600; margin-bottom: .3rem; }
.form-row input, .form-row textarea { display: block; width: 100%; padding: .6rem .75rem; border: 1px solid #77736d; border-radius: 0; background: #fbf8f2; color: var(--ink); }
.form-row textarea { resize: vertical; }
.form-trap { position: absolute; inline-size: 1px; block-size: 1px; clip-path: inset(50%); overflow: hidden; }
.form-status { margin-top: .9rem; padding: .65rem .8rem; border-left: 3px solid var(--teal); background: #e8dfd2; }
.site-footer { background: var(--ink); color: var(--paper); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem 2rem; min-height: 6.2rem; padding-block: 1.25rem; }
.footer-inner small { color: var(--light-muted); }

@media (max-width: 67rem) {
    .wrap { width: calc(100% - 5rem); }
    .book-card { align-items: start; }
}
@media (max-width: 54rem) {
    .hero h1 { font-size: clamp(3.6rem, 8.8vw, 5.3rem); }
    .hero-break { display: none; }
    .hero-grid { column-gap: 2rem; }
    .book-card { grid-template-columns: 1fr; }
    .book-card > .cover-link { max-width: 12.5rem; }
}
@media (max-width: 47.99rem) {
    .wrap { width: calc(100% - 2.75rem); }
    .hero-grid, .reading-grid, .book-feature { grid-template-columns: 1fr; }
    .hero-grid { grid-template-areas: "lead" "art" "body"; grid-template-rows: auto; padding-block: 3.25rem 3.8rem; gap: 2rem; }
    .hero-art { width: min(70%, 21rem); justify-self: start; margin-bottom: .45rem; }
    .hero h1 { max-width: 13ch; font-size: clamp(4.05rem, 10.55vw, 6rem); }
    .hero h1 .hero-break { display: initial; }
    .hero-question { margin-top: 1.15rem; }
    .hero-lead::before { margin-bottom: 1.15rem; }
    .home-about-grid { grid-template-columns: 1fr; }
    .reading-content { padding-top: 0; }
    .reading-grid .page-title { max-width: none; }
    .book-feature > figure, .book-feature > .cover-link { max-width: 15rem; }
}
@media (max-width: 35rem) {
    .header-inner { align-items: flex-start; flex-direction: column; justify-content: center; gap: .55rem; padding-block: 1.15rem .5rem; }
    .site-nav { justify-content: space-between; width: 100%; gap: .55rem; }
    .site-nav a { min-height: 2.7rem; font-size: .87rem; }
    .hero h1 { font-size: clamp(3.05rem, 12.7vw, 4.65rem); }
    .book-deck { grid-template-columns: 1fr; gap: 2rem; }
    .book-card { grid-template-columns: minmax(5.5rem, 39%) minmax(0, 1fr); gap: 1rem; }
    .book-card h3 { font-size: clamp(1.9rem, 8vw, 2.7rem); }
    .book-card p { font-size: .86rem; }
}
