/* ================================================================
   UNIBRUZ Blog — Page Styles
   Depends on: base.css
   ================================================================ */

/* ----------------------------------------------------------------
   CSS Variables (Blog-specific)
   ---------------------------------------------------------------- */
:root {
  --background: hsl(0 0% 4%);
  --card-foreground: hsl(0 0% 95%);
  --primary-foreground: hsl(0 0% 4%);
  --secondary: hsl(0 0% 12%);
  --muted-foreground: hsl(0 0% 60%);
  --gradient-gold: hsl(48 100% 50%);
  --shadow-glow: 0 0 40px hsl(48 100% 50% / .15);
}

/* ----------------------------------------------------------------
   Body
   ---------------------------------------------------------------- */
body {
  background-color: var(--background);
  color: var(--card-foreground);
  font-family: var(--font-body);
  line-height: 1.5;
  min-height: 100vh;
}

/* ----------------------------------------------------------------
   Layout
   ---------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Nav, footer & reset come from base.css */

/* ----------------------------------------------------------------
   Hero
   ---------------------------------------------------------------- */
.blog-hero {
  padding: 8rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.blog-hero::before { display: none; }
.eyebrow {
  font-family: var(--font-body);
  font-size: .8125rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 1.25rem;
}
.blog-hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: .95;
  margin-bottom: 1.25rem;
}
.text-gradient-gold { color: var(--primary); }
.blog-hero p {
  max-width: 560px;
  margin: 0 auto 3rem;
  color: var(--muted-foreground);
  font-size: 1.0625rem;
  line-height: 1.625;
}

/* ----------------------------------------------------------------
   Categories
   ---------------------------------------------------------------- */
.categories {
  display: flex;
  flex-wrap: wrap;
  gap: .625rem;
  justify-content: center;
  margin-bottom: 3.5rem;
}
.cat-btn {
  padding: .4rem 1rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted-foreground);
  font-family: var(--font-body);
  font-size: .8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.cat-btn:hover, .cat-btn.active {
  border-color: var(--primary);
  color: var(--primary);
  background: hsl(48 100% 50% / .06);
}

/* ----------------------------------------------------------------
   Featured Post
   ---------------------------------------------------------------- */
.featured-wrap { margin-bottom: 4rem; }
.featured-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 2.5rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  transition: border-color .3s, box-shadow .3s;
  text-decoration: none;
}
.featured-card:hover {
  border-color: hsl(48 100% 50% / .45);
  box-shadow: var(--shadow-glow);
}
@media (min-width: 768px) {
  .featured-card { grid-template-columns: 1fr 1fr; align-items: center; }
}
.featured-img {
  aspect-ratio: 16 / 9;
  border-radius: calc(var(--radius) - 2px);
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -.02em;
  overflow: hidden;
  position: relative;
}
.featured-img .feat-icon {
  font-size: 5rem;
  opacity: .25;
  position: absolute;
  bottom: -1rem; right: -.5rem;
}
.featured-img .featured-logo {
  width: min(45%, 220px);
  height: auto;
  object-fit: contain;
}
.featured-badge {
  display: inline-block;
  padding: .3rem .75rem;
  background: hsl(48 100% 50% / .1);
  color: var(--primary);
  font-size: .75rem;
  font-weight: 700;
  font-family: var(--font-display);
  border-radius: 9999px;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.featured-content h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.625rem;
  line-height: 1.2;
  margin-bottom: .875rem;
  color: var(--card-foreground);
}
.featured-content p {
  color: var(--muted-foreground);
  font-size: .9375rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: .8125rem;
  color: var(--muted-foreground);
}
.post-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-foreground); }
.read-more {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  color: var(--primary);
  font-weight: 600;
  font-size: .875rem;
  margin-top: .25rem;
  transition: gap .2s;
}
.featured-card:hover .read-more { gap: .625rem; }

/* ----------------------------------------------------------------
   Posts Grid
   ---------------------------------------------------------------- */
.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 5rem;
}
@media (min-width: 640px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .posts-grid { grid-template-columns: repeat(3, 1fr); }
}
.posts-empty {
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 4rem 1.5rem;
  margin-bottom: 5rem;
}
.posts-empty h3 { font-family: var(--font-display); font-size: 1.25rem; margin-bottom: .5rem; }
.posts-empty p { color: var(--muted-foreground); font-size: .95rem; max-width: 420px; margin: 0 auto; }

/* ----------------------------------------------------------------
   Post Card
   ---------------------------------------------------------------- */
.post-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color .3s, box-shadow .3s, transform .3s;
  text-decoration: none;
}
.post-card:hover {
  border-color: hsl(48 100% 50% / .4);
  box-shadow: var(--shadow-glow);
  transform: translateY(-3px);
}
.post-thumb {
  aspect-ratio: 16 / 9;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.75rem;
  position: relative;
  overflow: hidden;
}
.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  z-index: 0;
}
.post-thumb::after { display: none; }
.post-body { padding: 1.375rem; display: flex; flex-direction: column; flex: 1; }
.post-tag {
  display: inline-block;
  padding: .2rem .625rem;
  background: hsl(48 100% 50% / .08);
  color: var(--primary);
  font-size: .7rem;
  font-weight: 700;
  font-family: var(--font-display);
  border-radius: 9999px;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: .75rem;
}
.post-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.3;
  margin-bottom: .625rem;
  color: var(--card-foreground);
}
.post-card p {
  color: var(--muted-foreground);
  font-size: .875rem;
  line-height: 1.55;
  flex: 1;
  margin-bottom: 1.125rem;
}
.post-card .post-meta { margin-top: auto; }

/* ----------------------------------------------------------------
   Newsletter CTA
   ---------------------------------------------------------------- */
.newsletter {
  padding: 4rem 2.5rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 5rem;
}
.newsletter::before { display: none; }
.newsletter p.eyebrow { margin-bottom: .875rem; }
.newsletter h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 1rem;
}
.newsletter > p {
  max-width: 480px;
  margin: 0 auto 2rem;
  color: var(--muted-foreground);
  font-size: .9375rem;
  line-height: 1.6;
}
.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  max-width: 400px;
  margin: 0 auto;
}
@media (min-width: 480px) {
  .newsletter-form { flex-direction: row; }
}
.newsletter-form input {
  flex: 1;
  padding: .75rem 1rem;
  border-radius: calc(var(--radius) - 4px);
  border: 1px solid var(--border);
  background: hsl(0 0% 4%);
  color: var(--card-foreground);
  font-family: var(--font-body);
  font-size: .9rem;
  outline: none;
  transition: border-color .2s;
}
.newsletter-form input:focus { border-color: var(--primary); }
.newsletter-form input::placeholder { color: var(--muted-foreground); }
.newsletter-form button {
  padding: .75rem 1.5rem;
  border-radius: calc(var(--radius) - 4px);
  border: none;
  background: var(--primary);
  color: var(--primary-foreground);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .875rem;
  cursor: pointer;
  transition: opacity .15s;
  white-space: nowrap;
}
.newsletter-form button:hover { opacity: .88; }

/* ----------------------------------------------------------------
   Article Modal
   ---------------------------------------------------------------- */
.article-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: hsl(0 0% 0% / .72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
  padding: 1rem;
}
.article-modal.open { display: flex; }
.article-modal-card {
  width: min(840px, 100%);
  max-height: 88vh;
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-glow);
  padding: 1.25rem 1.25rem 1.5rem;
}
.article-modal-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.article-modal-top h3 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.8vw, 2rem);
  line-height: 1.2;
  color: var(--card-foreground);
}
.article-close {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted-foreground);
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}
.article-close:hover {
  color: var(--primary);
  border-color: var(--primary);
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  color: var(--muted-foreground);
  font-size: .8125rem;
  margin-bottom: 1.2rem;
}
.article-body {
  color: var(--card-foreground);
  line-height: 1.75;
  font-size: .96rem;
}
.article-body p {
  margin-bottom: 1rem;
  color: hsl(0 0% 88%);
}
.article-actions {
  margin-top: 1.2rem;
  display: flex;
  justify-content: flex-end;
}
.article-share {
  border: 1px solid var(--border);
  background: hsl(0 0% 4%);
  color: var(--primary);
  border-radius: calc(var(--radius) - 4px);
  padding: .55rem .85rem;
  font-family: var(--font-body);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.article-share:hover {
  border-color: var(--primary);
  background: hsl(48 100% 50% / .08);
}

/* ----------------------------------------------------------------
   Entrance Animations
   ---------------------------------------------------------------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.anim { opacity: 0; }
.anim.visible { animation: fadeInUp .55s cubic-bezier(.22,1,.36,1) forwards; }
.anim:nth-child(1) { animation-delay: 0s; }
.anim:nth-child(2) { animation-delay: .08s; }
.anim:nth-child(3) { animation-delay: .16s; }
.anim:nth-child(4) { animation-delay: .24s; }
.anim:nth-child(5) { animation-delay: .32s; }
.anim:nth-child(6) { animation-delay: .40s; }
