/* ==========================================================
   TOKENS
========================================================== */
:root {
  --bg: #F4F7F6;
  --surface: #FFFFFF;
  --ink: #10231F;
  --ink-soft: #45605B;
  --teal: #0E7C7B;
  --teal-deep: #0A5654;
  --amber: #FFC94D;
  --line: #DCE7E4;
  --on-amber: #10231F;
  --header-bg: rgba(244, 247, 246, 0.9);
  --footer-bg: #10231F;
  --shadow-color: rgba(16, 35, 31, 0.25);

  --font-display: "Space Grotesk", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --radius: 4px;
  --wrap: 1120px;
}

[data-theme="dark"] {
  --bg: #0D1412;
  --surface: #15201D;
  --ink: #E7EFEC;
  --ink-soft: #9DB4AE;
  --teal: #3BA8A6;
  --teal-deep: #7CCBC9;
  --amber: #FFC94D;
  --line: #24332F;
  --on-amber: #1B1405;
  --header-bg: rgba(13, 20, 18, 0.88);
  --footer-bg: #0A100F;
  --shadow-color: rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

address { font-style: normal; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.05rem; margin-bottom: 6px; }

p { margin: 0 0 16px; color: var(--ink-soft); }

a { color: var(--teal); }

.accent { color: var(--teal-deep); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin: 0 0 12px;
}

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .service-track { scroll-behavior: auto !important; }
}

/* ==========================================================
   HEADER
========================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
}

.brand-logo {
  display: block;
  height: 40px;
  width: auto;
}

.logo-oscuro { display: none; }
[data-theme="dark"] .logo-claro { display: none; }
[data-theme="dark"] .logo-oscuro { display: block; }

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.94rem;
}

.nav a:hover { color: var(--teal); }

.nav-cta {
  background: var(--amber);
  color: var(--on-amber) !important;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.12s ease, transform 0.12s ease;
}

.theme-toggle:hover { border-color: var(--teal); transform: translateY(-1px); }

[data-theme="light"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: none; }

/* Hamburger (solo mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 8px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 12px 24px 20px;
    box-shadow: 0 16px 32px -16px var(--shadow-color);
  }
  body.nav-open .nav { display: flex; }
  .nav a { padding: 10px 4px; border-bottom: 1px solid var(--line); }
  .nav a.nav-cta { border-bottom: none; text-align: center; margin-top: 8px; }
}

/* ==========================================================
   BUTTONS
========================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--amber);
  color: var(--on-amber);
}
.btn-primary:hover { background: #ffd66e; }

.btn-ghost {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--surface); }

.btn-block { width: 100%; }

/* ==========================================================
   HERO
========================================================== */
.hero { padding: 72px 0 96px; }

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.hero-lead { font-size: 1.08rem; max-width: 46ch; }

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* Signature element: service ticket */
.hero-ticket { display: flex; justify-content: center; }

.ticket {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 24px 26px;
  width: 100%;
  max-width: 340px;
  box-shadow: 0 24px 48px -24px var(--shadow-color);
  transform: rotate(-2deg);
}

.ticket-head {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.ticket-line {
  border-top: 1px dashed var(--line);
  margin: 14px 0;
}

.ticket-field {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.86rem;
  padding: 6px 0;
}

.ticket-field span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

.ticket-field strong {
  font-weight: 500;
  text-align: right;
}

.stamp {
  position: absolute;
  bottom: -14px;
  right: -10px;
  border: 2px solid var(--teal);
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  padding: 6px 12px;
  border-radius: 999px;
  transform: rotate(8deg);
  background: var(--bg);
}

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-ticket { margin-top: 8px; }
}

/* ==========================================================
   SECTIONS
========================================================== */
.section { padding: 88px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-split {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
}

@media (max-width: 860px) {
  .section-split { grid-template-columns: 1fr; }
}

.section-intro { max-width: 60ch; }

/* Mission / vision pair */
.mv-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin: 8px 0 32px;
}

@media (max-width: 560px) {
  .mv-grid { grid-template-columns: 1fr; }
}

/* Grouped services within a category */
.service-category + .service-category { margin-top: 56px; }
.service-category > h3 { margin-top: 40px; }

/* Checklist grid */
.checklist-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.checklist-grid.values-grid { grid-template-columns: repeat(2, 1fr); }
.checklist-grid.single-col { grid-template-columns: 1fr; }

.check-item {
  background: var(--surface);
  padding: 26px;
  display: flex;
  gap: 14px;
}

.check-mark {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.check-item p { margin: 0; font-size: 0.92rem; }

@media (max-width: 860px) {
  .checklist-grid { grid-template-columns: 1fr; }
}

/* Service carousel: scroll horizontal con flechas laterales y
   auto-avance cada 3s (pausado al interactuar — ver script.js) */
.service-carousel {
  margin-top: 40px;
  position: relative;
}

.service-carousel::before,
.service-carousel::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 28px;
  z-index: 1;
  pointer-events: none;
}

.service-carousel::before {
  left: 0;
  background: linear-gradient(to right, var(--bg), transparent);
}

.service-carousel::after {
  right: 0;
  background: linear-gradient(to left, var(--bg), transparent);
}

.section-alt .service-carousel::before { background: linear-gradient(to right, var(--surface), transparent); }
.section-alt .service-carousel::after { background: linear-gradient(to left, var(--surface), transparent); }

.service-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.service-track::-webkit-scrollbar { display: none; }

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 20px -8px var(--shadow-color);
  transition: background 0.12s ease, color 0.12s ease, transform 0.12s ease;
}

.carousel-arrow:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
  transform: translateY(-50%) scale(1.06);
}

.carousel-arrow.prev { left: -6px; }
.carousel-arrow.next { right: -6px; }

/* Single-item category: no carousel needed */
.service-single { margin-top: 40px; max-width: 320px; }

.service-card {
  flex: 0 0 280px;
  width: 280px;
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

@media (max-width: 560px) {
  .service-card { flex-basis: 220px; width: 220px; }
}

.service-card:hover {
  box-shadow: 0 12px 24px -14px var(--shadow-color);
  transform: translateY(-2px);
}

.service-card-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg);
}

.service-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.service-card:hover .service-card-image img { transform: scale(1.05); }

.service-card-body { padding: 16px 18px; }

.service-card-body h3 { font-size: 0.98rem; margin-bottom: 6px; }

.service-card-body p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn-detail {
  align-self: flex-start;
  margin-top: 14px;
  padding: 7px 14px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid var(--teal);
  background: transparent;
  color: var(--teal-deep);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.btn-detail:hover {
  background: var(--teal);
  color: #fff;
}

/* Modal de detalle de servicio */
.service-modal {
  border: none;
  border-radius: 10px;
  padding: 0;
  background: var(--surface);
  color: var(--ink);
  width: min(520px, calc(100vw - 40px));
  box-shadow: 0 32px 64px -24px rgba(0, 0, 0, 0.45);
}

.service-modal::backdrop {
  background: rgba(10, 16, 15, 0.6);
  backdrop-filter: blur(2px);
}

.service-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 26px 26px 0;
}

.service-modal-header h3 { margin: 0; font-size: 1.25rem; }

.service-modal-close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.service-modal-close:hover { background: var(--line); color: var(--ink); }

.service-modal-body { padding: 12px 26px 4px; }

.service-modal-body p {
  margin: 0 0 16px;
  font-size: 0.94rem;
  -webkit-line-clamp: unset;
  display: block;
  overflow: visible;
}

.service-modal-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.service-modal-list li { font-size: 0.9rem; color: var(--ink-soft); }

.service-modal-footer { padding: 20px 26px 26px; }

/* Selector múltiple con chips (formulario de cotización) */
.chips-field {
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chips-field legend {
  padding: 0;
  font-size: 0.86rem;
  color: var(--ink);
  margin-bottom: 4px;
}

.chips-hint { color: var(--ink-soft); font-weight: 400; }

.chips-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--teal);
  color: #fff;
  border-radius: 999px;
  padding: 5px 6px 5px 14px;
  font-size: 0.84rem;
  line-height: 1.3;
}

.chip button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 0.78rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.12s ease;
}

.chip button:hover { background: rgba(255, 255, 255, 0.42); }

.chip-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 14px;
}

.chip-group-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 6px;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-option {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 14px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.chip-option:hover { border-color: var(--teal); }

.chip-option[aria-pressed="true"] {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.chip-error { color: #B3261E; font-size: 0.82rem; margin: 0; }

/* FAQ */
.faq-list {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.faq-item { background: var(--surface); }

.faq-item summary {
  padding: 20px 26px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  font-family: var(--font-mono);
  color: var(--teal);
  flex-shrink: 0;
}

.faq-item[open] summary::after { content: "–"; }

.faq-item p {
  margin: 0;
  padding: 0 26px 20px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

/* ==========================================================
   FORMS
========================================================== */
.contact-inline p {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  margin: 4px 0;
  color: var(--ink);
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.86rem;
  color: var(--ink);
}

.form-card input,
.form-card select,
.form-card textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  resize: vertical;
}

.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus {
  border-color: var(--teal);
  outline: none;
}

.form-status {
  font-size: 0.86rem;
  min-height: 1.2em;
  margin: 0;
}

.form-status[data-state="success"] { color: var(--teal-deep); }
.form-status[data-state="error"] { color: #B3261E; }

/* ==========================================================
   FOOTER
========================================================== */
.site-footer {
  background: var(--footer-bg);
  color: #C9D6D3;
  padding: 24px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.site-footer .brand { color: #fff; margin-bottom: 4px; display: block; }
.site-footer p { color: #C9D6D3; margin: 2px 0; }

.site-footer .footer-contact {
  max-width: 640px;
}

.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: 8px;
  vertical-align: middle;
}

.footer-social a {
  display: inline-flex;
  color: #C9D6D3;
  transition: color 0.12s ease;
}

.footer-social a:hover { color: var(--amber); }
.footer-social svg { display: block; }

.site-footer .footer-copyright {
  text-align: center;
  margin-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 16px;
}
