/* ==========================================================================
   SEDAT — CSS puro, mantenible, sin frameworks
   - Tokens: :root
   - Base: reset + tipografía
   - Layout: container, grids, stacks
   - Componentes: botones, cards, forms, navegación
   ========================================================================== */

:root {
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji",
    "Segoe UI Emoji";

  --color-bg: #ffffff;
  --color-text: #111827; /* gray-900 */
  --color-muted: #6b7280; /* gray-500/600 */
  --color-border: #e5e7eb; /* gray-200 */
  --color-surface: #ffffff;
  --color-surface-muted: #f9fafb; /* gray-50 */

  --color-primary: #2d5f3e;
  --color-primary-600: #1f4329;
  --color-accent: #c4a547;
  --color-accent-600: #a88d3a;

  --radius-sm: 10px;
  --radius-md: 12px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.08);

  --container: 80rem; /* ≈ max-w-7xl */
  --gutter: 1rem;
  --header-offset: 6rem; /* offset para anclas con header sticky */

  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
}

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

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

/* Evita que el header sticky tape anclas al navegar */
section[id],
article[id] {
  scroll-margin-top: var(--header-offset);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

/* Accesibilidad */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.75rem 1rem;
  background: var(--color-text);
  color: #fff;
  border-radius: 0 0 var(--radius-md) 0;
  z-index: 9999;
}
.skip-link:focus {
  left: 0;
}

/* ---------- Helpers / Typography ---------- */
.h3 {
  margin: 0 0 var(--space-4);
  font-size: var(--text-2xl);
  line-height: 1.25;
}

.muted {
  margin: var(--space-3) 0 0;
  color: var(--color-muted);
}

/* ---------- Layout ---------- */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
}

.container {
  width: min(var(--container), calc(100% - (var(--gutter) * 2)));
  margin-inline: auto;
}

.section {
  padding: var(--space-20) 0;
}

.section--muted {
  background: var(--color-surface-muted);
}

.section__header {
  margin-bottom: var(--space-12);
}
.section__header--center {
  text-align: center;
}

.section__title {
  margin: 0 0 var(--space-4);
  font-size: clamp(var(--text-3xl), 2.2vw, var(--text-4xl));
  line-height: 1.15;
}

.section__subtitle {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--text-lg);
  max-width: 48rem;
  margin-inline: auto;
}

.grid {
  display: grid;
  gap: var(--space-8);
}

.grid--2 {
  grid-template-columns: 1fr;
}
.grid--3 {
  grid-template-columns: 1fr;
}

.grid--contact {
  grid-template-columns: 1fr;
}

.stack {
  display: grid;
  gap: var(--space-6);
}
.stack--lg {
  gap: var(--space-8);
}
.stack--xl {
  gap: var(--space-12);
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.nav {
  min-height: 5rem; /* h-20 */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.brand {
  display: inline-flex;
  align-items: center;
}
.brand__logo {
  height: 4rem;
  width: auto;
}

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

.nav__link {
  font-size: var(--text-sm);
  color: var(--color-muted);
  transition: color 160ms ease, font-weight 160ms ease;
}
.nav__link:hover {
  color: var(--color-primary);
}
.nav__link.is-active {
  color: var(--color-primary);
  font-weight: 600;
}

.icon-btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: #374151;
}
.icon-btn:hover {
  background: #f3f4f6;
}

.icon {
  display: inline-block;
  vertical-align: middle;
}

.nav-mobile {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}
.nav-mobile__inner {
  padding: var(--space-4) 0;
  display: grid;
  gap: var(--space-4);
}
.nav-mobile__link {
  font-size: var(--text-base);
  color: var(--color-muted);
  transition: color 160ms ease;
}
.nav-mobile__link:hover {
  color: var(--color-primary);
}

/* ---------- Hero ---------- */
.hero {
  color: #fff;
  padding: var(--space-20) 0;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-600) 100%);
}

.hero--compact {
  padding: var(--space-16) 0;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  align-items: center;
}

.hero__title {
  margin: 0 0 var(--space-6);
  font-size: clamp(var(--text-4xl), 3vw, var(--text-5xl));
  line-height: 1.1;
}

.hero__kicker {
  margin: 0 0 var(--space-6);
  font-size: clamp(var(--text-4xl), 3vw, var(--text-5xl));
  line-height: 1.1;
}

.hero__lead {
  margin: 0 0 var(--space-8);
  font-size: var(--text-xl);
  color: rgba(255, 255, 255, 0.9);
}
.hero__lead--max {
  max-width: 48rem;
}

.hero__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.hero__media {
  display: flex;
  justify-content: center;
}
.hero__logo {
  width: min(28rem, 100%);
  filter: brightness(0) invert(1);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  border-radius: 10px;
  padding: 0.75rem 1.5rem;
  border: 1px solid transparent;
  cursor: pointer;
  user-select: none;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
  font-weight: 600;
}
.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
}
.btn--primary:hover {
  background: var(--color-primary-600);
}

.btn--light {
  background: #fff;
  color: var(--color-primary);
}
.btn--light:hover {
  background: #f3f4f6;
}

.btn--outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.95);
  border-width: 2px;
}
.btn--outline-light:hover {
  background: #fff;
  color: var(--color-primary);
}

.btn--lg {
  padding: 1rem 2rem;
  font-size: var(--text-base);
}

.btn__icon {
  display: inline-flex;
}

/* ---------- Links ---------- */
.link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-primary);
  transition: color 160ms ease;
}
.link:hover {
  color: var(--color-primary-600);
}

/* ---------- Cards ---------- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-10);
  box-shadow: var(--shadow-sm);
}

.card--hover {
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.card--hover:hover {
  border-color: rgba(45, 95, 62, 0.6);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card__icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
}
.card__icon--primary {
  background: var(--color-primary);
  color: #fff;
}

.card__title {
  margin: 0 0 var(--space-3);
  font-size: var(--text-xl);
  line-height: 1.25;
}

.card__headline {
  margin: 0 0 var(--space-6);
  font-size: clamp(var(--text-2xl), 2vw, var(--text-3xl));
  line-height: 1.15;
}
.card__headline--primary {
  color: var(--color-primary);
}
.card__headline--accent {
  color: var(--color-accent);
}

.card__text {
  margin: 0 0 var(--space-6);
  color: var(--color-muted);
}
.card__text--relaxed {
  color: #374151; /* gray-700 */
  line-height: 1.75;
  margin-bottom: 0;
}

/* ---------- CTA / Panel ---------- */
.cta {
  padding: var(--space-20) 0;
  color: #fff;
}
.cta--gold {
  background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-accent-600) 100%);
}
.cta__inner {
  text-align: center;
}
.cta__title {
  margin: 0 0 var(--space-6);
  font-size: clamp(var(--text-3xl), 2.5vw, var(--text-4xl));
  line-height: 1.15;
}
.cta__lead {
  margin: 0 auto var(--space-8);
  max-width: 42rem;
  font-size: var(--text-xl);
  color: rgba(255, 255, 255, 0.9);
}

.panel {
  border-radius: var(--radius-lg);
  padding: var(--space-10);
  color: #fff;
}
.panel--gold {
  background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-accent-600) 100%);
}
.panel__title {
  margin: 0 0 var(--space-6);
  font-size: clamp(var(--text-2xl), 2vw, var(--text-3xl));
}
.panel__lead {
  margin: 0 0 var(--space-6);
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.9);
}

/* ---------- Services ---------- */
.service {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

.service__header {
  padding: var(--space-10);
  color: #fff;
}
.service__header--green {
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary-600) 100%);
}
.service__title-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
.service__badge {
  width: 4rem;
  height: 4rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.service__title {
  margin: 0;
  font-size: var(--text-3xl);
  line-height: 1.15;
}
.service__desc {
  margin: 0;
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.9);
}
.service__body {
  padding: var(--space-10);
}
.service__subtitle {
  margin: 0 0 var(--space-6);
  font-size: var(--text-xl);
}
.service__subtitle--mt {
  margin-top: var(--space-10);
}

/* ---------- Check rows ---------- */
.check {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  color: #374151;
}
.check__icon {
  flex: 0 0 auto;
  margin-top: 2px;
}
.check__icon--primary {
  color: var(--color-primary);
}
.check__icon--accent {
  color: var(--color-accent);
}
.check--on-dark {
  color: rgba(255, 255, 255, 0.95);
}
.check__icon--on-dark {
  color: rgba(255, 255, 255, 0.95);
}

/* ---------- Info blocks ---------- */
.contact-info {
  max-width: 48rem;
  margin-inline: auto;
}

.contact-info > :first-child {
  text-align: center;
}

.contact-info .info {
  justify-content: center;
}

.contact-info .info > div:last-child {
  text-align: left;
}

.info {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}
.info__icon {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.info__title {
  margin: 0 0 0.25rem;
  font-size: var(--text-base);
  color: var(--color-text);
}
.info__text {
  margin: 0;
  color: var(--color-muted);
}

/* ---------- Forms ---------- */
.form {
  margin-top: var(--space-6);
  display: grid;
  gap: var(--space-6);
}

.field {
  display: grid;
  gap: var(--space-2);
}
.label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: #374151;
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 0.625rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  outline: none;
  transition: box-shadow 160ms ease, border-color 160ms ease;
}

.textarea {
  resize: vertical;
  min-height: 9rem;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(45, 95, 62, 0.25);
}

.field.is-invalid .input,
.field.is-invalid .select,
.field.is-invalid .textarea {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}
.field__error {
  margin: 0;
  min-height: 1.25em;
  font-size: var(--text-sm);
  color: #b91c1c;
}

.form-success {
  padding: var(--space-12) 0;
  display: grid;
  place-items: center;
  text-align: center;
  gap: var(--space-3);
}
.form-success__icon {
  width: 4rem;
  height: 4rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #dcfce7; /* green-100 */
  color: #16a34a; /* green-600 */
}
.form-success__title {
  margin: var(--space-3) 0 0;
  font-size: var(--text-xl);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-primary);
  color: #fff;
}

.footer {
  padding: var(--space-12) 0;
  display: grid;
  gap: var(--space-8);
}

.footer__brand {
  display: grid;
  gap: var(--space-4);
}

.footer__logo {
  height: 4rem;
}

.footer__title {
  margin: 0 0 var(--space-4);
  font-weight: 700;
}

.footer__text {
  margin: 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: var(--text-sm);
}

.footer__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-2);
}
.footer__link {
  color: rgba(255, 255, 255, 0.75);
  font-size: var(--text-sm);
  transition: color 160ms ease;
}
.footer__link:hover {
  color: #fff;
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  padding-top: var(--space-8);
  text-align: center;
}
.footer__small {
  margin: 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: var(--text-sm);
}

/* ---------- Responsive (desktop-first visual, con ajustes) ---------- */
@media (min-width: 48rem) {
  :root {
    --gutter: 1.5rem;
  }

  .nav__links {
    display: inline-flex;
  }
  .nav__toggle {
    display: none;
  }

  .hero__actions {
    flex-direction: row;
  }

  .grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .grid--contact {
    grid-template-columns: 1fr 2fr;
    align-items: start;
  }

  .footer {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }
  .footer__bottom {
    grid-column: 1 / -1;
  }
}

@media (min-width: 64rem) {
  .hero__grid {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

