/* ============================================
   DogPaddle Radio — Ghost Theme
   Inter with slashed zero, forest green accent
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,300;0,14..32,400;0,14..32,500;0,14..32,600;0,14..32,700;1,14..32,400;1,14..32,500&display=swap');

/* ---- Design Tokens ---- */
:root {
  --green:        #3a5c3a;
  --green-light:  #4e7a4e;
  --green-subtle: #f0f4f0;
  --green-rule:   #c8d8c8;
  --ink:          #1a1a1a;
  --ink-mid:      #4a4a4a;
  --ink-light:    #7a7a7a;
  --paper:        #fafaf8;
  --paper-warm:   #f4f4f0;
  --white:        #ffffff;
  --max-width:    720px;
  --max-wide:     1100px;
  --nav-height:   60px;
  --radius:       3px;
  --serif-stack:  'Inter', system-ui, sans-serif;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--serif-stack);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
}

/* Slashed zero — applied to callsign and technical contexts */
.callsign,
.technical,
code,
pre {
  font-feature-settings: "kern" 1, "liga" 1, "zero" 1;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-light); }

/* ---- Typography Scale ---- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
  letter-spacing: -0.02em;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p { margin-bottom: 1.5rem; }
p:last-child { margin-bottom: 0; }

/* ---- Layout ---- */
.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main { flex: 1; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-wide {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---- Navigation ---- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--green-rule);
  height: var(--nav-height);
  transition: box-shadow 0.2s ease;
}

.site-nav.scrolled {
  box-shadow: 0 2px 12px rgba(58, 92, 58, 0.08);
}

.site-nav .container-wide {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.site-nav-logo {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-decoration: none;
  flex-shrink: 0;
}

.site-nav-logo .wordmark {
  font-size: 1rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: -0.02em;
}

.site-nav-logo .tagline {
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--ink-light);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-nav-menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Ghost {{navigation}} outputs <ul class="nav"> */
.site-nav-menu ul.nav,
.site-nav-menu .nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav-menu ul.nav li,
.site-nav-menu .nav li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav-menu a,
.site-nav-menu ul.nav a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-mid);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
  letter-spacing: 0.01em;
  display: block;
}

.site-nav-menu a:hover,
.site-nav-menu ul.nav a:hover {
  color: var(--green);
  background: var(--green-subtle);
}

.site-nav-menu a.nav-current,
.site-nav-menu ul.nav a.nav-current {
  color: var(--green);
}

.nav-cta-link {
  background: var(--green) !important;
  color: var(--white) !important;
  padding: 0.4rem 1rem !important;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.nav-cta-link:hover {
  background: var(--green-light) !important;
  color: var(--white) !important;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--ink);
}

/* ---- Hero ---- */
.site-hero {
  position: relative;
  height: clamp(320px, 45vw, 520px);
  overflow: hidden;
  background: var(--green);
}

.site-hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  opacity: 0.85;
}

.site-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 30%,
    rgba(26, 26, 26, 0.55) 100%
  );
}

.site-hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 1.5rem;
  max-width: var(--max-wide);
  margin: 0 auto;
}

.site-hero-title {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.site-hero-description {
  margin-top: 0.5rem;
  font-size: 1rem;
  color: rgba(255,255,255,0.85);
  max-width: 540px;
  line-height: 1.5;
}

/* No hero — page header fallback */
.page-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--green-rule);
  margin-bottom: 3rem;
}

.page-header h1 {
  font-size: 2rem;
  color: var(--ink);
}

/* ---- Post Feed (index) ---- */
.post-feed {
  padding: 3rem 0 4rem;
}

.post-feed-inner {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Post card — single column editorial */
.post-card {
  display: grid;
  grid-template-columns: 1fr;
  padding: 2rem 0;
  border-bottom: 1px solid var(--green-rule);
  gap: 0.75rem;
}

.post-card:first-child {
  padding-top: 0;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: var(--ink-light);
  letter-spacing: 0.02em;
}

.post-card-tag {
  background: var(--green-subtle);
  color: var(--green);
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
  font-weight: 500;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.post-card-title {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.post-card-title a {
  color: inherit;
  text-decoration: none;
}

.post-card-title a:hover {
  color: var(--green);
}

.post-card-excerpt {
  font-size: 0.95rem;
  color: var(--ink-mid);
  line-height: 1.65;
  max-width: 65ch;
}

.post-card-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.25rem;
}

.read-more {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--green);
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.read-more::after {
  content: '→';
  transition: transform 0.15s;
}

.post-card:hover .read-more::after {
  transform: translateX(3px);
}

/* Featured post — slightly elevated */
.post-card.featured {
  background: var(--green-subtle);
  padding: 1.75rem;
  border-radius: var(--radius);
  border-bottom: none;
  margin-bottom: 1rem;
  border-left: 3px solid var(--green);
}

.post-card.featured .post-card-title {
  font-size: 1.5rem;
}

/* ---- Pagination ---- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 0;
  font-size: 0.85rem;
  color: var(--ink-light);
  border-top: 1px solid var(--green-rule);
}

.pagination a {
  font-weight: 500;
  color: var(--green);
}

/* ---- Single Post ---- */
.post-header {
  padding: 3rem 0 2rem;
}

.post-header-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--ink-light);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.post-header-meta .separator {
  color: var(--green-rule);
}

.post-title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.post-excerpt {
  font-size: 1.1rem;
  color: var(--ink-mid);
  line-height: 1.6;
  font-weight: 400;
  border-left: 3px solid var(--green);
  padding-left: 1rem;
  margin-bottom: 1.5rem;
}

.post-feature-image {
  margin: 0 0 2.5rem;
  border-radius: var(--radius);
  overflow: hidden;
}

.post-feature-image img {
  width: 100%;
  height: auto;
}

/* Post body content */
.post-content {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ink);
}

.post-content h2 {
  font-size: 1.5rem;
  margin: 2.5rem 0 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--green-rule);
}

.post-content h3 {
  font-size: 1.2rem;
  margin: 2rem 0 0.5rem;
  color: var(--green);
}

.post-content h4 {
  font-size: 1rem;
  margin: 1.5rem 0 0.5rem;
  font-weight: 600;
}

.post-content p { margin-bottom: 1.5rem; }

.post-content a {
  color: var(--green);
  text-decoration: underline;
  text-decoration-color: var(--green-rule);
  text-underline-offset: 2px;
}

.post-content a:hover {
  text-decoration-color: var(--green);
}

.post-content ul,
.post-content ol {
  margin: 0 0 1.5rem 1.5rem;
}

.post-content li { margin-bottom: 0.4rem; }

.post-content blockquote {
  border-left: 3px solid var(--green);
  padding: 0.5rem 0 0.5rem 1.25rem;
  margin: 1.5rem 0;
  color: var(--ink-mid);
  font-style: italic;
}

.post-content hr {
  border: none;
  border-top: 1px solid var(--green-rule);
  margin: 2.5rem 0;
}

.post-content img {
  border-radius: var(--radius);
  margin: 1.5rem 0;
}

.post-content figcaption {
  font-size: 0.8rem;
  color: var(--ink-light);
  text-align: center;
  margin-top: -1rem;
  margin-bottom: 1.5rem;
}

/* Code */
.post-content code {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.875em;
  background: var(--paper-warm);
  border: 1px solid var(--green-rule);
  border-radius: 2px;
  padding: 0.1em 0.35em;
  font-feature-settings: "zero" 1;
}

.post-content pre {
  background: #1e2a1e;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-feature-settings: "zero" 1;
}

.post-content pre code {
  background: none;
  border: none;
  padding: 0;
  color: #c8e6c8;
  font-size: 0.85rem;
  line-height: 1.6;
}

/* Tables */
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.post-content th {
  background: var(--green-subtle);
  color: var(--green);
  font-weight: 600;
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 2px solid var(--green-rule);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.post-content td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--green-rule);
  vertical-align: top;
}

.post-content tr:last-child td { border-bottom: none; }

/* Post footer */
.post-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--green-rule);
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.post-tag {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--green);
  background: var(--green-subtle);
  padding: 0.25rem 0.6rem;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---- Static Pages ---- */
.page-content {
  padding: 3rem 0 5rem;
}

.page-content .post-content {
  font-size: 1.02rem;
}

/* About page bio styling */
.bio-intro {
  font-size: 1.1rem;
  color: var(--ink-mid);
  line-height: 1.8;
  margin-bottom: 2rem;
}

/* Products page */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.product-card {
  border: 1px solid var(--green-rule);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.product-card:hover {
  border-color: var(--green);
  box-shadow: 0 4px 16px rgba(58, 92, 58, 0.1);
}

.product-card-image {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--green-subtle);
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.product-card:hover .product-card-image img {
  transform: scale(1.03);
}

.product-card-body {
  padding: 1.25rem;
}

.product-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.product-card-desc {
  font-size: 0.88rem;
  color: var(--ink-mid);
  line-height: 1.55;
  margin-bottom: 1rem;
}

.product-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  margin-bottom: 0.75rem;
}

.product-badge.available { background: var(--green-subtle); color: var(--green); }
.product-badge.development { background: #fef9e7; color: #8a6d00; }
.product-badge.free { background: #e8f4fd; color: #1a6496; }

/* ---- Newsletter / Subscribe ---- */
.subscribe-section {
  background: var(--green-subtle);
  border-top: 1px solid var(--green-rule);
  border-bottom: 1px solid var(--green-rule);
  padding: 3rem 0;
  margin: 3rem 0;
  text-align: center;
}

.subscribe-section h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.subscribe-section p {
  color: var(--ink-mid);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.subscribe-form {
  display: flex;
  gap: 0.5rem;
  max-width: 420px;
  margin: 0 auto;
}

.subscribe-form input {
  flex: 1;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--green-rule);
  border-radius: var(--radius);
  font-family: var(--serif-stack);
  font-size: 0.9rem;
  background: var(--white);
  outline: none;
  transition: border-color 0.15s;
}

.subscribe-form input:focus {
  border-color: var(--green);
}

.btn {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  background: var(--green);
  color: var(--white);
  font-family: var(--serif-stack);
  font-size: 0.88rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.btn:hover {
  background: var(--green-light);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--green);
  border: 1px solid var(--green);
}

.btn-outline:hover {
  background: var(--green-subtle);
  color: var(--green);
}

/* ---- Footer ---- */
.site-footer {
  background: var(--paper-warm);
  border-top: 1px solid var(--green-rule);
  padding: 2.5rem 0;
  margin-top: auto;
}

.site-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.site-footer-brand .wordmark {
  font-weight: 700;
  color: var(--green);
  font-size: 0.95rem;
}

.site-footer-brand .callsign {
  font-size: 0.8rem;
  color: var(--ink-light);
  font-feature-settings: "zero" 1;
}

.site-footer-nav {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  flex-wrap: wrap;
}

.site-footer-nav a {
  font-size: 0.82rem;
  color: var(--ink-mid);
}

.site-footer-nav a:hover { color: var(--green); }

.site-footer-copy {
  font-size: 0.78rem;
  color: var(--ink-light);
  width: 100%;
}

/* ---- Utility ---- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

.text-green { color: var(--green); }
.text-mid { color: var(--ink-mid); }
.text-small { font-size: 0.85rem; }

/* ---- Responsive ---- */
@media (max-width: 640px) {
  html { font-size: 16px; }

  .site-nav-menu {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--green-rule);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    gap: 0.25rem;
  }

  .site-nav-menu.open { display: flex; }

  .site-nav-menu ul.nav,
  .site-nav-menu .nav {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  .site-nav-menu ul.nav li { width: 100%; }
  .site-nav-menu a,
  .site-nav-menu ul.nav a { width: 100%; }
  .nav-toggle { display: block; }

  .site-hero-content { padding: 1.5rem 1rem; }

  .subscribe-form {
    flex-direction: column;
  }

  .site-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .post-card.featured {
    padding: 1.25rem;
  }
}

@media (max-width: 480px) {
  .post-title { font-size: 1.5rem; }
  .products-grid { grid-template-columns: 1fr; }
}

/* ---- Ghost Card Width Classes (required) ---- */
.kg-width-wide {
  position: relative;
  width: 85vw;
  min-width: 100%;
  margin: 1.5rem calc(50% - 42.5vw);
}

.kg-width-full {
  position: relative;
  width: 100vw;
  margin: 1.5rem calc(50% - 50vw);
}

.kg-width-wide img,
.kg-width-full img {
  width: 100%;
}

/* ---- Ghost Card Types ---- */
.kg-image-card { margin: 1.5rem 0; }
.kg-image-card img { border-radius: var(--radius); }

.kg-gallery-card { margin: 1.5rem 0; }
.kg-gallery-container {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.kg-gallery-row {
  display: flex;
  gap: 4px;
  width: 100%;
}
.kg-gallery-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

.kg-bookmark-card { margin: 1.5rem 0; }
.kg-bookmark-container {
  display: flex;
  border: 1px solid var(--green-rule);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}
.kg-bookmark-content { padding: 1rem; flex: 1; }
.kg-bookmark-title { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.25rem; }
.kg-bookmark-description { font-size: 0.82rem; color: var(--ink-mid); }
.kg-bookmark-metadata { font-size: 0.75rem; color: var(--ink-light); margin-top: 0.5rem; }
.kg-bookmark-thumbnail { width: 140px; flex-shrink: 0; }
.kg-bookmark-thumbnail img { width: 100%; height: 100%; object-fit: cover; }

.kg-callout-card {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  background: var(--green-subtle);
  border-left: 3px solid var(--green);
  margin: 1.5rem 0;
}
.kg-callout-emoji { font-size: 1.2rem; flex-shrink: 0; }
.kg-callout-text { font-size: 0.95rem; }

.kg-toggle-card { margin: 1.5rem 0; }
.kg-toggle-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 0.75rem 1rem;
  background: var(--paper-warm);
  border: 1px solid var(--green-rule);
  border-radius: var(--radius);
  font-weight: 600;
}
.kg-toggle-content {
  padding: 0.75rem 1rem;
  border: 1px solid var(--green-rule);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
}

.kg-video-card { margin: 1.5rem 0; }
.kg-video-card video { width: 100%; border-radius: var(--radius); }

.kg-audio-card {
  margin: 1.5rem 0;
  padding: 1rem;
  border: 1px solid var(--green-rule);
  border-radius: var(--radius);
  background: var(--paper-warm);
}

.kg-embed-card { margin: 1.5rem 0; }
.kg-embed-card iframe { width: 100%; border-radius: var(--radius); }

.kg-product-card {
  margin: 1.5rem 0;
  padding: 1.25rem;
  border: 1px solid var(--green-rule);
  border-radius: var(--radius);
}

.kg-header-card {
  padding: 3rem 2rem;
  background: var(--green);
  color: var(--white);
  border-radius: var(--radius);
  margin: 1.5rem 0;
  text-align: center;
}

.kg-button-card { margin: 1.5rem 0; text-align: center; }
.kg-btn {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  background: var(--green);
  color: var(--white);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}
.kg-btn:hover { background: var(--green-light); color: var(--white); }

/* ---- Page features ---- */
.home-template .site-hero { display: block; }
.post-template .post-full-content { display: block; }
.page-template .page-content { display: block; }
.tag-template .tag-header { display: block; }
.author-template .author-header { display: block; }

/* Members / subscription UI */
.gh-post-upgrade-cta { margin: 2rem 0; }

