/* Layout primitives & section spacing for the website UI kit */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }

.container { max-width: 1440px; margin: 0 auto; padding: 0 var(--ma-gutter, 56px); }
@media (max-width: 768px) { .container { padding: 0 var(--ma-gutter, 56px); } }
@media (max-width: 480px) { .container { padding: 0 20px; } }

.section { padding: 120px 0; }
@media (max-width: 1024px) { .section { padding: 80px 0; } }
@media (max-width: 768px)  { .section { padding: 60px 0; } }
.section--warm { background: #F5F0EB; }
.section--dark { background: #2C2C2C; color: #fff; }
.section--accent { background: #A20202; color: #fff; }

/* Section header */
.section-head { text-align: center; max-width: 720px; margin: 0 auto 64px; }
.section-head .eyebrow { display: inline-block; margin-bottom: 14px; }
.section-head h2 { margin: 0 0 12px; font-size: 44px; }
.section-head p { color: #7A7A7A; font-size: 17px; }
@media (max-width: 768px) { .section-head h2 { font-size: 30px; } .section-head { margin-bottom: 40px; } }

/* Buttons (component-ready) */
.btn {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 14px 30px; border-radius: 4px;
  font-family: 'Raleway', sans-serif; font-weight: 700; font-size: 15px;
  letter-spacing: 0.04em; border: 2px solid transparent;
  transition: background 250ms ease, color 250ms ease, transform 200ms ease, box-shadow 250ms ease, border-color 250ms ease;
  text-decoration: none;
}
.btn--primary { background: #A20202; color: #fff; border-color: #A20202; }
.btn--primary:hover { background: #7A0101; border-color: #7A0101; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(162,2,2,.30); }
.btn--secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn--secondary:hover { background: rgba(255,255,255,.12); border-color: #fff; transform: translateY(-2px); }
.btn--tertiary { background: transparent; color: #A20202; border-color: #A20202; padding: 12px 26px; font-size: 14px; }
.btn--tertiary:hover { background: #A20202; color: #fff; transform: translateY(-1px); }
.btn--white { background: #fff; color: #A20202; border-color: #fff; }
.btn--white:hover { background: #F5F0EB; border-color: #F5F0EB; transform: translateY(-2px); }

/* Shared red/outline button pair (used across home, nosotros, contacto) */
.btn-red, .btn-outline {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: 6px;
  font-family: 'Lato', sans-serif; font-weight: 700; font-size: 14px;
  text-decoration: none; cursor: pointer;
  transition: background .25s ease, color .25s ease, transform .2s ease, box-shadow .25s ease, border-color .25s ease;
}
.btn-red { background: #A20202; color: #fff; border: 1.5px solid #A20202; }
.btn-red:hover { background: #7A0101; border-color: #7A0101; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(162,2,2,.28); }
.btn-outline { background: #fff; color: #2C2C2C; border: 1.5px solid #2C2C2C; }
.btn-outline:hover { background: #2C2C2C; color: #fff; transform: translateY(-2px); }

/* Ghost link with growing underline */
.link-ghost {
  font-family: 'Raleway', sans-serif; font-weight: 600; font-size: 14px; letter-spacing: 0.03em;
  color: #A20202; display: inline-flex; align-items: center; gap: 6px; position: relative; padding: 4px 0;
}
.link-ghost::after { content: ''; position: absolute; left: 0; bottom: -2px; width: 0; height: 1.5px; background: #A20202; transition: width 300ms ease; }
.link-ghost:hover::after { width: 100%; }

/* Scroll-into-view fade-up */
.animate-up { opacity: 0; transform: translateY(40px); transition: opacity 700ms cubic-bezier(.22,1,.36,1), transform 700ms cubic-bezier(.22,1,.36,1); }
.animate-up.is-visible { opacity: 1; transform: translateY(0); }
.stagger-1 { transition-delay: 50ms; } .stagger-2 { transition-delay: 120ms; } .stagger-3 { transition-delay: 190ms; } .stagger-4 { transition-delay: 260ms; }

/* ========================================================================
   Responsive global tightenings — applied to every page of the kit.
   Keeps section paddings comfortable on tablet/mobile and avoids horizontal
   overflow on long lines of body copy.
   ======================================================================== */
@media (max-width: 1024px) {
  html { -webkit-text-size-adjust: 100%; }
  body { overflow-x: hidden; }
}
@media (max-width: 700px) {
  html { font-size: 15px; }
  .btn-red, .btn-outline { padding: 12px 20px; font-size: 13.5px; width: 100%; justify-content: center; }
  /* CTA stacks become full width by default on mobile */
  .hero-ctas, .nshero-ctas { width: 100%; }
  .hero-ctas .btn-red, .hero-ctas .btn-outline,
  .nshero-ctas .btn-red, .nshero-ctas .btn-outline { flex: 1 1 auto; }
}
@media (max-width: 480px) {
  html { font-size: 14.5px; }
}
@media (max-width: 400px) {
  html { font-size: 14px; }
  .section-head h2 { font-size: 26px; }
  .vals-row { grid-template-columns: 1fr !important; }
  .tst-grid { grid-template-columns: 1fr !important; }
}
