@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700;800;900&display=swap');

:root {
  --black: #050505;
  --text: #080808;
  --line: #8b8b8b;
  --muted: #6f7478;
  --error: #a12626;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: 'Montserrat', Arial, sans-serif;
}

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

.servir-page {
  width: min(100% - 32px, 1000px);
  margin: 0 auto;
  padding: 48px 0 64px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(0, 1.7fr);
  align-items: start;
  gap: 34px;
}

.hero-copy {
  padding-top: 7px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(60px, 7vw, 88px);
  line-height: .78;
  letter-spacing: -4.5px;
  font-weight: 900;
}

.hero p {
  margin: 20px 0 0;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 700;
}

.hero-image {
  overflow: hidden;
  border-radius: 6px;
  background: #111;
}

.hero-image img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 7.2;
  object-fit: cover;
  object-position: center 43%;
}

.form-section {
  margin-top: 20px;
}

.form-section h2 {
  margin: 0 0 18px;
  font-size: clamp(34px, 4.6vw, 48px);
  line-height: .95;
  letter-spacing: -1.8px;
  font-weight: 900;
}

.field {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: end;
  gap: 9px;
  margin-bottom: 13px;
}

.field label {
  padding-bottom: 5px;
  font-size: 15px;
  line-height: 1.15;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 4px 26px 4px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: #111;
  box-shadow: none;
}

.field input:focus,
.field select:focus {
  border-bottom-color: #000;
  border-bottom-width: 2px;
}

.field--age input {
  max-width: 180px;
}

.select-wrap {
  position: relative;
  min-width: 0;
}

.select-wrap::after {
  content: '';
  position: absolute;
  right: 5px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #111;
  border-bottom: 1.5px solid #111;
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.selection-note {
  margin: 23px 0 21px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.areas {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

.area-group {
  max-width: 760px;
}

.area-group h3 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
  margin: 0 0 10px;
  padding: 4px 18px 5px 12px;
  border: 1.5px solid #111;
  border-radius: 999px;
  font-size: 20px;
  line-height: 1;
  letter-spacing: .8px;
  font-weight: 900;
}

.area-icon {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 20px;
  font-size: 17px;
  line-height: 1;
  font-weight: 500;
}

.options {
  display: grid;
  gap: 5px;
  padding-left: 14px;
}

.option-label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  cursor: pointer;
  font-size: 16px;
  line-height: 1.08;
  font-weight: 700;
  user-select: none;
}

.option-label input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.custom-check {
  width: 16px;
  height: 16px;
  margin-top: 0;
  border: 1.4px solid #111;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}

.option-label input:checked + .custom-check::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #111;
}

.option-label input:disabled + .custom-check,
.option-label input:disabled ~ span {
  opacity: .35;
}

.areas-error {
  margin: 20px 0 0;
  padding: 10px 12px;
  border-radius: 6px;
  background: #fff0f0;
  color: var(--error);
  font-size: 13px;
  font-weight: 700;
}

.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 185px;
  min-height: 43px;
  margin-top: 26px;
  padding: 10px 25px;
  border: 0;
  border-radius: 999px;
  background: #000;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.submit-btn:hover { opacity: .86; }

.submit-btn:disabled {
  opacity: .55;
  cursor: default;
}

/* resultado */

.result-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
}

.result-card {
  width: min(100%, 640px);
  text-align: center;
}

.result-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #000;
  color: #fff;
  font-size: 38px;
  font-weight: 800;
}

.result-card--error .result-icon { background: var(--error); }

.result-card h1 {
  margin: 0;
  font-size: clamp(54px, 9vw, 82px);
  line-height: .9;
  letter-spacing: -3.5px;
  font-weight: 900;
}

.result-card p {
  margin: 23px 0 0;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 700;
}

.result-secondary {
  color: var(--muted);
  font-size: 15px !important;
  font-weight: 600 !important;
}

.back-btn {
  display: inline-flex;
  margin-top: 28px;
  padding: 11px 22px;
  border-radius: 999px;
  background: #000;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

@media (max-width: 720px) {
  .servir-page {
    width: min(100% - 24px, 1000px);
    padding-top: 28px;
  }

  .hero {
    grid-template-columns: minmax(0, .82fr) minmax(0, 1.25fr);
    gap: 15px;
  }

  .hero h1 {
    font-size: clamp(42px, 12.2vw, 54px);
    letter-spacing: -2.8px;
  }

  .hero p {
    margin-top: 14px;
    font-size: 10.5px;
  }

  .hero-image img {
    aspect-ratio: 16 / 8.3;
  }

  .form-section {
    margin-top: 18px;
  }

  .form-section h2 {
    font-size: 31px;
    margin-bottom: 17px;
  }

  .field {
    margin-bottom: 12px;
  }

  .field label {
    font-size: 12.5px;
  }

  .field--age input {
    max-width: none;
  }

  .field:has(label[for="PARTE_CFC"]),
  .field:has(label[for="GDV"]) {
    grid-template-columns: 1fr;
    gap: 1px;
  }

  .field:has(label[for="PARTE_CFC"]) label,
  .field:has(label[for="GDV"]) label {
    padding-bottom: 0;
  }

  .selection-note {
    margin-top: 20px;
  }

  .areas {
    gap: 21px;
  }

  .area-group h3 {
    min-width: 0;
    max-width: 100%;
    padding: 4px 14px 5px 10px;
    font-size: 16px;
    letter-spacing: .5px;
  }

  .area-icon {
    width: 21px;
    font-size: 15px;
  }

  .options {
    padding-left: 10px;
    gap: 6px;
  }

  .option-label {
    grid-template-columns: 17px minmax(0, 1fr);
    gap: 8px;
    font-size: 13.5px;
    line-height: 1.08;
  }
}

@media (max-width: 720px) {
  .hero {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .hero-copy {
    width: 100%;
    padding-top: 0;
  }

  .hero-image {
    width: 100%;
  }

  .hero-image img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
  }
}


/* ==========================================
   DESKTOP
   Maqueta PC - mantiene intacto el mobile
   ========================================== */

@media (min-width: 721px) {
  .servir-page {
    width: min(100% - 64px, 1180px);
    padding: 58px 0 70px;
  }

  /* Cabecera: texto a izquierda, foto a derecha */
  .hero {
    grid-template-columns: minmax(250px, .72fr) minmax(0, 1.65fr);
    gap: 48px;
    align-items: center;
  }

  .hero-copy {
    padding-top: 0;
  }

  .hero h1 {
    font-size: clamp(66px, 6.2vw, 88px);
    line-height: .78;
    letter-spacing: -4.5px;
  }

  .hero p {
    margin-top: 20px;
    font-size: 13px;
    line-height: 1.18;
  }

  .hero-image img {
    aspect-ratio: 16 / 6.5;
    object-position: center 42%;
  }

  /* Datos personales */
  .form-section {
    margin-top: 34px;
  }

  .form-section h2 {
    margin-bottom: 24px;
    font-size: clamp(36px, 3.7vw, 48px);
  }

  #form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 54px;
    align-items: start;
  }

  #form > .field {
    margin-bottom: 15px;
  }

  #form > .field label {
    font-size: 13px;
  }

  #form > .field input,
  #form > .field select {
    height: 31px;
  }

  .field--age input {
    max-width: none;
  }

  /* La nota y las áreas vuelven a ocupar todo el ancho */
  .selection-note,
  .areas,
  .areas-error,
  .submit-btn {
    grid-column: 1 / -1;
  }

  .selection-note {
    margin: 20px 0 24px;
  }

  /* Áreas en tres columnas, como en la maqueta desktop */
  .areas {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px 34px;
    align-items: start;
  }

  .area-group {
    max-width: none;
    min-width: 0;
  }

  .area-group h3 {
    min-width: 0;
    max-width: 100%;
    margin-bottom: 12px;
    padding: 4px 14px 5px 10px;
    font-size: 15px;
    letter-spacing: .45px;
    white-space: nowrap;
  }

  .area-icon {
    width: 21px;
    height: 18px;
    font-size: 14px;
  }

  .options {
    gap: 6px;
    padding-left: 10px;
  }

  .option-label {
    grid-template-columns: 16px minmax(0, 1fr);
    gap: 8px;
    font-size: 12.5px;
    line-height: 1.12;
  }

  .custom-check {
    width: 16px;
    height: 16px;
  }

  .submit-btn {
    justify-self: start;
    margin-top: 30px;
  }
}

/* Evita que los títulos largos se aprieten en notebooks */
@media (min-width: 721px) and (max-width: 1050px) {
  .servir-page {
    width: min(100% - 40px, 1180px);
  }

  .areas {
    gap: 28px 20px;
  }

  .area-group h3 {
    font-size: 13px;
    white-space: normal;
  }

  .option-label {
    font-size: 11.5px;
  }
}
