@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,500;12..96,600;12..96,700;12..96,800&display=swap');

:root {
  --tinta: #1F2A1E;      /* texto principal, verde muy oscuro */
  --gris: #5E655A;       /* texto secundario */
  --linea: #D9DED0;      /* reglas y bordes */
  --hoja: #F3F6EC;       /* fondo de selección */
  --brote: #C8DC6E;      /* acento claro de marca */
  --verde: #69B31F;      /* acción */
  --verde-hondo: #4E8A14;/* hover y foco */
  --papel: #FFFFFF;
  --error: #9A2B12;
  --radio: 6px;
  --ancho: 1080px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  font-optical-sizing: auto;
  font-size: 17px;
  line-height: 1.5;
  color: var(--tinta);
  background: var(--papel);
}
a { color: var(--verde-hondo); }
:focus-visible { outline: 3px solid var(--verde); outline-offset: 2px; }

/* Encabezado */
.barra {
  max-width: var(--ancho); margin: 0 auto; padding: 20px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.barra img { height: 44px; display: block; }
.barra nav { display: flex; gap: 22px; font-size: 15px; }
.barra nav a { color: var(--gris); text-decoration: none; }
.barra nav a:hover { color: var(--tinta); text-decoration: underline; }

main { max-width: var(--ancho); margin: 0 auto; padding: 8px 24px 64px; }

/* Tipografía */
h1 {
  font-size: clamp(38px, 6vw, 68px); line-height: 1.02; letter-spacing: -0.025em;
  font-weight: 800; font-variation-settings: 'opsz' 96; margin: 24px 0 18px; max-width: 14ch;
}
h2 { font-size: 28px; line-height: 1.15; letter-spacing: -0.01em; font-weight: 700; margin: 0 0 8px; }
.entrada { font-size: 20px; color: var(--gris); max-width: 46ch; margin: 0 0 32px; }
.nota { font-size: 14px; color: var(--gris); }

/* Portada */
.portada { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; }
.hexa { width: 100%; max-width: 420px; justify-self: end; }
.hexa svg { width: 100%; height: auto; display: block; }
.opciones { margin-top: 40px; border-top: 2px solid var(--tinta); }
.opcion {
  display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; align-items: baseline;
  padding: 26px 4px; border-bottom: 1px solid var(--linea); text-decoration: none; color: var(--tinta);
}
.opcion strong { font-size: clamp(26px, 3.4vw, 36px); font-weight: 700; letter-spacing: -0.015em; }
.opcion span { grid-column: 1; color: var(--gris); max-width: 52ch; }
.opcion em { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-style: normal; font-weight: 600; color: var(--verde-hondo); }
.opcion:hover strong { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.opcion.discreta strong { font-size: 22px; }

/* Formulario */
.cotizador { display: grid; grid-template-columns: 300px 1fr; gap: 48px; margin-top: 8px; }
.lateral { align-self: start; }
.lateral h1 { font-size: clamp(36px, 4.6vw, 54px); }
fieldset { border: 0; border-top: 2px solid var(--tinta); margin: 0 0 28px; padding: 16px 0 0; }
legend { font-size: 20px; font-weight: 700; padding: 0 0 10px; }
.campos { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.campos .todo { grid-column: 1 / -1; }
label { display: block; font-size: 15px; font-weight: 600; margin-bottom: 6px; }
input, select {
  width: 100%; font: inherit; font-size: 17px; color: var(--tinta);
  padding: 11px 12px; border: 1.5px solid #B9C1AE; border-radius: var(--radio); background: var(--papel);
}
input:focus, select:focus { outline: none; border-color: var(--verde-hondo); box-shadow: 0 0 0 3px rgba(105, 179, 31, 0.22); }
select:disabled { background: #F4F5F1; color: #9AA192; }
.ayuda { font-size: 14px; color: var(--gris); margin-top: 5px; min-height: 20px; }
.ayuda.ok { color: var(--verde-hondo); }
.ayuda.mal { color: var(--error); }

.selector { display: inline-flex; border: 1.5px solid var(--tinta); border-radius: var(--radio); overflow: hidden; margin-bottom: 24px; }
.selector button { font: inherit; font-weight: 600; padding: 10px 18px; border: 0; background: var(--papel); color: var(--tinta); cursor: pointer; }
.selector button + button { border-left: 1.5px solid var(--tinta); }
.selector button[aria-pressed="true"] { background: var(--tinta); color: var(--papel); }

.fichas { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ficha { display: inline-flex; align-items: center; gap: 8px; background: var(--hoja); border: 1px solid var(--brote); border-radius: 999px; padding: 4px 6px 4px 12px; font-size: 15px; }
.ficha button { border: 0; background: none; cursor: pointer; font-size: 18px; line-height: 1; color: var(--gris); padding: 2px 6px; border-radius: 50%; }
.ficha button:hover { background: var(--brote); color: var(--tinta); }

.boton {
  display: inline-block; font: inherit; font-weight: 700; font-size: 18px; text-decoration: none; text-align: center;
  background: var(--verde); color: #fff; border: 0; border-radius: var(--radio); padding: 14px 26px; cursor: pointer;
}
.boton:hover { background: var(--verde-hondo); }
.boton:disabled { opacity: 0.65; cursor: progress; }
.boton.claro { background: var(--papel); color: var(--verde-hondo); box-shadow: inset 0 0 0 2px var(--verde); }
.boton.claro:hover { background: var(--hoja); }
.enviar { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.error { display: none; color: var(--error); font-weight: 600; margin: 0 0 16px; }

/* Resultado tipo carátula */
.resultado { display: none; margin-top: 48px; padding-top: 28px; border-top: 6px double var(--tinta); }
.resultado.visible { display: block; animation: aparece 0.35s ease-out; }
@keyframes aparece { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.resultado .resumen { color: var(--gris); margin: 0 0 22px; max-width: 70ch; }
.tabla-envoltura { overflow-x: auto; border: 1px solid var(--linea); border-radius: var(--radio); }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--linea); vertical-align: top; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody th { font-weight: 500; color: var(--tinta); min-width: 150px; }
thead th { vertical-align: bottom; border-bottom: 2px solid var(--tinta); background: var(--papel); }
td.no { color: #9AA192; }
.col-sel { background: var(--hoja); }
.plan-cab { display: flex; flex-direction: column; gap: 2px; }
.plan-cab .nombre { font-size: 19px; font-weight: 700; }
.plan-cab .precio { font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
.plan-cab .mensual { font-size: 14px; color: var(--gris); font-weight: 400; }
.plan-cab .marca { font-size: 13px; font-weight: 600; color: var(--verde-hondo); }
.elegir { margin-top: 8px; font: inherit; font-size: 14px; font-weight: 600; border: 1.5px solid var(--verde); background: var(--papel); color: var(--verde-hondo); border-radius: var(--radio); padding: 6px 10px; cursor: pointer; }
.col-sel .elegir { background: var(--verde); color: #fff; }
tr.fila-sel td, tr.fila-sel th { background: var(--hoja); }
tr.seleccionable { cursor: pointer; }
td input[type="radio"] { width: auto; accent-color: var(--verde-hondo); }

.datos { display: flex; flex-wrap: wrap; gap: 14px 40px; margin: 22px 0; }
.datos div { min-width: 140px; }
.datos dt { font-size: 14px; color: var(--gris); }
.datos dd { margin: 0; font-weight: 600; }
.acciones { display: flex; gap: 12px; flex-wrap: wrap; }

.legal { margin-top: 56px; font-size: 13px; color: var(--gris); max-width: 78ch; }
footer { border-top: 1px solid var(--linea); }
footer .barra { font-size: 14px; color: var(--gris); padding-top: 18px; padding-bottom: 28px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .portada { grid-template-columns: 1fr; }
  .hexa { order: -1; max-width: 160px; justify-self: start; }
  .cotizador { grid-template-columns: 1fr; gap: 8px; }
  .lateral { position: static; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .campos { grid-template-columns: 1fr; }
  .barra nav { display: none; }
  .opcion { grid-template-columns: 1fr; }
  .opcion em { grid-row: auto; grid-column: 1; }
  .enviar .boton { width: 100%; }
  th, td { padding: 9px 8px; }
  tbody th { min-width: 0; }
  #tabla td:first-child { width: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .resultado.visible { animation: none; }
}
.visualmente-oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* Cotizador externo */
.marco { border: 1px solid var(--linea); border-radius: var(--radio); overflow: hidden; min-height: 820px; }
.marco iframe { display: block; width: 100%; height: 820px; border: 0; }
@media (max-width: 560px) { .marco iframe { height: 760px; } }
