/*
Theme Name: Seventy-Three
Theme URI: https://73magazine.com
Author: COMPUTE! Publications, Inc.
Description: A faithful-retro WordPress theme for 73 Magazine — the revival of the amateur radio publication. Bold cover-blue masthead, "feedback card" numbered sections, and a homepage that both sells subscriptions and showcases content. Built as a classic PHP theme.
Version: 1.0.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: seventy-three
*/

/* ============================================================
   73 MAGAZINE — DESIGN TOKENS
   Palette drawn from the June 1990 (Issue #357) cover:
   saturated cover blue, "Ray Gun" yellow strip, section-flag red,
   aged newsprint paper, near-black ink.
   ============================================================ */
:root {
  --73-blue:      #1a3a8f;
  --73-blue-deep: #12285f;
  --73-blue-ink:  #0d1c47;
  --73-yellow:    #f5c518;
  --73-red:       #cc2229;
  --73-paper:     #f4f1e8;
  --73-paper-dk:  #e7e2d3;
  --73-ink:       #1a1a1a;
  --73-ink-soft:  #4a4a46;
  --73-line:      #c9c3b2;
  --73-white:     #ffffff;

  --font-display: "Arial Black", "Helvetica Neue", Impact, sans-serif;
  --font-slab:    Georgia, "Times New Roman", serif;
  --font-body:    Georgia, "Times New Roman", serif;
  --font-util:    "Courier New", ui-monospace, monospace;

  --wrap: 1180px;
  --gap: clamp(1rem, 2.5vw, 2rem);
  --radius: 0; /* period-correct: no rounded corners */
}

/* ============================================================
   RESET / 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: .001ms !important; transition-duration: .001ms !important; }
}
body {
  margin: 0;
  background: var(--73-paper);
  color: var(--73-ink);
  font-family: var(--font-body);
  font-size: 1.02rem;
  line-height: 1.6;
  /* subtle newsprint tooth */
  background-image:
    repeating-linear-gradient(0deg, rgba(0,0,0,.012) 0 1px, transparent 1px 3px);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--73-blue); text-underline-offset: 2px; }
a:hover { color: var(--73-red); }
:focus-visible { outline: 3px solid var(--73-yellow); outline-offset: 2px; }

.wrap { width: min(var(--wrap), 92vw); margin-inline: auto; }
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--73-yellow);
  color: var(--73-ink); padding: .6rem 1rem; font-family: var(--font-util); z-index: 999;
}
.skip-link:focus { left: 0; }

/* ============================================================
   FEEDBACK-CARD EYEBROW — the theme signature.
   Echoes "Number X on your Feedback card" from the print issue,
   repurposed as real section numbering.
   ============================================================ */
.fb-eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-util);
  font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--73-blue-deep);
  margin: 0 0 .5rem;
}
.fb-eyebrow .fb-num {
  background: var(--73-red); color: var(--73-white);
  padding: .12rem .5rem; font-weight: 700;
}
.fb-eyebrow .fb-label { border-bottom: 2px solid var(--73-ink); padding-bottom: .05rem; }

/* ============================================================
   MASTHEAD / HEADER
   ============================================================ */
.site-header { background: var(--73-blue); color: var(--73-white); border-bottom: 4px solid var(--73-yellow); }
.masthead {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--gap); padding: 1.1rem 0;
}
.mast-lockup { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--73-white); }
.mast-73 {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(3rem, 8vw, 5.25rem);
  line-height: .8; letter-spacing: -.04em;
  color: var(--73-white);
  text-shadow: 3px 3px 0 var(--73-blue-ink);
}
.mast-word { display: flex; flex-direction: column; line-height: .92; }
.mast-word b {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 3vw, 1.9rem);
  letter-spacing: .01em; text-transform: uppercase;
}
.mast-word span {
  font-family: var(--font-util);
  font-size: .68rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--73-yellow);
}
.mast-meta { text-align: right; font-family: var(--font-util); font-size: .72rem; letter-spacing: .08em; color: rgba(255,255,255,.85); }
.mast-meta strong { color: var(--73-yellow); }

/* primary nav */
.primary-nav { background: var(--73-blue-deep); }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.primary-nav a {
  display: block; color: var(--73-white); text-decoration: none;
  font-family: var(--font-util); text-transform: uppercase;
  font-size: .78rem; letter-spacing: .1em; padding: .7rem 1rem;
  border-right: 1px solid rgba(255,255,255,.12);
}
.primary-nav a:hover, .primary-nav .current-menu-item > a { background: var(--73-yellow); color: var(--73-ink); }
.nav-toggle { display: none; }

/* ============================================================
   HERO — subscription + pre-order call, the page's first job
   ============================================================ */
.hero { background: var(--73-blue); color: var(--73-white); padding: clamp(2rem, 5vw, 3.5rem) 0; border-bottom: 6px solid var(--73-yellow); }
.hero-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--gap); align-items: center; }
.hero-kicker {
  display: inline-block; background: var(--73-red); color: #fff;
  font-family: var(--font-util); text-transform: uppercase; letter-spacing: .14em;
  font-size: .74rem; padding: .3rem .7rem; margin-bottom: 1rem;
}
.hero h1 {
  font-family: var(--font-display); font-style: italic;
  font-size: clamp(2rem, 5.5vw, 3.4rem); line-height: .98; margin: 0 0 .8rem;
  text-shadow: 2px 2px 0 var(--73-blue-ink);
}
.hero p.lede { font-size: 1.15rem; max-width: 34ch; color: rgba(255,255,255,.92); margin: 0 0 1.5rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; }
.btn {
  display: inline-block; font-family: var(--font-util); text-transform: uppercase;
  letter-spacing: .08em; font-size: .82rem; font-weight: 700;
  padding: .85rem 1.4rem; text-decoration: none; border: 2px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--73-yellow); color: var(--73-ink); border-color: var(--73-yellow); }
.btn-primary:hover { background: #fff; color: var(--73-ink); border-color:#fff; }
.btn-ghost { background: transparent; color: #fff; border-color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--73-blue); }

/* cover card in hero */
.hero-cover {
  background: var(--73-blue-deep); border: 3px solid var(--73-yellow);
  padding: 1.2rem; box-shadow: 8px 8px 0 var(--73-blue-ink);
}
.hero-cover .cov-top { display:flex; align-items:baseline; gap:.4rem; }
.hero-cover .cov-73 { font-family: var(--font-display); font-style: italic; font-size: 2.6rem; line-height:.8; }
.hero-cover .cov-word { font-family: var(--font-display); font-size: .95rem; text-transform: uppercase; line-height:.95; }
.hero-cover ul { list-style: none; margin: 1rem 0 0; padding: 0; }
.hero-cover li { font-family: var(--font-slab); font-style: italic; padding: .35rem 0; border-top: 1px dashed rgba(255,255,255,.25); color: var(--73-yellow); }
.hero-cover li:first-child { border-top: 0; }

/* ============================================================
   SECTION SCAFFOLD
   ============================================================ */
.section { padding: clamp(2rem, 4vw, 3.25rem) 0; }
.section + .section { border-top: 2px solid var(--73-line); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; border-bottom: 3px solid var(--73-ink); padding-bottom: .6rem; }
.section-head h2 { font-family: var(--font-display); font-size: clamp(1.4rem, 3.2vw, 2.1rem); margin: 0; text-transform: uppercase; letter-spacing: -.01em; }
.section-head .more { font-family: var(--font-util); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; white-space: nowrap; }

/* ============================================================
   ARTICLE GRID (content showcase)
   ============================================================ */
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.card { background: var(--73-white); border: 2px solid var(--73-ink); display: flex; flex-direction: column; }
.card .thumb {
  aspect-ratio: 16/10; border-bottom: 2px solid var(--73-ink);
  background: var(--73-blue) center/cover;
  /* halftone dot texture as a graceful placeholder before a featured image is set */
  background-image:
    radial-gradient(var(--73-blue-deep) 22%, transparent 23%),
    radial-gradient(var(--73-blue-deep) 22%, transparent 23%);
  background-size: 12px 12px; background-position: 0 0, 6px 6px;
  position: relative;
}
.card .thumb::after {
  content: "73"; position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-display); font-style: italic; font-size: 2.4rem;
  color: rgba(255,255,255,.35);
}
/* when a real featured image is present, cover the texture */
.card .thumb[style*="url"] { background-image: none; }
.card .thumb[style*="url"]::after { content: none; }
.card .card-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap:.4rem; flex: 1; }
.card h3 { font-family: var(--font-slab); font-size: 1.22rem; line-height: 1.15; margin: 0; }
.card h3 a { text-decoration: none; color: var(--73-ink); }
.card h3 a:hover { color: var(--73-blue); }
.card .excerpt { font-size: .95rem; color: var(--73-ink-soft); margin: 0; }
.card .byline { margin-top: auto; font-family: var(--font-util); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--73-blue-deep); }

/* department strip */
.dept-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; }
.dept {
  background: var(--73-blue); color: #fff; text-decoration: none;
  padding: 1rem; border: 2px solid var(--73-blue-ink);
  display: flex; flex-direction: column; gap:.3rem;
}
.dept:hover { background: var(--73-yellow); color: var(--73-ink); }
.dept b { font-family: var(--font-display); text-transform: uppercase; font-size: 1rem; letter-spacing: .02em; }
.dept span { font-family: var(--font-util); font-size: .72rem; opacity: .9; }

/* ============================================================
   SUBSCRIBE / PRE-ORDER BLOCK
   ============================================================ */
.subscribe { background: var(--73-blue-deep); color: #fff; border-block: 6px solid var(--73-yellow); }
.subscribe .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: center; }
.subscribe h2 { font-family: var(--font-display); font-style: italic; font-size: clamp(1.8rem, 4vw, 2.8rem); margin: 0 0 .6rem; }
.subscribe p { color: rgba(255,255,255,.9); max-width: 42ch; }
.plan { background: var(--73-blue); border: 3px solid var(--73-yellow); padding: 1.5rem; }
.plan .price { font-family: var(--font-display); font-size: 2.8rem; line-height:1; }
.plan .price small { font-size: .95rem; font-family: var(--font-util); }
.plan ul { list-style: none; margin: 1rem 0; padding: 0; }
.plan li { padding: .4rem 0; border-top: 1px dashed rgba(255,255,255,.25); font-family: var(--font-slab); }
.plan li::before { content: "73  "; font-family: var(--font-display); font-style: italic; color: var(--73-yellow); }

/* ============================================================
   POST / PAGE CONTENT
   ============================================================ */
.post-header { background: var(--73-blue); color:#fff; padding: clamp(2rem,4vw,3rem) 0; border-bottom: 5px solid var(--73-yellow); }
.post-header h1 { font-family: var(--font-display); font-size: clamp(1.8rem, 5vw, 3rem); margin:.3rem 0 .5rem; line-height:1.02; }
.post-header .meta { font-family: var(--font-util); font-size:.78rem; letter-spacing:.08em; color: var(--73-yellow); text-transform: uppercase; }
.entry { max-width: 70ch; margin-inline:auto; padding: clamp(1.5rem,3vw,2.5rem) 0; }
.entry p, .entry li { font-size: 1.08rem; }
.entry h2 { font-family: var(--font-display); text-transform: uppercase; font-size: 1.5rem; margin-top: 2rem; border-bottom: 2px solid var(--73-ink); padding-bottom: .3rem; }
.entry h3 { font-family: var(--font-slab); font-weight: 700; font-size: 1.25rem; margin-top: 1.6rem; }
.entry blockquote {
  border-left: 5px solid var(--73-red); margin: 1.5rem 0; padding: .5rem 1.2rem;
  font-family: var(--font-slab); font-style: italic; font-size: 1.2rem; background: var(--73-paper-dk);
}
.entry img { border: 2px solid var(--73-ink); margin: 1.2rem 0; }
.entry a { text-decoration: underline; }

/* pull columns for that magazine density on wide posts */
.entry .wp-block-columns { gap: 2rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--73-ink); color: #e9e6dc; margin-top: 3rem; padding: 2.5rem 0 3rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--gap); }
.site-footer h4 { font-family: var(--font-display); text-transform: uppercase; color: var(--73-yellow); font-size: 1rem; margin: 0 0 .6rem; }
.site-footer a { color: #e9e6dc; }
.site-footer a:hover { color: var(--73-yellow); }
.footer-73 { font-family: var(--font-display); font-style: italic; font-size: 3rem; line-height:.8; color: var(--73-white); }
.footer-legal { margin-top: 2rem; border-top: 1px solid #3a3a37; padding-top: 1rem; font-family: var(--font-util); font-size: .72rem; color: #a5a29a; }
.footer-legal .tm { color: var(--73-yellow); }

/* ============================================================
   WIDGETS / MISC
   ============================================================ */
.widget { margin-bottom: 1.5rem; }
.widget-title { font-family: var(--font-display); text-transform: uppercase; font-size: 1.05rem; border-bottom: 2px solid var(--73-ink); padding-bottom:.3rem; }
.pagination { display:flex; gap:.5rem; flex-wrap:wrap; margin: 2rem 0; }
.pagination a, .pagination span {
  font-family: var(--font-util); padding:.5rem .9rem; border:2px solid var(--73-ink);
  text-decoration:none; background:#fff;
}
.pagination .current { background: var(--73-blue); color:#fff; border-color: var(--73-blue); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .subscribe .wrap { grid-template-columns: 1fr; }
  .article-grid { grid-template-columns: repeat(2, 1fr); }
  .dept-strip { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .article-grid { grid-template-columns: 1fr; }
  .masthead { flex-direction: column; align-items: flex-start; gap: .6rem; }
  .mast-meta { text-align: left; }
  .nav-toggle {
    display: block; background: var(--73-yellow); color: var(--73-ink); border: 0;
    font-family: var(--font-util); text-transform: uppercase; letter-spacing:.1em;
    padding: .7rem 1rem; width: 100%; text-align: left; cursor: pointer; font-weight:700;
  }
  .primary-nav ul { display: none; flex-direction: column; }
  .primary-nav.open ul { display: flex; }
  .primary-nav a { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.12); }
}

/* ============================================================
   BLOCK-PATTERN CONTAINMENT
   Patterns use core group/columns wrappers, which otherwise run
   edge-to-edge. Constrain their inner containers to the same
   centered column the .wrap helper uses, and restore the section
   padding/coloring the hand-coded fallback had.
   ============================================================ */

/* Constrain the inner container of every 73 pattern section */
.hero > .wp-block-group__inner-container,
.section.wp-block-group > .wp-block-group__inner-container,
.subscribe.wp-block-group > .wp-block-group__inner-container {
  width: min(var(--wrap), 92vw);
  margin-inline: auto;
}

/* The hero group carries color/padding via .hero already; make sure the
   full-bleed background still spans edge-to-edge while content centers. */
.hero.wp-block-group,
.subscribe.wp-block-group {
  padding-inline: 0;
}

/* Hero pattern: match the two-column proportions + cover-card styling */
.hero .hero-grid.wp-block-columns { align-items: center; gap: var(--gap); }
.hero .hero-cover.wp-block-column {
  background: var(--73-blue-deep);
  border: 3px solid var(--73-yellow);
  padding: 1.2rem 1.4rem;
  box-shadow: 8px 8px 0 var(--73-blue-ink);
}
.hero .hero-cover.wp-block-column p strong { color: #fff; font-family: var(--font-display); text-transform: uppercase; letter-spacing:.03em; }
.hero .hero-cover.wp-block-column ul { list-style: none; margin: .8rem 0 0; padding: 0; }
.hero .hero-cover.wp-block-column li {
  font-family: var(--font-slab); font-style: italic; color: var(--73-yellow);
  padding: .35rem 0; border-top: 1px dashed rgba(255,255,255,.25);
}
.hero .hero-cover.wp-block-column li:first-child { border-top: 0; }

/* Departments pattern: restyle core columns into the tile strip */
.dept-strip.wp-block-columns { gap: .8rem; }
.dept-strip .dept.wp-block-column {
  background: var(--73-blue); color: #fff; border: 2px solid var(--73-blue-ink);
  padding: 1rem; flex-basis: 0; flex-grow: 1;
}
.dept-strip .dept.wp-block-column p { margin: 0; }
.dept-strip .dept.wp-block-column strong {
  font-family: var(--font-display); text-transform: uppercase; font-size: 1rem;
  display: block; margin-bottom: .2rem;
}

/* Subscribe pattern: restore the plan-card styling on the core column */
.subscribe .plan.wp-block-column {
  background: var(--73-blue); border: 3px solid var(--73-yellow); padding: 1.5rem;
}
.subscribe .plan .price { font-family: var(--font-display); font-size: 2.8rem; line-height: 1; margin: 0; }
.subscribe .plan .price small { font-size: .95rem; font-family: var(--font-util); }
.subscribe .plan ul { list-style: none; margin: 1rem 0; padding: 0; }
.subscribe .plan li { padding: .4rem 0; border-top: 1px dashed rgba(255,255,255,.25); font-family: var(--font-slab); }
.subscribe .plan li::before { content: "73  "; font-family: var(--font-display); font-style: italic; color: var(--73-yellow); }

/* Buttons inside patterns: neutralize core button chrome so our .btn shows */
.hero .wp-block-button.btn .wp-block-button__link,
.subscribe .wp-block-button.btn .wp-block-button__link {
  background: transparent; border-radius: 0; padding: 0; color: inherit;
}
.wp-block-button.btn-primary .wp-block-button__link { background: var(--73-yellow); color: var(--73-ink); }
.wp-block-button.btn-ghost .wp-block-button__link { background: transparent; color:#fff; border: 2px solid #fff; }
