/*
Theme Name: SCM BLOG
Theme URI: https://better.subculturemedia.net
Author: SubCulture Media
Author URI: https://subculturemedia.net
Description: SubCulture Media blog theme. Built for a branded match to the primary HubSpot website at subculturemedia.net.
Version: 1.2
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: scm-blog
Tags: blog, one-column, custom-menu, featured-images, threaded-comments
*/

/* ---------- Design tokens ---------- */
:root {
  --nav: #1a0d24;
  --nav-foreground: #f5f4f7;
  --hero: #9dd7dd;
  --accent: #437292;
  --accent-soft: #99acc2;
  --callout-bg: #f7f9fb;
  --pink: #f7b2be;
  --surface: #f4f5f8;
  --surface-fg: #14121a;
  --muted-fg: #5a5766;
  --border: #e5e7eb;
  --bg: #000000;
  --fg: #ffffff;
  --radius: 12px;
  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}


/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-serif); margin: 0 0 .5rem; line-height: 1.2; }

.container { max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ---------- Header ---------- */
.site-header { background: var(--nav); color: var(--nav-foreground); }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 0; }
.site-header .brand { display: flex; align-items: center; gap: .75rem; }
.site-header .brand img { height: 48px; width: 48px; border-radius: 8px; object-fit: cover; }
.site-nav { display: none; align-items: center; gap: 2rem; font-size: .875rem; }
@media (min-width: 768px) { .site-nav { display: flex; } }
.site-nav a { transition: color .2s; }
.site-nav a:hover { color: var(--hero); }
.book-call {
  border: 1px solid rgba(157,215,221,.6);
  color: var(--hero);
  padding: .5rem 1.25rem;
  border-radius: 9999px;
  transition: background .2s, color .2s;
}
.book-call:hover { background: var(--hero); color: var(--nav); }

/* Dropdowns (CSS only) */
.nav-dropdown,
.site-nav-list > .menu-item-has-children { position: relative; }
.nav-dropdown > button {
  background: none; border: 0; color: inherit; font: inherit;
  display: inline-flex; align-items: center; gap: .25rem; cursor: pointer; padding: 0;
}
.nav-dropdown > button:focus { outline: none; }
.nav-dropdown > button:focus-visible { outline: 2px solid var(--hero); outline-offset: 6px; border-radius: 4px; }
.nav-dropdown > button .chev { transition: transform .2s; display: inline-block; }
.nav-dropdown:hover > button,
.site-nav-list > .menu-item-has-children:hover > a { color: var(--hero); }
.nav-dropdown:hover > button .chev { transform: rotate(180deg); }
.nav-dropdown::after,
.site-nav-list > .menu-item-has-children::after {
  content: "";
  position: absolute;
  left: -0.75rem;
  right: -0.75rem;
  top: 100%;
  height: .75rem;
  display: none;
}
.nav-dropdown:hover::after,
.site-nav-list > .menu-item-has-children:hover::after { display: block; }
.nav-menu,
.site-nav-list .sub-menu {
  position: absolute; left: 0; top: calc(100% + .75rem); margin-top: 0;
  min-width: 18rem; background: var(--nav);
  border: 1px solid rgba(157,215,221,.2);
  border-radius: 8px; overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  pointer-events: none;
  z-index: 50;
  list-style: none; padding: .25rem 0;
  transition: opacity .14s ease, transform .14s ease, visibility .14s ease;
}
.nav-dropdown:hover,
.site-nav-list > .menu-item-has-children:hover { z-index: 70; }
.nav-dropdown:hover .nav-menu,
.site-nav-list > .menu-item-has-children:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.nav-menu a,
.site-nav-list .sub-menu a { display: block; padding: .625rem 1rem; font-size: .875rem; transition: background .2s, color .2s; white-space: nowrap; }
.nav-menu a:hover,
.site-nav-list .sub-menu a:hover { background: rgba(157,215,221,.1); color: var(--hero); }
.site-nav-list { display: flex; align-items: center; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.site-nav-list li { margin: 0; }

/* ---------- Hero ---------- */
.blog-hero { background: #9dd7dd; padding: 5rem 0; text-align: center; }
.blog-hero h1 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 1.05;
  color: var(--nav);
  letter-spacing: -0.02em;
}
.blog-hero .search { max-width: 32rem; margin: 2rem auto 0; }
.blog-hero .search input {
  width: 100%; padding: .875rem 1.25rem; border-radius: 9999px;
  border: 1px solid rgba(0,0,0,.1); background: #fff;
  color: var(--surface-fg); font-size: 1rem; outline: none;
}
.blog-hero .search input:focus { border-color: var(--nav); }

/* ---------- Topics bar ---------- */
.topics { padding: 2rem 0 1rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.topics ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.topics a {
  display: inline-block; padding: .375rem .875rem; border-radius: 9999px;
  background: rgba(255,255,255,.05); color: var(--fg); font-size: .875rem;
  transition: background .2s, color .2s;
}
.topics a:hover, .topics a.active { background: var(--hero); color: var(--nav); }

/* ---------- Featured ---------- */
.featured { padding: 3rem 0; }
.featured .grid { display: grid; grid-template-columns: 1fr; gap: 2rem; background: var(--surface); color: var(--surface-fg); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 900px) { .featured .grid { grid-template-columns: 1.1fr 1fr; } }
.featured .thumb { aspect-ratio: 4/3; overflow: hidden; }
.featured .thumb img { width: 100%; height: 100%; object-fit: cover; }
.featured .body { padding: 2.5rem; display: flex; flex-direction: column; justify-content: center; }
.featured .eyebrow { color: var(--accent); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; margin-bottom: .75rem; }
.featured h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
.featured .excerpt { color: var(--muted-fg); margin: 1rem 0 1.5rem; }
.featured .meta { color: var(--muted-fg); font-size: .875rem; }
.featured .meta a { color: var(--accent); font-weight: 500; }

/* ---------- Post grid ---------- */
.post-grid { padding: 2rem 0 4rem; display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 700px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .post-grid { grid-template-columns: repeat(3, 1fr); } }
.post-card { background: var(--surface); color: var(--surface-fg); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s; }
.post-card:hover { transform: translateY(-4px); }
.post-card .thumb { aspect-ratio: 16/10; overflow: hidden; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .body { padding: 1.5rem; display: flex; flex-direction: column; gap: .75rem; flex: 1; }
.post-card .eyebrow { color: var(--accent); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }
.post-card h3 { font-size: 1.25rem; line-height: 1.3; }
.post-card .meta { color: var(--muted-fg); font-size: .8125rem; margin-top: auto; }
.post-card .meta a { color: var(--accent); }

/* ---------- Pagination ---------- */
.pagination { display: flex; justify-content: center; gap: .5rem; padding: 2rem 0 4rem; }
.pagination a, .pagination span {
  padding: .5rem 1rem; border-radius: 6px; background: rgba(255,255,255,.05);
  color: var(--fg); font-size: .875rem;
}
.pagination .current { background: var(--hero); color: var(--nav); }
.pagination a:hover { background: rgba(157,215,221,.2); }

/* ---------- Single ---------- */
.article-wrap { padding: 3rem 0 5rem; }
.article {
  background: var(--surface); color: var(--surface-fg);
  border-radius: var(--radius); overflow: hidden; max-width: 52rem; margin: 0 auto;
}
.article .hero-image { aspect-ratio: 16/9; overflow: hidden; }
.article .hero-image img { width: 100%; height: 100%; object-fit: cover; }
.article .inner { padding: 2.5rem clamp(1.5rem, 4vw, 3.5rem) 3.5rem; }
.article .eyebrow { color: var(--accent); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; margin-bottom: 1rem; }
.article h1 { font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.1; margin-bottom: 1.25rem; }
.article .meta { color: var(--muted-fg); font-size: .9375rem; margin-bottom: 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--border); }
.article .meta a { color: var(--accent); font-weight: 500; }
.post-content { font-size: 1.125rem; line-height: 1.75; }
.post-content > * + * { margin-top: 1.25rem; }
.post-content h2 { font-family: var(--font-serif); font-size: 2.25rem; font-weight: 700; margin-top: 2.75rem; margin-bottom: .75rem; line-height: 1.25; }
.post-content h3 { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 700; margin-top: 2rem; margin-bottom: .5rem; line-height: 1.3; }
.post-content p { color: rgba(20,18,26,.92); }
.post-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; transition: color .15s ease; }
.post-content a:hover { color: var(--pink); }
.post-content ul, .post-content ol { padding-left: 1.5rem; }
.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }
.post-content li + li { margin-top: .5rem; }
.post-content blockquote { border-left: 6px solid var(--accent); background: var(--callout-bg); padding: 1.25rem 1.5rem; font-style: italic; color: rgba(20,18,26,.85); }
.post-content hr { border: 0; border-top: 1px solid var(--accent-soft); margin: 2.5rem 0; opacity: .6; }
.post-content img { border-radius: .75rem; }
.post-content table { border-collapse: collapse; width: 100%; border: 2px solid var(--accent-soft); }
.post-content table td, .post-content table th { border: 1px solid var(--accent-soft); padding: 1rem; vertical-align: top; }
.post-content table th, .post-content table tr:first-child td { background: var(--callout-bg); font-weight: 600; }
.post-content pre { background: rgba(20,18,26,.06); padding: 1rem; border-radius: .5rem; overflow-x: auto; font-size: .95rem; }
.post-content code { background: rgba(20,18,26,.06); padding: .1rem .35rem; border-radius: .25rem; font-size: .9em; }

/* SubCulture callout / box helpers (usable in post editor via class names) */
.post-content .scm-callout { background: var(--callout-bg); border-left: 6px solid var(--accent); padding: 1.5rem; margin: 1.75rem 0; border-radius: 0 .75rem .75rem 0; }
.post-content .scm-box { background: #fff; border: 2px solid var(--accent-soft); padding: 1.375rem; margin: 1.5rem 0; }


.back-link { display: inline-block; margin-bottom: 1.5rem; color: var(--hero); font-size: .875rem; }
.back-link:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { background: var(--nav); color: var(--nav-foreground); padding: 3rem 0; margin-top: 4rem; }
.site-footer .row { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; align-items: center; font-size: .875rem; }
.site-footer a { color: var(--hero); }
.site-footer a:hover { text-decoration: underline; }
