/* Base variables and reset */
:root {
  --text: #111518;
  --muted: #637c88;
  --border: #dce2e5;
  --brand: #e85d18;
  --brand-light: #f0712f;
  --brand-dark: #d85314;
  --bg: #ffffff;
  --side-pad: 1rem;
  /* mobile-first padding */
  --radius: 12px;
  --content-max: 1280px;
  /* Typography families */
  --ff-heading: 'Futura MD', 'Futura', 'Segoe UI', Roboto, Arial, sans-serif;
  --ff-body: 'Roboto', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  /* Font weights (customizable) */
  --fw-thin: 100;
  --fw-extralight: 200;
  --fw-light: 300;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-extrabold: 800;
  --fw-black: 900;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: var(--ff-body);
  font-weight: var(--fw-light);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Layout */
.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.layout {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.page {
  flex: 1;
}

/* Header (sticky with max width) */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem;
  padding: .5rem var(--side-pad);
  border-bottom: 1px solid var(--border);
  background: #fff;
  max-width: var(--content-max); width: 100%; margin: 0 auto;
}

/* mobile menu toggle (hidden on desktop) */
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

.menu-toggle svg {
  width: 22px;
  height: 22px;
}

@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--text);
}

.brand .logo {
  width: 165px;
  height: auto;
}


.main-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--text);
  font-size: .95rem;
  text-decoration: none;
  font-weight: 600;
  padding: .5rem .25rem;
  border-radius: .375rem;
}

.main-nav a:hover {
  text-decoration: underline;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

/* Mobile dropdown menu panel */
@media (max-width: 767.98px) {
  .site-header { position: sticky; top: 0; background: #fff; }

  .nav-cta {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: .5rem;
    padding: .75rem var(--side-pad) 1rem;
    margin-left: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 6px 12px rgba(0, 0, 0, .06);
  }

  .site-header[data-menu-open="true"] .nav-cta {
    display: grid;
    grid-template-columns: 1fr;
  }

  .main-nav {
    display: grid;
    gap: .25rem;
  }

  .main-nav a {
    padding: .5rem 0;
  }

  .nav-cta .btn {
    width: 100%;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.75rem;
  min-height: 44px;
  padding: 0 1rem;
  border-radius: .5rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
/* Content width constrained sections */
.hero {
  min-height: 420px; display: grid; align-items: end;
  background-position: center; background-repeat: no-repeat; background-size: cover;
  border-radius: var(--radius);
  margin: 1rem auto 0; max-width: var(--content-max); width: 100%;
  padding: 0 var(--side-pad) 1.25rem;
}
.hero-content { max-width: var(--content-max); color: #fff; display: grid; gap: .75rem; }
.section { max-width: var(--content-max); width: 100%; margin: 0 auto; padding: 1rem var(--side-pad) 0; }
.site-footer { display: grid; gap: 1rem; justify-items: center; padding: 2rem var(--side-pad); max-width: var(--content-max); width: 100%; margin: 0 auto; }
@media (min-width: 768px) { .hero { min-height: 520px; padding: 0 var(--side-pad) 2rem; } }

.btn-primary {
  background: linear-gradient(180deg, var(--brand-light), var(--brand));
  color: #fff;
  border: 1px solid var(--brand-dark);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(232,93,24,.25);
}

.btn-primary:hover {
  filter: brightness(.98);
  box-shadow: 0 10px 24px rgba(232,93,24,.3);
}

/* (Removed duplicate hero definitions overridden by consolidated block above) */

.hero h1 {
  margin: 0;
  font-size: clamp(1.75rem, 5vw + .5rem, 2.5rem);
  font-weight: var(--fw-black);
  font-family: var(--ff-heading);
  letter-spacing: -.03em;
  line-height: 1.1;
}

.hero p {
  margin: 0 0 .5rem;
  font-size: 1rem;
}

/* (Removed duplicate .section definition) */

.section-title {
  font-size: 1.375rem;
  font-weight: var(--fw-extrabold);
  font-family: var(--ff-heading);
  letter-spacing: -.015em;
  margin: 1rem 0;
}

.section-subtitle {
  font-size: 1.1rem;
  font-weight: var(--fw-extrabold);
  font-family: var(--ff-heading);
  margin: 1rem 0;
}

.lead-block {
  display: grid;
  gap: .5rem;
  margin: 0 0 1rem;
}

.lead-block h3 {
  margin: 0;
  font-size: clamp(1.25rem, 2vw + .75rem, 2rem);
  font-weight: var(--fw-black);
  font-family: var(--ff-heading);
  letter-spacing: -.03em;
}

.lead-block p {
  margin: 0;
  font-size: 1rem;
}

/* Tiles grid (cards with square images) */
.grid-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  padding: .5rem 0;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  padding-bottom: .5rem;
}

.tile-media {
  width: 100%;
  height: 240px;
  aspect-ratio: 1 / 1;
  background-position: center;
  background-size: cover;
  border-radius: 10px;
}

.tile-title {
  margin: 0 0 .25rem;
  font-weight: var(--fw-semibold);
  font-family: var(--ff-heading);
}

/* Cards grid */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: .75rem;
  padding: .5rem 0;
}

.card {
  display: grid;
  gap: .5rem;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  padding: 1rem;
}

.icon {
  color: var(--text);
}

.card-title {
  margin: 0;
  font-weight: var(--fw-extrabold);
  font-size: 1rem;
  font-family: var(--ff-heading);
}

.muted {
  color: var(--muted);
}

.small {
  font-size: .9rem;
}

.center {
  text-align: center;
}

/* Testimonials */
.testimonials {
  display: grid;
  gap: 1rem;
  padding: .5rem 0;
}

.testimonial {
  display: grid;
  gap: .5rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
}

.t-header {
  display: flex;
  gap: .75rem;
  align-items: center;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  background-size: cover;
  background-position: center;
}

.t-meta {
  display: grid;
}

.t-name {
  margin: 0;
  font-weight: var(--fw-semibold);
  font-family: var(--ff-heading);
}

.t-date {
  margin: 0;
}

.stars {
  display: flex;
  gap: .25rem;
  color: var(--text);
}

/* Quote form */
.quote-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  max-width: 720px;
}

@media (min-width: 600px) {
  .quote-form {
    grid-template-columns: repeat(2, 1fr);
  }

  .quote-form .full {
    grid-column: 1 / -1;
  }
}

.form-field {
  display: grid;
  gap: .5rem;
}

.label {
  color: var(--text);
  font-weight: 600;
}

.input {
  width: 100%;
  border: none;
  border-radius: .5rem;
  padding: 15px;
  font-size: 1rem;
  color: var(--text);
  background: #fff;
}

.input:focus {
  outline: 2px solid rgba(23, 146, 207, .4);
}

.input:focus-visible {
  outline: 2px solid rgba(23, 146, 207, .6);
  outline-offset: 1px;
}

.textarea {
  min-height: 9rem;
  resize: vertical;
}

/* Timeline */
.timeline {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: .5rem 0;
}

.tl-row {
  display: contents;
}

.tl-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
}

.tl-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text);
  margin-top: 1.25rem;
}

/* Calculator */
.calculator {
  display: grid;
  gap: 1rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
  background: #fff;
  box-shadow: 0 6px 20px rgba(0,0,0,.06);
}
.calc-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 600px) {
  .calc-grid {
    grid-template-columns: 2fr 1fr;
    align-items: end;
  }
  .calc-actions {
    grid-column: 1 / -1;
  }
}
.calc-field {
  display: grid;
  gap: .5rem;
}
.calc-actions {
  display: flex;
  gap: .75rem;
}
.calc-result {
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 1rem;
  background: #f8fbfd;
}
.calc-next {
  display: flex;
  justify-content: flex-end;
}
.calc-next .btn[disabled] {
  opacity: .6;
  cursor: not-allowed;
}

/* Inline calculator layout to match design */
.calc-grid-inline {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 1.25rem 2rem;
  align-items: center;
  justify-items: center;
  padding: .5rem 0 0;
}
@media (max-width: 799.98px) {
  .calc-grid-inline {
    grid-template-columns: 1fr;
  }
  .calc-operator { display: none; }
}

.calc-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,.05);
  padding: 1.25rem 1rem;
  min-width: min(260px, 90vw);
  min-height: 140px;
  display: grid;
  place-items: center;
}

.input-wrap { 
  position: relative; 
  width: 100%; 
  /* Tamaño único para número y sufijo */
  --num-size: clamp(1.75rem, 4.5vw + .5rem, 3rem);
}
.measure { position: absolute; visibility: hidden; white-space: pre; }
.input--big {
  font-size: var(--num-size);        /* antes: clamp(...) */
  font-weight: var(--fw-black);
  text-align: center;
  padding: .5rem 1.5rem;
}
.input--big::placeholder { color: #c8d2d7; }

.suffix {
  position: absolute;
  right: .35rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--brand);
  font-weight: var(--fw-black);
  font-size: var(--num-size);        /* antes: clamp(1.25rem, 3vw + .25rem, 2rem) */
  pointer-events: none;
}

/* Select already shows the unit (m) in option text */
.input-wrap select + .suffix { display: none; }

.calc-caption {
  text-align: center;
  color: var(--muted);
  margin-top: .5rem;
}

.calc-operator {
  font-size: clamp(1.5rem, 4vw + .25rem, 2.25rem);
  font-weight: var(--fw-black);
  color: #2a3c31;
}

.calc-result--card {
  border: 0;
  background: transparent;
  font-weight: var(--fw-black);
  font-size: clamp(1.5rem, 4vw + .25rem, 2.25rem);
  text-align: center;
}

.calc-actions--inline { display: none; }
.calc-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: .5rem;
  flex-wrap: wrap;
}
.calc-bottom .calc-note { flex: 1 1 360px; }
.calc-bottom .calc-next { flex: 0 0 auto; }
@media (max-width: 599.98px) {
  .calc-bottom { gap: .75rem; }
  .calc-bottom .calc-next { width: 100%; display: flex; justify-content: flex-end; }
}
.btn--cta { height: 3rem; padding: 0 1.25rem; }

/* Accessibility helper */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* Remove number input spinners */
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type='number'] { -moz-appearance: textfield; appearance: textfield; }

.calc-field input #calc-ml {
  width: 250px;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1000;
}
.modal[aria-hidden="false"] {
  display: block;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .35);
}
.modal-content {
  position: relative;
  background: #fff;
  border-radius: 12px;
  max-width: 720px;
  width: calc(100% - 2rem);
  margin: 5vh auto;
  padding: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
  max-height: calc(100vh - 10vh);
  overflow: auto;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: .5rem;
}
.modal-body {
  padding-top: 1rem;
}

.tl-line {
  width: 1.5px;
  background: var(--border);
  flex: 1;
}

.tl-line-top {
  height: 1rem;
}

.tl-content {
  padding: .75rem 0;
}

.tl-title {
  margin: 0 0 .25rem;
  font-weight: var(--fw-semibold);
  font-family: var(--ff-heading);
}

/* (Removed duplicate .site-footer definition) */

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 1.5rem;
}

.footer-nav a {
  min-width: auto;
  text-align: center;
  color: var(--muted);
  text-decoration: none;
  padding: .25rem .5rem;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
}

.social {
  display: flex;
  gap: 1rem;
}

/* Larger screens */
@media (min-width: 768px) {
  :root {
    --side-pad: 2rem;
  }

  .hero {
    min-height: 520px;
    padding: 0 var(--side-pad) 2rem;
  }

  .hero h1 {
    font-size: clamp(2rem, 4vw + 1rem, 3rem);
  }

  .section {
    padding: 1.25rem var(--side-pad) 0;
  }
}

@media (min-width: 1024px) {
  :root {
    --side-pad: 2.5rem;
  }

  .section,
  .hero {
    border-radius: var(--radius);
  }
}

/* Skip link */
.skip-link { position:absolute; left:-999px; top:auto; width:1px; height:1px; overflow:hidden; }
.skip-link:focus { left:50%; top:.5rem; transform:translateX(-50%); width:auto; height:auto; padding:.75rem 1rem; background:#000; color:#fff; border-radius:8px; z-index:999; }

/* Focus styles for interactive elements */
a:focus-visible, button:focus-visible, .menu-toggle:focus-visible, .btn:focus-visible, input:focus-visible, textarea:focus-visible {
  outline:2px solid rgba(23,146,207,.6); outline-offset:2px;
}

/* Improve motion reduction for menu panel (no extra transitions added yet) */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}