/* =============================================================
   UMBRAL — Stylesheet

   Sections:
     1. Fonts
     2. Variables
     3. Reset + base typography
     4. Utilities
     5. Navbar
     6. Features (home lead + secondaries)
     7. Category tags
     8. Áreas (home section)
     9. River (home recent feed)
    10. Archive page
    11. Post page
    12. Area pages
    13. Manifiesto
    14. Brand placeholders
    15. Footer
    16. Responsive (≤ 900px, ≤ 640px)
   ============================================================= */


/* 1. Fonts ---------------------------------------------------- */

@font-face {
  font-family: 'Advercase';
  src: url('../fonts/Advercase-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Advercase';
  src: url('../fonts/Advercase-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Helvetica Neue';
  src: url('../fonts/HelveticaNeueThin.woff2') format('woff2');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Helvetica Neue';
  src: url('../fonts/HelveticaNeueLight.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Helvetica Neue';
  src: url('../fonts/HelveticaNeueRoman.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Helvetica Neue';
  src: url('../fonts/HelveticaNeueBold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}


/* 2. Variables ------------------------------------------------ */

:root {
  --petrol:   #1b485f;
  --green:    #466b5d;
  --sage:     #d7dfa4;
  --cream:    #f7f0e4;
  --burgundy: #781a1a;
  --orange:   #cf531b;
  --sky:      #8fb5e1;
  --black:    #1a1a1a;
  --white:    #ffffff;

  --font-title: 'Advercase', 'DM Serif Display', serif;
  --font-body:  'Helvetica Neue', 'Inter', sans-serif;

  --container:        1140px;
  --container-narrow: 720px;

  --rule:       rgba(27, 72, 95, 0.12);
  --rule-soft:  rgba(27, 72, 95, 0.10);
}


/* 3. Reset + base --------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--black);
  background-color: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-title);
  font-weight: 400;
  line-height: 1.2;
}


/* 4. Utilities ------------------------------------------------ */

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

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


/* 5. Navbar --------------------------------------------------- */

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--cream);
  border-bottom: 1px solid var(--rule);
  padding: 1rem 0;
}

.nav-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  z-index: 1001;
}

.nav-logo-img {
  height: 46px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  position: relative;
  color: var(--petrol);
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  transition: opacity 0.2s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: var(--burgundy);
  transition: width 0.3s;
}

.nav-links a:hover           { opacity: 0.85; }
.nav-links a:hover::after    { width: 100%; }

/* Hamburger (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--petrol);
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg)  translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }


/* 6. Features (home lead + secondaries) ----------------------- */

.features {
  padding: 2.5rem 0 3rem;
  border-bottom: 1px solid var(--rule);
}

.features-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
}

.feature-card {
  display: grid;
  grid-template-columns: minmax(280px, 38%) 1fr;
  gap: 2rem;
  padding: 2rem 0;
  border-top: 1px solid var(--rule-soft);
  align-items: start;
}

.feature-card:first-child {
  border-top: none;
  padding-top: 0;
}

.feature-card--lead {
  grid-template-columns: minmax(340px, 48%) 1fr;
  gap: 2.5rem;
  padding: 0 0 3rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}

.feature-card--lead + .feature-card { border-top: none; }

.feature-image {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.feature-image > img,
.feature-image > .placeholder {
  width: 100%;
  height: 100%;
}

.feature-image > img { object-fit: cover; }

.feature-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.feature-date {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #888;
}

.feature-title {
  font-family: var(--font-title);
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  color: var(--petrol);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}

.feature-title a       { color: inherit; transition: color 0.2s; }
.feature-title a:hover { color: var(--burgundy); }

.feature-card--lead .feature-title {
  font-size: clamp(2.4rem, 4.2vw, 3.6rem);
  line-height: 1.05;
  margin-bottom: 1rem;
}

.feature-dek {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1.05rem;
  color: #333;
  line-height: 1.55;
  margin-bottom: 0.85rem;
}

.feature-card--lead .feature-dek {
  font-size: 1.2rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.feature-byline {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #666;
}


/* 7. Category tags -------------------------------------------- */

.cat-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.3rem 0.65rem;
  border-radius: 2px;
  background: var(--petrol);
  color: var(--cream);
  line-height: 1;
  white-space: nowrap;
}

.cat-tag--sm {
  font-size: 0.62rem;
  padding: 0.25rem 0.5rem;
  letter-spacing: 0.12em;
  margin-right: 0.5rem;
  vertical-align: 0.18em;
}

.cat-tag--ensayo            { background: var(--petrol);   color: var(--cream); }
.cat-tag--columna           { background: var(--orange);   color: var(--cream); }
.cat-tag--carta-al-director { background: var(--green);    color: var(--cream); }
.cat-tag--resena            { background: var(--burgundy); color: var(--cream); }

/* When the pill sits in the post header, force it onto its own line. */
.post-header .cat-tag {
  display: block;
  width: fit-content;
  margin-bottom: 1rem;
}


/* 8. Áreas (home section) ------------------------------------- */

.areas {
  padding: 3.5rem 0 4rem;
  border-bottom: 1px solid var(--rule);
}

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

.areas-label {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--burgundy);
  margin-bottom: 2rem;
}

.areas-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
}

.area-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.6rem;
  padding: 0.75rem 0.5rem;
  color: inherit;
  transition: transform 0.2s;
}

.area-card:hover                    { transform: translateY(-3px); }
.area-card:hover .area-card-name    { color: var(--burgundy); }

.area-card-icon {
  width: 76px;
  height: 76px;
  object-fit: contain;
  margin-bottom: 0.4rem;
}

.area-card-name {
  font-family: var(--font-title);
  font-size: 1.05rem;
  color: var(--petrol);
  line-height: 1.2;
  transition: color 0.2s;
}

.area-card-desc {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: #666;
  line-height: 1.4;
}


/* 9. River (home recent feed) --------------------------------- */

.river {
  padding: 3rem 0 5rem;
}

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

.river-label {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--burgundy);
  margin-bottom: 1.5rem;
}

.river-list {
  display: flex;
  flex-direction: column;
}

/* The row component is shared by both the home river and the archive. */
.post-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--rule-soft);
}

.river-list   .post-row:last-child,
.archive-list .post-row:last-child {
  border-bottom: 1px solid var(--rule-soft);
}

.post-row-date {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #888;
  padding-top: 0.4rem;
}

.post-row-link {
  display: block;
  transition: color 0.2s;
}

.post-row-link:hover .post-row-title { color: var(--burgundy); }

.post-row-title {
  font-family: var(--font-title);
  font-size: 1.3rem;
  color: var(--petrol);
  line-height: 1.25;
  transition: color 0.2s;
}

.post-row-author {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: #777;
}


/* 10. Archive page (publicaciones) ---------------------------- */

.archive {
  padding: 2rem 0 5rem;
}

.archive-header,
.archive-year {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.archive-header { padding-top: 3rem;    padding-bottom: 2rem; }
.archive-year   { padding-top: 2rem;    padding-bottom: 2rem; }

.archive-header h1 {
  font-family: var(--font-title);
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--petrol);
}

.archive-lede {
  color: #666;
  margin-top: 0.75rem;
  max-width: 540px;
  font-weight: 300;
  font-size: 1.05rem;
}

.archive-year-label {
  font-family: var(--font-title);
  font-size: 1.8rem;
  color: var(--burgundy);
  border-bottom: 1px solid rgba(27, 72, 95, 0.2);
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
}

.archive-list {
  display: flex;
  flex-direction: column;
}

.archive-empty {
  text-align: center;
  padding: 4rem 1.5rem;
  color: #999;
  font-size: 1.05rem;
}


/* 11. Post page ----------------------------------------------- */

.post-page { padding-top: 0; }

.post-hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 560px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.post-hero > img,
.post-hero > .placeholder {
  width: 100%;
  height: 100%;
}

.post-hero > img { object-fit: cover; }

.post-header { padding: 4rem 0 2rem; }

.post-back {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--green);
  margin-bottom: 1.5rem;
  transition: color 0.2s;
}

.post-back:hover { color: var(--petrol); }

.post-header h1 {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  color: var(--petrol);
  margin-bottom: 1rem;
}

.post-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: #888;
}

.post-content {
  padding: 3rem 0;
  font-size: 1.1rem;
  line-height: 1.8;
}

.post-content p          { margin-bottom: 1.5rem; }
.post-content h2         { font-size: 1.8rem; color: var(--petrol); margin: 2.5rem 0 1rem; }
.post-content h3         { font-size: 1.4rem; color: var(--petrol); margin: 2rem 0 0.75rem; }

.post-content blockquote {
  border-left: 3px solid var(--sage);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: #555;
}

/* Inline images in post body */
.post-content img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 2.5rem auto;
}

.post-content p:has(> img:only-child) { margin: 0; }

.post-content figure     { margin: 2.5rem 0; }
.post-content figure img { margin: 0 auto; }

.post-content figcaption {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-style: italic;
  color: #777;
  text-align: center;
  margin-top: 0.75rem;
  letter-spacing: 0.01em;
}

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

.post-content li {
  margin-bottom: 0.5rem;
  list-style: disc;
}

.post-footer {
  padding: 2rem 0 5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}


/* 12. Area pages (entrevistas, prensa, eventos, vinculacion) -- */

.area-page { padding: 4rem 0 5rem; }

.area-page-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.area-page-icon {
  width: 140px;
  height: 140px;
  object-fit: contain;
  display: block;
  margin: 0 auto 1.75rem;
}

.area-page-kicker {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--burgundy);
  border-top: 2px solid var(--burgundy);
  padding-top: 0.5rem;
  margin-bottom: 1rem;
}

.area-page-header h1 {
  font-family: var(--font-title);
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  color: var(--petrol);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.area-page-tagline {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1.2rem;
  color: #555;
  max-width: 560px;
  margin: 1.25rem auto 0;
  line-height: 1.5;
}

.area-page-body {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #333;
}

.area-page-body p { margin-bottom: 1.25rem; }

.area-page-body a {
  color: var(--burgundy);
  border-bottom: 1px solid rgba(120, 26, 26, 0.3);
  transition: border-color 0.2s;
}

.area-page-body a:hover { border-bottom-color: var(--burgundy); }

.area-page-back-row {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule-soft);
  text-align: center;
}

.area-page-back {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--green);
  transition: color 0.2s;
}

.area-page-back:hover { color: var(--petrol); }


/* 13. Manifiesto ---------------------------------------------- */

.manifiesto        { padding: 3rem 0 5rem; }
.manifiesto-header { margin-bottom: 2rem; }

.manifiesto-kicker {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--burgundy);
  border-top: 2px solid var(--burgundy);
  padding-top: 0.5rem;
  margin-bottom: 1rem;
}

.manifiesto-header h1 {
  font-family: var(--font-title);
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  color: var(--petrol);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.manifiesto-subtitle {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1.15rem;
  color: #555;
  margin-top: 0.75rem;
}

.manifiesto-date {
  display: block;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #888;
  margin-top: 1rem;
}

.manifiesto-body {
  font-size: 1.1rem;
  line-height: 1.8;
}

.manifiesto-body h2 {
  font-family: var(--font-title);
  font-size: 1.7rem;
  color: var(--petrol);
  margin: 2.75rem 0 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.manifiesto-body h3 {
  font-family: var(--font-title);
  font-size: 1.3rem;
  color: var(--petrol);
  margin: 2rem 0 0.75rem;
  font-style: italic;
}

.manifiesto-body p {
  margin-bottom: 1.35rem;
  color: #2a2a2a;
}

.manifiesto-body blockquote,
.manifiesto-body em { font-style: italic; }

.manifiesto-body ol,
.manifiesto-body ul { margin: 1rem 0 1.5rem 1.5rem; }

.manifiesto-body li {
  margin-bottom: 0.5rem;
  list-style: decimal;
}

.manifiesto-body strong { color: var(--petrol); }


/* 14. Brand placeholders -------------------------------------- */

.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.placeholder-mark {
  display: block;
  width: 22%;
  max-width: 110px;
  height: auto;
}

.placeholder--lead      .placeholder-mark { width: 16%; max-width: 120px; }
.placeholder--secondary .placeholder-mark { width: 28%; max-width: 80px; }
.placeholder--feature   .placeholder-mark { width: 22%; max-width: 110px; }
.placeholder--post      .placeholder-mark { width: 14%; max-width: 130px; }

.placeholder--petrol   { background: var(--petrol); }
.placeholder--burgundy { background: var(--burgundy); }
.placeholder--green    { background: var(--green); }
.placeholder--sage     { background: var(--sage); }


/* 15. Footer -------------------------------------------------- */

.footer {
  background: var(--petrol);
  color: var(--cream);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-logo-img {
  height: 44px;
  width: auto;
  display: block;
  margin-bottom: 1rem;
}

.footer-tagline {
  font-size: 0.9rem;
  color: rgba(247, 240, 228, 0.65);
  line-height: 1.6;
  max-width: 350px;
}

.footer h4 {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
  color: var(--sage);
}

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

.footer-nav a,
.footer-contact a {
  font-size: 0.9rem;
  color: rgba(247, 240, 228, 0.7);
  transition: color 0.2s;
}

.footer-nav a:hover,
.footer-contact a:hover { color: var(--cream); }

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.footer-social a {
  color: rgba(247, 240, 228, 0.5);
  transition: color 0.2s;
}

.footer-social a:hover { color: var(--cream); }

.footer-bottom {
  border-top: 1px solid rgba(247, 240, 228, 0.1);
  padding-top: 1.5rem;
  font-size: 0.8rem;
  color: rgba(247, 240, 228, 0.4);
}


/* 16. Responsive ---------------------------------------------- */

@media (max-width: 900px) {
  /* Features: tighten the image column slightly */
  .feature-card {
    grid-template-columns: minmax(220px, 36%) 1fr;
    gap: 1.5rem;
  }

  /* Áreas: drop the descriptions but keep the 5-up icon row */
  .area-card-icon { width: 56px; height: 56px; }
  .area-card-name { font-size: 0.95rem; }
  .area-card-desc { display: none; }

  /* Footer collapses to 2 columns, brand spans both */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  /* Mobile hamburger menu */
  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--cream);
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    transition: right 0.3s;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
    border-left: 1px solid var(--rule);
  }

  .nav-links.active     { right: 0; }
  .nav-links a          { font-size: 1.1rem; }

  /* Features stack vertically, image on top */
  .feature-card {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.75rem 0;
  }
  .feature-image                     { aspect-ratio: 16 / 10; }
  .feature-card--lead .feature-title { font-size: 1.75rem; }
  .feature-dek,
  .feature-card--lead .feature-dek   { font-size: 1rem; }

  /* Áreas: 2 columns, descriptions back on */
  .areas-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 1rem;
  }
  .area-card-icon { width: 60px; height: 60px; }
  .area-card-desc { display: block; font-size: 0.78rem; }

  /* Area pages: smaller hero icon */
  .area-page-icon { width: 110px; height: 110px; }

  /* Row component collapses */
  .post-row {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
  .post-row-date  { padding-top: 0; }
  .post-row-title { font-size: 1.15rem; }

  /* Footer to single column */
  .footer-grid    { grid-template-columns: 1fr; }

  /* Post header tightens */
  .post-header h1 { font-size: 2rem; }
}
