/* Formulario de feedback con empresas. Mismo sistema que la app: Geist, terra
   para la acción, tarjetas blancas con borde y radios de 10 y 12. Sin degradados. */

@font-face {
  font-family: "Geist";
  src: url("./fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #fcfcfa;
  --surface: #ffffff;
  --ink: #17161a;
  --muted: #6b6b6e;
  --line: #e6e6e8;
  --terra: #c4532b;
  --terra-dark: #a9431f;
  --sand: #f4efe7;
  --green: #3d6b50;
  --error-bg: #fbeae4;
  --error: #8f2d16;
  --radius: 12px;
  --chip: 10px;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--terra);
  outline-offset: 2px;
}

.app {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px calc(24px + env(safe-area-inset-bottom));
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

/* Cabecera */

.head {
  display: flex;
  align-items: center;
  gap: 12px;
  row-gap: 6px;
  flex-wrap: wrap;
  padding: 16px 0 12px;
}

.brand {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--terra);
  text-decoration: none;
}

.head-sub {
  font-size: 13px;
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 12px;
}

.head-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pending {
  font-size: 12px;
  font-weight: 600;
  color: var(--terra-dark);
  background: var(--sand);
  border-radius: 999px;
  padding: 4px 9px;
  white-space: nowrap;
}

.link {
  background: none;
  border: 0;
  padding: 6px 2px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.progress {
  height: 3px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  background: var(--terra);
  transition: width 0.25s ease;
}

/* Contenido */

.main {
  flex: 1;
  padding: 22px 0 8px;
}

.step {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.title {
  margin: 0 0 8px;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 620;
}

.guide {
  margin: 0 0 24px;
  padding: 10px 12px;
  background: var(--sand);
  border-left: 3px solid var(--terra);
  border-radius: 8px;
  font-size: 14px;
  color: #3a3630;
}

.field {
  margin-bottom: 22px;
}

.label {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 550;
  line-height: 1.35;
}

.hint {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}

.optional {
  font-weight: 400;
  color: var(--muted);
}

input[type="text"],
input[type="tel"],
input[type="email"],
textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--chip);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.35;
}

textarea {
  min-height: 84px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #9a9a9d;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--terra);
  box-shadow: 0 0 0 2px rgba(196, 83, 43, 0.16);
}

/* Números exactos: campo corto y chip de escape cuando el cliente no lo sabe */

.number {
  display: flex;
  align-items: center;
  gap: 10px;
}

.number input {
  width: 116px;
  min-height: 48px;
  padding: 0 12px;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.number input:disabled {
  background: #f3f1ec;
  border-color: var(--line);
  color: transparent;
}

.number .suffix {
  font-size: 14px;
  color: var(--muted);
}

.chips.escapes {
  margin-top: 8px;
}

.chip.small {
  min-height: 44px;
  padding: 0 12px;
  font-size: 14px;
}

/* Opciones */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  min-height: 44px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--chip);
  font-size: 15px;
  line-height: 1.2;
  text-align: left;
}

.chip[aria-pressed="true"] {
  background: var(--terra);
  border-color: var(--terra);
  color: #fff;
  font-weight: 500;
}

/* Escala 1 a 5 */

.scale {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  max-width: 400px;
}

.scale button {
  min-height: 46px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--chip);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.scale button[aria-pressed="true"] {
  background: var(--terra);
  border-color: var(--terra);
  color: #fff;
  font-weight: 600;
}

.scale-ends {
  display: flex;
  justify-content: space-between;
  max-width: 400px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px;
  margin-bottom: 10px;
}

.card .name {
  font-size: 15px;
  font-weight: 550;
}

.card .hint {
  margin: 2px 0 10px;
}

/* Entrevistas a medias */

.pending-box {
  border: 1px solid var(--terra);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px 14px;
  margin-bottom: 20px;
}

.pending-box h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--terra-dark);
}

.pending-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid var(--line);
}

.pending-item .name {
  font-size: 15px;
  font-weight: 600;
}

.pending-item .meta {
  font-size: 12.5px;
  color: var(--muted);
}

.pending-item .btn.small {
  min-height: 44px;
  padding: 0 14px;
  font-size: 14px;
}

.pending-box p.meta {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

/* Errores */

.error {
  margin: 0 0 16px;
  padding: 10px 12px;
  background: var(--error-bg);
  color: var(--error);
  border-radius: 8px;
  font-size: 14px;
}

.error ul {
  margin: 4px 0 0;
  padding-left: 18px;
}

/* Barra de acciones */

.actions {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 10px;
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
  background: var(--bg);
  border-top: 1px solid var(--line);
}

.btn {
  min-height: 48px;
  padding: 0 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.btn.primary {
  flex: 1;
  background: var(--terra);
  border-color: var(--terra);
  color: #fff;
}

.btn.primary:active {
  background: var(--terra-dark);
}

.btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.btn.ghost {
  background: transparent;
}

/* Puerta y cierre */

.center {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 0;
}

.center .title {
  font-size: 28px;
}

.center p {
  color: var(--muted);
  margin: 0 0 20px;
  font-size: 15px;
}

.center form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.done-mark {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: rgba(61, 107, 80, 0.12);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.done-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

.notice {
  margin-top: 14px;
  font-size: 14px;
  color: var(--terra-dark);
}

.foot {
  margin-top: 22px;
  font-size: 12px;
  color: var(--muted);
}

.foot a {
  color: var(--muted);
}

@media (min-width: 600px) {
  .title {
    font-size: 30px;
  }
  .done-actions {
    flex-direction: row;
  }
  .done-actions .btn {
    flex: 1;
  }
}

@media (max-width: 420px) {
  .head-sub {
    display: none;
  }
}
