/* andrewcohen.ca — plain CSS, no build step. Fonts in fonts.css (self-hosted). */
:root {
  --ink: #2a2726;
  --navy: #2a343e;
  --navy-dark: #222a32;
  --night: #161922;
  --accent: #db5461;
  --accent-dark: #c44e58;
  --rule: #e4e2df;
  --paper: #fff;
  --mist: #f4f3f1;
  --muted: #8b8784;
  --serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --sans: "Open Sans", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1180px;
  --header-h: 84px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; font: 400 16px/1.6 var(--serif); color: var(--ink); background: var(--paper); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 1.1em; }
h1, h2, h3 { font-family: var(--sans); font-weight: 800; line-height: 1.15; color: var(--navy); margin: 0 0 .6em; }
i, em { font-style: italic; }

.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }
.wrap.narrow { width: min(820px, 100% - 48px); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
.hp { position: absolute; left: -9999px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45em; border: 0; border-radius: 4px;
  background: var(--accent); color: #fff; font: 600 15px/1 var(--serif); padding: 13px 22px; text-decoration: none; cursor: pointer;
  transition: background-color .2s; }
.btn:hover { background: var(--accent-dark); }
.btn-dark { background: var(--navy); font-family: var(--sans); font-size: 14px; }
.btn-dark:hover { background: var(--night); }
.btn-wide { min-width: 220px; }
.btn-block { display: flex; width: 100%; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.97); box-shadow: 0 1px 0 var(--rule); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 24px; }
.logo img { width: 200px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.site-nav a { display: inline-flex; align-items: center; font: 600 14px/1 var(--sans); color: var(--navy); text-decoration: none; padding: 12px 16px; border-radius: 4px; }
.site-nav a:not(.btn):hover, .site-nav a.is-current:not(.btn) { color: var(--accent); }
.site-nav .nav-contact { color: #fff; margin-left: 14px; padding: 13px 22px; }
.site-nav .nav-contact:hover { color: #fff; }
.home-link .sr-desktop { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.nav-toggle { display: none; }

@media (max-width: 900px) {
  :root { --header-h: 68px; }
  .logo img { width: 160px; }
  .nav-toggle { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; padding: 10px;
    border: 0; border-radius: 4px; background: var(--navy); cursor: pointer; }
  .nav-toggle span:not(.sr) { display: block; height: 2px; background: #fff; transition: transform .2s, opacity .2s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .site-nav { position: absolute; left: 0; right: 0; top: 100%; background: #fff; box-shadow: 0 10px 20px rgba(0,0,0,.08); display: none; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: 8px 24px 20px; gap: 0; }
  .site-nav a { padding: 14px 0; border-bottom: 1px solid var(--rule); width: 100%; font-size: 15px; }
  .site-nav .nav-contact { margin: 14px 0 0; justify-content: center; border: 0; }
  .home-link .sr-desktop { position: static; width: auto; height: auto; clip: auto; margin-left: 8px; }
}

/* Sections */
.section { padding: 70px 0; }
.page-top { padding-top: 56px; }
.section-title { font-size: 30px; text-transform: uppercase; }
.section-title.normal-case { text-transform: none; font-size: 26px; }
.page-title { font-size: clamp(30px, 4vw, 40px); text-transform: uppercase; margin-bottom: 28px; }
.sub-title { font-size: 22px; text-transform: uppercase; }
.accent-heading { color: var(--accent); font-size: 26px; }
.prose { max-width: 72ch; }
.prose.wide { max-width: none; margin: 30px 0 50px; }
.prose a:not(.btn) { color: var(--accent-dark); }
.prose .lead { font-size: 1.05em; }
a.accent { color: var(--accent-dark); }
.framed { border: 6px solid #fff; box-shadow: 0 2px 14px rgba(0,0,0,.14); }
.media-row { display: grid; grid-template-columns: minmax(240px, 380px) 1fr; gap: 48px; align-items: start; }
@media (max-width: 760px) { .media-row { grid-template-columns: 1fr; gap: 28px; } .section { padding: 50px 0; } }

/* Hero */
.hero { position: relative; color: #fff; background: #1b1d20 url("../img/uploads/2021/05/dark-background-4.webp") center / cover; overflow: hidden; }
.hero-slide[hidden] { display: none; }
.hero.has-moved .hero-slide { animation: fade .6s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; gap: 40px; min-height: 420px; padding: 34px 0; }
.hero-img { max-height: 400px; width: auto; justify-self: center; }
.hero-img-laptop { max-height: 340px; }
.hero-text { font: 600 21px/1.55 var(--sans); margin: 0; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.hero-arrow { position: absolute; top: 50%; translate: 0 -50%; width: 44px; height: 44px; border: 0; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0,0,0,.35); color: #fff; cursor: pointer; transition: background-color .2s; }
.hero-arrow:hover { background: rgba(0,0,0,.6); }
.hero-arrow.prev { left: 14px; } .hero-arrow.next { right: 14px; }
.hero-tabs { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.hero-tabs button { font: 700 11px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; border: 0; border-radius: 3px; padding: 9px 0; width: 150px;
  background: var(--rule); color: var(--muted); cursor: pointer; }
.hero-tabs button[aria-selected="true"] { background: #fff; color: var(--navy); box-shadow: 0 1px 6px rgba(0,0,0,.12); }
@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; min-height: 0; padding: 36px 40px 40px; gap: 24px; }
  .hero-img { max-height: 230px; }
  .hero-text { font-size: 17px; }
  .hero-arrow { width: 36px; height: 36px; } .hero-arrow.prev { left: 6px; } .hero-arrow.next { right: 6px; }
  .hero-tabs { justify-content: center; }
}

.about-teaser { padding-top: 40px; }
.as-seen { padding-top: 10px; }
.as-seen .logos { margin: 26px auto 0; max-width: 1000px; width: 100%; }

/* Dark band */
.dark { background: var(--navy); color: #e9ecef; }
.dark .section-title { color: #fff; }
.dark .prose { max-width: none; }
.appearances-teaser .media-row { grid-template-columns: minmax(260px, 420px) 1fr; }
@media (max-width: 760px) { .appearances-teaser .media-row { grid-template-columns: 1fr; } .appearances-teaser .prose { order: -1; } }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px; }
.card { background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 2px 16px rgba(20,25,34,.09); display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 26px rgba(20,25,34,.14); }
.card-img { display: block; aspect-ratio: 16 / 10; background: var(--mist); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; color: var(--ink); }
.card-outlet { font: 700 11px/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.card-title { font: 700 17px/1.35 var(--serif); color: var(--ink); margin: 0 0 16px; }
.card-title a { text-decoration: none; }
.card-title a:hover { color: var(--accent-dark); }
.card-more { margin: auto 0 0; font: 600 14px/1 var(--sans); }
.card-more a { color: var(--navy); text-decoration: none; }
.card:hover .card-more a { color: var(--accent); }
.card-feature .card-img { aspect-ratio: 16 / 9; }
.card-feature .card-title { font-size: 19px; }

/* About */
.about-grid { display: grid; grid-template-columns: 320px 1fr; gap: 52px; align-items: start; }
.about-photos { display: grid; gap: 28px; position: sticky; top: calc(var(--header-h) + 24px); }
.about-photos figure { margin: 0; }
.about-photos figcaption { font-size: 13px; color: var(--muted); margin-top: 10px; text-align: center; }
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-photos { position: static; grid-template-columns: 1fr 1fr; gap: 16px; }
}

/* Books */
.books-intro { display: grid; grid-template-columns: 200px 1fr; gap: 40px; align-items: center; }
.books-intro .note a { color: var(--accent); }
.books-shelf { background: var(--mist); }
.book-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); gap: 40px 24px; }
.book-grid a { display: block; text-decoration: none; }
.book-grid img { width: 100%; aspect-ratio: 300 / 455; object-fit: cover; border: 5px solid #fff; box-shadow: 0 3px 16px rgba(0,0,0,.16); transition: transform .2s, box-shadow .2s; }
.book-grid a:hover img { transform: translateY(-4px); box-shadow: 0 10px 26px rgba(0,0,0,.2); }
.book-title { display: block; font-size: 13px; line-height: 1.45; margin-top: 12px; }
.book-grid a:hover .book-title { color: var(--accent-dark); }
@media (max-width: 640px) { .books-intro { grid-template-columns: 110px 1fr; gap: 20px; } .book-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 18px; } }

/* Article */
.crumb { font: 600 13px/1 var(--sans); margin-bottom: 26px; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--accent); }
.article-hero { width: 100%; margin-bottom: 30px; border-radius: 4px; }
.article-title { font: 400 clamp(26px, 3.6vw, 36px)/1.25 var(--serif); color: var(--ink); }
.byline { display: flex; flex-wrap: wrap; gap: 6px 18px; font: 600 12px/1.4 var(--sans); letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
  padding: 14px 0; border-block: 1px solid var(--rule); margin-bottom: 34px; }
.byline-author { color: var(--navy); }
.article-body { max-width: none; font-size: 17px; line-height: 1.75; }
.article-body h2, .article-body h3 { font-family: var(--serif); font-weight: 700; color: var(--ink); margin-top: 1.6em; font-size: 1.2em; }
.article-body img { margin: 1.4em auto; }
.article-body blockquote, .article-body figure.wp-block-pullquote, .article-body figure { margin: 1.8em 0; }
.article-body blockquote { border-left: 3px solid var(--accent); padding: .2em 0 .2em 1.2em; color: var(--accent-dark); font-style: italic; }
.article-body hr { border: 0; border-top: 1px solid var(--rule); margin: 2em 0; }
.video { position: relative; aspect-ratio: 16 / 9; margin: 0 0 1.6em; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 50px; align-items: start; }
.form-box { background: #fff; border: 1px solid var(--rule); box-shadow: 0 2px 16px rgba(0,0,0,.06); padding: 26px; border-radius: 4px; }
.contact-form { display: grid; gap: 14px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
input[type=text], input[type=email], input[type=tel], textarea {
  width: 100%; font: 15px/1.4 var(--serif); color: var(--ink); background: #fff; border: 1px solid #d8d5d1; border-radius: 3px; padding: 11px 12px; }
input:focus, textarea:focus { border-color: var(--navy); outline: 2px solid rgba(42,52,62,.15); outline-offset: 0; }
textarea { resize: vertical; min-height: 130px; }
.form-note { border-radius: 4px; padding: 14px 16px; font-size: 15px; margin-bottom: 14px; }
.form-note p:last-child { margin: 0; }
.form-note.ok { background: #eef6ef; color: #23512b; }
.form-note.err { background: #fbeced; color: #8a2630; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; gap: 24px; } }
@media (max-width: 560px) { .row3 { grid-template-columns: 1fr; } .form-box { padding: 18px; } }

/* Pre-footer: recent work + subscribe */
.prefooter { padding: 60px 0; border-top: 1px solid var(--rule); }
.prefooter-grid { display: grid; grid-template-columns: 1.2fr .8fr 1.2fr; gap: 40px; align-items: start; }
.recent ul { list-style: none; margin: 0; padding: 0; }
.recent li { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.recent a { display: block; font-style: italic; text-decoration: none; font-size: 15px; line-height: 1.45; }
.recent a:hover { color: var(--accent-dark); }
.recent time { display: block; font-size: 12px; font-style: italic; color: var(--muted); margin-top: 3px; }
.prefooter-photo img { width: 100%; border: 6px solid #fff; box-shadow: 0 2px 14px rgba(0,0,0,.14); }
.subscribe h3 { font-size: 24px; color: var(--night); }
.subscribe p { font-size: 15px; }
.subscribe .small { font-size: 12px; color: var(--muted); }
.subscribe-form { display: flex; gap: 10px; }
.subscribe-form input { flex: 1; min-width: 0; }
.subscribe-form .btn { text-transform: uppercase; font-size: 13px; letter-spacing: .04em; }
@media (max-width: 960px) { .prefooter-grid { grid-template-columns: 1fr 1fr; } .prefooter-photo { display: none; } }
@media (max-width: 640px) { .prefooter-grid { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { background: var(--navy); color: #fff; text-align: center; padding: 56px 0 36px; font-size: 14px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #f3b2b8; }
.footer-logo { display: inline-block; margin-bottom: 26px; }
.footer-logo img { width: 240px; }
.site-footer .strong { font-weight: 700; }
.to-top { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.12); margin: 18px 0 26px; }
.to-top:hover { background: rgba(255,255,255,.22); }
.footer-links, .copyright { font-size: 12px; margin: 0 0 6px; color: #c9ced4; }
