/*
Theme Name: Sliptide
Theme URI:
Author:
Description: A dark minimal theme for musicians and creatives. Features a scalable releases grid and journal layout.
Version: 1.0.7
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sliptide
Tags: music, dark, grid, minimal, blog
*/

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  --pink:        #FF1B8D;
  --pink-glow:   rgba(255, 27, 141, 0.15);
  --turquoise:   #00D4C8;
  --bg:          #080808;
  --surface:     #111111;
  --surface-2:   #1A1A1A;
  --surface-3:   #252525;
  --border:      #2A2A2A;
  --border-mid:  #3A3A3A;
  --text:        #F0F0F0;
  --text-muted:  #ABABAB;
  --text-dim:    #4A4A4A;
  --header-h:    64px;
  --max-w:       1400px;
  --content-w:   780px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; background: none; border: none; font: inherit; color: inherit; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 600px) {
  .container { padding: 0 16px; }
}

.site-content {
  flex: 1;
  padding-top: var(--header-h);
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: border-color 0.3s ease;
}

/* Glassmorphism on a pseudo-element so the header itself does NOT create
   a CSS containing block — which would trap position:fixed children (the
   mobile nav overlay) inside the 64px header instead of the viewport. */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 8, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: background 0.3s ease;
  z-index: -1;
}

.site-header.scrolled { border-color: var(--border-mid); }
.site-header.scrolled::before { background: rgba(8, 8, 8, 0.97); }

/* WordPress admin bar */
.admin-bar .site-header { top: 32px; }
.admin-bar .site-content { padding-top: calc(var(--header-h) + 32px); }
@media screen and (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
  .admin-bar .site-content { padding-top: calc(var(--header-h) + 46px); }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* SVG logo rendered via CSS mask so the fill colour is fully CSS-controlled.
   The SVG itself contains white text on a transparent background — the
   background-color here supplies the actual pink/turquoise colour. */
.site-logo-img {
  display: block;
  /* Natural dimensions at 60px display height (SVG aspect ratio 285.76 / 134.06 ≈ 2.13) */
  height: 60px;
  width: 128px;
  background-color: var(--pink);
  -webkit-mask-image: url('assets/images/logo.svg');
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: left center;
          mask-image: url('assets/images/logo.svg');
          mask-size: contain;
          mask-repeat: no-repeat;
          mask-position: left center;
  transition: background-color 0.2s ease;
}

.site-logo:hover .site-logo-img {
  background-color: var(--turquoise);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 2px;
}

.main-nav a {
  display: block;
  padding: 7px 13px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  position: relative;
  transition: color 0.2s ease;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 13px; right: 13px;
  height: 1px;
  background: var(--turquoise);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current-cat > a,
.main-nav .current-menu-ancestor > a {
  color: var(--text);
}

.main-nav a:hover::after,
.main-nav .current-menu-item > a::after,
.main-nav .current-cat > a::after {
  transform: scaleX(1);
}

/* Hamburger button */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

.nav-toggle.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile nav */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .main-nav {
    position: fixed;
    top: var(--header-h); left: 0; right: 0; bottom: 0;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    overflow: hidden;
    z-index: 999;
  }

  .admin-bar .main-nav { top: calc(var(--header-h) + 32px); }
  @media screen and (max-width: 782px) {
    .admin-bar .main-nav { top: calc(var(--header-h) + 46px); }
  }

  .main-nav.open { opacity: 1; pointer-events: auto; }

  .main-nav ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    width: 100%;
    max-width: 100%;
  }

  .main-nav li { width: 100%; text-align: center; }

  .main-nav a {
    font-size: 0.9rem;
    padding: 14px 24px;
    text-align: center;
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .main-nav a::after { display: none; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  margin-top: 80px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pink);
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s ease;
}
.footer-links a:hover { color: var(--turquoise); }

/* ============================================================
   HOME PAGE — HERO
   ============================================================ */
.home-hero {
  padding: 96px 0 80px;
  border-bottom: 1px solid var(--border);
}

.hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--turquoise);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--turquoise);
}

.hero-name {
  font-size: clamp(3.5rem, 10vw, 8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.92;
  margin-bottom: 28px;
  color: var(--text);
}

.hero-name .accent { color: var(--pink); }

.hero-tagline {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 460px;
  line-height: 1.6;
}

/* Static page content block (optional WP editor content on front page) */
.home-page-content {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
}

/* ============================================================
   HOME PAGE — SECTIONS
   ============================================================ */
.home-section { padding: 64px 0; border-bottom: 1px solid var(--border); }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.section-all {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--turquoise);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.2s ease;
}
.section-all::after { content: '→'; }
.section-all:hover { color: var(--pink); }

/* ============================================================
   RELEASES GRID
   ============================================================ */
.releases-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
@media (max-width: 1200px) { .releases-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 900px)  { .releases-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px)  { .releases-grid { grid-template-columns: repeat(2, 1fr); } }

.release-card {
  display: block;
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--surface);
}

.release-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.release-card:hover img { transform: scale(1.06); }

.release-card .card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 45%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px;
}

.release-card:hover .card-overlay { opacity: 1; }

.card-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 3px;
}

.card-meta {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--turquoise);
}

/* No featured image fallback */
.release-card.no-image { background: var(--surface-2); }

.card-no-img {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
}

.card-no-img span {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1.3;
}

/* ============================================================
   RELEASES ARCHIVE PAGE
   ============================================================ */
.archive-header {
  padding: 56px 0 36px;
  border-bottom: 1px solid var(--border);
}

.archive-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--turquoise);
  margin-bottom: 8px;
}

.archive-header h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--text);
}

/* Category filter bar */
.release-filter {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding: 28px 0;
}

.release-filter a {
  display: inline-block;
  padding: 5px 14px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.release-filter a:hover,
.release-filter a.is-active {
  color: var(--pink);
  border-color: var(--pink);
  background: var(--pink-glow);
}

/* ============================================================
   JOURNAL LIST
   ============================================================ */
.journal-archive-header {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.journal-list { max-width: var(--content-w); }

.journal-entry {
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}

.entry-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.entry-date {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--turquoise);
}

.entry-cats { display: flex; gap: 5px; flex-wrap: wrap; }

.entry-cat-tag {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 2px 8px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.entry-cat-tag:hover { color: var(--text-muted); border-color: var(--border-mid); }

.journal-entry h2 {
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  font-weight: 700;
  margin-bottom: 10px;
}

.journal-entry h2 a { color: var(--text); transition: color 0.2s ease; }
.journal-entry h2 a:hover { color: var(--pink); }

.entry-excerpt {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 16px;
}

.read-more {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--turquoise);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease;
}
.read-more::after { content: '→'; transition: transform 0.2s ease; }
.read-more:hover { color: var(--pink); }
.read-more:hover::after { transform: translateX(4px); }

/* ============================================================
   SINGLE POST — SHARED
   ============================================================ */
.post-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 32px 0 0;
  transition: color 0.2s ease;
}
.post-back::before { content: '←'; transition: transform 0.2s ease; }
.post-back:hover { color: var(--turquoise); }
.post-back:hover::before { transform: translateX(-4px); }

.post-cat-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }

.post-cat-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pink);
  border: 1px solid var(--pink);
  padding: 3px 10px;
}

/* ============================================================
   SINGLE POST — RELEASE LAYOUT
   ============================================================ */
.release-single { padding: 0 0 80px; }

.release-layout {
  display: grid;
  grid-template-columns: minmax(0, 520px) 1fr;
  gap: 56px;
  align-items: start;
  padding: 40px 0 0;
}

@media (max-width: 900px) {
  .release-layout { grid-template-columns: 1fr; gap: 32px; }
}

.release-cover img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  max-width: 520px;
}

.release-info { padding-top: 4px; }

.release-info h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-bottom: 16px;
}

.release-date {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--turquoise);
  margin-bottom: 32px;
}

/* ============================================================
   SINGLE POST — JOURNAL LAYOUT
   ============================================================ */
.journal-single { padding: 0 0 80px; }

.journal-post-header {
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
  max-width: var(--content-w);
}

.journal-post-header .post-date {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--turquoise);
  margin-bottom: 12px;
}

.journal-post-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.journal-featured-img {
  margin-bottom: 40px;
  max-width: var(--content-w);
}

.journal-featured-img img { width: 100%; }

/* ============================================================
   POST CONTENT
   ============================================================ */
.post-content {
  max-width: var(--content-w);
  font-size: 1.05rem;
  line-height: 1.82;
  color: var(--text-muted);
}

.post-content h2 { color: var(--text); font-size: 1.5rem; margin: 2.2em 0 0.7em; }
.post-content h3 { color: var(--text); font-size: 1.2rem; margin: 1.8em 0 0.6em; }
.post-content h4 { color: var(--text); font-size: 1rem; margin: 1.5em 0 0.5em; }
.post-content p { margin-bottom: 1.5em; }
.post-content p:last-child { margin-bottom: 0; }
.post-content a { color: var(--turquoise); text-decoration: underline; text-underline-offset: 3px; }
.post-content a:hover { color: var(--pink); }
.post-content img { margin: 2em 0; width: 100%; }
.post-content strong { color: var(--text); font-weight: 700; }
.post-content em { font-style: italic; }

.post-content blockquote {
  border-left: 2px solid var(--pink);
  padding: 4px 0 4px 24px;
  margin: 2em 0;
  color: var(--text-muted);
  font-style: italic;
}

.post-content ul { list-style: disc; margin: 1em 0 1.5em 1.2em; }
.post-content ol { list-style: decimal; margin: 1em 0 1.5em 1.2em; }
.post-content li { margin-bottom: 0.4em; }

.post-content code {
  font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
  font-size: 0.88em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 1px 6px;
}

.post-content pre {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 20px;
  overflow-x: auto;
  margin: 1.5em 0;
}
.post-content pre code { background: none; border: none; padding: 0; }

/* ---- Tables — structural only; all colors left to the WP editor ---- */
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.post-content td,
.post-content th {
  padding: 10px 14px;
  vertical-align: top;
  border: none;
}

/* Scrollable block tables on narrow viewports */
.post-content .wp-block-table,
.post-content figure.wp-block-table {
  overflow-x: auto;
  margin: 2em 0;
}
.post-content .wp-block-table table,
.post-content figure.wp-block-table table {
  margin: 0;
}

/* Release post content — wider */
.release-single .post-content { max-width: 100%; }

/* ============================================================
   POST NAVIGATION (prev / next within same category)
   ============================================================ */
.post-navigation {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.post-nav-link {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-width: 48%;
}

.post-nav-link.post-nav-next {
  text-align: right;
  margin-left: auto;
}

.nav-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--turquoise);
}

.nav-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.3;
  transition: color 0.2s ease;
}

.post-nav-link:hover .nav-title { color: var(--text); }

@media (max-width: 600px) {
  .post-navigation    { flex-direction: column; gap: 16px; }
  .post-nav-link      { max-width: 100%; }
  .post-nav-link.post-nav-next { text-align: left; margin-left: 0; }
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  gap: 4px;
  margin-top: 64px;
  flex-wrap: wrap;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
  color: var(--pink);
  border-color: var(--pink);
  background: var(--pink-glow);
}

.pagination .page-numbers.dots { border-color: transparent; }

/* ============================================================
   PAGE TEMPLATE
   ============================================================ */
.page-layout { padding: 56px 0 80px; max-width: var(--content-w); }

.page-layout .page-title {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

/* ============================================================
   404
   ============================================================ */
.error-404-wrap {
  padding: 80px 0;
  text-align: center;
}

.error-code {
  font-size: clamp(6rem, 20vw, 14rem);
  font-weight: 800;
  line-height: 1;
  color: var(--surface-3);
  margin-bottom: 24px;
  letter-spacing: -0.05em;
}

.error-title {
  font-size: 1.4rem;
  color: var(--text);
  margin-bottom: 12px;
}

.error-desc {
  color: var(--text-muted);
  margin-bottom: 32px;
  font-size: 1rem;
}

/* ============================================================
   BUTTON
   ============================================================ */
.btn {
  display: inline-block;
  padding: 11px 28px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--pink);
  border: 1px solid var(--pink);
  transition: background 0.2s ease, color 0.2s ease;
}
.btn:hover { background: var(--pink); color: #000; }

/* ============================================================
   UTILITY
   ============================================================ */
.no-posts {
  padding: 64px 0;
  color: var(--text-muted);
  font-size: 1rem;
}

.screen-reader-text {
  clip: rect(1px,1px,1px,1px);
  height: 1px; width: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
}

/* WordPress alignment classes */
.alignleft  { float: left;  margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin: 1em auto; }
.alignwide  { max-width: calc(var(--content-w) + 160px); }
.alignfull  { max-width: 100%; }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--pink); }

/* Selection */
::selection { background: var(--pink); color: #fff; }
