/* Mesa de Trabajo por Los Navalmorales — diseño 2026 */
:root {
  --olive: #5c6b3a;
  --olive-deep: #3d4a28;
  --olive-soft: #8a9a62;
  --wood: #8b6544;
  --wood-deep: #5c3f28;
  --ink: #1c2416;
  --ink-muted: #4a5540;
  --paper: #f3f0e8;
  --paper-warm: #ebe6d8;
  --mist: #dfe6d4;
  --white: #faf9f5;
  --line: rgba(28, 36, 22, 0.12);
  --shadow: 0 24px 60px rgba(28, 36, 22, 0.18);
  --radius: 4px;
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Figtree", system-ui, sans-serif;
  --max: 1120px;
  --nav-h: 4.5rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(138, 154, 98, 0.28), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(139, 101, 68, 0.16), transparent 55%),
    linear-gradient(180deg, var(--mist) 0%, var(--paper) 28%, var(--paper-warm) 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

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

a {
  color: var(--olive-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: var(--wood);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 550;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
}

p {
  margin: 0 0 1em;
}

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* ——— Nav ——— */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease), backdrop-filter 0.35s;
}

.site-header.is-scrolled,
.site-header.solid {
  background: rgba(250, 249, 245, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line);
}

.site-header.over-hero:not(.is-scrolled) {
  background: transparent;
}

.site-header.over-hero:not(.is-scrolled) .brand-text,
.site-header.over-hero:not(.is-scrolled) .nav-toggle,
.site-header.over-hero:not(.is-scrolled) .nav-links a {
  color: var(--white);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

.site-header.over-hero:not(.is-scrolled) .nav-links a[aria-current="page"]::after,
.site-header.over-hero:not(.is-scrolled) .nav-links a:hover::after {
  background: var(--white);
}

.nav-inner {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  width: 2.75rem;
  height: 2.75rem;
  object-fit: contain;
  border-radius: 2px;
  background: var(--white);
  padding: 2px;
}

.brand-text {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  max-width: 11ch;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem 1.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 560;
  letter-spacing: 0.02em;
  position: relative;
  padding: 0.35rem 0;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--olive);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--ink);
}

.nav-toggle span {
  display: block;
  width: 1.5rem;
  height: 2px;
  background: currentColor;
  margin: 5px 0;
  transition: transform 0.3s var(--ease), opacity 0.3s;
}

/* ——— Hero ——— */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  color: var(--white);
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  transform: scale(1.04);
  animation: hero-drift 18s var(--ease) infinite alternate;
}

@keyframes hero-drift {
  from { transform: scale(1.04) translateY(0); }
  to { transform: scale(1.08) translateY(-1.5%); }
}

.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(28, 36, 22, 0.35) 0%, rgba(28, 36, 22, 0.15) 35%, rgba(28, 36, 22, 0.72) 100%),
    linear-gradient(90deg, rgba(28, 36, 22, 0.45) 0%, transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
  padding: calc(var(--nav-h) + 1.5rem) 0 3.25rem;
}

.hero-logo {
  width: min(220px, 58vw);
  margin-bottom: 1.15rem;
  border-radius: 4px;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.35));
  animation: rise 0.9s var(--ease) both;
}

.hero h1 {
  font-size: clamp(1.85rem, 4.2vw, 3.15rem);
  max-width: 16ch;
  margin-bottom: 0.45rem;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.4);
  animation: rise 0.9s 0.1s var(--ease) both;
}

.hero .lede {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  max-width: 38ch;
  opacity: 0.95;
  margin-bottom: 1.75rem;
  animation: rise 0.9s 0.2s var(--ease) both;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  animation: rise 0.9s 0.3s var(--ease) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 650;
  font-size: 0.98rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s, color 0.25s, border-color 0.25s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--olive);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--olive-deep);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.65);
  color: var(--white);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

.btn-wood {
  background: var(--wood);
  color: var(--white);
}

.btn-wood:hover {
  background: var(--wood-deep);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  border-color: var(--olive);
  color: var(--olive-deep);
}

.btn-outline:hover {
  background: var(--olive);
  color: var(--white);
}

/* ——— Sections ——— */
.section {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
}

.section-head {
  max-width: 40rem;
  margin-bottom: 2.5rem;
}

.section-head h2 {
  font-size: clamp(1.9rem, 3.5vw, 2.75rem);
}

.section-head p {
  color: var(--ink-muted);
  font-size: 1.15rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wood);
  margin-bottom: 0.65rem;
}

/* Pillars — not cards: open layout with left rule */
.pillars {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 720px) {
  .pillars {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.pillar {
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 3px solid var(--olive-soft);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.pillar.is-visible {
  opacity: 1;
  transform: none;
}

.pillar h3 {
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.pillar p {
  color: var(--ink-muted);
  margin: 0;
  font-size: 1.05rem;
}

/* Feature strips */
.feature-strip {
  display: grid;
  gap: 2rem;
  align-items: center;
  margin-bottom: clamp(3rem, 6vw, 4.5rem);
}

@media (min-width: 860px) {
  .feature-strip {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3.5rem;
  }

  .feature-strip.reverse {
    grid-template-columns: 0.95fr 1.05fr;
  }

  .feature-strip.reverse .feature-copy {
    order: -1;
  }
}

.feature-media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  min-height: 280px;
  box-shadow: var(--shadow);
}

.feature-media img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  max-height: 420px;
  object-fit: cover;
}

.feature-copy h3 {
  font-size: clamp(1.6rem, 2.8vw, 2.15rem);
}

.feature-copy p {
  font-size: 1.12rem;
  color: var(--ink-muted);
}

/* Photo mosaic for home activities */
.mosaic {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.75rem;
}

.mosaic figure {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  grid-column: span 3;
  min-height: 180px;
}

.mosaic figure:first-child {
  grid-column: span 4;
  grid-row: span 2;
  min-height: 380px;
}

.mosaic figure:nth-child(2),
.mosaic figure:nth-child(3) {
  grid-column: span 2;
}

.mosaic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.mosaic figure:hover img {
  transform: scale(1.05);
}

@media (max-width: 700px) {
  .mosaic figure,
  .mosaic figure:first-child,
  .mosaic figure:nth-child(2) {
    grid-column: span 6;
    min-height: 200px;
  }
}

/* Page hero (inner pages) */
.page-hero {
  padding: calc(var(--nav-h) + 3rem) 0 2.5rem;
  background:
    linear-gradient(135deg, rgba(92, 107, 58, 0.12), transparent 50%),
    linear-gradient(180deg, var(--mist), transparent);
}

.page-hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  max-width: 18ch;
}

.page-hero p {
  max-width: 42ch;
  color: var(--ink-muted);
  font-size: 1.2rem;
}

/* Team */
.team-photo {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin: 2rem 0 2.5rem;
}

.team-photo img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  object-position: center;
}

.team-list {
  display: grid;
  gap: 0.65rem 2rem;
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
}

@media (min-width: 640px) {
  .team-list {
    grid-template-columns: 1fr 1fr;
  }
}

.team-list li {
  display: flex;
  flex-direction: column;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.team-list .role {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--wood);
}

.team-list .name {
  font-family: var(--font-display);
  font-size: 1.2rem;
}

/* Forja archive grid */
.forja-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1.1rem;
}

.forja-item {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  transition: transform 0.3s var(--ease);
}

.forja-item:hover {
  transform: translateY(-4px);
  color: inherit;
}

.forja-cover {
  aspect-ratio: 3 / 4;
  background:
    linear-gradient(160deg, var(--olive-deep), var(--wood-deep));
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: var(--white);
  box-shadow: 0 10px 28px rgba(28, 36, 22, 0.16);
  position: relative;
  overflow: hidden;
}

.forja-cover::before {
  content: "FORJA";
  position: absolute;
  top: 12%;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  opacity: 0.7;
}

.forja-cover .num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 600;
}

.forja-item span {
  font-size: 0.92rem;
  font-weight: 600;
  text-align: center;
}

.forja-item.latest .forja-cover {
  background: linear-gradient(160deg, var(--olive), #6e5538);
}

.forja-item.missing {
  opacity: 0.45;
  pointer-events: none;
}

.forja-item.missing .forja-cover {
  background: #9aa18c;
}

/* Publications */
.pub-list {
  display: grid;
  gap: 2.5rem;
}

.pub {
  display: grid;
  gap: 1.25rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 700px) {
  .pub {
    grid-template-columns: 120px 1fr;
    gap: 1.75rem;
  }
}

.pub-cover {
  width: 120px;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--mist);
  box-shadow: 0 8px 20px rgba(28, 36, 22, 0.12);
}

.pub h3 {
  font-size: 1.45rem;
  margin-bottom: 0.2rem;
}

.pub .author {
  color: var(--wood);
  font-weight: 650;
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
}

.pub p {
  color: var(--ink-muted);
  margin: 0;
  font-size: 1.05rem;
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.gallery a {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 1;
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.gallery a:hover img {
  transform: scale(1.06);
}

/* Contact */
.contact-block {
  display: grid;
  gap: 2rem;
}

@media (min-width: 800px) {
  .contact-block {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3.5rem;
  }
}

.contact-panel {
  background: linear-gradient(160deg, var(--olive-deep), #2f3820);
  color: var(--white);
  padding: clamp(1.75rem, 4vw, 2.5rem);
  border-radius: var(--radius);
}

.contact-panel h3 {
  color: var(--white);
}

.contact-panel a {
  color: #e8efd4;
}

.contact-panel .mailto {
  font-size: 1.25rem;
  font-weight: 700;
  word-break: break-all;
}

.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius);
  color: var(--white);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}

.social-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

/* Links list */
.links-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.links-list li {
  border-bottom: 1px solid var(--line);
}

.links-list a {
  display: block;
  padding: 0.9rem 0;
  text-decoration: none;
  font-weight: 600;
}

.links-list a:hover {
  padding-left: 0.35rem;
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: rgba(250, 249, 245, 0.78);
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.site-footer h4 {
  color: var(--white);
  font-size: 1.05rem;
  margin-bottom: 0.85rem;
}

.site-footer a {
  color: rgba(250, 249, 245, 0.85);
  text-decoration: none;
}

.site-footer a:hover {
  color: #c5d49a;
}

.footer-brand {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.footer-brand img {
  width: 64px;
  background: var(--white);
  border-radius: 2px;
  padding: 3px;
}

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

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

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.88rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Mobile nav */
@media (max-width: 920px) {
  .nav-toggle {
    display: block;
    z-index: 120;
  }

  .nav-links {
    position: fixed;
    inset: 0;
    background: rgba(28, 36, 22, 0.96);
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease);
  }

  .nav-links.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    color: var(--white) !important;
    font-size: 1.35rem;
    text-shadow: none !important;
  }

  .nav-links a::after {
    background: var(--olive-soft) !important;
  }

  .site-header.nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .site-header.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  .site-header.nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

/* Prose for long texts */
.prose {
  max-width: 68ch;
  font-size: 1.15rem;
}

.prose p + p {
  margin-top: 1em;
}

.prose strong {
  color: var(--ink);
}

/* News / activity items */
.activity {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 3.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 800px) {
  .activity {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
  }
}

.activity h3 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}

.activity p {
  color: var(--ink-muted);
  font-size: 1.1rem;
}

.activity-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.activity-photos img {
  border-radius: var(--radius);
  aspect-ratio: 4/3;
  object-fit: cover;
  width: 100%;
}

.activity-photos img:first-child {
  grid-column: 1 / -1;
  aspect-ratio: 16/10;
}
