/* portal.css — base compartida del portal público de ofertas */

/* Esta es una segunda copia de la paleta: el portal público no carga `design-system.css`. Los
   valores tienen que coincidir con los de allí, y los colores de estado tienen que estar los
   seis. Faltaban cuatro hasta el 2026-08-10, y eso convertía un `var(--orange-lt)` escrito aquí
   en un fondo transparente: sin error en consola, sin fondo en pantalla.
   `StatusColorTokenTest` compara las dos listas para que no vuelva a descuadrarse. */
:root {
  --blue: #00247d;
  --blue-hover: #001a5c;
  --yellow: #ffcc00;
  --yellow-hover: #e6b800;
  --red: #c8102e;
  --red-lt: rgba(200, 16, 46, .08);
  --bg: #f4f6fb;
  --white: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --green: #16a34a;
  --green-lt: rgba(22, 163, 74, .08);
  --orange: #ea580c;
  --orange-lt: rgba(234, 88, 12, .08);
  --blue-soft: rgba(0, 36, 125, .06);
  --radius-sm: .625rem;
  --radius-md: 1rem;
  --shadow-card: 0 1px 3px rgba(0, 36, 125, .06), 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-hover: 0 4px 16px rgba(0, 36, 125, .10);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding-top: 4px;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont,
               'Segoe UI', Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

.skip-link {
  position: fixed;
  top: .75rem;
  left: .75rem;
  z-index: 500;
  padding: .7rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--yellow);
  color: var(--text);
  font-size: .875rem;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform .2s ease-out;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Stripe tricolor fijo */
.portal-stripe {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 400;
  height: 4px;
  background: linear-gradient(to right,
    var(--yellow) 0% 33.33%,
    var(--blue) 33.33% 66.66%,
    var(--red) 66.66% 100%);
}

/* Navegación */
.portal-nav {
  min-height: 56px;
  padding: .4rem clamp(1rem, 4vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.portal-nav-logo {
  display: inline-flex;
  align-items: baseline;
  gap: .45rem;
  color: var(--blue);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -.02em;
  text-decoration: none;
}

.portal-nav-logo .logo-text {
  font-weight: 900;
  letter-spacing: -.025em;
}

.portal-nav-logo .logo-text .v { color: #22d3ee; }
.portal-nav-logo .logo-text .t { color: var(--yellow); }

.nav-section-tag {
  color: var(--red);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.portal-nav-back {
  min-height: 44px;
  padding: 0 .25rem;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--muted);
  font-size: .8125rem;
  font-weight: 500;
  text-decoration: none;
}

.portal-nav-back svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.portal-nav-logo:focus-visible,
.portal-nav-back:focus-visible,
.portal-footer a:focus-visible {
  outline: 3px solid rgba(0, 36, 125, .2);
  outline-offset: 3px;
  border-radius: .25rem;
}

.portal-nav-back:hover {
  color: var(--blue);
}

/* Hero compartido */
.portal-hero {
  background: var(--blue);
  color: var(--white);
}

.portal-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.35rem 1.5rem 2.5rem;
}

.portal-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: .75rem;
  background: var(--white);
  color: var(--blue);
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1;
}

.portal-avatar--lg {
  width: 3rem;
  height: 3rem;
  font-size: .9rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
}

.portal-avatar--sm {
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--border);
  border-radius: .65rem;
  background: var(--blue-soft);
  font-size: .75rem;
  box-shadow: none;
}

.portal-hero-company {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.1rem;
}

.portal-hero-co-name {
  font-size: 1rem;
  font-weight: 700;
}

.portal-hero-co-meta {
  margin-top: .1rem;
  color: rgba(255, 255, 255, .75);
  font-size: .82rem;
}

.portal-hero-title {
  max-width: 18ch;
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1.05;
  text-wrap: balance;
}

.portal-chips {
  margin-bottom: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.portal-chip {
  padding: .3rem .75rem;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 9999px;
  background: rgba(255, 255, 255, .10);
  color: rgba(255, 255, 255, .9);
  font-size: .8125rem;
  font-weight: 500;
}

.portal-chip svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  stroke: rgba(255, 255, 255, .75);
}

.portal-hero-cta {
  min-height: 44px;
  padding: .65rem 1.35rem;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  border-radius: var(--radius-sm);
  background: var(--yellow);
  color: var(--text);
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color .2s ease, transform .2s ease;
}

.portal-hero-cta:hover {
  background: var(--yellow-hover);
  transform: translateY(-1px);
}

.portal-hero-cta:active {
  transform: translateY(0);
}

.portal-hero-cta:focus-visible {
  outline: 3px solid rgba(255, 204, 0, .45);
  outline-offset: 3px;
}

.portal-hero-cta svg {
  width: 14px;
  height: 14px;
}

.portal-hero-views {
  margin-top: .9rem;
  display: flex;
  align-items: center;
  gap: .35rem;
  color: rgba(255, 255, 255, .65);
  font-size: .8125rem;
}

.portal-hero-views svg {
  width: 14px;
  height: 14px;
  stroke: rgba(255, 255, 255, .65);
}

/* Footer */
.portal-footer {
  margin-top: 2.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--white);
  border-top: 1px solid var(--border);
  text-align: center;
}

.portal-footer p {
  margin: 0;
  display: flex;
  justify-content: center;
  gap: .45rem;
  color: var(--muted);
  font-size: .8125rem;
}

.portal-footer strong {
  color: var(--text);
}

.portal-footer a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
}

.portal-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 639px) {
  .portal-nav {
    min-height: 52px;
  }

  .portal-hero-inner {
    padding: 1.75rem 1rem 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    transition-duration: .01ms !important;
  }
}
