/*
Theme Name: AS 2026
Theme URI: https://aaronsonnenberg.com
Author: Sonnenberg Design
Author URI: https://sonnenbergdesign.com
Description: Custom editorial theme for aaronsonnenberg.com. Blog-grid home, wide-hero article template. No page builder.
Version: 1.1.3
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: as-2026
*/

@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/instrument-serif-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/instrument-serif-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Kaushan Script';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/kaushan-script.woff2') format('woff2');
}

:root {
  --paper: #FAFAF9;
  --ink: #1A1C26;
  --muted: #6F7178;
  --faint: #9A9CA3;
  --line: #E8E7E3;
  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --script: 'Kaushan Script', 'Snell Roundhand', cursive;
  --wrap: 1080px;
}

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
img { max-width: 100%; height: auto; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px; width: 1px;
  overflow: hidden; position: absolute !important;
  word-wrap: normal !important;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
}
.nav {
  display: flex; align-items: center; gap: 36px;
  padding: 18px 32px;
  max-width: var(--wrap); margin: 0 auto;
}
.logo {
  font-family: var(--serif);
  font-size: 23px;
  letter-spacing: -.01em;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-links { display: flex; gap: 26px; font-size: 13.5px; color: var(--muted); margin-left: 8px; }
.nav-links ul { display: contents; list-style: none; }
.nav-links li { display: inline; }
.nav-links a:hover { color: var(--ink); }
.nav-links .current-menu-item a, .nav-links .current_page_item a { color: var(--ink); }
.nav-spacer { flex: 1; }
.btn-pill {
  background: var(--ink); color: var(--paper);
  font-size: 13px; font-weight: 500;
  padding: 9px 18px; border-radius: 999px;
  white-space: nowrap;
}
.btn-pill:hover { background: #33364a; }
@media (max-width: 720px) {
  .nav { gap: 18px; }
  .nav-links { display: none; }
}

/* ---------- home / blog grid ---------- */
.home-hero { padding: 108px 0 0; }
.home-hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 6.5vw, 58px);
  line-height: 1.06;
  letter-spacing: -.04em;
  min-height: 2.2em;
  width: 100%;
}
.home-hero .caret {
  display: inline-block;
  width: 3px;
  height: .82em;
  margin-left: 6px;
  background: var(--ink);
  vertical-align: baseline;
  transform: translateY(.12em);
  animation: as-caret 1.1s steps(1) infinite;
}
@keyframes as-caret { 50% { opacity: 0; } }
@media (max-width: 600px) { .home-hero h1 { min-height: 3.3em; } }
.home-hero .intro {
  margin-top: 22px;
  max-width: 80%;
  color: var(--muted);
  font-size: 16px;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 64px 32px;
  margin-top: 96px;
  padding-bottom: 128px;
  list-style: none;
}
@media (max-width: 900px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .post-grid { grid-template-columns: 1fr; margin-top: 64px; } }

.card { display: block; }
.card .card-link { display: block; }
.card-meta { font-size: 12.5px; color: var(--faint); margin-top: 10px; }
.card-meta a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.card-meta a:hover { color: var(--ink); }
.card .photo {
  aspect-ratio: 4 / 5;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  background: var(--line);
  box-shadow:
    inset 0 0 0 1px rgba(8, 21, 46, .10),
    0 1px 2px rgba(8, 21, 46, .04),
    0 6px 16px rgba(8, 21, 46, .06),
    0 24px 48px rgba(8, 21, 46, .08);
}
.card .photo img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.card h2, .card h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.6rem;
  line-height: 1.15;
  letter-spacing: -.01em;
  margin: 20px 0 12px;
  text-wrap: balance;
  transition: opacity .2s ease;
}
.card:hover h2, .card:hover h3 { opacity: .8; }
.card .excerpt { font-size: 15.5px; color: rgba(26, 28, 38, .7); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .excerpt p { margin: 0; }
@media (prefers-reduced-motion: no-preference) {
  .card { transition: transform .15s ease; }
  .card:active { transform: scale(.99); }
}

/* pagination */
.pagination { padding: 0 0 96px; display: flex; gap: 8px; font-size: 13.5px; color: var(--muted); }
.pagination .page-numbers { padding: 6px 12px; border-radius: 999px; }
.pagination .page-numbers.current { background: var(--ink); color: var(--paper); }
.pagination a:hover { color: var(--ink); }

/* ---------- article ---------- */
.article-shell { max-width: 780px; margin: 0 auto; padding: 72px 32px 0; }
.back {
  font-size: 13px; color: var(--muted);
  display: inline-flex; align-items: center; gap: 6px;
  margin-bottom: 44px;
}
.back:hover { color: var(--ink); }
.post-meta {
  font-size: 11px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 20px;
}
.post-meta .sep { margin: 0 7px; color: var(--line); }
.article-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 5.5vw, 62px);
  line-height: 1.05;
  letter-spacing: -.01em;
  text-wrap: balance;
  margin-bottom: 22px;
}
.page-title { margin-bottom: 44px; }

.hero-wide { max-width: 1000px; margin: 0 auto; padding: 0 32px; }
.hero-wide .hero-photo {
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  margin-bottom: 72px;
  box-shadow:
    inset 0 0 0 1px rgba(8, 21, 46, .10),
    0 1px 2px rgba(8, 21, 46, .04),
    0 6px 16px rgba(8, 21, 46, .06),
    0 24px 48px rgba(8, 21, 46, .08);
}
.hero-wide .hero-photo img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

.article-body { max-width: 640px; margin: 0 auto; padding-bottom: 64px; }
.article-body > * { margin-bottom: 22px; }
.article-body p { font-size: 16px; line-height: 1.78; color: #33353f; max-width: 65ch; }
.article-body h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.2;
  margin: 44px 0 16px;
  text-wrap: balance;
}
.article-body h3 { font-size: 15px; font-weight: 650; margin: 28px 0 8px; }
.article-body h4 { font-size: 14px; font-weight: 650; margin: 22px 0 6px; }
.article-body ul, .article-body ol { margin: 0 0 22px 20px; }
.article-body li { font-size: 16px; line-height: 1.7; color: #33353f; margin-bottom: 6px; }
.article-body blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 26px;
  line-height: 1.3;
  padding: 8px 0 8px 26px;
  border-left: 2px solid var(--ink);
  margin: 38px 0;
}
.article-body blockquote p { font-size: inherit; color: inherit; margin: 0; }
.article-body img { border-radius: 14px; }
.article-body figure { margin: 40px 0; }
.article-body figcaption { font-size: 12.5px; color: var(--faint); margin-top: 10px; }
.article-body a { text-decoration: underline; text-underline-offset: 2px; }
.article-body pre {
  background: #F1F0EC; border-radius: 10px; padding: 18px;
  overflow-x: auto; font-size: 13px; line-height: 1.6;
}
.article-body code { font-size: .92em; }

.sign-off {
  font-family: var(--script);
  font-size: 26px;
  transform: rotate(-2deg);
  display: inline-block;
  margin-top: 12px;
}

/* ---------- more writing ---------- */
.more { border-top: 1px solid var(--line); margin-top: 48px; padding-top: 64px; padding-bottom: 40px; }
.more h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 32px;
  margin-bottom: 36px;
}
.more .post-grid { margin-top: 0; padding-bottom: 48px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 52px 0 60px; }
.foot {
  display: flex; flex-wrap: wrap; gap: 32px;
  align-items: flex-start; justify-content: space-between;
  max-width: var(--wrap); margin: 0 auto; padding: 0 32px;
}
.foot .logo { font-size: 19px; }
.foot-tag { font-size: 12.5px; color: var(--faint); margin-top: 10px; max-width: 30ch; }
.foot-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.foot-col h4 {
  font-size: 10.5px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 14px;
}
.foot-col ul { list-style: none; }
.foot-col a { display: block; font-size: 13px; color: var(--muted); margin-bottom: 9px; }
.foot-col a:hover { color: var(--ink); }
.copyright {
  max-width: var(--wrap); margin: 44px auto 0; padding: 0 32px;
  font-size: 11.5px; color: var(--faint);
}
.copyright a { text-decoration: underline; }

/* ---------- Contact Form 7 ---------- */
.wpcf7 form { max-width: 560px; }
.wpcf7 form > p { margin-bottom: 18px; }
.wpcf7 label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.wpcf7-form-control:not(.wpcf7-submit) {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 12px 14px;
  font: inherit;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.wpcf7-form-control:not(.wpcf7-submit):focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(26, 28, 38, .08);
}
.wpcf7 textarea { min-height: 160px; resize: vertical; }
.wpcf7-submit {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 28px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
}
.wpcf7-submit:hover { background: #33364a; }
.wpcf7-submit:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.wpcf7-spinner { margin: 0 0 0 12px; }
.wpcf7-form-control.wpcf7-not-valid { border-color: #B4483E; }
.wpcf7-not-valid-tip {
  display: block;
  font-size: 12.5px;
  color: #B4483E;
  margin-top: 6px;
}
.wpcf7 .wpcf7-response-output {
  margin: 20px 0 0;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  color: var(--muted);
}
.wpcf7 form.sent .wpcf7-response-output { border-color: #3E7C52; color: #3E7C52; }
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.aborted .wpcf7-response-output { border-color: #B4483E; color: #B4483E; }

/* ---------- WP compat ---------- */
.alignwide { max-width: 1000px; margin-left: auto; margin-right: auto; }
.alignfull { width: 100%; }
.wp-block-image img { border-radius: 14px; }
