/* ============================================
   TINSEL MAGAZINE — Ghost Theme Styles
   v1.0 — March 2026
   ============================================ */

/* --- IMPORTS --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400;1,700;1,900&family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* --- VARIABLES --- */
:root {
  --black: #0a0a0a;
  --off-black: #1a1a1a;
  --white: #f5f3ef;
  --pure-white: #ffffff;
  --signal: #d63031;
  --electric: #2d5bf0;
  --mid: #8c8c8c;
  --warm: #c8c4bc;
  --faint: #e8e5df;

  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  --max-width: 1200px;
  --content-width: 720px;
  --wide-width: 960px;
}

/* --- RESET --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--black);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* --- UTILITY --- */
.mono-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ============================================
   HEADER / NAVIGATION
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--faint);
  transition: box-shadow 0.2s ease;
}
.site-header.scrolled {
  box-shadow: 0 1px 8px rgba(0,0,0,0.04);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.site-logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.6rem;
  letter-spacing: -0.04em;
  color: var(--black);
  display: flex;
  align-items: center;
  gap: 0;
  line-height: 1;
}
.site-logo .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--signal);
  border-radius: 50%;
  margin-left: 2px;
  position: relative;
  top: -0.4em;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-nav a {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  transition: color 0.15s ease;
  position: relative;
}
.site-nav a:hover {
  color: var(--black);
}
.site-nav a.active {
  color: var(--black);
}
.site-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--signal);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--black);
  margin: 4px 0;
  transition: all 0.2s ease;
}

/* ============================================
   HOMEPAGE
   ============================================ */

/* --- Hero / Featured --- */
.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  margin-bottom: 64px;
}
.hero-main {
  position: relative;
}
.hero-main .post-image {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  margin-bottom: 20px;
}
.hero-main .post-tag {
  margin-bottom: 12px;
}
.hero-main .post-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2.4rem;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.hero-main .post-title a:hover {
  color: var(--signal);
}
.hero-main .post-excerpt {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--mid);
  margin-bottom: 12px;
  max-width: 500px;
}
.hero-main .post-meta {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--warm);
}

.hero-sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.hero-sidebar-post {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--faint);
}
.hero-sidebar-post:last-child {
  border-bottom: none;
}
.hero-sidebar-post .post-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}
.hero-sidebar-post .post-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-sidebar-post .post-tag {
  margin-bottom: 8px;
}
.hero-sidebar-post .post-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.hero-sidebar-post .post-title a:hover {
  color: var(--signal);
}
.hero-sidebar-post .post-meta {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--warm);
}

/* --- Section Tags --- */
.post-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 8px;
  color: white;
}
.post-tag a { color: white; }
.tag-culture { background: var(--signal); }
.tag-entertainment { background: var(--black); }
.tag-internet { background: var(--electric); }
.tag-style { background: var(--black); }
.tag-voices { background: var(--signal); }
.tag-industry { background: var(--mid); }

/* --- Section Divider --- */
.section-divider {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.section-divider-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  border-top: 2px solid var(--black);
}
.section-divider h2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}
.section-divider .see-all {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  transition: color 0.15s ease;
}
.section-divider .see-all:hover {
  color: var(--signal);
}

/* --- Post Grid --- */
.post-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 24px 64px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

/* --- Post Card --- */
.post-card {
  display: flex;
  flex-direction: column;
}
.post-card .post-image-wrap {
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
}
.post-card .post-image {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.post-card:hover .post-image {
  transform: scale(1.03);
}
.post-card .post-tag {
  margin-bottom: 10px;
}
.post-card .post-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.post-card .post-title a:hover {
  color: var(--signal);
}
.post-card .post-excerpt {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--mid);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card .post-meta {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--warm);
  margin-top: auto;
}

/* --- Partner Badge --- */
.partner-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.52rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 6px;
  background: var(--black);
  color: var(--white);
  margin-left: 8px;
  vertical-align: middle;
}

/* --- Ticker / Trending --- */
.ticker {
  background: var(--black);
  color: var(--white);
  overflow: hidden;
  padding: 10px 0;
}
.ticker-inner {
  display: flex;
  gap: 48px;
  animation: ticker-scroll 30s linear infinite;
  white-space: nowrap;
}
.ticker-item {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.ticker-dot {
  width: 5px;
  height: 5px;
  background: var(--signal);
  border-radius: 50%;
  flex-shrink: 0;
}
.ticker-item a { color: var(--white); }
.ticker-item a:hover { color: var(--signal); }

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* --- Newsletter CTA --- */
.newsletter-section {
  background: var(--black);
  color: var(--white);
  padding: 80px 24px;
  text-align: center;
}
.newsletter-inner {
  max-width: 520px;
  margin: 0 auto;
}
.newsletter-section h2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2rem;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.newsletter-section p {
  color: var(--mid);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 28px;
}
.newsletter-form {
  display: flex;
  gap: 8px;
  max-width: 420px;
  margin: 0 auto;
}
.newsletter-form input[type="email"] {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.15s ease;
}
.newsletter-form input[type="email"]::placeholder {
  color: var(--mid);
}
.newsletter-form input[type="email"]:focus {
  border-color: var(--signal);
}
.newsletter-form button {
  padding: 12px 24px;
  background: var(--signal);
  color: white;
  border: none;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}
.newsletter-form button:hover {
  background: #c0292a;
}

/* ============================================
   SINGLE POST / ARTICLE
   ============================================ */
.article-header {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 56px 24px 32px;
  text-align: center;
}
.article-header .post-tag {
  margin-bottom: 20px;
}
.article-header h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2.8rem;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.article-deck {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--mid);
  margin-bottom: 24px;
}
.article-meta {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--warm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.article-meta a {
  color: var(--mid);
  transition: color 0.15s;
}
.article-meta a:hover {
  color: var(--signal);
}
.article-meta-sep {
  color: var(--faint);
}

/* Feature Image */
.article-feature-image {
  max-width: var(--wide-width);
  margin: 0 auto 48px;
  padding: 0 24px;
}
.article-feature-image img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.article-feature-image figcaption {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  color: var(--warm);
  margin-top: 8px;
  text-align: right;
}

/* Article Body / Ghost Content */
.article-body {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 24px 64px;
}
.gh-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--off-black);
}
.gh-content p {
  margin-bottom: 1.5em;
}
.gh-content h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-top: 2.5em;
  margin-bottom: 0.8em;
}
.gh-content h3 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.3;
  margin-top: 2em;
  margin-bottom: 0.6em;
}
.gh-content a {
  color: var(--signal);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.gh-content a:hover {
  color: var(--black);
}
.gh-content blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.3rem;
  line-height: 1.45;
  padding: 24px 0 24px 24px;
  border-left: 3px solid var(--signal);
  margin: 2em 0;
  color: var(--mid);
}
.gh-content figure {
  margin: 2em 0;
}
.gh-content figcaption {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  color: var(--warm);
  margin-top: 8px;
}
.gh-content ul, .gh-content ol {
  padding-left: 1.5em;
  margin-bottom: 1.5em;
}
.gh-content li {
  margin-bottom: 0.5em;
  list-style: disc;
}
.gh-content ol li {
  list-style: decimal;
}
.gh-content hr {
  border: none;
  height: 1px;
  background: var(--faint);
  margin: 3em 0;
}
.gh-content .kg-image-card img,
.gh-content .kg-gallery-image img {
  width: 100%;
  height: auto;
}

/* Wide and full width images */
.gh-content .kg-width-wide {
  max-width: var(--wide-width);
  margin-left: calc((var(--content-width) - var(--wide-width)) / 2);
  margin-right: calc((var(--content-width) - var(--wide-width)) / 2);
}
.gh-content .kg-width-full {
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* --- Author Box --- */
.author-box {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 32px 24px 64px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  border-top: 1px solid var(--faint);
}
.author-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.author-info h4 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 4px;
}
.author-info p {
  font-size: 0.85rem;
  color: var(--mid);
  line-height: 1.5;
}

/* ============================================
   TAG / SECTION PAGES
   ============================================ */
.tag-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px 24px 32px;
}
.tag-header h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 3rem;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.tag-header p {
  font-size: 0.95rem;
  color: var(--mid);
  max-width: 480px;
}

/* ============================================
   AUTHOR PAGE
   ============================================ */
.author-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px 24px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.author-header-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}
.author-header h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2rem;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.author-header p {
  font-size: 0.88rem;
  color: var(--mid);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--black);
  color: var(--white);
  padding: 64px 24px 32px;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}
.footer-brand .footer-logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.8rem;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
}
.footer-brand .footer-logo .dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--signal);
  border-radius: 50%;
  margin-left: 2px;
  position: relative;
  top: -0.4em;
}
.footer-brand p {
  font-size: 0.85rem;
  color: var(--mid);
  line-height: 1.6;
  max-width: 280px;
}
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  font-size: 0.85rem;
  color: var(--warm);
  margin-bottom: 10px;
  transition: color 0.15s ease;
}
.footer-col a:hover {
  color: var(--signal);
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-bottom p {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.2);
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px 80px;
  display: flex;
  justify-content: center;
  gap: 16px;
}
.pagination a {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  padding: 10px 20px;
  border: 1px solid var(--faint);
  transition: all 0.15s ease;
}
.pagination a:hover {
  border-color: var(--black);
  color: var(--black);
}

/* ============================================
   ERROR PAGE
   ============================================ */
.error-page {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 120px 24px;
  text-align: center;
}
.error-code {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 8rem;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--faint);
  margin-bottom: 16px;
}
.error-page h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  margin-bottom: 12px;
}
.error-page p {
  color: var(--mid);
  margin-bottom: 32px;
}
.error-page a {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--signal);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-main .post-title {
    font-size: 2rem;
  }
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .article-header h1 {
    font-size: 2.2rem;
  }
}

@media (max-width: 640px) {
  .header-inner {
    height: 56px;
  }
  .site-nav {
    display: none;
  }
  .site-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--faint);
    padding: 24px;
    gap: 20px;
  }
  .nav-toggle {
    display: block;
  }
  .hero-main .post-title {
    font-size: 1.6rem;
  }
  .hero-main .post-image {
    aspect-ratio: 3/2;
  }
  .hero-sidebar-post {
    grid-template-columns: 100px 1fr;
  }
  .post-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-top {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .article-header h1 {
    font-size: 1.8rem;
  }
  .article-header {
    text-align: left;
  }
  .article-meta {
    justify-content: flex-start;
  }
  .newsletter-form {
    flex-direction: column;
  }
  .newsletter-form button {
    padding: 14px;
  }
}

/* ============================================
   GHOST SPECIFIC / OVERRIDES
   ============================================ */
.gh-portal-triggerbtn-iframe {
  /* Style ghost membership button */
}
.kg-bookmark-card {
  border: 1px solid var(--faint);
  margin: 2em 0;
}
.kg-bookmark-container {
  display: flex;
  text-decoration: none;
  color: var(--black);
}
.kg-bookmark-content {
  padding: 20px;
  flex: 1;
}
.kg-bookmark-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 8px;
}
.kg-bookmark-description {
  font-size: 0.85rem;
  color: var(--mid);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.kg-bookmark-metadata {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.06em;
  color: var(--warm);
  margin-top: 8px;
  text-transform: uppercase;
}
.kg-bookmark-thumbnail {
  width: 160px;
  flex-shrink: 0;
}
.kg-bookmark-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
