/* =====================================================================
   MAGIORIA BLOG · style.css
   Aesthetic: Editorial-magical · Storybook warmth · Pixar-inspired
   Typography: Fraunces (display) · Manrope (UI) · Lora (lectura)
   ===================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Color palette */
  --c-night: #2D1B4E;
  --c-night-2: #1A1132;
  --c-violet: #7C3F9E;
  --c-violet-soft: #A87AC4;
  --c-gold: #F5C26B;
  --c-gold-deep: #E5A93C;
  --c-rose: #E8A4A4;
  --c-cream: #FBF7F0;
  --c-cream-2: #F3ECDD;
  --c-ink: #1A1A2E;
  --c-ink-soft: #4A4A6A;
  --c-line: #E5DDC9;

  /* Typography */
  --f-display: "Fraunces", "Cormorant Garamond", Georgia, serif;
  --f-ui:       "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --f-body:    "Lora", Georgia, "Times New Roman", serif;

  /* Layout */
  --container: 1240px;
  --gutter: clamp(20px, 4vw, 40px);
  --radius: 14px;
  --radius-lg: 22px;

  /* Shadows */
  --shadow-soft: 0 12px 32px -16px rgba(45, 27, 78, 0.18);
  --shadow-deep: 0 30px 80px -30px rgba(45, 27, 78, 0.42);

  /* Easings */
  --ease: cubic-bezier(.2,.8,.2,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--c-ink);
  background: var(--c-cream);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(245,194,107,0.10), transparent 38%),
    radial-gradient(circle at 88% 5%, rgba(232,164,164,0.10), transparent 42%),
    radial-gradient(circle at 50% 100%, rgba(124,63,158,0.06), transparent 50%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Subtle paper grain via SVG noise */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.18 0 0 0 0 0.10 0 0 0 0 0.30 0 0 0 0.06 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

img { max-width: 100%; display: block; height: auto; }
a { color: var(--c-violet); text-decoration: none; transition: color .25s var(--ease); }
a:hover { color: var(--c-night); }

/* ---------- Containers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 2;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--c-night);
  margin: 0 0 0.5em;
  font-variation-settings: "SOFT" 50, "WONK" 0;
}
h1 { font-size: clamp(2.4rem, 5.4vw, 4.6rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.7rem); }

p { margin: 0 0 1.2em; }
.lead { font-size: 1.18em; line-height: 1.55; color: var(--c-ink-soft); }

::selection { background: var(--c-gold); color: var(--c-night); }

/* =====================================================================
   HEADER
   ===================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 247, 240, 0.85);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--c-line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 1.65rem;
  color: var(--c-night);
  letter-spacing: -0.02em;
  font-variation-settings: "SOFT" 100, "WONK" 1;
}
.brand .star {
  display: inline-block;
  width: 14px; height: 14px;
  background: var(--c-gold);
  clip-path: polygon(50% 0,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%);
  transform: translateY(-2px);
  animation: twinkle 4s var(--ease) infinite;
}
@keyframes twinkle {
  0%, 100% { transform: translateY(-2px) scale(1) rotate(0); opacity: 1; }
  50%      { transform: translateY(-2px) scale(1.18) rotate(20deg); opacity: 0.75; }
}
.brand small {
  font-family: var(--f-ui);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--c-ink-soft);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-ui);
  font-size: 0.92rem;
  font-weight: 500;
}
.nav a {
  position: relative;
  padding: 10px 14px;
  color: var(--c-ink);
  border-radius: 999px;
  transition: background .25s var(--ease), color .25s var(--ease);
}
.nav a:hover, .nav a.is-active {
  background: var(--c-night);
  color: var(--c-cream);
}

.search-toggle {
  background: transparent;
  border: 1.5px solid var(--c-line);
  color: var(--c-ink);
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--f-ui);
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all .25s var(--ease);
}
.search-toggle:hover { border-color: var(--c-night); background: var(--c-night); color: var(--c-cream); }

.menu-toggle {
  display: none;
  background: transparent;
  border: 0;
  font-size: 1.7rem;
  color: var(--c-night);
  cursor: pointer;
  padding: 6px;
}

@media (max-width: 880px) {
  .nav, .search-toggle { display: none; }
  .menu-toggle { display: block; }
  .nav.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--c-cream);
    padding: 16px var(--gutter);
    border-bottom: 1px solid var(--c-line);
    align-items: stretch;
  }
  .nav.is-open a { padding: 12px 16px; border-radius: 10px; }
}

/* =====================================================================
   HERO (homepage)
   ===================================================================== */
.hero {
  position: relative;
  padding: clamp(60px, 10vw, 110px) 0 clamp(50px, 8vw, 80px);
  overflow: hidden;
}
.hero::after {
  /* decorative moon */
  content: "";
  position: absolute;
  top: 8%;
  right: -120px;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle at 35% 35%, var(--c-cream-2), var(--c-rose) 70%, transparent 73%);
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.55;
  z-index: 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
  position: relative;
  z-index: 2;
}
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; } }

.hero-eyebrow {
  font-family: var(--f-ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-violet);
  margin-bottom: 22px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.hero-eyebrow::before {
  content: "";
  width: 30px; height: 1.5px;
  background: var(--c-violet);
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 5rem);
  font-weight: 400;
  line-height: 0.98;
  margin-bottom: 28px;
  font-variation-settings: "SOFT" 100, "WONK" 0;
}
.hero h1 em {
  font-style: italic;
  color: var(--c-violet);
  font-variation-settings: "SOFT" 100, "WONK" 1;
}

.hero p {
  font-size: 1.15rem;
  color: var(--c-ink-soft);
  max-width: 480px;
  margin-bottom: 36px;
}

.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  font-family: var(--f-ui);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
  letter-spacing: 0.01em;
}
.btn-primary {
  background: var(--c-night);
  color: var(--c-cream);
}
.btn-primary:hover {
  background: var(--c-violet);
  color: var(--c-cream);
  transform: translateY(-2px);
  box-shadow: var(--shadow-deep);
}
.btn-secondary {
  background: transparent;
  color: var(--c-night);
  border: 1.5px solid var(--c-night);
}
.btn-secondary:hover {
  background: var(--c-night);
  color: var(--c-cream);
}

/* Hero featured card */
.hero-feature {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-deep);
  transform: rotate(1.2deg);
  transition: transform .5s var(--ease);
}
.hero-feature:hover { transform: rotate(0); }
.hero-feature .ratio {
  aspect-ratio: 4 / 5;
  background: var(--c-night);
}
.hero-feature img,
.hero-feature .ratio img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s var(--ease);
}
.hero-feature:hover img { transform: scale(1.05); }
.hero-feature .meta {
  position: absolute;
  inset: auto 0 0 0;
  padding: 26px 28px 28px;
  background: linear-gradient(to top, rgba(26,17,50,0.95) 0%, rgba(26,17,50,0.6) 60%, transparent);
  color: var(--c-cream);
}
.hero-feature .tag {
  display: inline-block;
  font-family: var(--f-ui);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: var(--c-gold);
  color: var(--c-night);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.hero-feature h3 {
  color: var(--c-cream);
  font-size: 1.7rem;
  margin: 0;
  font-weight: 400;
}

/* Floating sparkles in hero */
.sparkle {
  position: absolute;
  width: 18px; height: 18px;
  pointer-events: none;
  opacity: 0.6;
  animation: float-up 6s var(--ease) infinite;
}
.sparkle:nth-of-type(1) { top: 18%; left: 6%; animation-delay: 0s; color: var(--c-gold); }
.sparkle:nth-of-type(2) { top: 60%; left: 48%; animation-delay: 1.5s; color: var(--c-rose); }
.sparkle:nth-of-type(3) { top: 30%; left: 92%; animation-delay: 3s; color: var(--c-violet-soft); }
@keyframes float-up {
  0%   { transform: translateY(0) rotate(0); opacity: 0; }
  20%  { opacity: 0.8; }
  100% { transform: translateY(-120px) rotate(180deg); opacity: 0; }
}

/* =====================================================================
   SECTION HEAD
   ===================================================================== */
.section {
  padding: clamp(60px, 8vw, 100px) 0;
  position: relative;
  z-index: 2;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 50px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--c-line);
}
.section-head h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 400;
  font-variation-settings: "SOFT" 100, "WONK" 0;
}
.section-head .label {
  font-family: var(--f-ui);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-violet);
  display: block;
  margin-bottom: 8px;
}
.section-head .more {
  font-family: var(--f-ui);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--c-night);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.section-head .more:hover { color: var(--c-violet); gap: 12px; }

/* =====================================================================
   CATEGORY PILLS
   ===================================================================== */
.cat-strip {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 50px;
}
.cat-pill {
  font-family: var(--f-ui);
  font-size: 0.86rem;
  font-weight: 600;
  background: var(--c-cream-2);
  color: var(--c-night);
  padding: 10px 20px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  transition: all .25s var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cat-pill:hover, .cat-pill.is-active {
  background: var(--c-night);
  color: var(--c-cream);
}
.cat-pill .count {
  font-size: 0.72rem;
  opacity: 0.6;
  font-variant-numeric: tabular-nums;
}

/* =====================================================================
   ARTICLE GRID + CARDS
   ===================================================================== */
.layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: clamp(30px, 5vw, 60px);
}
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(28px, 4vw, 48px);
}
@media (max-width: 640px) { .article-grid { grid-template-columns: 1fr; } }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: transparent;
  transition: transform .35s var(--ease);
}
.card:hover { transform: translateY(-4px); }

.card-img {
  position: relative;
  aspect-ratio: 5 / 4;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 22px;
  box-shadow: var(--shadow-soft);
  background: var(--c-cream-2);
}
.card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.card:hover .card-img img { transform: scale(1.06); }

.card-tag {
  position: absolute;
  top: 14px; left: 14px;
  font-family: var(--f-ui);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: var(--c-cream);
  color: var(--c-night);
  padding: 6px 12px;
  border-radius: 999px;
  z-index: 2;
}

.card-meta {
  font-family: var(--f-ui);
  font-size: 0.78rem;
  color: var(--c-ink-soft);
  letter-spacing: 0.04em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-meta .dot { width: 3px; height: 3px; background: currentColor; border-radius: 50%; opacity: 0.5; }

.card h3 {
  font-size: clamp(1.25rem, 1.8vw, 1.55rem);
  font-weight: 500;
  margin: 0 0 12px;
  line-height: 1.18;
}
.card h3 a { color: var(--c-night); background-image: linear-gradient(var(--c-night), var(--c-night)); background-size: 0 1.5px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .35s var(--ease), color .25s var(--ease); }
.card h3 a:hover { background-size: 100% 1.5px; color: var(--c-violet); background-image: linear-gradient(var(--c-violet), var(--c-violet)); }

.card p {
  color: var(--c-ink-soft);
  font-size: 0.96rem;
  margin: 0;
}

/* Featured (large) card */
.card-feature .card-img { aspect-ratio: 16 / 10; }
.card-feature h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.card-feature { grid-column: span 2; }
@media (max-width: 640px) { .card-feature { grid-column: span 1; } }

/* =====================================================================
   SIDEBAR
   ===================================================================== */
.sidebar { position: sticky; top: 100px; align-self: start; }
.widget {
  margin-bottom: 44px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--c-line);
}
.widget:last-child { border: 0; }
.widget h4 {
  font-family: var(--f-ui);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-violet);
  margin: 0 0 22px;
  padding-bottom: 14px;
  border-bottom: 1.5px solid var(--c-night);
  display: inline-block;
}

.popular-list { list-style: none; padding: 0; margin: 0; counter-reset: pop; }
.popular-list li {
  display: flex;
  gap: 14px;
  margin-bottom: 22px;
  counter-increment: pop;
}
.popular-list li::before {
  content: counter(pop, decimal-leading-zero);
  font-family: var(--f-display);
  font-size: 1.6rem;
  font-weight: 300;
  color: var(--c-violet-soft);
  line-height: 1;
  min-width: 38px;
  font-variation-settings: "WONK" 1;
}
.popular-list a {
  color: var(--c-night);
  font-family: var(--f-display);
  font-size: 1.02rem;
  line-height: 1.25;
}
.popular-list a:hover { color: var(--c-violet); }
.popular-list small {
  display: block;
  font-family: var(--f-ui);
  font-size: 0.72rem;
  color: var(--c-ink-soft);
  margin-top: 4px;
  letter-spacing: 0.04em;
}

.cat-list { list-style: none; padding: 0; margin: 0; }
.cat-list li {
  border-bottom: 1px dashed var(--c-line);
}
.cat-list li:last-child { border: 0; }
.cat-list a {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  font-family: var(--f-ui);
  font-size: 0.94rem;
  color: var(--c-night);
  font-weight: 500;
  transition: padding .25s var(--ease);
}
.cat-list a:hover { padding-left: 8px; color: var(--c-violet); }
.cat-list span { color: var(--c-ink-soft); font-size: 0.82rem; }

/* CTA / Newsletter widget */
.widget-cta {
  background: var(--c-night);
  color: var(--c-cream);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  margin-bottom: 44px;
  position: relative;
  overflow: hidden;
}
.widget-cta::after {
  content: "";
  position: absolute;
  top: -40px; right: -40px;
  width: 140px; height: 140px;
  background: radial-gradient(circle, var(--c-gold), transparent 70%);
  border-radius: 50%;
  opacity: 0.4;
}
.widget-cta h4 {
  color: var(--c-gold);
  border-color: var(--c-gold);
}
.widget-cta p {
  font-family: var(--f-body);
  color: var(--c-cream);
  font-size: 0.96rem;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}
.widget-cta input[type="email"] {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 0;
  background: var(--c-cream);
  color: var(--c-night);
  font-family: var(--f-ui);
  font-size: 0.92rem;
  margin-bottom: 12px;
}
.widget-cta input[type="email"]:focus {
  outline: 2px solid var(--c-gold);
  outline-offset: 2px;
}
.widget-cta button {
  width: 100%;
  background: var(--c-gold);
  color: var(--c-night);
  font-family: var(--f-ui);
  font-weight: 700;
  border: 0;
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .25s var(--ease);
}
.widget-cta button:hover { background: var(--c-gold-deep); }

/* =====================================================================
   ARTICLE PAGE
   ===================================================================== */
.article-hero {
  padding: clamp(40px, 6vw, 70px) 0 30px;
  text-align: center;
}
.article-hero .crumbs {
  font-family: var(--f-ui);
  font-size: 0.8rem;
  color: var(--c-ink-soft);
  letter-spacing: 0.04em;
  margin-bottom: 22px;
}
.article-hero .crumbs a { color: var(--c-violet); }
.article-hero .crumbs span { margin: 0 8px; opacity: 0.4; }

.article-hero .cat-tag {
  display: inline-block;
  font-family: var(--f-ui);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-violet);
  margin-bottom: 18px;
}

.article-hero h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 400;
  max-width: 920px;
  margin: 0 auto 22px;
  font-variation-settings: "SOFT" 80, "WONK" 0;
}
.article-hero .excerpt {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: var(--c-ink-soft);
  max-width: 720px;
  margin: 0 auto 30px;
  font-style: italic;
  font-family: var(--f-display);
  font-weight: 300;
  line-height: 1.4;
}

.article-byline {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-family: var(--f-ui);
  font-size: 0.88rem;
  color: var(--c-ink-soft);
  padding: 14px 24px;
  background: var(--c-cream-2);
  border-radius: 999px;
}
.article-byline strong {
  color: var(--c-night);
  font-weight: 700;
}
.article-byline .sep { width: 1px; height: 14px; background: var(--c-line); }

.article-image {
  margin: clamp(30px, 5vw, 50px) 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-deep);
  aspect-ratio: 16 / 9;
  background: var(--c-night);
}
.article-image img { width: 100%; height: 100%; object-fit: cover; }

.article-content {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.12rem;
  line-height: 1.78;
  color: #2a2438;
}
.article-content > * { margin-bottom: 1.4em; }
.article-content h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  font-weight: 500;
  margin-top: 1.6em;
  margin-bottom: 0.5em;
  font-variation-settings: "SOFT" 60, "WONK" 1;
}
.article-content h3 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-top: 1.4em;
  margin-bottom: 0.4em;
}
.article-content .lead {
  font-size: 1.32rem;
  font-family: var(--f-display);
  font-weight: 300;
  line-height: 1.4;
  color: var(--c-night);
  border-left: 3px solid var(--c-gold);
  padding-left: 22px;
  margin-left: -22px;
}
.article-content blockquote {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 1.5rem;
  line-height: 1.35;
  color: var(--c-violet);
  border: 0;
  padding: 30px 40px;
  margin: 40px -40px;
  position: relative;
  font-variation-settings: "SOFT" 100, "WONK" 1;
}
.article-content blockquote::before {
  content: "\201C";
  position: absolute;
  top: -10px;
  left: 0;
  font-size: 5rem;
  color: var(--c-gold);
  line-height: 1;
  font-family: Georgia, serif;
}
@media (max-width: 760px) {
  .article-content blockquote { margin: 30px 0; padding: 20px 0 20px 30px; }
  .article-content blockquote::before { left: -8px; }
}

.article-content ul, .article-content ol {
  padding-left: 24px;
}
.article-content li { margin-bottom: 0.6em; }
.article-content strong { color: var(--c-night); font-weight: 700; }
.article-content a {
  color: var(--c-violet);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  text-decoration-color: var(--c-gold);
}
.article-content a:hover { color: var(--c-night); }

.article-content figure {
  margin: 40px -40px;
  border-radius: var(--radius);
  overflow: hidden;
}
.article-content figure img { width: 100%; }
.article-content figcaption {
  font-family: var(--f-ui);
  font-size: 0.85rem;
  text-align: center;
  color: var(--c-ink-soft);
  padding: 12px 16px;
  background: var(--c-cream-2);
}

/* CTA in article */
.article-cta {
  max-width: 720px;
  margin: 60px auto;
  background: linear-gradient(135deg, var(--c-night) 0%, var(--c-violet) 100%);
  color: var(--c-cream);
  border-radius: var(--radius-lg);
  padding: 50px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.article-cta::before {
  content: "";
  position: absolute;
  top: -50%; left: 50%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--c-gold), transparent 60%);
  opacity: 0.25;
  transform: translateX(-50%);
  border-radius: 50%;
}
.article-cta h3 {
  color: var(--c-cream);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 14px;
  position: relative;
  font-weight: 400;
}
.article-cta p {
  color: rgba(251, 247, 240, 0.9);
  margin-bottom: 24px;
  position: relative;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.article-cta .btn {
  background: var(--c-gold);
  color: var(--c-night);
  position: relative;
  font-weight: 700;
}
.article-cta .btn:hover {
  background: var(--c-cream);
  transform: translateY(-2px);
}

/* Share buttons */
.share-block {
  max-width: 720px;
  margin: 50px auto 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 30px;
  border-top: 1px solid var(--c-line);
}
.share-block span {
  font-family: var(--f-ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-ink-soft);
}
.share-block a {
  width: 38px; height: 38px;
  border: 1.5px solid var(--c-line);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--c-night);
  transition: all .25s var(--ease);
}
.share-block a:hover {
  background: var(--c-night);
  color: var(--c-cream);
  border-color: var(--c-night);
  transform: translateY(-2px);
}

/* =====================================================================
   CATEGORY PAGE
   ===================================================================== */
.cat-hero {
  padding: clamp(60px, 10vw, 100px) 0 clamp(40px, 6vw, 60px);
  text-align: center;
  border-bottom: 1px solid var(--c-line);
  position: relative;
}
.cat-hero h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 400;
  margin-bottom: 22px;
  font-variation-settings: "SOFT" 100, "WONK" 1;
}
.cat-hero .intro {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.1rem;
  color: var(--c-ink-soft);
  line-height: 1.6;
}
.cat-hero .stat {
  display: inline-block;
  margin-top: 22px;
  padding: 8px 20px;
  background: var(--c-cream-2);
  border-radius: 999px;
  font-family: var(--f-ui);
  font-size: 0.82rem;
  color: var(--c-night);
  letter-spacing: 0.06em;
}

/* =====================================================================
   SEARCH
   ===================================================================== */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 17, 50, 0.92);
  backdrop-filter: blur(10px);
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 14vh;
}
.search-overlay.is-open { display: flex; animation: fadeIn .3s var(--ease); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.search-box {
  width: 100%;
  max-width: 600px;
  margin: 0 var(--gutter);
}
.search-box form {
  position: relative;
  border-bottom: 2px solid var(--c-gold);
}
.search-box input {
  width: 100%;
  background: transparent;
  border: 0;
  padding: 18px 50px 18px 0;
  font-family: var(--f-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--c-cream);
  font-weight: 300;
}
.search-box input:focus { outline: 0; }
.search-box input::placeholder { color: rgba(251,247,240,0.4); }
.search-box .close {
  position: absolute;
  right: 0; top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: var(--c-cream);
  font-size: 1.6rem;
  cursor: pointer;
}
.search-box .hint {
  margin-top: 18px;
  font-family: var(--f-ui);
  font-size: 0.82rem;
  color: rgba(251,247,240,0.55);
  letter-spacing: 0.08em;
}

/* =====================================================================
   PAGINATION
   ===================================================================== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 60px;
  font-family: var(--f-ui);
}
.pagination a, .pagination span {
  min-width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--c-night);
  transition: all .25s var(--ease);
}
.pagination a:hover { background: var(--c-cream-2); }
.pagination .current { background: var(--c-night); color: var(--c-cream); }
.pagination .disabled { opacity: 0.3; pointer-events: none; }

/* =====================================================================
   FOOTER
   ===================================================================== */
.site-footer {
  background: var(--c-night);
  color: var(--c-cream);
  padding: 80px 0 40px;
  margin-top: 100px;
  position: relative;
  z-index: 2;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  gap: 50px;
  margin-bottom: 60px;
}
@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-col h5 {
  font-family: var(--f-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-gold);
  margin: 0 0 22px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a {
  color: var(--c-cream);
  font-family: var(--f-ui);
  font-size: 0.92rem;
  opacity: 0.85;
}
.footer-col a:hover { opacity: 1; color: var(--c-gold); }

.footer-brand {
  font-family: var(--f-display);
  font-size: 2rem;
  margin-bottom: 16px;
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-variation-settings: "SOFT" 100, "WONK" 1;
}
.footer-brand .star {
  display: inline-block;
  width: 14px; height: 14px;
  background: var(--c-gold);
  clip-path: polygon(50% 0,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%);
}
.footer-tagline {
  opacity: 0.7;
  max-width: 320px;
  font-size: 0.95rem;
  line-height: 1.55;
}

.footer-newsletter input {
  width: 100%;
  background: rgba(251, 247, 240, 0.08);
  border: 1.5px solid rgba(251, 247, 240, 0.2);
  color: var(--c-cream);
  padding: 12px 16px;
  border-radius: 10px;
  font-family: var(--f-ui);
  font-size: 0.9rem;
  margin-bottom: 12px;
}
.footer-newsletter input:focus { outline: 0; border-color: var(--c-gold); }
.footer-newsletter input::placeholder { color: rgba(251,247,240,0.4); }
.footer-newsletter button {
  width: 100%;
  background: var(--c-gold);
  color: var(--c-night);
  border: 0;
  padding: 12px;
  border-radius: 10px;
  font-family: var(--f-ui);
  font-weight: 700;
  cursor: pointer;
  transition: background .25s var(--ease);
}
.footer-newsletter button:hover { background: var(--c-cream); }

.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid rgba(251, 247, 240, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--f-ui);
  font-size: 0.82rem;
  opacity: 0.7;
}

/* =====================================================================
   RELATED ARTICLES
   ===================================================================== */
.related {
  background: var(--c-cream-2);
  margin-top: 100px;
  padding: 70px 0;
}
.related-head {
  text-align: center;
  margin-bottom: 50px;
}
.related-head .label {
  font-family: var(--f-ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-violet);
  margin-bottom: 12px;
  display: block;
}
.related-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 400;
  margin: 0;
}

/* =====================================================================
   ALERTS / FORMS
   ===================================================================== */
.alert {
  padding: 14px 20px;
  border-radius: 10px;
  font-family: var(--f-ui);
  font-size: 0.92rem;
  margin-bottom: 20px;
}
.alert-success { background: #E8F5E9; color: #1B5E20; }
.alert-error   { background: #FDEDED; color: #8E1A1A; border: 1px solid #f5c2c2; }

/* =====================================================================
   ANIMATION ENTER
   ===================================================================== */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp .8s var(--ease) forwards;
}
.fade-up.d1 { animation-delay: 0.1s; }
.fade-up.d2 { animation-delay: 0.2s; }
.fade-up.d3 { animation-delay: 0.3s; }
.fade-up.d4 { animation-delay: 0.4s; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* =====================================================================
   ADMIN STYLES (en admin.php)
   ===================================================================== */
.admin-wrap {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
@media (max-width: 768px) { .admin-wrap { grid-template-columns: 1fr; } }
.admin-sidebar {
  background: var(--c-night);
  color: var(--c-cream);
  padding: 30px 24px;
}
.admin-sidebar h2 {
  color: var(--c-cream);
  font-size: 1.5rem;
  margin-bottom: 30px;
}
.admin-sidebar nav a {
  display: block;
  color: var(--c-cream);
  padding: 10px 14px;
  border-radius: 10px;
  font-family: var(--f-ui);
  font-size: 0.92rem;
  margin-bottom: 4px;
  opacity: 0.85;
}
.admin-sidebar nav a:hover, .admin-sidebar nav a.is-active {
  background: rgba(251,247,240,0.12);
  opacity: 1;
}
.admin-main { padding: 40px; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.admin-table th, .admin-table td {
  padding: 14px 16px;
  text-align: left;
  font-family: var(--f-ui);
  font-size: 0.92rem;
  border-bottom: 1px solid var(--c-line);
}
.admin-table th {
  background: var(--c-cream-2);
  font-weight: 700;
  color: var(--c-night);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.admin-table tr:hover { background: var(--c-cream); }

.admin-form { background: white; border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-soft); max-width: 800px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-family: var(--f-ui); font-weight: 600; font-size: 0.86rem; margin-bottom: 6px; color: var(--c-night); }
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="file"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--c-line);
  border-radius: 10px;
  font-family: var(--f-ui);
  font-size: 0.94rem;
  background: var(--c-cream);
}
.form-group textarea { min-height: 220px; font-family: var(--f-body); font-size: 1rem; line-height: 1.6; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: 0;
  border-color: var(--c-violet);
  background: white;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background: linear-gradient(135deg, var(--c-night), var(--c-violet));
}
.login-card {
  background: var(--c-cream);
  border-radius: var(--radius-lg);
  padding: 50px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-deep);
}
.login-card h1 {
  font-size: 2rem;
  margin-bottom: 8px;
  font-variation-settings: "SOFT" 100, "WONK" 1;
}
.login-card p { color: var(--c-ink-soft); font-size: 0.95rem; }

/* =====================================================================
   UTILITIES
   ===================================================================== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.text-center { text-align: center; }
.mt-4 { margin-top: 40px; }
