/*
Theme Name: Spinzer Journal
Theme URI: https://spinzer.us/
Author: Christopher Tock & Maya
Description: A personal editorial archive for Spinzer.us.
Version: 0.1.0
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: spinzer-journal
*/

:root {
  --ink: #14213d;
  --ink-soft: #40506b;
  --paper: #fffdf8;
  --canvas: #edf6f8;
  --card: rgba(255,255,255,.88);
  --coral: #f06449;
  --sun: #f7b32b;
  --sky: #3a86ff;
  --mint: #2a9d8f;
  --plum: #7657c8;
  --line: rgba(20,33,61,.12);
  --shadow: 0 24px 70px rgba(20,33,61,.12);
  --radius: 24px;
  --wrap: min(1180px, calc(100% - 40px));
}

* { box-sizing: border-box; }
html { max-width: 100%; scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 5%, rgba(247,179,43,.16), transparent 28rem),
    radial-gradient(circle at 90% 18%, rgba(58,134,255,.13), transparent 30rem),
    var(--canvas);
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  max-width: 100%;
  overflow-x: hidden;
  overflow-wrap: anywhere;
}
a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .16em; }
a:hover { color: var(--coral); }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea { font: inherit; }
.wrap { width: calc(100% - 40px); max-width: 1180px; margin-inline: auto; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 1000; padding: 12px 18px; background: var(--ink); color: #fff; }
.skip-link:focus { top: 20px; }
.eyebrow { margin: 0 0 8px; color: var(--coral); font-size: .76rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.section-title { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 5vw, 4rem); line-height: .98; letter-spacing: -.045em; }
.section-heading { display: flex; gap: 24px; align-items: end; justify-content: space-between; margin: 72px 0 26px; }
.section-heading p { max-width: 38rem; margin: 0; color: var(--ink-soft); }
.button { display: inline-flex; align-items: center; gap: 9px; border-radius: 999px; padding: 12px 19px; border: 1px solid var(--line); background: #fff; font-weight: 750; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.button:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(20,33,61,.12); }

/* Masthead */
.site-header { position: relative; padding: 24px 0 0; }
.utility-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--ink-soft); font-size: .82rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.utility-links { display: flex; gap: 14px; flex-wrap: wrap; }
.utility-links a { text-decoration: none; }
.brand { padding: 52px 0 42px; text-align: center; }
.brand-mark { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-dot { width: 13px; height: 13px; border-radius: 50%; background: var(--coral); box-shadow: 19px 0 0 var(--sun), 38px 0 0 var(--sky); margin-right: 38px; }
.brand-name { font-family: Georgia, "Times New Roman", serif; font-size: clamp(3.4rem, 9vw, 7.8rem); line-height: .78; letter-spacing: -.075em; }
.brand-tagline { max-width: 520px; margin: 20px auto 0; color: var(--ink-soft); font-size: clamp(.9rem, 2vw, 1.06rem); }
.main-nav { position: sticky; top: 0; z-index: 50; border-block: 1px solid var(--line); background: rgba(237,246,248,.86); backdrop-filter: blur(16px); }
.nav-inner { display: flex; min-height: 58px; align-items: center; justify-content: center; }
.menu { display: flex; gap: clamp(16px, 4vw, 42px); align-items: center; margin: 0; padding: 0; list-style: none; }
.menu a { font-size: .84rem; font-weight: 800; letter-spacing: .07em; text-decoration: none; text-transform: uppercase; }
.nav-toggle { display: none; border: 0; background: transparent; font-weight: 800; }

/* Homepage */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.68fr) minmax(280px, .72fr); gap: 24px; margin-top: 38px; }
.hero-card, .ranked, .post-card, .now-card, .article-shell { background: var(--card); border: 1px solid rgba(255,255,255,.78); box-shadow: var(--shadow); }
.hero-card { position: relative; min-height: 590px; overflow: hidden; border-radius: 32px; background: var(--ink); color: #fff; }
.hero-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .73; transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.hero-card:hover img { transform: scale(1.035); }
.hero-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 25%, rgba(9,20,42,.9)); }
.hero-copy { position: absolute; z-index: 2; left: clamp(24px, 5vw, 54px); right: clamp(24px, 5vw, 54px); bottom: clamp(28px, 6vw, 58px); }
.hero-copy h1 { max-width: 760px; margin: 14px 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.45rem, 6vw, 5.7rem); line-height: .95; letter-spacing: -.055em; }
.hero-copy h1 a { text-decoration: none; }
.hero-excerpt { max-width: 620px; margin: 0; color: rgba(255,255,255,.84); }
.meta { display: flex; gap: 10px 16px; align-items: center; flex-wrap: wrap; color: inherit; font-size: .8rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.category-pill { display: inline-flex; padding: 6px 11px; border-radius: 999px; background: var(--coral); color: #fff !important; font-size: .7rem; font-weight: 850; letter-spacing: .09em; text-decoration: none; text-transform: uppercase; }
.category-pill:nth-child(2n) { background: var(--sky); }
.ranked { padding: 28px; border-radius: 32px; }
.ranked h2 { margin: 0 0 18px; font-family: Georgia, "Times New Roman", serif; font-size: 1.8rem; }
.ranked-item { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; padding: 19px 0; border-top: 1px solid var(--line); }
.ranked-item > div { min-width: 0; }
.ranked-number { color: var(--coral); font-family: Georgia, serif; font-size: 2rem; line-height: 1; }
.ranked-item h3 { margin: 0 0 6px; font-size: 1rem; line-height: 1.25; }
.ranked-item a { text-decoration: none; }
.ranked-date { color: var(--ink-soft); font-size: .74rem; font-weight: 700; }
.now-card { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; margin-top: 24px; padding: 30px 34px; border-radius: var(--radius); }
.now-orb { display: grid; width: 64px; aspect-ratio: 1; place-items: center; border-radius: 50%; background: var(--sun); font-family: Georgia, serif; font-size: 1.4rem; font-style: italic; }
.now-card h2 { margin: 0; font-size: 1.15rem; }
.now-card p { margin: 3px 0 0; color: var(--ink-soft); }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card { overflow: hidden; border-radius: var(--radius); transition: transform .24s ease, box-shadow .24s ease; }
.post-card:hover { transform: translateY(-5px); box-shadow: 0 30px 80px rgba(20,33,61,.17); }
.post-card:nth-child(5n+2) .card-image { background: #e5f0ff; }
.post-card:nth-child(5n+3) .card-image { background: #fff0d6; }
.card-image { display: block; aspect-ratio: 4/3; overflow: hidden; background: #dcefea; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.post-card:hover img { transform: scale(1.045); }
.card-body { padding: 24px; }
.card-body h2, .card-body h3 { margin: 10px 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.35rem, 2.5vw, 2rem); line-height: 1.08; letter-spacing: -.025em; }
.card-body h2 a, .card-body h3 a { text-decoration: none; }
.card-body p { margin: 0; color: var(--ink-soft); font-size: .94rem; }
.card-footer { margin-top: 18px; color: var(--ink-soft); font-size: .72rem; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.archive-years { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 30px; }
.archive-years a { border: 1px solid var(--line); border-radius: 999px; padding: 8px 13px; background: rgba(255,255,255,.55); font-size: .78rem; font-weight: 800; text-decoration: none; }

/* Interior */
.page-shell { padding: 60px 0 90px; }
.page-intro { max-width: 820px; margin-bottom: 38px; }
.article-shell { max-width: 930px; margin: 42px auto 90px; overflow: hidden; border-radius: 32px; }
.article-hero img { width: 100%; max-height: 620px; object-fit: cover; }
.article-header, .article-content { padding-inline: clamp(24px, 7vw, 84px); }
.article-header { padding-top: clamp(34px, 7vw, 72px); }
.article-header h1 { margin: 15px 0 20px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.6rem, 7vw, 5.8rem); line-height: .94; letter-spacing: -.055em; }
.article-content { padding-top: 30px; padding-bottom: 72px; }
.article-content > * { max-width: 720px; margin-inline: auto; }
.article-content > .alignwide { max-width: 1040px; }
.article-content > .alignfull { max-width: none; margin-inline: calc(clamp(24px, 7vw, 84px) * -1); }
.article-content p { margin-block: 0 1.5em; }
.article-content h2, .article-content h3 { margin-top: 1.8em; font-family: Georgia, serif; line-height: 1.08; }
.article-content blockquote { border-left: 5px solid var(--sun); padding-left: 24px; color: var(--ink-soft); font-family: Georgia, serif; font-size: 1.35rem; }
.article-content img { border-radius: 14px; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 26px clamp(24px, 7vw, 84px) 50px; border-top: 1px solid var(--line); }
.post-nav a { font-weight: 800; text-decoration: none; }
.navigation.pagination { margin-top: 38px; }
.nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.page-numbers { display: grid; min-width: 42px; height: 42px; place-items: center; border-radius: 50%; background: #fff; text-decoration: none; }
.page-numbers.current { background: var(--ink); color: #fff; }

/* Footer */
.site-footer { padding: 72px 0 34px; background: var(--ink); color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: end; }
.footer-title { margin: 0; font-family: Georgia, serif; font-size: clamp(2.8rem, 7vw, 6rem); line-height: .9; letter-spacing: -.055em; }
.footer-copy { color: rgba(255,255,255,.67); }
.footer-bottom { display: flex; justify-content: space-between; gap: 24px; margin-top: 58px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.14); color: rgba(255,255,255,.58); font-size: .78rem; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 900px) {
  .hero-grid, .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-card, .ranked, .now-card { min-width: 0; width: 100%; }
  .hero-card { min-height: 520px; }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .now-card { grid-template-columns: auto 1fr; }
  .now-card .button { grid-column: 1 / -1; justify-content: center; }
}
@media (max-width: 650px) {
  :root { --wrap: min(calc(100% - 24px), 1180px); --radius: 20px; }
  body { font-size: 16px; }
  .wrap { width: calc(100% - 24px); max-width: none; }
  .utility-row { justify-content: center; }
  .utility-row > span { display: none; }
  .brand { padding: 40px 0 34px; }
  .brand-name { font-size: clamp(3.3rem, 17vw, 4rem); }
  .brand-tagline { max-width: calc(100% - 24px); white-space: normal; overflow-wrap: anywhere; }
  .main-nav { position: relative; }
  .nav-inner { justify-content: stretch; }
  .nav-toggle { display: flex; width: 100%; min-height: 54px; align-items: center; justify-content: space-between; }
  .main-nav .menu { display: none; width: 100%; padding: 12px 0 20px; flex-direction: column; align-items: flex-start; }
  .main-nav.is-open .menu { display: flex; }
  .nav-inner { flex-direction: column; align-items: stretch; }
  .hero-grid { margin-top: 20px; }
  .hero-card { min-height: 470px; border-radius: 24px; }
  .hero-copy h1 { max-width: 100%; font-size: 2rem; }
  .hero-copy h1 a, .ranked-item h3 a { display: block; max-width: 100%; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
  .hero-excerpt { display: none; }
  .post-grid { grid-template-columns: 1fr; }
  .section-heading { display: block; margin-top: 56px; }
  .section-heading p { margin-top: 14px; }
  .now-card { padding: 24px; }
  .article-shell { margin: 20px 12px 60px; border-radius: 22px; }
  .post-nav { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
