/*
Theme Name: 37 Frames Journal
Theme URI: https://37framesphotographyblog.com
Author: 37 Frames
Author URI: https://www.37framesphotography.com
Description: Editorial, photography-first blog theme for 37 Frames. Calm typography, generous space, sharp frames. Built to work with Jetpack, Powerkit, SearchWP Live Search, Post Views Counter, Contact Form 7, Ecwid and Elementor.
Version: 1.2.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: 37frames-journal
Tags: blog, photography, one-column, two-columns, custom-logo, custom-menu, featured-images, translation-ready
*/

/* ------------------------------------------------------------------
   Tokens
------------------------------------------------------------------ */
:root {
  --paper: #fafaf7;
  --paper-raised: #f3f3ee;
  --ink: #191917;
  --ink-soft: #43433f;
  --muted: #6f6f68;
  --hairline: #e3e3dc;
  --accent: #a93f26;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Outfit", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --measure: 68ch;
  --site-max: 1320px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ------------------------------------------------------------------
   Base
------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }

.entry-content a,
.comment-content a,
.textwidget a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
  text-underline-offset: 3px;
  transition: color 0.25s var(--ease), text-decoration-color 0.25s var(--ease);
}

.entry-content a:hover,
.comment-content a:hover,
.textwidget a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

::selection { background: var(--ink); color: var(--paper); }

.screen-reader-text {
  border: 0; clip-path: inset(50%); height: 1px; width: 1px;
  margin: -1px; overflow: hidden; padding: 0; position: absolute;
  word-wrap: normal;
}

.skip-link:focus {
  clip-path: none; height: auto; width: auto;
  position: fixed; top: 0.5rem; left: 0.5rem; z-index: 100;
  background: var(--ink); color: var(--paper);
  padding: 0.6rem 1rem; font-family: var(--sans); font-size: 0.85rem;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.site-container {
  max-width: var(--site-max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ------------------------------------------------------------------
   Header
------------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  height: 68px;
}

.site-branding { display: flex; align-items: baseline; gap: 0.65rem; flex-shrink: 0; }

.site-branding .custom-logo { max-height: 40px; width: auto; }

.site-title {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}

.site-title-journal {
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.15rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}

.primary-nav { display: flex; align-items: center; gap: 1.75rem; }

.primary-nav ul {
  display: flex; align-items: center; gap: 1.75rem;
  list-style: none; margin: 0; padding: 0;
}

.primary-nav a {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
  white-space: nowrap;
}

.primary-nav a:hover,
.primary-nav .current-menu-item > a {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.header-actions { display: flex; align-items: center; gap: 1rem; }

.icon-button {
  appearance: none; background: none; border: none; cursor: pointer;
  padding: 0.4rem; color: var(--ink); display: inline-flex;
  transition: color 0.25s var(--ease);
}
.icon-button:hover { color: var(--accent); }
.icon-button svg { width: 19px; height: 19px; }

.nav-toggle { display: none; }

/* Collapsed nav: the menu needs real room, so the toggle appears early */
@media (max-width: 1199px) {
  .primary-nav {
    position: fixed; inset: 68px 0 auto 0;
    background: var(--paper);
    border-bottom: 1px solid var(--hairline);
    padding: 1.5rem var(--gutter) 2rem;
    display: none;
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; align-items: flex-start; gap: 1.1rem; }
  .primary-nav a { font-size: 0.95rem; }
  .nav-toggle { display: inline-flex; }
}

/* Search panel */
.search-panel {
  display: none;
  border-bottom: 1px solid var(--hairline);
  background: var(--paper);
}
.search-panel.is-open { display: block; }
.search-panel .site-container { padding-top: 2rem; padding-bottom: 2.25rem; }

.search-form { display: flex; gap: 0; max-width: 720px; }

.search-form .search-field {
  flex: 1;
  font-family: var(--serif);
  font-size: 1.35rem;
  padding: 0.6rem 0;
  border: none;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  border-radius: 0;
}
.search-form .search-field::placeholder { color: var(--muted); opacity: 1; }
.search-form .search-field:focus { outline: none; border-bottom-color: var(--accent); }

.search-form .search-submit {
  font-family: var(--sans); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  background: none; border: none; border-bottom: 1px solid var(--ink);
  color: var(--ink); cursor: pointer; padding: 0 0 0 1rem;
  border-radius: 0;
  transition: color 0.25s var(--ease);
}
.search-form .search-submit:hover { color: var(--accent); }

/* Category rail */
.category-rail {
  border-bottom: 1px solid var(--hairline);
  overflow-x: auto;
  scrollbar-width: none;
}
.category-rail::-webkit-scrollbar { display: none; }

.category-rail ul {
  display: flex; gap: 2rem; list-style: none;
  margin: 0; padding: 0.85rem 0;
  white-space: nowrap;
}

.category-rail a {
  font-family: var(--sans); font-size: 0.72rem; font-weight: 400;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted);
  transition: color 0.25s var(--ease);
}
.category-rail a:hover, .category-rail .current-cat > a { color: var(--accent); }

/* ------------------------------------------------------------------
   Featured story (home hero)
------------------------------------------------------------------ */
.featured-story {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2.5rem, 6vw, 4.5rem);
}

/* Editorial offset: image sits high, words hang lower */
.featured-story-body { padding-top: clamp(0.5rem, 5vw, 4rem); }

.featured-story-media { order: 2; overflow: hidden; }

.featured-story-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
}

.featured-story:hover .featured-story-media img { transform: scale(1.025); }

.featured-story-body { order: 1; }

.post-meta {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--sans); font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.1rem;
}

.post-meta .meta-category { color: var(--accent); }
.post-meta .meta-sep { color: var(--hairline); }

.featured-story-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.3rem, 4.8vw, 3.9rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
  margin: 0 0 1.25rem;
}

.featured-story-title a { transition: color 0.25s var(--ease); }
.featured-story-title a:hover { color: var(--accent); }

.featured-story-excerpt {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 0 1.75rem;
}

.text-link {
  display: inline-block;
  font-family: var(--sans); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0.3rem;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.text-link:hover { color: var(--accent); border-color: var(--accent); }

@media (max-width: 820px) {
  .featured-story { grid-template-columns: 1fr; gap: 1.5rem; }
  .featured-story-media { order: 1; }
  .featured-story-body { order: 2; }
}

/* ------------------------------------------------------------------
   Post grid
------------------------------------------------------------------ */
.section-heading {
  display: flex; align-items: baseline; justify-content: space-between;
  border-top: 1px solid var(--ink);
  padding-top: 1rem;
  margin: 0 0 2.25rem;
}

.section-heading h2 {
  font-family: var(--display); font-style: italic; font-weight: 500;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin: 0;
  line-height: 1.15; padding-bottom: 0.15em;
}

.post-grid-paged { padding-top: clamp(2.5rem, 6vw, 4rem); }

.post-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(1.75rem, 3.5vw, 3rem) clamp(1.25rem, 2.5vw, 2rem);
  padding-bottom: clamp(3rem, 7vw, 5.5rem);
}

.post-card { display: flex; flex-direction: column; }

.post-grid .post-card { grid-column: span 2; }

/* Editorial rhythm: first two cards in each block of five run wide */
.post-grid .post-card:nth-child(5n + 1),
.post-grid .post-card:nth-child(5n + 2) { grid-column: span 3; }

.post-card-media { overflow: hidden; margin-bottom: 1.1rem; }

.post-card-media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}

.post-grid .post-card:nth-child(5n + 3) .post-card-media img,
.post-grid .post-card:nth-child(5n + 4) .post-card-media img,
.post-grid .post-card:nth-child(5n + 5) .post-card-media img {
  aspect-ratio: 4 / 5;
}

.post-card:hover .post-card-media img { transform: scale(1.03); }

.post-card .post-meta { margin-bottom: 0.6rem; }

.post-card-title {
  font-family: var(--display); font-weight: 500;
  font-size: 1.65rem; line-height: 1.15; letter-spacing: -0.005em;
  margin: 0 0 0.6rem;
}

.post-grid .post-card:nth-child(5n + 1) .post-card-title,
.post-grid .post-card:nth-child(5n + 2) .post-card-title { font-size: 2.05rem; }

.post-card-title a { transition: color 0.25s var(--ease); }
.post-card-title a:hover { color: var(--accent); }

.post-card-excerpt {
  font-family: var(--sans);
  font-size: 0.92rem; line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

/* Clean grid with no orphans: a lone last card becomes a full-width
   cinematic closer; two stranded tall cards become a wide pair. */
@media (min-width: 1021px) {
  .post-grid .post-card:nth-child(5n + 1):last-child,
  .post-grid .post-card:nth-child(5n + 3):last-child { grid-column: span 6; }

  .post-grid .post-card:nth-child(5n + 1):last-child .post-card-media img,
  .post-grid .post-card:nth-child(5n + 3):last-child .post-card-media img { aspect-ratio: 5 / 2; }

  .post-grid .post-card:nth-child(5n + 1):last-child .post-card-title,
  .post-grid .post-card:nth-child(5n + 3):last-child .post-card-title { font-size: 2.05rem; }

  .post-grid .post-card:nth-child(5n + 3):nth-last-child(2),
  .post-grid .post-card:nth-child(5n + 3):nth-last-child(2) ~ .post-card:last-child { grid-column: span 3; }

  .post-grid .post-card:nth-child(5n + 3):nth-last-child(2) .post-card-media img,
  .post-grid .post-card:nth-child(5n + 3):nth-last-child(2) ~ .post-card:last-child .post-card-media img { aspect-ratio: 3 / 2; }
}

@media (max-width: 1020px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .post-grid .post-card,
  .post-grid .post-card:nth-child(5n + 1),
  .post-grid .post-card:nth-child(5n + 2) { grid-column: span 1; }
  .post-grid .post-card-media img { aspect-ratio: 3 / 2 !important; }
}

@media (max-width: 640px) {
  .post-grid { grid-template-columns: 1fr; }
}

/* Scroll reveal (JS adds .reveal; IO adds .is-visible) */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------------
   Featured stories band (random picks from the archive)
------------------------------------------------------------------ */
.featured-band {
  background: var(--paper-raised);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  margin: 0 calc(50% - 50vw) clamp(2.5rem, 6vw, 4rem);
  padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(2.5rem, 5vw, 4rem);
}

.featured-band-inner {
  max-width: var(--site-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.featured-band .section-heading { border-top-color: var(--hairline); margin-bottom: 2rem; }

.featured-band-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.featured-band .post-card-title { font-size: 1.5rem; }

@media (max-width: 820px) {
  .featured-band-grid { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------
   Pagination
------------------------------------------------------------------ */
.pagination {
  display: flex; justify-content: center; gap: 0.4rem;
  padding: 0 0 clamp(3rem, 7vw, 5rem);
  font-family: var(--sans); font-size: 0.9rem;
}

.pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.4rem; height: 2.4rem; padding: 0 0.6rem;
  border: 1px solid transparent;
  color: var(--muted);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.pagination .page-numbers:hover { color: var(--ink); border-color: var(--hairline); }
.pagination .page-numbers.current { color: var(--ink); border-color: var(--ink); }

/* ------------------------------------------------------------------
   Archive / search headers
------------------------------------------------------------------ */
.archive-header { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1.5rem, 3vw, 2.5rem); max-width: 820px; }

.archive-header .archive-kicker {
  font-family: var(--sans); font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
  margin: 0 0 0.9rem;
}

.archive-header h1 {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  line-height: 1.06; letter-spacing: -0.01em; margin: 0;
}

.archive-header .archive-description {
  color: var(--ink-soft); margin-top: 1rem; max-width: 60ch;
}

/* ------------------------------------------------------------------
   Single post / page
------------------------------------------------------------------ */
.entry-header {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1.75rem, 4vw, 2.75rem);
  text-align: left;
}

.entry-header .post-meta { margin-bottom: 1.25rem; }

.entry-title {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(2.4rem, 5.5vw, 4.1rem);
  line-height: 1.05; letter-spacing: -0.01em;
  margin: 0;
}

.entry-featured-image { max-width: 1180px; margin: 0 auto clamp(2rem, 5vw, 3.5rem); }
.entry-featured-image img { width: 100%; }
.entry-featured-image figcaption {
  font-family: var(--sans); font-size: 0.8rem; color: var(--muted);
  padding-top: 0.6rem;
}

.entry-content,
.entry-footer,
.post-author-note,
.comments-area {
  max-width: var(--measure);
  margin-left: auto;
  margin-right: auto;
}

.entry-content { font-size: 1.125rem; line-height: 1.75; }

/* Drop cap opens the story */
.single .entry-content > p:first-of-type::first-letter {
  font-family: var(--display);
  font-weight: 500;
  font-size: 3.6em;
  line-height: 0.75;
  float: left;
  padding: 0.09em 0.14em 0 0;
}

.entry-content > * + * { margin-top: 1.35em; }

.entry-content h2, .entry-content h3, .entry-content h4 {
  font-family: var(--display); font-weight: 500; line-height: 1.15;
  letter-spacing: -0.005em; margin-top: 2.2em;
}
.entry-content h2 { font-size: 2.1rem; }
.entry-content h3 { font-size: 1.65rem; }
.entry-content h4 { font-size: 1.35rem; }

.entry-content blockquote {
  margin: 2.2em 0; padding: 0 0 0 1.6rem;
  border-left: 2px solid var(--accent);
  font-family: var(--display);
  font-style: italic; font-size: 1.45rem; line-height: 1.45;
  color: var(--ink-soft);
}
.entry-content blockquote p { margin: 0; }

.entry-content figure { margin: 2.2em 0; }
.entry-content figcaption {
  font-family: var(--sans); font-size: 0.8rem; color: var(--muted);
  padding-top: 0.6rem;
}

.entry-content .alignwide { margin-left: calc(50% - min(50vw, 590px) + var(--gutter)); margin-right: calc(50% - min(50vw, 590px) + var(--gutter)); max-width: none; }
.entry-content .alignfull { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); max-width: none; }

.entry-content ul, .entry-content ol { padding-left: 1.4rem; }
.entry-content li + li { margin-top: 0.5em; }

.entry-content hr {
  border: none; border-top: 1px solid var(--hairline);
  margin: 3em auto; max-width: 120px;
}

.wp-caption { max-width: 100%; }
.wp-caption-text {
  font-family: var(--sans); font-size: 0.8rem; color: var(--muted);
  padding-top: 0.6rem;
}

/* Tags + share row */
.entry-footer {
  padding: 2.5rem 0 1rem;
  border-top: 1px solid var(--hairline);
  margin-top: 3rem;
}

.tag-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.tag-list a {
  font-family: var(--sans); font-size: 0.78rem; font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--hairline);
  padding: 0.35rem 0.8rem;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.tag-list a:hover { color: var(--accent); border-color: var(--accent); }

.post-views {
  font-family: var(--sans); font-size: 0.8rem; color: var(--muted);
  margin-top: 1.25rem;
}

/* Prev / next */
.post-navigation {
  max-width: 1180px;
  margin: clamp(2.5rem, 6vw, 4rem) auto 0;
  border-top: 1px solid var(--ink);
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.post-navigation .nav-item { padding: 1.75rem 0; }
.post-navigation .nav-next { text-align: right; border-left: 1px solid var(--hairline); padding-left: 2rem; }
.post-navigation .nav-previous { padding-right: 2rem; }

.post-navigation .nav-label {
  display: block;
  font-family: var(--sans); font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 0.5rem;
}

.post-navigation .nav-title {
  font-family: var(--display); font-size: 1.45rem; font-weight: 500; line-height: 1.2;
  transition: color 0.25s var(--ease);
}
.post-navigation a:hover .nav-title { color: var(--accent); }

@media (max-width: 640px) {
  .post-navigation { grid-template-columns: 1fr; }
  .post-navigation .nav-next { text-align: left; border-left: none; border-top: 1px solid var(--hairline); padding-left: 0; }
  .post-navigation .nav-previous { padding-right: 0; }
}

/* ------------------------------------------------------------------
   Comments
------------------------------------------------------------------ */
.comments-area { padding: clamp(2rem, 5vw, 3.5rem) 0; }

.comments-title {
  font-family: var(--display); font-style: italic; font-weight: 500;
  font-size: 1.5rem; border-top: 1px solid var(--ink); padding-top: 1rem;
}

.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .comment { border-bottom: 1px solid var(--hairline); padding: 1.5rem 0; }
.comment-list .children { list-style: none; padding-left: 2rem; }

.comment-author { font-family: var(--sans); font-weight: 600; font-size: 0.95rem; }
.comment-metadata { font-family: var(--sans); font-size: 0.78rem; color: var(--muted); margin-top: 0.15rem; }
.comment-content { margin-top: 0.75rem; }

.comment-form label {
  display: block;
  font-family: var(--sans); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea,
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea {
  width: 100%;
  font-family: var(--serif); font-size: 1rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--hairline);
  background: #fff;
  color: var(--ink);
  border-radius: 0;
  transition: border-color 0.25s var(--ease);
}

.comment-form input:focus, .comment-form textarea:focus,
.wpcf7 input:focus, .wpcf7 textarea:focus {
  outline: none; border-color: var(--ink);
}

.comment-form p { margin: 0 0 1.25rem; }

.button,
.comment-form .submit,
.wpcf7 input[type="submit"],
button[type="submit"].wp-block-search__button {
  display: inline-block;
  font-family: var(--sans); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--ink);
  padding: 0.85rem 1.9rem;
  cursor: pointer;
  border-radius: 0;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.15s var(--ease);
}

.button:hover,
.comment-form .submit:hover,
.wpcf7 input[type="submit"]:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.button:active,
.comment-form .submit:active,
.wpcf7 input[type="submit"]:active { transform: translateY(1px); }

/* ------------------------------------------------------------------
   Widgets (sidebar-compatible; used in footer columns)
------------------------------------------------------------------ */
.widget { font-family: var(--sans); font-size: 0.92rem; }

.widget-title {
  font-family: var(--sans); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  margin: 0 0 1.1rem;
}

.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 0.4rem 0; border-bottom: 1px solid var(--hairline); }
.widget li:last-child { border-bottom: none; }
.widget a { color: var(--ink-soft); transition: color 0.25s var(--ease); }
.widget a:hover { color: var(--accent); }

/* ------------------------------------------------------------------
   404 / no results
------------------------------------------------------------------ */
.no-results { padding: clamp(3rem, 8vw, 6rem) 0; max-width: 640px; }
.no-results h1 {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.08; margin: 0 0 1rem;
}
.no-results p { color: var(--ink-soft); margin: 0 0 2rem; }

/* ------------------------------------------------------------------
   Footer
------------------------------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--ink);
  margin-top: clamp(2rem, 5vw, 3rem);
  background: var(--paper);
}

.footer-brand { padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(1.5rem, 3vw, 2rem); }

.footer-wordmark {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(3rem, 9vw, 6.5rem);
  letter-spacing: -0.02em; line-height: 1;
  margin: 0 0 0.75rem;
}

.footer-tagline { color: var(--muted); font-style: italic; margin: 0; max-width: 52ch; }

.footer-widgets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  padding: clamp(2rem, 4vw, 3rem) 0;
}

@media (max-width: 820px) {
  .footer-widgets { grid-template-columns: 1fr; }
}

.footer-bottom {
  border-top: 1px solid var(--hairline);
  padding: 1.4rem 0;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  font-family: var(--sans); font-size: 0.8rem; color: var(--muted);
}

.footer-nav ul { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.footer-nav a { color: var(--muted); transition: color 0.25s var(--ease); }
.footer-nav a:hover { color: var(--accent); }

/* ------------------------------------------------------------------
   Reading progress (CSS scroll-driven, invisible where unsupported)
------------------------------------------------------------------ */
.reading-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 60;
  pointer-events: none;
}

@supports (animation-timeline: scroll()) {
  .reading-progress {
    animation: frames-progress linear forwards;
    animation-timeline: scroll(root);
  }
  @keyframes frames-progress {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
  }
}

/* ------------------------------------------------------------------
   Meta reading time
------------------------------------------------------------------ */
.meta-reading-time { margin-left: 1rem; color: var(--muted); }

/* ------------------------------------------------------------------
   Author note
------------------------------------------------------------------ */
.post-author-note {
  display: flex; gap: 1.1rem; align-items: flex-start;
  border-top: 1px solid var(--hairline);
  margin-top: 2rem; padding: 1.75rem 0 0.5rem;
}

.post-author-note img.avatar { border-radius: 0; width: 56px; height: 56px; }

.post-author-note-name {
  font-family: var(--sans); font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  margin: 0 0 0.35rem;
}

.post-author-note-bio {
  font-family: var(--sans); font-size: 0.9rem; line-height: 1.6;
  color: var(--muted); margin: 0; max-width: 52ch;
}

/* ------------------------------------------------------------------
   Recommended posts
------------------------------------------------------------------ */
.recommended-posts {
  max-width: 1180px;
  margin: clamp(3rem, 7vw, 5rem) auto 0;
}

.recommended-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.recommended-grid .post-card-title { font-size: 1.5rem; }

@media (max-width: 820px) {
  .recommended-grid { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------
   Subscribe band
------------------------------------------------------------------ */
.subscribe-band {
  border-top: 1px solid var(--ink);
  background: var(--paper-raised);
  padding: clamp(3rem, 7vw, 5rem) 0;
  text-align: center;
}

.subscribe-band .widget { max-width: 560px; margin: 0 auto; }

.subscribe-band .widget-title {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.005em; text-transform: none;
  margin: 0 0 0.75rem;
}

.subscribe-band p {
  color: var(--muted); font-family: var(--sans); font-size: 0.95rem;
}

.subscribe-band input[type="email"],
.subscribe-band input[type="text"] {
  width: 100%;
  font-family: var(--serif); font-size: 1.05rem;
  padding: 0.75rem 0.25rem;
  border: none; border-bottom: 1px solid var(--ink);
  background: transparent; color: var(--ink);
  border-radius: 0; text-align: center;
}

.subscribe-band input:focus { outline: none; border-bottom-color: var(--accent); }

.subscribe-band input[type="submit"],
.subscribe-band button[type="submit"] {
  margin-top: 1.25rem;
  display: inline-block;
  font-family: var(--sans); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--ink);
  padding: 0.85rem 2.2rem; cursor: pointer; border-radius: 0;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}

.subscribe-band input[type="submit"]:hover,
.subscribe-band button[type="submit"]:hover { background: var(--accent); border-color: var(--accent); }

/* ------------------------------------------------------------------
   Plugin friendliness
------------------------------------------------------------------ */
/* Jetpack / Powerkit share buttons inherit type */
.sharedaddy, .pk-share-buttons { font-family: var(--sans); }

/* SearchWP live results panel */
.searchwp-live-search-results {
  background: var(--paper) !important;
  border: 1px solid var(--hairline) !important;
  border-radius: 0 !important;
  box-shadow: 0 18px 40px rgba(25, 25, 23, 0.08) !important;
  font-family: var(--sans);
}

/* Elementor full-width template plays inside .site-main */
.page-template-template-full-width .site-main { max-width: none; padding: 0; }
