/* ============================================================
   Nova Empire Gym — Página de calificación
   Paleta del sitio: negro, blanco y rojo.
   ============================================================ */

:root {
  --ink: #080808;
  --panel: #0c0c0c;
  --field: #101010;
  --white: #f4f1ec;
  --muted: #a3a09b;
  --dim: #6f6b66;
  --red: #e1251b;
  --red-bright: #ff6a5e;
  --red-deep: #b81a12;
  --line: rgba(244, 241, 236, 0.12);
  --line-soft: rgba(244, 241, 236, 0.07);
  --radius: 18px;
  --shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.9), 0 1px 0 rgba(244, 241, 236, 0.05) inset;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Anton", "Arial Narrow", Impact, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: var(--muted);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(58% 38% at 50% -6%, rgba(225, 37, 27, 0.22), transparent 70%),
    radial-gradient(45% 32% at 100% 104%, rgba(225, 37, 27, 0.08), transparent 72%);
}

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

h1,
h2,
p {
  margin: 0;
}

::selection {
  background: var(--red);
  color: #fff;
}

.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;
}

/* ---------- Barra superior ---------- */

.topbar {
  padding: 18px clamp(16px, 5vw, 40px);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  text-decoration: none;
}

.brand__mark {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.brand__name {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.1;
}

.brand__name span {
  display: block;
  color: var(--dim);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.22em;
}

.topbar__back {
  color: var(--dim);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.topbar__back:hover {
  color: var(--white);
}

/* ---------- Página ---------- */

.page {
  flex: 1;
  display: grid;
  place-items: center;
  padding: clamp(8px, 2vw, 24px) clamp(16px, 5vw, 40px) clamp(32px, 6vw, 64px);
}

.card {
  width: 100%;
  max-width: 620px;
  padding: clamp(28px, 5.5vw, 48px) clamp(22px, 5.5vw, 48px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(244, 241, 236, 0.03), transparent 42%),
    var(--panel);
  box-shadow: var(--shadow);
  text-align: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  border: 1px solid rgba(225, 37, 27, 0.36);
  border-radius: 999px;
  background: rgba(225, 37, 27, 0.11);
  color: var(--red-bright);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.card h1 {
  margin-top: 20px;
  color: var(--white);
  font-family: var(--display);
  font-size: clamp(2rem, 7vw, 3.15rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}

.lede {
  max-width: 38ch;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: clamp(0.92rem, 2.4vw, 1rem);
  line-height: 1.65;
}

/* ---------- Estrellas ---------- */

.rating {
  margin: 30px 0 0;
  padding: 0;
  border: 0;
}

.stars {
  display: flex;
  flex-direction: row-reverse;
  justify-content: center;
  gap: clamp(4px, 1.4vw, 10px);
}

.stars input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.stars label {
  display: grid;
  place-items: center;
  padding: 4px;
  color: rgba(244, 241, 236, 0.22);
  cursor: pointer;
  transition: color 0.18s ease, transform 0.18s var(--ease);
}

.stars label svg {
  width: clamp(42px, 11vw, 56px);
  height: clamp(42px, 11vw, 56px);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linejoin: round;
  transition: fill 0.18s ease, filter 0.18s ease;
}

.stars input:checked ~ label {
  color: var(--red);
}

.stars input:checked ~ label svg {
  fill: currentColor;
  filter: drop-shadow(0 0 14px rgba(225, 37, 27, 0.45));
}

.stars input:focus-visible + label {
  outline: 2px solid var(--red-bright);
  outline-offset: 2px;
  border-radius: 12px;
}

@media (hover: hover) {
  .stars label:hover {
    transform: translateY(-3px) scale(1.04);
  }

  .stars label:hover,
  .stars label:hover ~ label {
    color: var(--red);
  }

  .stars label:hover svg,
  .stars label:hover ~ label svg {
    fill: currentColor;
  }
}

.stars label:active {
  transform: scale(0.94);
}

.hint {
  margin-top: 14px;
  color: var(--dim);
  font-size: 0.76rem;
  letter-spacing: 0.02em;
}

/* ---------- Paneles ---------- */

.panel {
  margin-top: 26px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  text-align: left;
  animation: panel-in 0.4s var(--ease) both;
}

.panel--sent {
  text-align: center;
}

.panel h2 {
  color: var(--white);
  font-family: var(--display);
  font-size: clamp(1.3rem, 3.6vw, 1.7rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.panel h2:focus {
  outline: none;
}

.panel p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.87rem;
  line-height: 1.65;
}

.panel__lede {
  max-width: 46ch;
}

.panel__badge {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  box-shadow: 0 0 0 6px rgba(225, 37, 27, 0.12);
}

.echo {
  display: inline-block;
  margin-top: 12px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(244, 241, 236, 0.04);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 600;
}

/* ---------- Formulario ---------- */

.fields {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  color: var(--white);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.req {
  color: var(--red-bright);
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field);
  color: var(--white);
  font-family: inherit;
  font-size: 0.94rem;
  line-height: 1.5;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #5f5b57;
}

.field input:hover,
.field textarea:hover {
  border-color: rgba(244, 241, 236, 0.2);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--red);
  background: #131313;
  box-shadow: 0 0 0 3px rgba(225, 37, 27, 0.18);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--red-bright);
}

.field input[aria-invalid="true"]:focus,
.field textarea[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px rgba(255, 106, 94, 0.18);
}

.field textarea {
  min-height: 118px;
  resize: vertical;
}

.error {
  margin-top: 6px !important;
  color: var(--red-bright) !important;
  font-size: 0.73rem !important;
  font-weight: 500;
}

.form-note {
  margin-top: 12px !important;
  color: var(--dim);
  font-size: 0.7rem !important;
  text-align: center;
}

.error--form {
  margin-top: 14px !important;
  text-align: center;
}

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--white);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s var(--ease), box-shadow 0.2s ease;
}

.btn--primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 12px 26px -14px rgba(225, 37, 27, 0.95);
}

.btn--primary:hover {
  background: var(--red-deep);
  transform: translateY(-1px);
}

.btn--block {
  width: 100%;
  margin-top: 20px;
}

.btn--ghost {
  margin-top: 18px;
  border: 1px solid var(--line);
  color: var(--white);
}

.btn--ghost:hover {
  border-color: rgba(244, 241, 236, 0.34);
  background: rgba(244, 241, 236, 0.05);
}

.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

/* ---------- Pie ---------- */

.foot {
  padding: 0 20px 28px;
  text-align: center;
}

.foot p {
  margin: 0;
  color: #57534f;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
}

/* ---------- Animación ---------- */

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 520px) {
  .fields {
    grid-template-columns: 1fr 1fr;
  }

  .field--full {
    grid-column: 1 / -1;
  }
}

@media (max-width: 420px) {
  .brand__name {
    font-size: 0.7rem;
  }

  .topbar__back {
    font-size: 0.74rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .stars label:hover {
    transform: none;
  }
}
