/* =============================================
   KLATUS.COM — Hoja de estilos principal
   Sistema de diseño basado en variables CSS.
   ============================================= */

/* ─── Variables ─────────────────────────────── */
:root {
  --clr-brand:    #0d9e8c;
  --clr-brand-dk: #0a7a6c;
  --clr-dark:     #0f172a;
  --clr-dark-sec: #1e293b;
  --clr-text:     #1e293b;
  --clr-muted:    #64748b;
  --clr-bg:       #ffffff;
  --clr-bg-alt:   #f8fafc;
  --clr-border:   #e2e8f0;

  --radius-sm: 6px;
  --radius-md: 14px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,.09);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.12);

  --container: min(1160px, 100% - 2rem);
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: 200ms ease;
}

/* ─── Reset ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--clr-text);
  background: var(--clr-bg);
}

img   { display: block; max-width: 100%; height: auto; }
a     { color: inherit; text-decoration: none; }
ul    { list-style: none; }
button { font-family: var(--font); }

/* ─── Accesibilidad: saltar al contenido ─────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--clr-brand);
  color: #fff;
  padding: .5rem 1.1rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-size: .9rem;
  font-weight: 600;
  z-index: 200;
  transition: top .2s;
}
.skip-link:focus { top: 0; }

/* ─── Utilidades ─────────────────────────────── */
.container {
  width: var(--container);
  margin-inline: auto;
}

.section-eyebrow {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--clr-brand);
  margin-bottom: .75rem;
}

.section-title {
  font-size: clamp(1.7rem, 3.5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--clr-dark);
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--clr-muted);
  max-width: 54ch;
  margin-top: .8rem;
  line-height: 1.7;
}

/* ─── Botones ────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1.8rem;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--ease), color var(--ease),
              border-color var(--ease), transform var(--ease);
  white-space: nowrap;
}

.btn--primary {
  background: var(--clr-brand);
  color: #fff;
}
.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--clr-brand-dk);
  transform: translateY(-2px);
}

.btn--outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.55);
}
.btn--outline:hover,
.btn--outline:focus-visible {
  background: rgba(255,255,255,.1);
  border-color: #fff;
}

/* ─── Animación de aparición al hacer scroll ─── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Retardo escalonado para grillas */
.services__grid .reveal:nth-child(1) { transition-delay:   0ms; }
.services__grid .reveal:nth-child(2) { transition-delay:  70ms; }
.services__grid .reveal:nth-child(3) { transition-delay: 140ms; }
.services__grid .reveal:nth-child(4) { transition-delay: 210ms; }
.services__grid .reveal:nth-child(5) { transition-delay: 280ms; }
.services__grid .reveal:nth-child(6) { transition-delay: 350ms; }

.strategy__items .reveal:nth-child(1) { transition-delay:   0ms; }
.strategy__items .reveal:nth-child(2) { transition-delay: 100ms; }
.strategy__items .reveal:nth-child(3) { transition-delay: 200ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__scroll { animation: none; }
}

/* ============================================
   NAVEGACIÓN
   ============================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background var(--ease), box-shadow var(--ease);
}

.site-header.scrolled {
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

/* Sobre el hero oscuro: logo con texto blanco */
.logo--white { display: none; }
.site-header:not(.scrolled) .logo--color { display: none; }
.site-header:not(.scrolled) .logo--white { display: block; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav__links a {
  font-size: .9rem;
  font-weight: 500;
  color: rgba(255,255,255,.85);
  transition: color var(--ease);
}
.nav__links a:hover { color: #fff; }

.site-header.scrolled .nav__links a         { color: var(--clr-text); }
.site-header.scrolled .nav__links a:hover   { color: var(--clr-brand); }

.nav__cta {
  background: var(--clr-brand) !important;
  color: #fff !important;
  padding: .45rem 1.15rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.nav__cta:hover { background: var(--clr-brand-dk) !important; }

.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
  color: #fff;
  line-height: 0;
  transition: color var(--ease);
}
.site-header.scrolled .nav__toggle { color: var(--clr-text); }

/* Menú móvil */
@media (max-width: 640px) {
  .nav__toggle { display: block; }

  .nav__links {
    display: none;
    position: fixed;
    inset: 64px 0 0;
    background: var(--clr-dark);
    flex-direction: column;
    justify-content: center;
    gap: 2.5rem;
    padding: 2rem;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a {
    font-size: 1.25rem;
    color: rgba(255,255,255,.85);
  }
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  background-image: url('../img/background1.webp');
  background-size: cover;
  background-position: center;
  color: #fff;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(15,23,42,.92) 40%,
    rgba(13,158,140,.55) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 1;
  padding-block: 8rem 5rem;
  max-width: 680px;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.6);
  margin-bottom: 1.5rem;
}

.hero__title {
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}
.hero__title em {
  font-style: normal;
  color: var(--clr-brand);
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: rgba(255,255,255,.78);
  line-height: 1.75;
  margin-bottom: 2.5rem;
  max-width: 56ch;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Indicador de scroll animado */
.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
  animation: float 2.2s ease infinite;
}
@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(7px); }
}

/* ============================================
   SERVICIOS
   ============================================ */
.services {
  padding-block: 6rem;
  background: var(--clr-bg-alt);
}

.services__head {
  margin-bottom: 3.5rem;
}

/* ─── Tarjetas de servicio ───────────────────────
   Para AGREGAR un servicio:
     1. Copia un bloque <article class="service-card reveal">
     2. Edita el ícono SVG, el .service-card__title y el .service-card__desc.
   Para ELIMINAR: borra el bloque <article> completo.
─────────────────────────────────────────────── */
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
@media (max-width: 900px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .services__grid { grid-template-columns: 1fr; }
}

.service-card {
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 2rem 1.75rem;
  transition: box-shadow var(--ease), transform var(--ease), border-color var(--ease);
}
.service-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--clr-brand);
}

.service-card__icon {
  width: 48px;
  height: 48px;
  background: rgba(13,158,140,.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--clr-brand);
  flex-shrink: 0;
}

.service-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--clr-dark);
  margin-bottom: .6rem;
  line-height: 1.35;
}

.service-card__desc {
  font-size: .9rem;
  color: var(--clr-muted);
  line-height: 1.7;
}

/* ============================================
   ESTRATEGIA
   ============================================ */
.strategy {
  padding-block: 6rem;
  background: var(--clr-bg);
}

.strategy__layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 5rem;
  align-items: start;
}
@media (max-width: 768px) {
  .strategy__layout { grid-template-columns: 1fr; gap: 2.5rem; }
}

.strategy__items {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

.strategy-item {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.strategy-item__num {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(13,158,140,.12);
  color: var(--clr-brand);
  font-size: .78rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: .03em;
  margin-top: .1rem;
}

.strategy-item__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--clr-dark);
  margin-bottom: .4rem;
}

.strategy-item__desc {
  font-size: .9rem;
  color: var(--clr-muted);
  line-height: 1.7;
}

/* ============================================
   BANNER CTA
   ============================================ */
.cta-banner {
  padding-block: 6rem;
  background-image: url('../img/fft.webp');
  background-size: cover;
  background-position: center;
  position: relative;
  text-align: center;
  color: #fff;
}
.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,.78);
}

.cta-banner__content {
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin-inline: auto;
}

.cta-banner__title {
  font-size: clamp(1.7rem, 3.2vw, 2.3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.cta-banner__text {
  font-size: 1.05rem;
  color: rgba(255,255,255,.75);
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--clr-dark);
  color: rgba(255,255,255,.55);
  padding-block: 3rem;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer__logo img {
  height: 48px;
  width: auto;
}

.footer__nav {
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
}
.footer__nav a {
  font-size: .85rem;
  transition: color var(--ease);
}
.footer__nav a:hover { color: #fff; }

.footer__copy {
  font-size: .78rem;
  text-align: center;
  width: 100%;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.1);
}

/* ============================================
   PÁGINA DE CONTACTO — Hero
   ============================================ */
.page-hero {
  padding-top: 9rem;
  padding-bottom: 4rem;
  background: var(--clr-dark);
  background-image:
    linear-gradient(135deg, rgba(15,23,42,1) 55%, rgba(13,158,140,.35) 100%);
  color: #fff;
}

.page-hero .section-title { color: #fff; }
.page-hero .section-subtitle { color: rgba(255,255,255,.65); }

/* ============================================
   PÁGINA DE CONTACTO — Sección formulario
   ============================================ */
.contact-section {
  padding-block: 5.5rem;
  background: var(--clr-bg-alt);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4.5rem;
  align-items: start;
}
@media (max-width: 768px) {
  .contact-layout { grid-template-columns: 1fr; gap: 2.5rem; }
}

.contact-info__title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--clr-dark);
  margin-bottom: .85rem;
}

.contact-info__text {
  font-size: .95rem;
  color: var(--clr-muted);
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

/* ─── Tarjeta del formulario ─── */
.contact-card {
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 2.25rem 2rem;
}

/* ============================================
   FORMULARIO
   ============================================ */
.form {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}

.form__group {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.form__label {
  font-size: .875rem;
  font-weight: 600;
  color: var(--clr-text);
}
.form__label .req {
  color: var(--clr-brand);
  margin-left: .15rem;
}

.form__input,
.form__textarea {
  padding: .72rem 1rem;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: .95rem;
  color: var(--clr-text);
  background: var(--clr-bg);
  width: 100%;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.form__input::placeholder,
.form__textarea::placeholder { color: rgba(100,116,139,.55); }

.form__input:focus,
.form__textarea:focus {
  outline: none;
  border-color: var(--clr-brand);
  box-shadow: 0 0 0 3px rgba(13,158,140,.15);
}
.form__input.is-error,
.form__textarea.is-error { border-color: #e53e3e; }

.form__textarea {
  resize: vertical;
  min-height: 130px;
}

input[type="file"].form__input {
  padding: .55rem .75rem;
  cursor: pointer;
}
input[type="file"].form__input::file-selector-button {
  padding: .5rem 1rem;
  margin-right: 1rem;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--clr-brand);
  color: #fff;
  font-family: var(--font);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity var(--ease);
}
input[type="file"].form__input::file-selector-button:hover { opacity: .9; }

.form__hint {
  font-size: .78rem;
  color: var(--clr-muted);
  font-weight: 400;
}
.form__error {
  font-size: .8rem;
  color: #e53e3e;
  min-height: 1.1em;
}

.form__submit { margin-top: .25rem; }

.form__privacy {
  font-size: .76rem;
  color: var(--clr-muted);
  text-align: center;
  line-height: 1.6;
}
.form__privacy a {
  color: var(--clr-brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ============================================
   NOTIFICACIONES TOAST
   ============================================ */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  max-width: 360px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .9rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 500;
  color: #fff;
  box-shadow: var(--shadow-lg);
  animation: toast-in .25s ease forwards;
  pointer-events: auto;
}
.toast--success { background: var(--clr-brand); }
.toast--error   { background: #e53e3e; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
