/*
Theme Name: Macabre Magazine™
Description: A typography-led horror magazine with an independent featured story and a 13-post latest section.
Version: 1.0.0
Requires at least: 6.2
Requires PHP: 7.4
Text Domain: macabre-magazine
*/

:root {
  --paper: #f4eee4;
  --ink: #201a17;
  --muted: #62524a;
  --accent: #741f2e;
  --line: #c6b6a6;
  --serif: Spectral, Georgia, serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.55 var(--serif); }
a { color: inherit; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
button, input { font: inherit; }
.wrap { width: min(1160px, calc(100% - 80px)); margin-inline: auto; }
.skip { position: absolute; left: 1rem; top: 1rem; transform: translateY(-180%); }
.skip:focus { transform: none; z-index: 2; background: var(--paper); padding: .5rem 1rem; }
.masthead { margin-top: 20px; border-top: 3px solid var(--ink); text-align: center; }
.masthead img { display: block; width: clamp(150px, 23vw, 238px); height: auto; margin: 9px auto 3px; }
h1 { margin: 0; }
.wordmark { display: inline-flex; flex-direction: column; position: relative; align-items: flex-start; text-transform: uppercase; margin: 0; line-height: .82; font-weight: 800; }
.macabre { font-size: clamp(2.15rem, 7.4vw, 5.6rem); letter-spacing: -.065em; }
.magazine { font-size: clamp(1.02rem, 3.4vw, 2.55rem); transform-origin: left; margin-top: .19em; font-weight: 700; }
.tm { font-family: var(--serif); position: absolute; left: calc(100% + .25em); bottom: .05em; font-size: clamp(.68rem, 1.6vw, 1rem); }
.navigation { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px clamp(12px, 3.3vw, 47px); border-block: 1px solid var(--ink); padding: 11px 0; }
.navigation a, .navigation summary { font-size: .84rem; font-weight: 700; letter-spacing: .105em; text-transform: uppercase; text-decoration: none; padding: 5px 2px; }
.navigation a:hover, .navigation summary:hover { color: var(--accent); text-decoration: underline; text-underline-offset: .25em; }
.navigation [aria-current] { color: var(--accent); }
.navigation details { position: relative; }
.navigation summary { cursor: pointer; }
.navigation form { position: absolute; right: 0; top: 100%; z-index: 1; width: min(16rem, 75vw); display: flex; background: var(--paper); border: 1px solid var(--line); padding: 8px; gap: 5px; }
.navigation input { width: 100%; min-width: 0; padding: 4px; }
.navigation button { color: var(--paper); background: var(--accent); border: 0; padding: 4px 10px; cursor: pointer; }
.featured { position: relative; isolation: isolate; overflow: hidden; display: grid; place-items: center; text-align: center; margin-top: 28px; padding: clamp(42px, 6vw, 85px) 26px; color: var(--paper); background: radial-gradient(ellipse at 50% 125%, #6c2631, #291820 66%, #1d1418); }
.featured::before { content: ""; position: absolute; inset: 9px; border: 1px solid #ddaf9c45; z-index: -1; }
.featured::after { content: ""; position: absolute; width: min(83%, 650px); aspect-ratio: 1; border-radius: 50%; border: 1px solid #ddaf9c25; top: 38%; left: 50%; transform: translateX(-50%); z-index: -1; }
.featured .eyebrow, .genre { font-size: .78rem; letter-spacing: .16em; font-weight: 700; text-transform: uppercase; }
.featured .eyebrow { margin: 0 0 24px; color: #efc1b0; }
.genre { margin: 0 0 8px; color: var(--accent); }
.feature .genre { color: #efc1b0; }
.story h2, .story h3 { margin: 0; line-height: 1.02; text-wrap: balance; font-weight: 700; letter-spacing: -.038em; }
.story h2 a, .story h3 a { text-decoration: none; }
.story h2 a:hover, .story h3 a:hover { text-decoration: underline; text-decoration-thickness: .045em; text-underline-offset: .13em; }
.feature h2 { font-size: clamp(2.85rem, 7.6vw, 6.4rem); }
.byline { font-style: italic; color: var(--muted); margin: 10px 0 0; }
.feature .byline { color: #eed8cd; }
.read { display: inline-block; margin-top: 22px; padding: 6px 0; border-bottom: 1px solid #efc1b0; text-decoration: none; font-weight: 600; }
.read span { margin-left: 6px; }
.latest { margin: clamp(36px, 5vw, 64px) 0 56px; }
.latest > h2 { margin: 0; font-size: clamp(1.9rem, 4.3vw, 3.25rem); font-weight: 700; line-height: 1.1; letter-spacing: -.04em; padding: 0 0 14px; border-bottom: 2px solid var(--ink); }
.lead { padding: clamp(24px, 4vw, 50px) 0; }
.lead h3 { font-size: clamp(2.3rem, 5.1vw, 4.3rem); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid .story { padding: 21px clamp(12px, 2.65vw, 31px) 25px; min-height: 155px; border-top: 1px solid var(--line); }
.grid .story + .story { border-left: 1px solid var(--line); }
.grid .story:nth-child(3n+1) { padding-left: 0; border-left: 0; }
.grid .story:nth-child(3n) { padding-right: 0; }
.grid h3 { font-size: clamp(1.4rem, 2.7vw, 2.2rem); }
.motto { margin: 18px 0 22px; color: var(--accent); font-size: clamp(.95rem, 2.4vw, 1.2rem); font-style: italic; }
.newsletter { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; border-block: 1px solid var(--ink); background: #eee3d5; padding: clamp(22px, 4vw, 42px); }
.newsletter h2 { margin: 0; line-height: 1.1; font-size: clamp(1.6rem, 3.5vw, 2.5rem); }
.newsletter p { margin: 8px 0 0; color: var(--muted); }
.subscribe { display: inline-block; padding: 11px 20px; background: var(--accent); color: var(--paper); text-decoration: none; font-weight: 700; }
.subscribe:hover { background: var(--ink); }
footer { padding-block: 28px 30px; color: var(--muted); }
.footer-main { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 18px 40px; padding-bottom: 22px; }
.footer-main nav { display: flex; flex-wrap: wrap; gap: 10px 23px; }
.footer-main h2 { margin: 0 0 4px; font-size: 1.2rem; color: var(--ink); }
.copyright { margin: 0; border-top: 1px solid var(--line); padding-top: 16px; font-size: .9rem; }
@media (max-width: 660px) {
  .wrap { width: calc(100% - 32px); }
  .masthead { margin-top: 12px; }
  .motto { margin: 15px 0 17px; }
  .navigation { column-gap: 14px; padding: 8px 0; }
  .navigation a, .navigation summary { font-size: .73rem; }
  .featured { margin-top: 18px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .grid .story:nth-child(n) { padding-inline: 0; border-left: 0; min-height: 0; }
  .grid h3 { font-size: 1.8rem; }
}

.brand { display: inline-block; text-decoration: none; }
.navigation .menu, .footer-main .menu {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: inherit;
  padding: 0;
  margin: 0;
}
.navigation .menu a { display: inline-block; }
.navigation .current-menu-item > a { color: var(--accent); }
.footer-main { padding-top: 24px; }
.latest > .section-title {
  margin: 0;
  font-size: clamp(1.9rem, 4.3vw, 3.25rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.04em;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--ink);
}
.lead h2 { font-size: clamp(2.3rem, 5.1vw, 4.3rem); }
.grid h2 { font-size: clamp(1.4rem, 2.7vw, 2.2rem); }
.story-image { width: 100%; height: auto; display: block; margin-bottom: 16px; }
.feature .story-image { max-width: 760px; max-height: 340px; object-fit: cover; }
.grid .story-image { aspect-ratio: 3 / 2; object-fit: cover; }
.lead .story-image { max-width: 760px; }
.reading { max-width: 760px; margin: clamp(36px, 7vw, 88px) auto; }
.reading h1 {
  font-size: clamp(2.45rem, 6vw, 4.65rem);
  line-height: 1.02;
  letter-spacing: -.035em;
  overflow-wrap: break-word;
}
.entry-header { border-bottom: 1px solid var(--line); padding-bottom: 22px; margin-bottom: 26px; }
.entry-image { width: 100%; height: auto; display: block; margin: 0 0 28px; }
.entry-content { font-size: clamp(1.12rem, 2.4vw, 1.32rem); line-height: 1.65; overflow-wrap: break-word; }
.entry-content img, .entry-content video, .entry-content iframe { max-width: 100%; }
.entry-content img, .entry-content video { height: auto; }
.entry-content blockquote { margin-inline: 0; padding-inline-start: 1em; border-inline-start: 3px solid var(--accent); }
.entry-content pre { overflow: auto; }
.entry-content a, .comments a { color: var(--accent); }
.pagination, .post-navigation, .comments { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 30px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 12px 22px; }
.page-numbers.current { color: var(--accent); font-weight: 700; }
input, button, textarea, select { font: inherit; }
textarea { max-width: 100%; }
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.screen-reader-text:focus { position: static; width: auto; height: auto; clip-path: none; }
@media (max-width: 660px) {
  .grid h2 { font-size: 1.8rem; }
  .navigation .menu { gap: 4px 14px; }
  .navigation form { right: auto; left: 50%; transform: translateX(-50%); }
}
