:root {
  --ink: #2f3033;
  --muted: #727579;
  --paper: #f3f4f2;
  --white: #ffffff;
  --dark: #302f2f;
  --teal: #07566a;
  --teal-dark: #043d4d;
  --gold: #9b8e25;
  --gold-soft: #d7ca73;
  --line: #e3e4e0;
  --shadow: 0 24px 70px rgba(33, 38, 39, 0.12);
  --max: 1180px;
}

.config-page {
  min-height: 100svh;
  background: #f2f3f1;
}

.configurator {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  min-height: calc(100svh - 56px);
}

.config-panel {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 24px;
  background: var(--white);
  border-right: 1px solid rgba(43, 44, 46, 0.12);
}

.config-panel-heading h1 {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.2rem;
  line-height: 1;
}

.config-panel label {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 14px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 900;
}

.config-panel input[type="range"] {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: var(--teal);
}

.config-panel output {
  color: var(--teal);
  font-family: Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
}

.config-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.config-actions .button {
  min-height: 44px;
  padding: 0 16px;
}

.config-code {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  border: 1px solid rgba(43, 44, 46, 0.18);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: #f7f8f6;
  font-family: Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.5;
}

.config-preview {
  min-width: 0;
  overflow: auto;
  background: var(--white);
}

.config-preview .hero {
  min-width: 1120px;
}

@media (max-width: 880px) {
  .configurator {
    grid-template-columns: 1fr;
  }

  .config-panel {
    border-right: 0;
    border-bottom: 1px solid rgba(43, 44, 46, 0.12);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

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

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

.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 56px;
  padding: 10px clamp(22px, 5vw, 72px);
  color: var(--white);
  background: var(--ink);
}

.desktop-nav,
.header-contact {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 34px);
  font-size: 0.78rem;
  font-weight: 850;
}

.desktop-nav a,
.header-contact a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.header-contact {
  justify-content: flex-end;
  line-height: 1.25;
}

.header-contact span {
  color: rgba(255, 255, 255, 0.76);
}

.nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nav-button,
.mobile-nav {
  display: none;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 54vw) minmax(360px, 540px);
  gap: clamp(28px, 3.5vw, 58px);
  align-items: start;
  justify-content: start;
  width: 100%;
  min-height: min(620px, calc(100svh - 56px));
  margin: 0 auto;
  padding: 0 clamp(18px, 5vw, 72px) 72px 0;
  background: var(--white);
  overflow: visible;
}

.hero-visual {
  position: relative;
  z-index: 0;
  height: clamp(
    var(--hero-visual-min, 464px),
    var(--hero-visual-fluid, 33.25vw),
    var(--hero-visual-max, 482px)
  );
  min-height: 0;
  overflow: visible;
}

.image-stack {
  position: absolute;
  top: var(--hero-effect-y, 0px);
  left: var(--hero-effect-x, -4%);
  width: auto;
  height: var(--hero-effect-height, 100%);
  aspect-ratio: 1040 / 913;
  background-image: url("../img/portada-vesmar.webp");
  background-position: var(--hero-photo-x, center) var(--hero-photo-y, bottom);
  background-size: var(--hero-photo-size, cover);
  transform: scale(var(--hero-effect-scale, 1.28));
  transform-origin: left top;
}

.effect-mask {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  max-width: none;
  object-fit: fill;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(var(--hero-svg-scale, 1));
  transform-origin: center;
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: clamp(594px, 42.5vw, 617px);
  min-height: 0;
  max-width: 540px;
  padding-top: 0;
  text-align: center;
}

.pretitle,
.tag {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section h2,
.section-heading h2 {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.9rem, 3vw, 2.65rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}

.section h2 span {
  color: var(--teal);
}

.hero-copy h1 {
  display: grid;
  gap: 0.06em;
  max-width: 540px;
  margin: 2px auto 0;
  color: var(--ink);
  font-family:
    "Arial Black", "Century Gothic", Eurostile, "Microgramma D Extended",
    Arial, Helvetica, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(2rem, 2.9vw, 3.05rem);
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-copy h1 span {
  display: block;
  overflow-wrap: anywhere;
}

.hero-copy h1 .title-accent {
  color: var(--teal);
}

.hero-logo {
  display: block;
  width: min(500px, 100%);
  height: auto;
  margin: 0 auto 22px;
  padding: 12px 16px;
  background: var(--white);
  border-radius: 4px;
}

.hero-copy p:not(.pretitle) {
  max-width: 540px;
  margin: 22px auto 0;
  color: #4d5052;
  font-size: clamp(1.02rem, 1.5vw, 1.16rem);
  font-weight: 700;
  overflow-wrap: break-word;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  width: 100%;
  max-width: 540px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 24px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  font-weight: 950;
  transition:
    transform 180ms ease,
    background 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button.primary {
  color: var(--white);
  background: var(--teal);
  border-color: var(--teal);
}

.button.ghost {
  color: var(--ink);
  background: transparent;
}

.request-bar {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr)) auto;
  gap: 16px;
  width: min(1240px, calc(100% - 36px));
  margin: -74px auto 0;
  padding: 16px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.request-bar div {
  min-height: 58px;
  padding: 10px 18px;
  background: #f4f4f2;
  border-radius: 4px;
}

.request-bar span {
  display: block;
  color: #a0a19e;
  font-size: 0.76rem;
  font-weight: 850;
}

.request-bar strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 0.92rem;
}

.request-bar a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 170px;
  padding: 12px 20px;
  color: var(--white);
  background: var(--teal);
  border-radius: 4px;
  font-weight: 950;
}

.section {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(86px, 10vw, 140px) 0;
}

.about {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(36px, 7vw, 90px);
  align-items: center;
}

.about-copy p:not(.tag),
.service-grid p,
.steps p {
  color: var(--muted);
  font-size: 1.02rem;
  font-weight: 600;
}

.check-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 22px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 26px;
  color: #55585a;
  font-size: 0.94rem;
  font-weight: 800;
}

.check-list li::before {
  position: absolute;
  top: 2px;
  left: 0;
  content: "✓";
  color: var(--teal);
  font-weight: 950;
}

.about-image {
  overflow: hidden;
  border-radius: 140px 8px 8px 8px;
}

.about-image img {
  width: 100%;
  aspect-ratio: 1.15;
  object-fit: cover;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 0 0 clamp(76px, 8vw, 110px);
}

.stats article {
  text-align: center;
}

.stats strong {
  display: block;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.8rem, 5.6vw, 5rem);
  font-weight: 500;
  line-height: 0.95;
}

.stats strong::first-letter {
  color: var(--teal);
}

.stats span {
  display: block;
  margin-top: 16px;
  color: #8a8b88;
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.services {
  width: 100%;
  max-width: none;
  background: #eceeeb;
}

.services > * {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

.section-heading {
  text-align: center;
}

.section-heading h2 {
  max-width: 760px;
  margin: 0 auto;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 48px;
}

.service-grid article {
  min-height: 250px;
  padding: 30px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.service-grid h3 {
  margin: 0 0 14px;
  color: var(--teal-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.7rem;
  line-height: 1.05;
}

.gallery {
  padding-top: clamp(76px, 8vw, 118px);
}

.gallery .section-heading h2 {
  max-width: 680px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(210px, 18vw);
  gap: 18px;
  margin-top: 48px;
}

.gallery-item {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  background: var(--ink);
  border-radius: 6px;
}

.gallery-featured {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item figcaption {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  padding: 10px 12px;
  color: var(--white);
  background: rgba(47, 48, 51, 0.78);
  border-radius: 4px;
  font-size: 0.84rem;
  font-weight: 950;
  line-height: 1.2;
}

.method {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1.15fr);
  gap: clamp(36px, 7vw, 90px);
}

.steps {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  padding: 26px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.steps span {
  color: var(--gold);
  font-weight: 950;
}

.steps strong {
  display: block;
  margin-top: 8px;
  color: var(--teal-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
}

.steps p {
  margin-bottom: 0;
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(340px, 1.15fr);
  gap: clamp(36px, 7vw, 90px);
  align-items: start;
}

.contact-copy p {
  max-width: 520px;
  color: var(--muted);
  font-size: 1.02rem;
  font-weight: 600;
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: clamp(22px, 3vw, 32px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.contact-form label,
.contact-form .field-wide {
  display: grid;
  gap: 7px;
}

.contact-form .field-wide {
  grid-column: 1 / -1;
}

.contact-form span {
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  color: var(--ink);
  background: #f7f7f5;
  border: 1px solid var(--line);
  border-radius: 4px;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
}

.contact-form textarea {
  min-height: 138px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: 2px solid rgba(7, 86, 106, 0.28);
  outline-offset: 2px;
  border-color: var(--teal);
}

.contact-form .button {
  grid-column: 1 / -1;
  justify-self: start;
  min-width: 190px;
}

.site-footer {
  display: grid;
  align-items: center;
  justify-content: center;
  justify-items: center;
  gap: 4px;
  padding: 10px clamp(18px, 4vw, 48px);
  background: var(--white);
  border-top: 1px solid var(--line);
}

.site-footer span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.developer-logo {
  width: min(130px, 42vw);
  height: auto;
}

.login-page {
  min-height: 100svh;
  background:
    linear-gradient(rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.88)),
    url("../img/portada-vesmar.webp") center / cover;
}

.login-main {
  display: grid;
  width: 100%;
  max-width: 100vw;
  min-height: calc(100svh - 56px);
  place-items: center;
  padding: clamp(32px, 6vw, 72px) 18px;
  overflow: hidden;
}

.login-panel {
  display: grid;
  gap: 24px;
  width: 100%;
  max-width: 420px;
  padding: clamp(26px, 4vw, 38px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.login-panel img {
  width: min(260px, 100%);
  max-width: 100%;
}

.login-panel h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.login-form input {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  color: var(--ink);
  background: #f7f7f5;
  border: 1px solid var(--line);
  border-radius: 4px;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
}

.login-form input:focus {
  outline: 2px solid rgba(7, 86, 106, 0.28);
  outline-offset: 2px;
  border-color: var(--teal);
}

.dashboard-page {
  min-height: 100svh;
  background: #f6f7f5;
}

.dashboard-main {
  display: grid;
  grid-template-columns: minmax(240px, 300px) 1fr;
  min-height: calc(100svh - 56px);
}

.dashboard-sidebar {
  display: grid;
  align-content: start;
  gap: 30px;
  padding: 28px;
  background: var(--white);
  border-right: 1px solid var(--line);
}

.dashboard-sidebar img {
  width: min(220px, 100%);
  height: auto;
}

.dashboard-sidebar nav {
  display: grid;
  gap: 8px;
}

.dashboard-sidebar a {
  padding: 12px 14px;
  color: var(--ink);
  background: #f4f5f3;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 950;
}

.dashboard-content {
  display: grid;
  align-content: start;
  gap: 28px;
  padding: clamp(28px, 5vw, 60px);
}

.dashboard-content h1 {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 1;
}

.dashboard-empty {
  display: grid;
  min-height: 320px;
  place-items: center;
  color: var(--muted);
  background: var(--white);
  border: 1px dashed rgba(47, 48, 51, 0.26);
  border-radius: 6px;
  font-weight: 800;
}

@media (max-width: 980px) {
  .site-header {
    justify-content: flex-end;
    min-height: 54px;
  }

  .desktop-nav,
  .header-contact {
    display: none;
  }

  .nav-button {
    display: flex !important;
    position: relative;
    z-index: 3;
    flex-direction: column;
    gap: 4px;
    justify-self: end;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 6px;
    cursor: pointer;
  }

  .nav-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 0;
    background: var(--white);
  }

  .mobile-nav {
    position: absolute;
    top: 100%;
    right: 18px;
    left: 18px;
    display: grid;
    padding: 12px;
    background: var(--dark);
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: var(--shadow);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition:
      opacity 180ms ease,
      transform 180ms ease;
  }

  .mobile-nav a {
    padding: 13px 8px;
    font-weight: 850;
  }

  .nav-toggle:checked ~ .mobile-nav {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 0 16px 94px;
  }

  .hero-visual {
    height: 420px;
    min-height: 0;
    order: 1;
    margin-inline: -16px;
  }

  .hero-copy {
    order: 2;
    width: 100%;
    height: auto;
    min-height: 0;
    max-width: 760px;
    padding-top: 0;
  }

  .request-bar,
  .about,
  .method,
  .contact {
    grid-template-columns: 1fr;
  }

  .request-bar {
    margin-top: -64px;
  }

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

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(190px, 28vw);
  }

  .dashboard-main {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 680px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
  }

  .site-header {
    display: none;
  }

  .hero {
    width: 100vw;
    max-width: 100vw;
  }

  .hero-copy,
  .hero-copy p:not(.pretitle) {
    width: 100%;
    max-width: calc(100vw - 48px);
    overflow-wrap: anywhere;
  }

  .hero-visual {
    height: 320px;
    overflow: hidden;
  }

  .image-stack {
    top: 0;
    left: -34%;
    width: auto;
    height: 100%;
  }

  .hero-copy h1,
  .section h2,
  .section-heading h2 {
    font-size: clamp(1.75rem, 7vw, 2.2rem);
  }

  .hero-copy h1 {
    max-width: 100%;
    font-size: clamp(1.55rem, 7vw, 2rem);
    line-height: 1.05;
  }

  .hero-logo {
    width: min(330px, calc(100vw - 28px));
    max-width: 100%;
    padding: 7px 0;
  }

  .hero-copy p:not(.pretitle) {
    font-size: 0.94rem;
  }

  .hero-actions {
    display: grid;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 240px;
    gap: 12px;
  }

  .gallery-featured {
    grid-column: auto;
    grid-row: auto;
  }

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

  .button {
    width: 100%;
    max-width: calc(100vw - 32px);
  }

  .request-bar {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    padding: 12px;
  }

  .request-bar a {
    min-width: 0;
  }

  .section,
  .services > *,
  .stats {
    width: calc(100% - 32px);
  }

  .check-list,
  .stats {
    grid-template-columns: 1fr;
  }

  .about-image {
    border-radius: 80px 6px 6px 6px;
  }

  .site-footer {
    padding-block: 10px;
  }

  .login-main {
    padding-inline: 16px;
    justify-items: start;
  }

  .login-panel {
    width: min(320px, calc(100vw - 72px));
    max-width: 100%;
  }
}
