/* ============================================
   Still Sonic Media — Blog styles
   Shared by blog.html (post list) and post.html (single post).
   Matches the look of the project pages: same colours, fonts, nav and footer.
   ============================================ */

@font-face { font-family: 'Redaction35'; src: url('fonts/Redaction_35-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Redaction35'; src: url('fonts/Redaction_35-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root { --bg: #0f0d0b; --surface: #15120f; --border: #241f1a; --text: #f7f2ea; --muted: #7a7268; --soft: #aaa; --accent: #c8a97e; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: 'Redaction35', Georgia, serif; font-weight: 400; overflow-x: hidden; }
img { display: block; max-width: 100%; }

/* NAV (same as every other page) */
nav { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; display: flex; align-items: center; justify-content: space-between; padding: 1.5rem 3rem; background: linear-gradient(to bottom, rgba(15,13,11,0.95) 0%, transparent 100%); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(255,255,255,0.04); }
.nav-logo { display: flex; align-items: center; text-decoration: none; }
.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; transition: color 0.3s; font-family: 'Redaction35', Georgia, serif; }
.nav-links a:hover { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 1rem; }
.nav-instagram { color: var(--muted); text-decoration: none; display: flex; align-items: center; transition: color 0.3s; }
.nav-instagram:hover { color: var(--text); }
.nav-hamburger { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 4px; }
.nav-hamburger span { display: block; width: 22px; height: 1px; background: var(--muted); transition: transform 0.3s, opacity 0.3s; }
.nav-hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 768px) {
  nav { padding: 1.2rem 1.5rem; }
  .nav-hamburger { display: flex; }
  .nav-links { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(15,13,11,0.97); flex-direction: column; align-items: center; justify-content: center; gap: 2.5rem; z-index: 99; }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 1.1rem; letter-spacing: 0.22em; }
}

/* PAGE HERO */
.page-hero { min-height: 40vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 10rem 2rem 3rem; position: relative; overflow: hidden; }
.page-hero-bg { position: absolute; inset: 0; background: radial-gradient(ellipse 60% 50% at 50% 50%, rgba(200,169,126,0.05) 0%, transparent 70%); pointer-events: none; }
.hero-eyebrow { font-size: 0.68rem; letter-spacing: 0.35em; text-transform: uppercase; color: var(--accent); margin-bottom: 1rem; }
.hero-title { font-size: clamp(3rem, 8vw, 6rem); font-weight: 400; line-height: 1.0; }
.hero-subtitle { font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-top: 1.5rem; }
.page-hero-line { width: 1px; height: 40px; background: linear-gradient(to bottom, var(--accent), transparent); margin: 2rem auto 0; }

/* SHARED LABELS */
.post-meta { font-size: 0.62rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--muted); display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.post-meta .tag { color: var(--accent); }
.post-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }
.read-more { display: inline-block; margin-top: 1.25rem; font-size: 0.62rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--accent); border-bottom: 1px solid rgba(200,169,126,0.35); padding-bottom: 0.2rem; transition: color 0.2s, border-color 0.2s; }

/* ===== BLOG LIST (blog.html) ===== */
.blog-filters { display: flex; justify-content: center; gap: 0.5rem; flex-wrap: wrap; padding: 0 1rem 3rem; }
.blog-filter { background: none; border: 1px solid var(--border); color: var(--muted); font-family: inherit; font-size: 0.65rem; letter-spacing: 0.22em; text-transform: uppercase; padding: 0.7rem 1.4rem; min-height: 44px; cursor: pointer; transition: color 0.2s, border-color 0.2s, background 0.2s; }
.blog-filter:hover { color: var(--text); border-color: #333; }
.blog-filter.active { color: var(--bg); background: var(--accent); border-color: var(--accent); }
.blog-filter:focus-visible, .post-card:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }

#posts { padding: 0 2rem 8rem; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.25rem; align-items: start; max-width: 1400px; margin: 0 auto; }
.post-card { display: block; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--border); overflow: hidden; transition: border-color 0.3s, opacity 0.35s, transform 0.35s; }
.post-card:hover { border-color: rgba(200,169,126,0.3); }
.post-card:hover .read-more { color: var(--text); border-color: rgba(247,242,234,0.4); }
.post-card.is-hidden { display: none; }
.post-card-img { overflow: hidden; position: relative; }
.post-card-img img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform 0.8s cubic-bezier(0.25,0.46,0.45,0.94); }
.post-card:hover .post-card-img img { transform: scale(1.04); }
.post-card-body { padding: 1.5rem 1.6rem 1.75rem; }
.post-card-title { font-size: 1.45rem; font-weight: 400; line-height: 1.2; margin-top: 0.8rem; }
.post-card-excerpt { font-size: 0.92rem; line-height: 1.75; color: var(--soft); margin-top: 0.75rem; }

/* Photo-only card: the image carries it, title sits on the photo */
.post-card--image { border: none; background: none; position: relative; }
.post-card--image .post-card-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 1.5rem; background: linear-gradient(to top, rgba(15,13,11,0.85) 0%, rgba(15,13,11,0) 55%); }
.post-card--image .post-card-title { font-size: 1.3rem; }
.post-card--image .post-card-img img { aspect-ratio: 4 / 5; }

/* Text-only card: typographic, with a gold rule */
.post-card--text .post-card-body { padding: 2.25rem 2rem 2.25rem; border-top: 2px solid rgba(200,169,126,0.5); }
.post-card--text .post-card-title { font-size: 1.85rem; }
.post-card--text .post-card-excerpt { font-size: 1rem; }

.blog-empty { text-align: center; color: var(--muted); font-size: 0.9rem; padding: 3rem 1rem; }
@media (max-width: 768px) { #posts { padding: 0 1rem 5rem; } .blog-grid { grid-template-columns: 1fr; } }

/* ===== SINGLE POST (post.html) ===== */
.post { padding: 9rem 2rem 5rem; }
.post-header { max-width: 760px; margin: 0 auto 3rem; text-align: center; }
.post-header .post-meta { justify-content: center; }
.post-title { font-size: clamp(2.4rem, 6vw, 4.5rem); font-weight: 400; line-height: 1.05; margin-top: 1.25rem; }
.post-figure { max-width: 1200px; margin: 0 auto 3.5rem; }
.post-figure img { width: auto; max-width: 100%; max-height: 82vh; margin: 0 auto; cursor: zoom-in; }
.post-figure figcaption { text-align: center; font-size: 0.72rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); margin-top: 1.1rem; line-height: 1.7; }
.post-figure figcaption a, .post-body a { color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(200,169,126,0.35); }
.post-body { max-width: 680px; margin: 0 auto; }
.post-body p { font-size: 1.08rem; line-height: 1.9; color: #c4c4c4; margin-bottom: 1.5rem; }
/* Optional intro paragraph: only when a post has  lead: true  */
.post-body.has-lead p:first-child { font-size: 1.3rem; line-height: 1.7; color: var(--text); }

/* Photo-only post: image first and big, title underneath */
.post--image .post-figure { margin-bottom: 2rem; }
.post--image .post-header { margin: 0 auto; }
.post--image .post-title { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-top: 1rem; }

.post-nav { max-width: 1000px; margin: 5rem auto 0; padding-top: 2.5rem; border-top: 1px solid var(--border); display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.post-nav a { text-decoration: none; color: inherit; display: block; }
.post-nav .label { font-size: 0.6rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--accent); }
.post-nav .title { font-size: 1.2rem; margin-top: 0.5rem; line-height: 1.3; transition: color 0.2s; }
.post-nav a:hover .title { color: var(--accent); }
.post-nav .next { text-align: right; grid-column: 2; }
.post-missing { text-align: center; padding: 12rem 2rem 8rem; color: var(--muted); }
.post-missing h1 { color: var(--text); font-weight: 400; font-size: 2.5rem; margin-bottom: 1rem; }
.post-missing a { color: var(--accent); }
@media (max-width: 768px) { .post { padding: 7.5rem 1.25rem 4rem; } .post-nav { grid-template-columns: 1fr; } .post-nav .next { grid-column: 1; text-align: left; } }

.post-figure img[width] { width: min(100%, calc(82vh * var(--ar, 1))); height: auto; aspect-ratio: var(--ar); max-height: none; }

/* Lightbox (photo zoom on post pages) */
.lightbox { position: fixed; inset: 0; z-index: 9000; background: rgba(0,0,0,0.95); display: none; align-items: center; justify-content: center; padding: 2rem; }
.lightbox.active { display: flex; }
.lightbox img { max-width: 92vw; max-height: 92vh; object-fit: contain; }
.lightbox-close { position: absolute; top: 1.5rem; right: 2rem; font-size: 1.5rem; color: var(--muted); background: none; border: none; font-family: inherit; cursor: pointer; }
.lightbox-close:hover { color: var(--text); }

/* FOOTER */
footer { padding: 2rem 3rem; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.footer-back { color: var(--accent); text-decoration: none; font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; transition: opacity 0.2s; }
.footer-back:hover { opacity: 0.7; }
@media (max-width: 768px) { footer { flex-direction: column; gap: 0.75rem; text-align: center; } }

@media (prefers-reduced-motion: reduce) { .post-card, .post-card-img img { transition: none; } }

/* Stop double-tap zooming on phones; pinch zoom still works. */
html, body { touch-action: manipulation; }
