/* ==========================================================================
   Cárnicas Aliagas / Eurovicarme
   Plain CSS - no frameworks, no external fonts, no JavaScript.
   ========================================================================== */

:root {
  --ink: #2f2f2f;
  --body-text: #4a4a4a;
  --accent: #9e3225;
  --accent-light: #c0483a;
  --header-bg: #3a3a3a;
  --footer-bg: #4d4d4d;
  --footer-text: #e6e3de;
  --page-bg: #ffffff;
  --rule: #dcd8d2;

  --serif: Georgia, "Iowan Old Style", "Times New Roman", Times, serif;
  --sans: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --header-h: 106px;
  --max: 1200px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--body-text);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #fff;
  color: var(--accent);
  padding: 12px 20px;
  z-index: 200;
}
.skip-link:focus {
  left: 8px;
  top: 8px;
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--header-bg);
}

.site-header__inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 32px;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

/* On the home page the bar floats over the full-bleed slideshow. */
.home .site-header {
  background: rgba(40, 40, 40, 0.55);
}

.brand {
  display: inline-block;
  padding: 18px 0;
  flex: 0 0 auto;
}

.brand img {
  width: 232px;
  height: auto;
}

.nav ul {
  list-style: none;
  margin: 0;
  padding: 0 0 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 34px;
}

.nav a {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: #ffffff;
  transition: color 0.18s ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--accent-light);
}

.nav a[aria-current="page"] {
  color: var(--accent-light);
}

/* -------------------------------------------------------- home slideshow */

.hero-slideshow {
  position: relative;
  height: 100vh;
  min-height: 620px;
  overflow: hidden;
  background: #1d1d1d;
}

.hero-slideshow__slides {
  position: absolute;
  inset: 0;
}

/* Pure-CSS crossfade: 6 slides, 7s each, 42s total loop. */
.hero-slideshow__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: heroFade 42s infinite;
}

.hero-slideshow__slide:nth-child(1) {
  background-image: url("img/hero-1.jpg");
  animation-delay: 0s;
  opacity: 1;
}
.hero-slideshow__slide:nth-child(2) {
  background-image: url("img/hero-2.jpg");
  animation-delay: 7s;
}
.hero-slideshow__slide:nth-child(3) {
  background-image: url("img/hero-3.jpg");
  animation-delay: 14s;
}
.hero-slideshow__slide:nth-child(4) {
  background-image: url("img/hero-4.jpg");
  animation-delay: 21s;
}
.hero-slideshow__slide:nth-child(5) {
  background-image: url("img/hero-5.jpg");
  animation-delay: 28s;
}
.hero-slideshow__slide:nth-child(6) {
  background-image: url("img/hero-6.jpg");
  animation-delay: 35s;
}

@keyframes heroFade {
  0% {
    opacity: 0;
  }
  3% {
    opacity: 1;
  }
  16.66% {
    opacity: 1;
  }
  19.66% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slideshow__slide {
    animation: none;
  }
  .hero-slideshow__slide:nth-child(n + 2) {
    display: none;
  }
}

.hero-slideshow::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.42) 0%,
    rgba(0, 0, 0, 0.12) 42%,
    rgba(0, 0, 0, 0.55) 100%
  );
}

.hero-slideshow__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14%;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
}

.hero-slideshow__caption p {
  margin: 0;
  color: #fff;
  font-size: clamp(1.5rem, 3.2vw, 2.6rem);
  line-height: 1.3;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.6);
}

/* ------------------------------------------------------- inner page hero */

.page-hero {
  position: relative;
  min-height: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--header-h) + 40px) 24px 60px;
  background-size: cover;
  background-position: center;
  background-color: #2b2b2b;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.34);
}

.page-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.page-hero h1 {
  margin: 0;
  color: #fff;
  font-weight: 400;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.15;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}

.page-hero p {
  margin: 14px 0 0;
  color: #fff;
  font-size: clamp(1.15rem, 2.3vw, 1.85rem);
  line-height: 1.4;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.55);
}

/* --------------------------------------------------------------- section */

.section {
  padding: 90px 0;
}

.section--tight {
  padding: 64px 0;
}

.section--muted {
  background: #faf9f7;
}

.section-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 56px;
}

h2 {
  font-weight: 400;
  color: var(--accent);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1.25;
  margin: 0 0 16px;
}

h3 {
  font-weight: 400;
  color: var(--accent);
  font-size: 1.55rem;
  line-height: 1.3;
  margin: 0 0 14px;
}

p {
  margin: 0 0 1.15em;
}

p:last-child {
  margin-bottom: 0;
}

/* ----------------------------------------------------------------- cards */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 48px 40px;
}

.cards--center {
  max-width: 460px;
  margin: 0 auto;
}

.card {
  text-align: center;
}

.card__media {
  display: block;
  overflow: hidden;
  margin-bottom: 26px;
}

.card__media img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.card h3 a {
  color: inherit;
  text-decoration: none;
}

.card h3 a:hover {
  text-decoration: underline;
}

.card p {
  color: var(--body-text);
}

/* --------------------------------------------------------- media stripes */

.stripe {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: center;
  gap: 56px;
  margin-bottom: 84px;
}

.stripe:last-child {
  margin-bottom: 0;
}

.stripe img {
  width: 100%;
  height: 380px;
  object-fit: cover;
}

.stripe--reverse .stripe__media {
  order: 2;
}

@media (max-width: 719px) {
  .stripe--reverse .stripe__media {
    order: 0;
  }
}

/* --------------------------------------------------------- contact block */

.contact-strip {
  background: #faf9f7;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 44px 0;
  text-align: center;
}

.contact-strip p {
  margin: 0 0 6px;
}

.contact-strip a {
  color: var(--accent);
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 44px;
  text-align: center;
}

.contact-list h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.contact-list a {
  text-decoration: none;
}

.contact-list a:hover {
  text-decoration: underline;
}

/* ------------------------------------------------------------- legal doc */

.legal {
  padding: calc(var(--header-h) + 72px) 0 90px;
}

.legal h1 {
  font-weight: 400;
  color: var(--accent);
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.2;
  margin: 0 0 32px;
}

.legal .lead {
  font-size: 1.08rem;
}

.legal h2 {
  font-size: 1.4rem;
  margin-top: 40px;
}

.legal ul {
  margin: 0 0 1.15em;
  padding-left: 1.3em;
}

.legal li {
  margin-bottom: 0.5em;
}

.legal dl {
  margin: 0 0 1.15em;
}

.legal dt {
  font-weight: 700;
  color: var(--ink);
  margin-top: 12px;
}

.legal dd {
  margin: 0;
}

.legal-doc {
  max-width: 860px;
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 46px 0 40px;
}

.site-footer p {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.site-footer a {
  color: var(--footer-text);
}

.site-footer__legal {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 34px;
}

.site-footer__legal a {
  font-size: 1rem;
  text-decoration: none;
}

.site-footer__legal a:hover {
  text-decoration: underline;
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 960px) {
  :root {
    --header-h: 88px;
  }

  .site-header {
    position: static;
  }

  .home .site-header {
    position: static;
    background: var(--header-bg);
  }

  .site-header__inner {
    flex-direction: column;
    align-items: center;
    padding: 8px 20px 0;
    gap: 4px;
  }

  .brand img {
    width: 196px;
  }

  .nav ul {
    justify-content: center;
    gap: 20px;
  }

  .hero-slideshow {
    height: 62vh;
    min-height: 420px;
  }

  .page-hero {
    min-height: 380px;
    padding: 70px 24px;
  }

  .legal {
    padding: 60px 0 70px;
  }

  .section {
    padding: 64px 0;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 17px;
  }

  .nav a {
    font-size: 14px;
  }

  .stripe img {
    height: 260px;
  }
}

/* ------------------------------------------------------------ blog posts */

.post {
  max-width: 860px;
  margin: 0 auto 72px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--rule);
}

.post:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.post h2 {
  margin-bottom: 24px;
}

.post img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  margin-bottom: 26px;
}

.post__date {
  font-family: var(--sans);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a8a8a;
  margin-top: 22px;
}

@media (max-width: 600px) {
  .post img {
    height: 220px;
  }
}
