/* ==========================================================================
   Mategraf S.A. — static rebuild
   Design tokens lifted from the original Salient/WordPress build.
   ========================================================================== */

:root {
  --red:        #ee3124;
  --red-dark:   #cf2417;
  --dark:       #455560;
  --dark-deep:  #3a4852;
  --text:       #676767;
  --heading:    #444444;
  --white:      #ffffff;
  --rule:       rgba(0, 0, 0, .12);

  --font-body:    "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-display: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-alt:     "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

  --container: 1270px;
  --gutter:    28px;
  --header-h:  84px;
}

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

html {
  scroll-behavior: smooth;
  /* Sections carry their own top padding (header height + breathing room), so
     anchors land correctly with the scrollport flush at 0. A scroll-padding
     here would also shift snap alignment and leave a sliver of the previous
     section showing above each full-height panel. */
  scroll-padding-top: 0;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 30px;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-dark); }

h1, h2, h3, h4 { margin: 0 0 .5em; color: var(--heading); font-weight: 300; }
p  { margin: 0 0 1.2em; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.2em; }

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

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

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background-color .3s ease, box-shadow .3s ease, padding .3s ease;
  padding: 18px 0;
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 1px 14px rgba(0, 0, 0, .1);
  padding: 10px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo img {
  width: 190px;
  transition: width .3s ease;
}
.site-header.is-scrolled .logo img { width: 160px; }

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 34px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  font-family: var(--font-alt);
  font-size: 13px;
  letter-spacing: .3px;
  color: var(--heading);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.site-nav a:hover,
.site-nav a.is-active {
  color: var(--red);
  border-bottom-color: var(--red);
}

/* header sitting over the dark "¿Quiénes Somos?" panel, before it turns solid */
.site-header.is-over-dark:not(.is-scrolled) .site-nav a { color: #fff; }
.site-header.is-over-dark:not(.is-scrolled) .site-nav a:hover { color: #fff; border-bottom-color: #fff; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  padding: 10px;
  background: none; border: 0; cursor: pointer;
}
.nav-toggle span {
  display: block; height: 2px; margin: 5px 0;
  background: var(--heading);
  transition: transform .25s ease, opacity .25s ease, background-color .2s ease;
}
.site-header.is-over-dark:not(.is-scrolled) .nav-toggle span { background: #fff; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   Sections / scroll behaviour
   ========================================================================== */

.section {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding: calc(var(--header-h) + 40px) 0 60px;
  overflow: hidden;
}
.section > .container { width: 100%; }

.section--dark {
  background: var(--dark);
  color: rgba(255, 255, 255, .88);
}
.section--dark h2,
.section--dark h3 { color: #fff; }
.section--dark .h-display { color: var(--red); }

.section--center { text-align: center; }

/* Snap scrolling — the original used fullPage.js. `proximity` keeps the
   sectioned feel without trapping the user on tall sections.
   Delete this block to get plain continuous scrolling. */
@media (min-width: 1000px) and (min-height: 700px) and (prefers-reduced-motion: no-preference) {
  html { scroll-snap-type: y proximity; }
  .section { scroll-snap-align: start; scroll-snap-stop: normal; }
  .site-footer { scroll-snap-align: end; }
}

/* ---------- typography ---------- */

.h-display {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(28px, 3.2vw, 35px);
  line-height: 1.32;
  color: var(--red);
  margin-bottom: .6em;
}

.h-section {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(26px, 2.8vw, 32px);
  line-height: 1.25;
  color: var(--heading);
  margin-bottom: .5em;
}
.h-section--left { text-align: left; }

.section-lead {
  max-width: 900px;
  margin: 0 auto 46px;
  font-size: 17px;
}
.section-lead--left { margin-inline: 0; text-align: left; max-width: 460px; }

.lead {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 21px;
  line-height: 1.5;
  color: inherit;
  margin-bottom: 1em;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-block;
  border: 0;
  border-radius: 200px;
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  transition: background-color .25s ease, color .25s ease, box-shadow .25s ease, transform .15s ease;
}
.btn:active { transform: translateY(1px); }

.btn--jumbo  { font-size: 18px; padding: 25px 40px; }
.btn--solid  {
  font-size: 14px; padding: 16px 30px;
  background: var(--red); color: #fff;
}
.btn--solid:hover { background: var(--red-dark); color: #fff; }
.btn--solid[disabled] { opacity: .6; cursor: default; }

.btn--outline {
  background: transparent;
  color: var(--red);
  box-shadow: inset 0 0 0 2px var(--red);
}
.btn--outline:hover { background: var(--red); color: #fff; }

/* ==========================================================================
   Hero
   ========================================================================== */

.section--hero { text-align: center; }

.hero__logo {
  width: min(640px, 82%);
  margin: 0 auto 34px;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(26px, 3.6vw, 35px);
  line-height: 1.32;
  color: var(--red);
  max-width: 700px;
  margin: 0 auto .35em;
}
.hero__sub {
  font-size: 17px;
  margin-bottom: 2.2em;
}

.scroll-hint {
  position: absolute;
  left: 50%; bottom: 34px;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 2px solid rgba(0, 0, 0, .22);
  border-radius: 14px;
}
.scroll-hint span {
  position: absolute;
  left: 50%; top: 8px;
  width: 3px; height: 7px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--red);
  animation: scroll-hint 1.8s ease-in-out infinite;
}
@keyframes scroll-hint {
  0%, 100% { transform: translateY(0);    opacity: 1; }
  60%      { transform: translateY(15px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .scroll-hint span { animation: none; } }

/* ==========================================================================
   Split sections (text + image)
   ========================================================================== */

.split__inner {
  display: grid;
  grid-template-columns: 5fr 7fr;
  align-items: center;
  gap: 40px;
}
.split--media-left .split__inner { grid-template-columns: 7fr 5fr; }

.split__text { max-width: 520px; }
.split--media-left .split__text { justify-self: end; }

/* the original lets the artwork bleed past the container edge */
.split__media img { width: 100%; }
.split--text-left  .split__media { margin-right: calc(var(--gutter) * -1 - 3vw); }
.split--media-left .split__media { margin-left:  calc(var(--gutter) * -1 - 3vw); }

/* ---------- services list ---------- */
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 14px;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0; top: 12px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red);
}
.ticks strong { color: var(--heading); font-weight: 700; }

/* ---------- ordered steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; }
.steps li {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 18px;
  margin-bottom: 26px;
}
.steps__num {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1;
}
.steps h3 {
  font-family: var(--font-alt);
  font-size: 17px;
  font-weight: 500;
  color: var(--heading);
  margin: 10px 0 6px;
}
.steps p { font-size: 15px; line-height: 26px; margin: 0; }

/* ==========================================================================
   Flip cards
   ========================================================================== */

.flip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.flip {
  perspective: 1000px;
  aspect-ratio: 517 / 460;
  min-height: 300px;
}
.flip__inner {
  position: relative;
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform .7s cubic-bezier(.2, .7, .3, 1);
}
.flip:hover  .flip__inner,
.flip:focus  .flip__inner,
.flip.is-flipped .flip__inner { transform: rotateY(-180deg); }

.flip__face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 30px;
  text-align: center;
  color: #fff;
  background-color: #0a0a0a;
  background-size: cover;
  background-position: 50% 50%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
/* The card artwork is a busy logo collage, so the white copy needs a real
   scrim: a flat wash plus a darker band behind the centred text block. */
.flip__face::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, .62) 0%, rgba(0, 0, 0, .28) 62%, rgba(0, 0, 0, .2) 100%),
    rgba(0, 0, 0, .34);
}
.flip__face > div {
  position: relative;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .55);
}
.flip__back { transform: rotateY(-180deg); }

.flip__face h3 {
  font-family: var(--font-alt);
  font-weight: 400;
  font-size: 20px;
  color: #fff;
  margin: 0 0 8px;
}
.flip__face p {
  margin: 0;
  font-size: 16px;
  line-height: 28px;
  color: #fff;
}

/* ==========================================================================
   Contact
   ========================================================================== */

.contact {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 60px;
  align-items: start;
}

.contact__list {
  list-style: none;
  padding: 0;
  margin: 0 0 30px;
}
.contact__list li { margin-bottom: 4px; }
.contact__list a { color: var(--text); }
.contact__list a:hover { color: var(--red); }

.map {
  height: 240px;
  max-width: 570px;
  border: 1px solid var(--rule);
  background: #e8eaed;
}
.map-marker {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(238, 49, 36, .3);
}

/* ---------- form ---------- */
.field { margin: 0 0 18px; }
.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  color: var(--heading);
}
.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 15px;
  line-height: 1.5;
  color: var(--heading);
  background: #f6f7f8;
  border: 1px solid var(--rule);
  border-radius: 4px;
  transition: border-color .2s ease, background-color .2s ease;
}
.field input:focus,
.field textarea:focus {
  background: #fff;
  border-color: var(--red);
  outline: none;
}
.field textarea { resize: vertical; min-height: 120px; }
.field.has-error input,
.field.has-error textarea { border-color: var(--red); background: #fff5f4; }
.field .field-error {
  display: block;
  margin-top: 5px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--red);
}

/* honeypot — visually and semantically hidden, still fillable by bots */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.form-status {
  margin: 14px 0 0;
  font-size: 15px;
  line-height: 1.5;
  min-height: 1px;
}
.form-status.is-ok    { color: #2e7d32; }
.form-status.is-error { color: var(--red); }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--dark);
  color: rgba(255, 255, 255, .85);
  padding: 70px 0 40px;
  text-align: center;
}
.footer-inner p { margin: 0 0 4px; font-size: 15px; }
.footer__logo { width: 240px; margin: 0 auto 26px; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--red); }
.footer__copy {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .16);
  font-size: 13px;
  color: rgba(255, 255, 255, .6);
}

/* ==========================================================================
   Reveal-on-scroll
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .flip__inner { transition: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1100px) {
  .flip-grid { gap: 20px; }
  .split__inner { gap: 28px; }
}

@media (max-width: 900px) {
  :root { --header-h: 72px; }

  .section {
    min-height: 0;
    padding: 90px 0 70px;
  }
  .section--hero { min-height: 100svh; padding-top: 120px; }

  /* stack: text first, artwork second, in every split */
  .split__inner,
  .split--media-left .split__inner,
  .contact {
    grid-template-columns: 1fr;
    gap: 34px;
  }
  .split__text { max-width: none; }
  .split--media-left .split__text { justify-self: stretch; order: -1; }
  .split--text-left  .split__media,
  .split--media-left .split__media { margin: 0; }
  .split__media img { max-width: 560px; margin-inline: auto; }

  .section-lead--left { max-width: none; }
  .map { max-width: none; }

  .flip-grid { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
  .flip { aspect-ratio: 16 / 10; }

  .scroll-hint { display: none; }

  /* ---- mobile nav ---- */
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    inset: 100% 0 auto 0;
    background: #fff;
    box-shadow: 0 12px 24px rgba(0, 0, 0, .12);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0;
  }
  .site-nav a {
    display: block;
    padding: 14px var(--gutter);
    border-bottom: 0;
    font-size: 15px;
    color: var(--heading);
  }
  .site-header.is-over-dark:not(.is-scrolled) .site-nav a { color: var(--heading); }
  .site-nav a:hover, .site-nav a.is-active { border-bottom: 0; background: #f6f7f8; }
}

@media (max-width: 520px) {
  :root { --gutter: 20px; }
  .logo img, .site-header.is-scrolled .logo img { width: 145px; }
  .btn--jumbo { font-size: 16px; padding: 20px 32px; }
  .steps li { grid-template-columns: 42px 1fr; gap: 14px; }
  .steps__num { width: 42px; height: 42px; font-size: 18px; }
}
