/* ============================================
   CORPAS — Pro Max Edition
   Editorial humanista cálido
   HTML + CSS + JS vanilla
   ============================================ */

:root {
  --bg: #f5f0e8;
  --bg-2: #ede6da;
  --surface: #faf8f4;
  --ink: #1c1917;
  --ink-muted: #5c5449;
  --ink-light: #8c8274;
  --forest: #1a2f1d;
  --forest-light: #2d4a32;
  --mustard: #e8a93b;
  --terracotta: #c73e1d;
  --cream: #fffdf8;

  --font-display: 'Abril Fatface', Georgia, serif;
  --font-body: 'Bitter', Georgia, serif;
  --font-mono: 'Space Mono', monospace;

  --max-w: 1280px;
  --radius: 2px;
  --radius-lg: 8px;
  --shadow: 0 24px 60px rgba(28, 25, 23, 0.12);
  --shadow-sm: 0 8px 24px rgba(28, 25, 23, 0.08);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h: 80px;
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }

/* GRAIN TEXTURE */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* CONTAINER */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* TYPOGRAPHY UTILITIES */
.section__num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 18px;
}
.section__title {
  font-family: var(--font-display);
  font-size: clamp(42px, 7vw, 84px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.02em;
}
.section__title .muted { color: var(--ink-light); font-style: italic; }

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease, background 0.3s ease;
}
.btn svg { flex-shrink: 0; transition: transform 0.3s var(--ease-out); }
.btn:hover { transform: translateY(-3px); }
.btn:hover svg { transform: translateX(4px); }
.btn:focus-visible { outline: 3px solid var(--mustard); outline-offset: 3px; }
.btn--primary {
  background: var(--forest);
  color: var(--cream);
  box-shadow: 0 12px 32px rgba(26, 47, 29, 0.25);
}
.btn--primary:hover { background: var(--forest-light); box-shadow: 0 16px 40px rgba(26, 47, 29, 0.32); }
.btn--ghost {
  background: transparent;
  color: var(--forest);
  border: 1.5px solid var(--forest);
}
.btn--ghost:hover { background: var(--forest); color: var(--cream); }
.btn--block { width: 100%; justify-content: center; }

/* NAVIGATION */
.nav-sentinel { position: absolute; top: 0; left: 0; right: 0; height: 1px; pointer-events: none; }
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(245, 240, 232, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(28, 25, 23, 0.06);
  transition: background 0.4s ease, box-shadow 0.4s ease;
}
.nav--scrolled {
  background: rgba(245, 240, 232, 0.95);
  box-shadow: 0 4px 30px rgba(28, 25, 23, 0.06);
}
.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--forest);
}
.nav__logo-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--forest);
  color: var(--cream);
  border-radius: 50%;
  font-size: 20px;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav__links a {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  position: relative;
  padding: 8px 0;
}
.nav__links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--terracotta);
  transition: width 0.3s var(--ease-out);
}
.nav__links a:hover::after { width: 100%; }
.nav__cta {
  background: var(--forest);
  color: var(--cream) !important;
  padding: 12px 22px;
  border-radius: var(--radius);
}
.nav__cta::after { display: none; }
.nav__cta:hover { background: var(--terracotta); }
.nav__burger { display: none; flex-direction: column; gap: 6px; padding: 10px; }
.nav__burger span { display: block; width: 26px; height: 2px; background: var(--forest); transition: transform 0.3s ease, opacity 0.3s ease; }

/* HERO */
.hero {
  position: relative;
  min-height: 100vh;
  padding: calc(var(--nav-h) + 40px) 0 80px;
  overflow: hidden;
}
.hero::before {
  content: 'CORPAS';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: clamp(120px, 22vw, 320px);
  color: rgba(26, 47, 29, 0.035);
  white-space: nowrap;
  pointer-events: none;
  z-index: 0;
}
.hero__container {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: end;
}
.hero__top {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 24px;
}
.hero__label { display: flex; align-items: center; gap: 10px; }
.hero__dot { width: 8px; height: 8px; background: var(--terracotta); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.hero__data { display: flex; gap: 24px; }
.hero__title {
  grid-column: 1 / 2;
  font-family: var(--font-display);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 40px;
}
.hero__line {
  display: block;
  font-size: clamp(72px, 13vw, 170px);
  color: var(--forest);
}
.hero__line--small {
  font-size: clamp(32px, 5.5vw, 72px);
  color: var(--ink);
}
.hero__media {
  grid-column: 2 / 3;
  grid-row: 2 / 4;
  position: relative;
  justify-self: end;
}
.hero__photo {
  width: clamp(280px, 34vw, 460px);
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
  transition: transform 0.6s var(--ease-out);
}
.hero__photo:hover { transform: rotate(0deg) scale(1.02); }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.hero__caption {
  position: absolute;
  bottom: -20px;
  left: -40px;
  background: var(--cream);
  padding: 16px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hero__caption span:first-child { color: var(--terracotta); font-weight: 700; }
.hero__bottom {
  grid-column: 1 / 2;
  max-width: 540px;
}
.hero__lead {
  font-size: clamp(17px, 1.6vw, 21px);
  color: var(--ink-muted);
  margin-bottom: 32px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; }

/* ABOUT */
.about {
  padding: 140px 0;
  background: var(--surface);
  position: relative;
}
.about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ink-light), transparent);
  opacity: 0.2;
}
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 80px;
  align-items: start;
}
.about__left { position: sticky; top: 120px; }
.about__right { padding-top: 12px; }
.about__text {
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--ink-muted);
  margin-bottom: 28px;
}
.about__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid rgba(28, 25, 23, 0.1);
}
.about__stat { display: flex; flex-direction: column; gap: 6px; }
.about__stat-num {
  font-family: var(--font-display);
  font-size: 36px;
  color: var(--forest);
}
.about__stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-light);
}

/* WORK */
.work {
  padding: 140px 0;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.work__strip {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 12px;
  background: repeating-linear-gradient(
    45deg,
    var(--mustard),
    var(--mustard) 10px,
    var(--terracotta) 10px,
    var(--terracotta) 20px
  );
}
.work__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.work__visual { position: relative; }
.work__photo {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.work__photo img { width: 100%; height: 100%; object-fit: cover; }
.work__photo--small {
  position: absolute;
  bottom: -40px;
  right: -30px;
  width: 55%;
  aspect-ratio: 1 / 1;
  border: 8px solid var(--bg);
  transform: rotate(-4deg);
}
.work__content { position: relative; z-index: 1; }
.work__text {
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--ink-muted);
  margin: 24px 0;
}
.work__list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 32px;
}
.work__list li {
  position: relative;
  padding-left: 32px;
  font-size: 16px;
  color: var(--ink);
}
.work__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 12px;
  height: 12px;
  background: var(--mustard);
  border-radius: 50%;
}

/* PROGRAMS */
.programs {
  padding: 140px 0;
  background: var(--forest);
  color: var(--cream);
}
.programs__head { margin-bottom: 64px; }
.programs__head .section__num { color: var(--mustard); }
.programs__head .section__title .muted { color: rgba(255, 253, 248, 0.45); }
.programs__list { display: flex; flex-direction: column; gap: 0; }
.program {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 40px;
  padding: 40px 0;
  position: relative;
}
.program__num {
  font-family: var(--font-display);
  font-size: 48px;
  color: var(--mustard);
  line-height: 1;
}
.program__title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 36px);
  margin-bottom: 12px;
  color: var(--cream);
}
.program__body p {
  font-size: 17px;
  color: rgba(255, 253, 248, 0.75);
  max-width: 600px;
}
.program__line {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 253, 248, 0.15);
}
.program:hover .program__num { color: var(--terracotta); transition: color 0.3s ease; }

/* GALLERY */
.gallery {
  padding: 140px 0;
  background: var(--surface);
}
.gallery__head { margin-bottom: 64px; }
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 280px;
  gap: 16px;
  margin-bottom: 80px;
}
.gallery__item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}
.gallery__item:hover img { transform: scale(1.08); }
.gallery__item figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(transparent, rgba(28, 25, 23, 0.85));
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  transform: translateY(100%);
  transition: transform 0.4s var(--ease-out);
}
.gallery__item:hover figcaption { transform: translateY(0); }
.gallery__item--wide { grid-column: span 2; }
.gallery__item--tall { grid-row: span 2; }
.gallery__videos-title {
  font-family: var(--font-display);
  font-size: 36px;
  margin-bottom: 32px;
  color: var(--forest);
}
.videos__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.video-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg);
  box-shadow: var(--shadow-sm);
}
.video-card video {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  background: var(--ink);
}
.video-card figcaption {
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
}

/* JOIN */
.join {
  padding: 140px 0;
  background: var(--bg);
}
.join__grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: start;
}
.join__left { position: sticky; top: 120px; }
.join__text {
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--ink-muted);
  margin-top: 24px;
}
.join__cards { display: flex; flex-direction: column; gap: 24px; }
.join__card {
  background: var(--surface);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border-left: 6px solid var(--mustard);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease;
}
.join__card:hover { transform: translateX(8px); box-shadow: var(--shadow); }
.join__card-num {
  font-family: var(--font-display);
  font-size: 36px;
  color: var(--terracotta);
  margin-bottom: 12px;
}
.join__card h3 {
  font-family: var(--font-display);
  font-size: 28px;
  margin-bottom: 10px;
  color: var(--forest);
}
.join__card p { color: var(--ink-muted); font-size: 16px; }

/* CONTACT */
.contact {
  padding: 140px 0;
  background: var(--forest);
  color: var(--cream);
}
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.contact__info .section__num { color: var(--mustard); }
.contact__info .section__title .muted { color: rgba(255, 253, 248, 0.45); }
.contact__text {
  font-size: clamp(17px, 1.6vw, 20px);
  color: rgba(255, 253, 248, 0.75);
  margin: 24px 0 40px;
}
.contact__details { display: flex; flex-direction: column; gap: 20px; }
.contact__detail {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px;
  background: rgba(255, 253, 248, 0.06);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 253, 248, 0.1);
  transition: background 0.3s ease, transform 0.3s var(--ease-out);
}
.contact__detail:hover { background: rgba(255, 253, 248, 0.1); transform: translateX(6px); }
.contact__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mustard);
}
.contact__value {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 600;
  color: var(--cream);
}
.contact__form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--cream);
  padding: 48px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  color: var(--ink);
}
.contact__form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.contact__form input,
.contact__form select,
.contact__form textarea {
  padding: 14px 16px;
  border: 1.5px solid rgba(28, 25, 23, 0.12);
  border-radius: var(--radius);
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.contact__form input:focus,
.contact__form select:focus,
.contact__form textarea:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 0 4px rgba(26, 47, 29, 0.08);
}

/* FOOTER */
.footer {
  padding: 80px 0 40px;
  background: var(--ink);
  color: rgba(255, 253, 248, 0.7);
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1fr;
  gap: 60px;
  align-items: start;
}
.footer__logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--cream);
  margin-bottom: 18px;
}
.footer__logo-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--mustard);
  color: var(--forest);
  border-radius: 50%;
}
.footer__brand p { font-size: 15px; line-height: 1.7; }
.footer__nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 24px;
}
.footer__nav a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}
.footer__nav a:hover { color: var(--mustard); }
.footer__legal {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-align: right;
}

/* FLOATING WHATSAPP */
.wa-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 99;
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  background: #25d366;
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35);
  transition: transform 0.3s var(--ease-out);
}
.wa-float:hover { transform: scale(1.1) rotate(-8deg); }
.wa-float svg { width: 30px; height: 30px; }

/* REVEAL ANIMATIONS */
[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .hero__container { grid-template-columns: 1fr; }
  .hero__media { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 40px; }
  .hero__title { grid-column: 1; }
  .hero__bottom { grid-column: 1; }
  .about__grid,
  .work__grid,
  .join__grid,
  .contact__grid { grid-template-columns: 1fr; gap: 48px; }
  .about__left,
  .join__left { position: static; }
  .work__photo--small { right: 0; }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 240px; }
  .gallery__item--wide { grid-column: span 2; }
  .gallery__item--tall { grid-row: span 2; }
  .videos__grid { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer__legal { text-align: left; }
}

@media (max-width: 720px) {
  :root { --nav-h: 72px; }
  .nav__burger { display: flex; }
  .nav__links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(245, 240, 232, 0.98);
    padding: 32px;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease-out);
  }
  .nav__links.is-open { transform: translateX(0); }
  .nav__links a { font-size: 14px; padding: 18px 0; border-bottom: 1px solid rgba(28, 25, 23, 0.08); }
  .nav__cta { text-align: center; margin-top: 20px; }
  .hero { padding-top: calc(var(--nav-h) + 24px); }
  .hero__top { flex-direction: column; align-items: flex-start; gap: 8px; }
  .hero__data { gap: 16px; }
  .hero__photo { width: 100%; max-width: 360px; }
  .hero__caption { left: 12px; bottom: -12px; }
  .hero__actions { flex-direction: column; }
  .btn--block-mobile { width: 100%; justify-content: center; }
  .about__stats { grid-template-columns: 1fr; gap: 16px; }
  .program { grid-template-columns: 1fr; gap: 12px; }
  .gallery__grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .gallery__item--wide,
  .gallery__item--tall { grid-column: span 1; grid-row: span 1; }
  .gallery__item { aspect-ratio: 4 / 5; }
  .videos__grid { grid-template-columns: 1fr; }
  .join__card { padding: 28px; }
  .contact__form { padding: 28px; }
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .wa-float { width: 54px; height: 54px; bottom: 20px; right: 20px; }
}
