/* ============================================================
   Alto Rendimiento — appaltorendimientomasc.com
   Design: "meadow & ink" — warm bone background, deep evergreen,
   citrus-lime accents. Sora (display) + Manrope (text).
   ============================================================ */

:root {
  --bg: #F7F5EE;
  --bg-soft: #EFECE1;
  --surface: #FFFFFF;
  --ink: #14201A;
  --ink-soft: #46534C;
  --line: #E3DFD1;
  --evergreen: #0E5138;
  --evergreen-deep: #0A3D2A;
  --pine: #0B241B;
  --lime: #C6E86B;
  --lime-strong: #A8D93E;
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-pill: 999px;
  --font-display: "Sora", "Avenir Next", "Segoe UI", sans-serif;
  --font-text: "Manrope", "Helvetica Neue", Arial, sans-serif;
  --shadow-card: 0 10px 30px rgba(20, 32, 26, 0.07);
  --shadow-lift: 0 18px 44px rgba(20, 32, 26, 0.13);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--evergreen); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: min(1160px, 92%); margin: 0 auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.16;
  letter-spacing: -0.02em;
  font-weight: 600;
  color: var(--ink);
}

h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.22rem; }

.lead { font-size: 1.13rem; color: var(--ink-soft); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--evergreen);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 8px;
  border-radius: var(--radius-pill);
  background: var(--lime-strong);
}
.eyebrow.on-dark { color: var(--lime); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--pine);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 12px 0;
  z-index: 300;
}
.skip-link:focus { left: 0; }

/* ------------------------------ Buttons ------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 15px 30px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  text-decoration: none !important;
}
.btn svg { width: 16px; height: 16px; }

.btn-solid {
  background: var(--evergreen);
  color: #fff;
}
.btn-solid:hover { background: var(--evergreen-deep); transform: translateY(-2px); box-shadow: var(--shadow-lift); }

.btn-lime {
  background: var(--lime);
  color: var(--pine);
}
.btn-lime:hover { background: var(--lime-strong); transform: translateY(-2px); box-shadow: var(--shadow-lift); }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--bg); }

.btn-outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.12); }

/* ------------------------------ Header ------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: rgba(247, 245, 238, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
}
.brand-mark {
  width: 42px; height: 42px;
  flex: none;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.12; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand-sub {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--evergreen);
  font-weight: 600;
}

.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none !important;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a.active { color: var(--evergreen); border-color: var(--lime-strong); }

.nav-cta {
  background: var(--pine);
  color: #fff !important;
  padding: 11px 22px !important;
  border-radius: var(--radius-pill);
  border-bottom: none !important;
}
.nav-cta:hover { background: var(--evergreen-deep); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px; height: 2px;
  margin: 0 auto;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 36, 27, 0.4);
  z-index: 110;
}

/* ------------------------------ Hero ------------------------------ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 110px;
}
.hero::before {
  content: "";
  position: absolute;
  top: -220px; right: -180px;
  width: 640px; height: 640px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(198, 232, 107, 0.55), rgba(198, 232, 107, 0) 66%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: -260px; left: -200px;
  width: 560px; height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(14, 81, 56, 0.14), rgba(14, 81, 56, 0) 65%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 64px;
  align-items: center;
}

.hero-copy h1 em {
  font-style: normal;
  color: var(--evergreen);
  position: relative;
}
.hero-copy h1 em::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 4px;
  height: 0.34em;
  background: var(--lime);
  z-index: -1;
  border-radius: 6px;
}
.hero-copy .lead { margin: 24px 0 34px; max-width: 560px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-panel {
  background: var(--pine);
  color: #E8EFE9;
  border-radius: var(--radius-lg);
  padding: 34px 32px;
  box-shadow: var(--shadow-lift);
}
.hero-panel h3 {
  color: #fff;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hero-panel dl { display: grid; gap: 18px; }
.hero-panel dt {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 3px;
}
.hero-panel dd { font-size: 0.98rem; line-height: 1.5; }
.hero-panel .panel-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
}

/* ------------------------------ Sections ------------------------------ */
.section { padding: 88px 0; }
.section.tinted { background: var(--bg-soft); }

.section-head { max-width: 720px; margin-bottom: 52px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head .lead { margin-top: 16px; }

.two-col {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
  align-items: start;
}
.two-col .lead { margin-bottom: 18px; }
.two-col p + p { margin-top: 16px; }

/* Stats */
.stat-strip {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 26px 26px 22px;
  box-shadow: var(--shadow-card);
}
.stat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--evergreen);
  letter-spacing: -0.02em;
}
.stat-card p { margin-top: 8px; font-size: 0.94rem; color: var(--ink-soft); }

/* Product cards */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.product-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 34px 30px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.product-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--evergreen), var(--evergreen-deep));
  color: var(--lime);
  display: grid;
  place-items: center;
}
.product-icon svg { width: 26px; height: 26px; }
.product-card p { color: var(--ink-soft); font-size: 0.97rem; }
.product-tag {
  margin-top: auto;
  align-self: flex-start;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--evergreen);
  background: rgba(198, 232, 107, 0.35);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
}

/* Dark band */
.band {
  background: var(--pine);
  color: #DCE7DF;
  padding: 96px 0;
  position: relative;
  overflow: hidden;
}
.band::before {
  content: "";
  position: absolute;
  top: -160px; right: -120px;
  width: 480px; height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(198, 232, 107, 0.16), transparent 65%);
}
.band h2 { color: #fff; }
.band .band-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.band p { color: #B9C9BE; }
.band p + p { margin-top: 16px; }

.check-list { list-style: none; display: grid; gap: 14px; margin-top: 26px; }
.check-list li {
  position: relative;
  padding-left: 36px;
  color: #DCE7DF;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 3px;
  width: 22px; height: 22px;
  border-radius: 8px;
  background: var(--lime);
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg>') center / 14px no-repeat, linear-gradient(#000 0 0);
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg>') center / 14px no-repeat, linear-gradient(#000 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  background-color: var(--lime);
}

/* Commitments / numbered steps */
.step-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.step-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 30px 26px;
  box-shadow: var(--shadow-card);
}
.step-idx {
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--evergreen);
  display: inline-block;
  border: 1px solid var(--lime-strong);
  border-radius: var(--radius-pill);
  padding: 5px 13px;
  margin-bottom: 16px;
}
.step-card h3 { margin-bottom: 8px; font-size: 1.08rem; }
.step-card p { font-size: 0.94rem; color: var(--ink-soft); }

/* Pillars */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.pillar {
  border-top: 3px solid var(--lime-strong);
  background: var(--surface);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding: 26px 24px;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.pillar h3 { font-size: 1.05rem; margin-bottom: 8px; }
.pillar p { font-size: 0.94rem; color: var(--ink-soft); }

/* CTA / contact */
.cta-section {
  padding: 96px 0;
  background:
    radial-gradient(700px 340px at 85% 0%, rgba(198, 232, 107, 0.35), transparent 70%),
    var(--bg-soft);
}
.cta-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  padding: 64px 56px;
  text-align: center;
}
.cta-card h2 { max-width: 640px; margin: 0 auto; }
.cta-card .lead { max-width: 620px; margin: 18px auto 40px; }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  text-align: left;
}
.contact-item {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
}
.contact-item dt {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--evergreen);
  margin-bottom: 8px;
}
.contact-item dd { font-size: 0.97rem; color: var(--ink-soft); }

/* ------------------------------ Page hero (internal) ------------------------------ */
.page-hero {
  background: var(--pine);
  color: #DCE7DF;
  padding: 78px 0 68px;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: "";
  position: absolute;
  top: -180px; right: -140px;
  width: 460px; height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(198, 232, 107, 0.2), transparent 65%);
}
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4.4vw, 3.1rem); position: relative; z-index: 1; }
.page-hero .lead { color: #B9C9BE; margin-top: 14px; position: relative; z-index: 1; }
.crumbs {
  position: relative; z-index: 1;
  font-size: 0.85rem;
  margin-bottom: 22px;
  color: #8FA697;
}
.crumbs a { color: var(--lime); }

/* ------------------------------ Legal pages ------------------------------ */
.legal-body { max-width: 820px; }
.legal-body h2 {
  font-size: 1.4rem;
  margin: 44px 0 14px;
  scroll-margin-top: 110px;
}
.legal-body h3 { font-size: 1.08rem; margin: 26px 0 10px; }
.legal-body p + p { margin-top: 14px; }
.legal-body ul, .legal-body ol { margin: 14px 0 14px 24px; }
.legal-body li + li { margin-top: 8px; }
.legal-body .legal-note {
  margin-top: 44px;
  font-size: 0.88rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--lime-strong);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin: 30px 0 10px;
}
.toc h2 { font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 12px; }
.toc ol { margin: 0 0 0 20px; columns: 2; column-gap: 36px; }
.toc li { margin: 0 0 8px; font-size: 0.94rem; break-inside: avoid; }

/* ------------------------------ Footer ------------------------------ */
.site-footer {
  background: var(--pine);
  color: #B9C9BE;
  padding: 72px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 1.2fr;
  gap: 48px;
  padding-bottom: 44px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.footer-brand p { margin-top: 18px; font-size: 0.94rem; }
.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-sub { color: var(--lime); }

.footer-col h4 {
  color: #fff;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; display: grid; gap: 10px; }
.footer-col a { color: #B9C9BE; font-size: 0.94rem; }
.footer-col a:hover { color: var(--lime); text-decoration: none; }

.company-info {
  font-style: normal;
  display: grid;
  gap: 5px;
  font-size: 0.92rem;
}
.company-info strong { color: #fff; font-family: var(--font-display); }
.company-info a { color: var(--lime); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 26px;
  font-size: 0.88rem;
}
.footer-legal { display: flex; gap: 22px; }
.footer-legal a { color: #8FA697; }
.footer-legal a:hover { color: var(--lime); }

/* ------------------------------ Cookie banner ------------------------------ */
.cookie-banner {
  position: fixed;
  left: 18px; right: 18px; bottom: 18px;
  z-index: 200;
  display: none;
}
.cookie-banner.visible { display: block; }
.cookie-inner {
  max-width: 860px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lift);
  padding: 22px 26px;
  display: flex;
  align-items: center;
  gap: 26px;
}
.cookie-inner h3 { font-size: 1rem; margin-bottom: 4px; }
.cookie-inner p { font-size: 0.88rem; color: var(--ink-soft); }
.cookie-actions { display: flex; gap: 10px; flex: none; }
.cookie-actions .btn { padding: 11px 20px; font-size: 0.88rem; }

/* ------------------------------ 404 ------------------------------ */
.error-hero {
  min-height: 62vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 80px 0;
}
.error-code {
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 12vw, 8rem);
  font-weight: 700;
  color: var(--evergreen);
  line-height: 1;
}
.error-hero .lead { margin: 18px auto 34px; max-width: 480px; }

/* ------------------------------ Reveal animation ------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.12s; }
.reveal[data-delay="2"] { transition-delay: 0.24s; }
.reveal[data-delay="3"] { transition-delay: 0.36s; }

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

/* ------------------------------ Responsive ------------------------------ */
@media (max-width: 1000px) {
  .hero-inner { grid-template-columns: 1fr; gap: 44px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .step-grid, .pillar-grid { grid-template-columns: repeat(2, 1fr); }
  .band .band-grid { grid-template-columns: 1fr; gap: 40px; }
  .two-col { grid-template-columns: 1fr; gap: 30px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(320px, 84vw);
    background: var(--surface);
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 90px 30px 30px;
    transform: translateX(105%);
    transition: transform 0.25s ease;
    z-index: 115;
    box-shadow: var(--shadow-lift);
  }
  .site-nav.open { transform: none; }
  .site-nav a { font-size: 1.05rem; padding: 10px 0; }
  .nav-cta { margin-top: 10px; }
  .nav-backdrop[hidden] { display: none; }

  .hero { padding: 64px 0 76px; }
  .stat-strip, .product-grid, .step-grid, .pillar-grid, .contact-grid { grid-template-columns: 1fr; }
  .cta-card { padding: 44px 26px; }
  .toc ol { columns: 1; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .cookie-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
}
