/*
Theme Name: Abbady Horological Archive
Theme URI: https://abbady.org/
Author: Abbady Watches
Description: A scholarly, responsive editorial theme for the Abbady Watches history archive.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: abbady-archive
*/

/* Design system — warm parchment, near-black ink, escapement red, fine catalogue rules. */
:root {
	--abw-paper: #f3efe5;
	--abw-paper-deep: #e8e0d2;
	--abw-ink: #181713;
	--abw-ruby: #a62c2b;
	--abw-ruby-light: #dc6660;
	--abw-rule: rgba(24, 23, 19, .18);
	--abw-display: "Cormorant Garamond", Georgia, serif;
	--abw-sans: "IBM Plex Sans", Arial, sans-serif;
	--abw-mono: "IBM Plex Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--abw-paper); color: var(--abw-ink); font-family: var(--abw-sans); -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0; z-index: 1000; pointer-events: none; opacity: .12; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E"); mix-blend-mode: multiply; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { transition: color 180ms cubic-bezier(.23,1,.32,1), background-color 180ms cubic-bezier(.23,1,.32,1), border-color 180ms cubic-bezier(.23,1,.32,1), transform 180ms cubic-bezier(.23,1,.32,1); }
button:active, a:active { transform: scale(.97); }
::selection { background: var(--abw-ruby); color: var(--abw-paper); }
.abw-container { width: min(1380px, calc(100% - 2rem)); margin-inline: auto; }
.abw-display { font-family: var(--abw-display); }
.abw-eyebrow { margin: 0; color: var(--abw-ruby); font-size: .66rem; font-weight: 600; letter-spacing: .21em; line-height: 1.35; text-transform: uppercase; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.abw-button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: .5rem; border: 1px solid var(--abw-ink); padding: .8rem 1.15rem; background: var(--abw-ink); color: #fffdf7; font-size: .66rem; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; }
.abw-button:hover { border-color: var(--abw-ruby); background: var(--abw-ruby); }
.abw-button--outline { background: transparent; color: var(--abw-ink); border-color: rgba(24,23,19,.28); }
.abw-link { display: inline-flex; align-items: center; gap: .35rem; border-bottom: 1px solid rgba(166,44,43,.5); padding-bottom: .3rem; font-size: .67rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.abw-link:hover { color: var(--abw-ruby); border-color: var(--abw-ruby); }

.abw-site-header { position: sticky; top: 0; z-index: 100; border-bottom: 1px solid rgba(24,23,19,.1); background: rgba(243,239,229,.95); backdrop-filter: blur(16px); }
.admin-bar .abw-site-header { top: 32px; }
.abw-header-inner { display: flex; min-height: 76px; align-items: center; justify-content: space-between; gap: 1.5rem; }
.abw-brand { display: flex; align-items: center; gap: .75rem; }
.abw-brand img { width: 48px; height: 48px; object-fit: contain; }
.abw-brand-name { position: relative; display: block; width: fit-content; font-family: var(--abw-display); font-size: 1.55rem; font-weight: 600; letter-spacing: .12em; line-height: .8; }
.abw-brand-name::after { content: ""; position: absolute; right: -.55rem; top: 48%; width: 5px; height: 5px; border-radius: 999px; background: var(--abw-ruby); box-shadow: 0 0 0 2px var(--abw-paper); }
.abw-brand-subtitle { display: block; margin-top: .55rem; color: rgba(24,23,19,.55); font-size: .58rem; font-weight: 600; letter-spacing: .32em; text-transform: uppercase; }
.abw-nav ul { display: flex; align-items: center; gap: 1.5rem; margin: 0; padding: 0; list-style: none; }
.abw-nav a { position: relative; padding: .5rem 0; color: rgba(24,23,19,.65); font-size: .65rem; font-weight: 600; letter-spacing: .115em; text-transform: uppercase; }
.abw-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: .15rem; height: 1px; background: var(--abw-ruby); transition: right 180ms cubic-bezier(.23,1,.32,1); }
.abw-nav a:hover::after, .abw-nav .current-menu-item a::after { right: 0; }
.abw-menu-toggle { display: none; width: 42px; height: 42px; border: 1px solid var(--abw-rule); background: transparent; }

.abw-hero { padding: 3.5rem 0; }
.abw-hero-grid { display: grid; min-height: calc(100vh - 146px); grid-template-columns: 70px minmax(0,.86fr) minmax(420px,1.05fr); gap: 2.2rem; }
.abw-hero-rail { display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--abw-rule); padding-right: 1.5rem; }
.abw-vertical-label { margin: 0; writing-mode: vertical-rl; transform: rotate(180deg); color: rgba(24,23,19,.48); font-size: .62rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.abw-hero-copy { display: flex; flex-direction: column; justify-content: center; padding: 2rem 0; }
.abw-hero h1 { max-width: 760px; margin: 1.4rem 0 0; font-family: var(--abw-display); font-size: clamp(4.6rem,7vw,8rem); font-weight: 500; line-height: .86; }
.abw-hero h1 em, .abw-page-intro h1 em { color: var(--abw-ruby); font-weight: 400; }
.abw-hero-copy > p:not(.abw-eyebrow) { max-width: 570px; margin: 2rem 0 0; color: rgba(24,23,19,.62); font-size: 1.05rem; line-height: 1.9; }
.abw-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.abw-hero-stats { display: grid; max-width: 570px; grid-template-columns: repeat(3,1fr); margin-top: 2.8rem; border-block: 1px solid var(--abw-rule); padding: 1.2rem 0; }
.abw-hero-stats > div + div { border-left: 1px solid var(--abw-rule); padding-left: 1.25rem; }
.abw-hero-stats strong { display: block; font-family: var(--abw-display); font-size: 2rem; }
.abw-hero-stats span { color: rgba(24,23,19,.45); font-size: .58rem; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; }
.abw-hero-figure { position: relative; min-height: 560px; overflow: hidden; background: var(--abw-ink); }
.abw-hero-figure img { width: 100%; height: 100%; object-fit: cover; }
.abw-figure-label { position: absolute; right: 1.25rem; bottom: 1.25rem; border-left: 2px solid var(--abw-ruby); padding: .45rem .55rem; background: rgba(243,239,229,.88); font-family: var(--abw-mono); font-size: .58rem; letter-spacing: .11em; }

.abw-dark-section { padding: 6rem 0; background: var(--abw-ink); color: var(--abw-paper); }
.abw-discovery { display: grid; grid-template-columns: .38fr 1fr; gap: 4rem; }
.abw-discovery-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1px; background: rgba(243,239,229,.15); }
.abw-discovery-card { min-height: 250px; padding: 2.2rem; background: var(--abw-ink); }
.abw-discovery-card span { font-family: var(--abw-mono); color: var(--abw-ruby-light); font-size: .62rem; }
.abw-discovery-card h2 { margin: 3.5rem 0 0; font-family: var(--abw-display); font-size: 2.4rem; font-weight: 500; }
.abw-discovery-card p { max-width: 420px; color: rgba(243,239,229,.5); font-size: .86rem; line-height: 1.8; }

.abw-section { padding: 6rem 0; }
.abw-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; border-bottom: 1px solid var(--abw-rule); padding-bottom: 1.7rem; }
.abw-section-heading h2 { margin: .8rem 0 0; font-family: var(--abw-display); font-size: clamp(3rem,5vw,5rem); font-weight: 500; line-height: .95; }
.abw-section-heading h2 em { color: var(--abw-ruby); font-weight: 400; }
.abw-story-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 2rem; margin-top: 2.5rem; }
.abw-story-card figure { margin: 0; aspect-ratio: 4/3; overflow: hidden; background: var(--abw-paper-deep); }
.abw-story-card figure img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms cubic-bezier(.23,1,.32,1); }
.abw-story-card:hover figure img { transform: scale(1.025); }
.abw-story-meta { display: flex; justify-content: space-between; border-bottom: 1px solid var(--abw-rule); padding: .8rem 0; color: rgba(24,23,19,.45); font-size: .61rem; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; }
.abw-story-card h3 { margin: 1rem 0 0; font-family: var(--abw-display); font-size: 2rem; font-weight: 500; line-height: 1; }
.abw-story-card p { color: rgba(24,23,19,.6); font-size: .88rem; line-height: 1.8; }

.abw-page-intro { position: relative; overflow: hidden; padding: 7.5rem 0 5.5rem; }
.abw-page-intro::before { content: ""; position: absolute; left: 0; top: 52%; width: 60px; height: 1px; background: var(--abw-ruby); }
.abw-page-intro::after { content: ""; position: absolute; right: -90px; top: -175px; width: 350px; height: 350px; border-radius: 50%; background: repeating-conic-gradient(from 0deg, rgba(24,23,19,.12) 0 1deg, transparent 1deg 15deg); mask: radial-gradient(circle, transparent 0 72%, #000 72.5% 73%, transparent 73.5%); }
.abw-page-intro-grid { position: relative; z-index: 1; display: grid; grid-template-columns: .38fr 1fr; gap: 3rem; align-items: end; }
.abw-page-intro h1 { margin: 0; font-family: var(--abw-display); font-size: clamp(4.5rem,8vw,7.5rem); font-weight: 500; line-height: .9; }
.abw-page-intro-copy { max-width: 700px; margin: 1.6rem 0 0; color: rgba(24,23,19,.62); font-size: 1.05rem; line-height: 1.9; }
.abw-archive-tools { border-block: 1px solid var(--abw-rule); padding: 1.5rem 0; }
.abw-archive-controls { display: grid; grid-template-columns: 1fr 220px; gap: 1rem; }
.abw-archive-controls input, .abw-archive-controls select { width: 100%; min-height: 54px; border: 1px solid var(--abw-rule); padding: .8rem 1rem; background: transparent; color: var(--abw-ink); outline: none; }
.abw-archive-controls input:focus, .abw-archive-controls select:focus { border-color: var(--abw-ruby); }
.abw-letter-bar { display: flex; flex-wrap: wrap; gap: .7rem 1.1rem; margin-top: 1.2rem; }
.abw-letter-bar button { border: 0; border-bottom: 1px solid transparent; padding: .25rem 0; background: transparent; color: rgba(24,23,19,.55); font-family: var(--abw-mono); font-size: .7rem; }
.abw-letter-bar button.is-active, .abw-letter-bar button:hover { border-color: var(--abw-ruby); color: var(--abw-ruby); }
.abw-archive-list { border-top: 1px solid var(--abw-rule); }
.abw-archive-row { display: grid; grid-template-columns: 52px minmax(0,1fr) 150px 180px 40px; gap: 1.5rem; align-items: center; border-bottom: 1px solid var(--abw-rule); padding: 1.45rem 0; }
.abw-archive-row[hidden] { display: none; }
.abw-archive-number { color: rgba(24,23,19,.34); font-family: var(--abw-mono); font-size: .64rem; }
.abw-archive-row h2 { margin: 0; font-family: var(--abw-display); font-size: 1.9rem; font-weight: 500; line-height: 1; }
.abw-archive-row p { margin: .35rem 0 0; color: rgba(24,23,19,.52); font-size: .82rem; }
.abw-archive-tax { color: rgba(24,23,19,.45); font-size: .62rem; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; }

.abw-article-hero { padding: 3.5rem 0 4.5rem; background: var(--abw-paper-deep); border-bottom: 1px solid var(--abw-rule); }
.abw-article-hero-grid { display: grid; grid-template-columns: 1fr .86fr; gap: 3rem; align-items: end; }
.abw-article-hero h1 { margin: 1.4rem 0 0; font-family: var(--abw-display); font-size: clamp(4.5rem,8vw,7rem); font-weight: 500; line-height: .9; }
.abw-article-hero .abw-excerpt { max-width: 720px; color: rgba(24,23,19,.65); font-size: 1.08rem; line-height: 1.9; }
.abw-specimen { position: relative; border: 1px solid var(--abw-rule); padding: 1rem; background: #eee7da; }
.abw-specimen img { width: 100%; aspect-ratio: 4/3; object-fit: contain; background: #fff; }
.abw-article-layout { display: grid; grid-template-columns: 260px minmax(0,720px) 1fr; gap: 3.5rem; padding: 6rem 0; }
.abw-reading-index { align-self: start; position: sticky; top: 110px; }
.abw-reading-index ul { margin: 1.2rem 0 0; padding: 1.2rem 0 0; border-top: 1px solid var(--abw-rule); list-style: none; }
.abw-reading-index li { margin-bottom: .8rem; color: rgba(24,23,19,.58); font-size: .82rem; line-height: 1.6; }
.abw-prose { font-family: var(--abw-display); font-size: 1.28rem; line-height: 1.72; }
.abw-prose p { margin: 0 0 1.4rem; }
.abw-prose > p:first-child { font-size: 1.58rem; line-height: 1.55; }
.abw-prose > p:first-child::first-letter { float: left; margin: .3rem .45rem 0 0; color: var(--abw-ruby); font-size: 4.5rem; line-height: .72; }
.abw-prose h2 { margin: 2.8rem 0 1rem; border-top: 1px solid var(--abw-rule); padding-top: 1rem; color: var(--abw-ruby); font-family: var(--abw-mono); font-size: .78rem; letter-spacing: .15em; }
.abw-provenance { align-self: start; border-left: 1px solid var(--abw-rule); padding-left: 1.2rem; color: rgba(24,23,19,.5); font-size: .75rem; line-height: 1.8; }

.abw-site-footer { padding: 5rem 0 2rem; background: var(--abw-ink); color: var(--abw-paper); }
.abw-footer-grid { display: grid; grid-template-columns: 1.3fr .7fr .7fr; gap: 4rem; border-bottom: 1px solid rgba(243,239,229,.15); padding-bottom: 4rem; }
.abw-footer-title { margin: 1rem 0 0; font-family: var(--abw-display); font-size: 3.3rem; font-weight: 500; line-height: .95; }
.abw-footer-title em { color: var(--abw-ruby-light); font-weight: 400; }
.abw-footer-copy { max-width: 480px; color: rgba(243,239,229,.56); font-size: .86rem; line-height: 1.8; }
.abw-footer-nav { display: grid; gap: .7rem; margin-top: 1.4rem; color: rgba(243,239,229,.65); font-size: .82rem; }
.abw-colophon { display: flex; justify-content: space-between; gap: 2rem; padding-top: 1.5rem; color: rgba(243,239,229,.38); font-size: .62rem; letter-spacing: .17em; text-transform: uppercase; }

@media (max-width: 1000px) {
	.abw-nav { display: none; position: absolute; top: 76px; left: 0; right: 0; border-bottom: 1px solid var(--abw-rule); padding: 1rem; background: var(--abw-paper); }
	.abw-nav.is-open { display: block; }
	.abw-nav ul { display: grid; gap: 0; }
	.abw-nav a { display: block; border-bottom: 1px solid var(--abw-rule); padding: 1rem 0; }
	.abw-menu-toggle { display: inline-grid; place-items: center; }
	.abw-hero-grid { grid-template-columns: 1fr 1fr; }
	.abw-hero-rail { display: none; }
	.abw-article-layout { grid-template-columns: 220px minmax(0,1fr); }
	.abw-provenance { grid-column: 2; }
	.abw-archive-row { grid-template-columns: 42px minmax(0,1fr) 130px 35px; }
	.abw-archive-row .abw-archive-tax:nth-last-child(2) { display: none; }
}

@media (max-width: 720px) {
	.admin-bar .abw-site-header { top: 46px; }
	.abw-container { width: min(100% - 2rem, 1380px); }
	.abw-brand img { width: 40px; height: 40px; }
	.abw-brand-name { font-size: 1.2rem; }
	.abw-brand-subtitle { font-size: .5rem; }
	.abw-hero { padding: 1.5rem 0; }
	.abw-hero-grid, .abw-discovery, .abw-page-intro-grid, .abw-article-hero-grid, .abw-footer-grid, .abw-article-layout { grid-template-columns: 1fr; }
	.abw-hero-grid { min-height: auto; }
	.abw-hero h1 { font-size: clamp(3.9rem,17vw,5.8rem); }
	.abw-hero-figure { min-height: 460px; }
	.abw-dark-section, .abw-section { padding: 4.5rem 0; }
	.abw-discovery-grid, .abw-story-grid { grid-template-columns: 1fr; }
	.abw-section-heading { align-items: start; flex-direction: column; }
	.abw-page-intro { padding: 5rem 0 3.5rem; }
	.abw-page-intro h1 { font-size: clamp(4rem,17vw,5.8rem); }
	.abw-archive-controls { grid-template-columns: 1fr; }
	.abw-archive-row { grid-template-columns: 30px minmax(0,1fr) 32px; gap: .8rem; }
	.abw-archive-row .abw-archive-tax { display: none; }
	.abw-article-layout { padding: 4rem 0; }
	.abw-reading-index { position: static; }
	.abw-provenance { grid-column: auto; }
	.abw-colophon { flex-direction: column; }
}

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

