/* Magoven Blog — matches magoven.io design tokens */

:root {
  --background: #050506;
  --foreground: #f8f8f8;
  --card: rgba(255, 255, 255, 0.04);
  --card-border: rgba(255, 255, 255, 0.1);
  --muted: #a1a1aa;
  --brand-gold: #f6c302;
  --nav-bg: rgba(5, 5, 6, 0.92);
  --container: min(1200px, 100% - 2.5rem);
  --radius: 1.25rem;
  --radius-lg: 1.75rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.magoven-theme {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

body.magoven-theme::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 70% -10%, rgba(246, 195, 2, 0.1), transparent),
    radial-gradient(ellipse 50% 40% at 10% 60%, rgba(246, 195, 2, 0.04), transparent);
}

a {
  color: var(--brand-gold);
  text-decoration: none;
  transition: color 0.2s, opacity 0.2s;
}

a:hover {
  color: #ffe566;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: var(--container);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.site-header.is-scrolled {
  background: var(--nav-bg);
  border-color: var(--card-border);
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
  padding-block: 0.75rem;
}

.site-logo img {
  width: 150px;
  height: auto;
}

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

.site-nav a {
  padding: 0.5rem 0.85rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
}

.site-nav a:hover {
  color: var(--brand-gold);
  background: rgba(255, 255, 255, 0.05);
}

.site-nav--drawer {
  padding: 0.75rem 1.25rem 0;
  gap: 0.5rem;
}

.site-nav--drawer a {
  color: var(--brand-gold);
  border: 1px solid rgba(246, 195, 2, 0.25);
  background: rgba(246, 195, 2, 0.06);
}

@media (max-width: 1023px) {
  .hide-mobile {
    display: none !important;
  }
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.65rem 1.25rem;
  border-radius: 1rem;
  background: var(--brand-gold);
  color: #000 !important;
  font-weight: 700;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  color: #000 !important;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(246, 195, 2, 0.25);
}

.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.875rem;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--foreground);
  cursor: pointer;
}

.menu-toggle__bar {
  display: block;
  width: 1.125rem;
  height: 2px;
  background: currentColor;
  margin: 3px 0;
  transition: transform 0.25s;
}

.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  visibility: hidden;
  pointer-events: none;
}

.nav-drawer.is-open {
  visibility: visible;
  pointer-events: auto;
}

.nav-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  opacity: 0;
  transition: opacity 0.3s;
}

.nav-drawer.is-open .nav-drawer__backdrop {
  opacity: 1;
}

.nav-drawer__panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #0a0a0c;
  border-bottom: 1px solid var(--card-border);
  transform: translateY(-100%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  max-height: 100dvh;
  overflow-y: auto;
}

.nav-drawer.is-open .nav-drawer__panel {
  transform: translateY(0);
}

.nav-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--card-border);
}

.nav-menu {
  list-style: none;
  margin: 0;
  padding: 1.5rem 1.25rem;
}

.nav-menu li {
  margin: 0;
}

.nav-menu a {
  display: block;
  padding: 0.85rem 0;
  color: var(--foreground);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  border-bottom: 1px solid var(--card-border);
}

.nav-menu a:hover {
  color: var(--brand-gold);
}

.nav-menu .nav-label {
  display: block;
  padding: 1rem 0 0.5rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brand-gold);
  border: none;
}

/* Hero */
.blog-hero {
  padding: 5rem 0 3rem;
  text-align: center;
}

.blog-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--card);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-gold);
  margin-bottom: 1.25rem;
}

.blog-hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.blog-hero h1 .text-gold {
  background: linear-gradient(135deg, #f6c302 0%, #ffe566 50%, #f6c302 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.blog-hero p {
  margin: 0 auto;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.05rem;
}

/* Post grid */
.posts-grid {
  display: grid;
  gap: 1.5rem;
  padding-bottom: 4rem;
}

@media (min-width: 640px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .posts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.post-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  background: var(--card);
  overflow: hidden;
  backdrop-filter: blur(12px);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: rgba(246, 195, 2, 0.35);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.post-card__thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}

.post-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.post-card:hover .post-card__thumb img {
  transform: scale(1.04);
}

.post-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.25rem 1.35rem 1.5rem;
}

.post-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.post-card__meta a {
  color: var(--brand-gold);
  font-size: inherit;
}

.post-card__title {
  margin: 0 0 0.65rem;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.post-card__title a {
  color: var(--foreground);
}

.post-card__title a:hover {
  color: var(--brand-gold);
}

.post-card__excerpt {
  margin: 0 0 1rem;
  flex: 1;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
}

.post-card__link {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand-gold) !important;
}

/* Single post */
.single-hero {
  padding: 5rem 0 2rem;
  max-width: 48rem;
  margin-inline: auto;
}

.single-hero h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.post-meta a {
  color: var(--brand-gold);
}

.post-meta__sep {
  opacity: 0.5;
}

.single-featured {
  margin: 0 auto 2.5rem;
  max-width: 56rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--card-border);
}

.entry-content {
  max-width: 42rem;
  margin: 0 auto 4rem;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: rgba(248, 248, 248, 0.92);
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin: 2.25rem 0 0.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--foreground);
}

.entry-content h2 { font-size: 1.65rem; }
.entry-content h3 { font-size: 1.35rem; }

.entry-content p {
  margin: 0 0 1.25rem;
}

.entry-content ul,
.entry-content ol {
  margin: 0 0 1.25rem;
  padding-left: 1.35rem;
}

.entry-content li {
  margin-bottom: 0.5rem;
}

.entry-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--brand-gold);
  background: rgba(246, 195, 2, 0.06);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--muted);
  font-style: italic;
}

.entry-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.entry-content pre,
.entry-content code {
  font-family: ui-monospace, monospace;
  font-size: 0.875em;
}

.entry-content pre {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--card-border);
  overflow-x: auto;
}

/* Pagination */
.pagination,
.nav-links {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem 0 4rem;
  flex-wrap: wrap;
}

.pagination a,
.pagination span,
.nav-links a,
.nav-links span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.85rem;
  border-radius: 0.75rem;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--foreground);
  font-size: 0.875rem;
  font-weight: 600;
}

.pagination .current,
.nav-links .current {
  background: var(--brand-gold);
  color: #000;
  border-color: var(--brand-gold);
}

/* CTA band */
.cta-band {
  margin: 2rem 0 4rem;
  padding: 2.5rem 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(246, 195, 2, 0.25);
  background: linear-gradient(135deg, rgba(246, 195, 2, 0.08), rgba(255, 255, 255, 0.02));
  text-align: center;
}

.cta-band h2 {
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
  font-weight: 800;
}

.cta-band p {
  margin: 0 0 1.25rem;
  color: var(--muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--card-border);
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  background: var(--card);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.2fr 2fr;
    padding: 2.5rem;
  }
}

.footer-brand p {
  margin: 1rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
  max-width: 22rem;
}

.footer-links {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 640px) {
  .footer-links {
    grid-template-columns: repeat(4, 1fr);
  }
}

.footer-col h3 {
  margin: 0 0 0.85rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brand-gold);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  font-size: 0.875rem;
  color: var(--muted);
}

.footer-col a:hover {
  color: var(--foreground);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 2rem;
  padding-inline: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted);
}

@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* 404 & search */
.page-header {
  padding: 4rem 0 2rem;
  text-align: center;
}

.page-header h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 800;
}

.search-form {
  display: flex;
  gap: 0.5rem;
  max-width: 28rem;
  margin: 1.5rem auto 0;
}

.search-form input[type="search"] {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 0.875rem;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--foreground);
  font-family: inherit;
  font-size: 0.95rem;
}

.search-form input[type="submit"] {
  padding: 0.75rem 1.25rem;
  border-radius: 0.875rem;
  border: none;
  background: var(--brand-gold);
  color: #000;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

@media (max-width: 639px) {
  .hide-sm {
    display: none !important;
  }
}

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