﻿/* Marca y medidas compartidas */
@font-face {
  font-family: Anton;
  src: url("assets/fonts/Anton-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Montserrat;
  src: url("assets/fonts/Montserrat-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --green: #12493b;
  --green-hover: #0e3a2f;
  --green-deep: #163f34;
  --cream: #faf7f0;
  --mint: #a9cfc3;
  --button-mint: #b1cec4;
  --font-body: Montserrat, system-ui, sans-serif;
  --font-display: Anton, Impact, sans-serif;
  --weight-button: 700;
  --radius-pill: 100px;
  --header-height: 88px;
  --page-gutter: max(6vw, 24px);
  --hero-image-position: 50% 65%;
  --hero-overlay: linear-gradient(90deg, rgba(7,28,20,.72), rgba(7,28,20,.3) 44%, rgba(7,28,20,.02) 74%), linear-gradient(0deg, rgba(7,28,20,.65), transparent 30%);
  font-family: var(--font-body);
  color: var(--green);
  background: var(--cream);
}

/* Base y accesibilidad */
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
a:focus-visible, button:focus-visible, .slides:focus-visible {
  outline: 3px solid var(--mint);
  outline-offset: 5px;
}
.sr-only, .skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.skip:focus {
  position: fixed;
  top: 10px;
  left: 10px;
  background: var(--cream);
  padding: 12px;
  z-index: 20;
}

/* Cabecera */
.header {
  height: var(--header-height);
  padding-inline: var(--page-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 28px var(--font-display);
}
.logo-mark {
  display: block;
  width: 48px;
  height: auto;
  flex-shrink: 0;
  mix-blend-mode: multiply;
}

/* Botones: base común y variantes */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border-radius: var(--radius-pill);
  padding: 16px 24px;
  background: var(--green);
  color: var(--cream);
  font-size: 14px;
  font-weight: var(--weight-button);
  transition: background .2s;
}
.button:hover { background: var(--green-hover); }
.button-icon {
  display: block;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.button-light { background: var(--button-mint); color: var(--green); }
.button-light:hover { background: #cfe4dc; }
.button-outline { background: transparent; color: var(--cream); border: 1px solid var(--mint); }
.button-outline:hover { background: #faf7f014; }
.button[aria-disabled=true] { cursor: default; }
.button-disabled, .button-disabled:hover {
  background: rgba(20, 35, 29, .2);
  color: rgba(250, 247, 240, .5);
  border-color: rgba(250, 247, 240, .25);
  cursor: not-allowed;
}
.button img.button-icon-sun {
  position: static;
  width: 26px;
  height: 26px;
  object-fit: contain;
}

/* Carrusel: fotografías a sangre y contenido */
.hero {
  position: relative;
  background: var(--green);
  color: var(--cream);
  overflow: hidden;
}
.slides {
  display: flex;
  width: 100%;
  height: calc(100svh - var(--header-height));
  min-height: 600px;
  max-height: 900px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.slides::-webkit-scrollbar { display: none; }
.slide {
  position: relative;
  isolation: isolate;
  flex: 0 0 100%;
  min-width: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: var(--green-deep);
}
.slide--fpg { --hero-image-position: 50% 10%; }
.slide picture { position: absolute; inset: 0; display: block; }
.slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--hero-image-position);
  display: block;
}
.slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-overlay);
  pointer-events: none;
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  width: 88%;
  margin: 0 6%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 0 100px;
  pointer-events: none;
}
.hero-title {
  font: 400 clamp(52px, 5.3vw, 82px)/.98 var(--font-display);
  text-transform: uppercase;
  letter-spacing: .005em;
  margin: 0;
  max-width: 47%;
  text-shadow: 0 2px 16px #0003;
}
.hero-subtitle {
  max-width: 43%;
  font-size: clamp(18px, 1.6vw, 23px);
  line-height: 1.5;
  margin: 24px 0 0;
  text-shadow: 0 1px 8px #0005;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
  max-width: 48%;
  pointer-events: auto;
}
.hero-actions .button {
  font-size: clamp(15px, 1.25vw, 19px);
  padding: 18px 25px;
  min-height: 62px;
}

/* Controles del carrusel */
.hero-bottom {
  position: absolute;
  bottom: 26px;
  left: var(--page-gutter);
  right: var(--page-gutter);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 20px;
  z-index: 3;
  pointer-events: none;
}
.controls, .dots { display: flex; align-items: center; gap: 12px; pointer-events: auto; }
.arrow {
  display: grid;
  place-items: center;
  padding: 0;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 1px solid #faf7f060;
  border-radius: 50%;
  background: transparent;
  color: var(--cream);
}
.arrow svg {
  display: block;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.arrow:hover { background: #faf7f020; }
.dot {
  padding: 0;
  border: 0;
  width: 10px;
  height: 10px;
  border-radius: var(--radius-pill);
  background: #faf7f060;
  position: relative;
}
.dot::before { content: ""; position: absolute; inset: -15px -3px; }
.dot[aria-current=true] { width: 30px; background: var(--cream); }

/* Pie */
.footer {
  padding: 64px var(--page-gutter);
  display: flex;
  align-items: center;
  gap: clamp(40px, 7vw, 110px);
}
.footer-logo { flex-shrink: 0; }
.footer-logo img { display: block; width: clamp(140px, 14vw, 192px); height: auto; mix-blend-mode: multiply; }
.footer-contact { display: grid; grid-template-columns: minmax(240px, 1.7fr) 1fr 1fr; gap: 32px; width: 100%; font-style: normal; }
.footer-item { display: flex; flex-direction: column; gap: 12px; }
.footer-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; opacity: .65; }
.footer-item a { width: fit-content; font-size: 14px; font-weight: 500; line-height: 1.7; }
.footer-item a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-item a span { margin-left: 4px; }

/* Página de error */
.error-body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
.error-page {
  position: relative;
  isolation: isolate;
  flex: 1;
  min-height: 520px;
  padding: clamp(64px, 10vw, 140px) var(--page-gutter);
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--green);
  color: var(--cream);
  text-align: center;
}
.error-page::before,
.error-page::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: var(--mint);
  opacity: .16;
  z-index: -1;
}
.error-page::before { width: 42vw; height: 42vw; min-width: 300px; min-height: 300px; left: -14vw; top: -20vw; }
.error-page::after { width: 34vw; height: 34vw; min-width: 240px; min-height: 240px; right: -8vw; bottom: -18vw; }
.error-content { width: min(760px, 100%); }
.error-code {
  margin: 0;
  color: var(--mint);
  font: 400 clamp(100px, 20vw, 230px)/.8 var(--font-display);
  letter-spacing: -.03em;
}
.error-title {
  margin: 34px 0 0;
  font: 400 clamp(36px, 5vw, 68px)/1 var(--font-display);
  text-transform: uppercase;
}
.error-copy {
  max-width: 620px;
  margin: 22px auto 0;
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.6;
}
.error-actions {
  margin-top: 34px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}
.error-actions .button { min-height: 54px; }

/* Tablet */
@media (min-width: 601px) and (max-width: 1000px) {
  .footer-contact { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-item:first-child { grid-column: 1 / -1; }
  .hero-title { font-size: 48px; max-width: 48%; }
  .hero-subtitle { font-size: 17px; }
  .hero-actions .button { font-size: 14px; padding: 16px 20px; }
}

/* Mobile */
@media (max-width: 600px) {
  :root {
    --header-height: 80px;
    --page-gutter: 24px;
    --hero-image-position: 50% 15%;
    --hero-overlay: linear-gradient(0deg, rgba(5,22,15,.94), rgba(5,22,15,.8) 22%, rgba(5,22,15,.12) 62%, transparent 82%);
  }
  .header { padding-inline: 20px; }
  .logo { font-size: 22px; gap: 8px; }
  .logo-mark { width: 38px; }
  .header .button { font-size: 11px; padding: 11px 14px; gap: 8px; }
  .slides { min-height: 650px; max-height: 800px; }
  .slide--fpg { --hero-image-position: 55% 0; }
  .hero-content {
    width: calc(100% - 48px);
    margin: 0 24px;
    padding: 220px 0 86px;
    justify-content: flex-end;
  }
  .hero-title { max-width: 100%; font-size: clamp(36px, 10vw, 48px); line-height: 1.04; }
  .hero-subtitle { max-width: 100%; font-size: 16px; line-height: 1.45; margin-top: 16px; }
  .hero-actions { max-width: 100%; width: 100%; margin-top: 22px; gap: 10px; }
  .hero-actions .button { font-size: 14px; min-height: 50px; padding: 14px 20px; max-width: 100%; }
  .hero-bottom { bottom: 20px; flex-wrap: wrap; gap: 16px; }
  .arrow { width: 40px; height: 40px; }
  .footer { padding: 40px 24px; gap: 28px; flex-direction: column; align-items: flex-start; }
  .footer-logo img { width: 140px; }
  .footer-contact { grid-template-columns: 1fr; gap: 24px; }
  .error-page { min-height: 560px; padding-block: 72px; }
  .error-title { margin-top: 28px; }
  .error-actions { flex-direction: column; }
  .error-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
