/* KO All Hearts 2026 — buscador con la identidad "More LATAM Than Ever".
   La carta (.letter) y su modo de impresión se conservan tal cual venían del MVP: no tocar. */

:root {
  color-scheme: light;
  --ink: #000000;
  --paper: #ffffff;
  --red: #ff0013;
  --yellow: #ffce00;
  --cyan: #00ffff;
  --muted: #4a4a4a;
  --display: 'TT Modernoir', 'Avenir Next Condensed', 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
  --text: 'TCCC-UnityText', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Tipografía de marca para títulos: TT Modernoir (archivos aprobados por el cliente, ver assets/fonts/README.md).
   TCCC-UnityText no fue provista: el texto corre con la pila de sistema de --text. */
@font-face {
  font-family: 'TT Modernoir';
  src: url('assets/fonts/tt-modernoir-demibold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'TT Modernoir';
  src: url('assets/fonts/tt-modernoir-medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.5;
}

button, input { font: inherit; }

/* Las tres "líneas refrescantes" del brand book, una sola vez, arriba de todo. */
.lines { display: flex; flex-direction: column; }
.lines span { display: block; height: 10px; }
.lines span:nth-child(1) { background: var(--red); }
.lines span:nth-child(2) { background: var(--yellow); }
.lines span:nth-child(3) { background: var(--cyan); }

.page-shell {
  width: min(100% - 40px, 980px);
  margin: 56px auto 96px;
}

.lookup-panel { max-width: 640px; }

/* Nombre del evento como "palabra encuadrada" (squared word), según el brand book. */
.event {
  margin: 0 0 28px;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  line-height: 1;
}
.squared {
  display: inline-block;
  padding: 6px 10px 4px;
  background: var(--ink);
  color: var(--paper);
}
.year { margin-left: 6px; font-weight: 500; }

h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(40px, 7vw, 64px);
  font-weight: 600;
  line-height: .98;
  letter-spacing: -.01em;
  text-wrap: balance;
}

.intro { max-width: 34em; margin: 20px 0 36px; color: var(--muted); }

label { display: block; margin-bottom: 10px; font-weight: 700; }
.search-row { display: flex; gap: 12px; align-items: stretch; }

input {
  flex: 1;
  min-width: 0;
  min-height: 56px;
  padding: 0 16px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  outline: none;
}
input::placeholder { color: transparent; }
input:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }

button {
  min-height: 56px;
  padding: 0 24px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  cursor: pointer;
}
button:hover { background: var(--paper); color: var(--ink); }
button:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
button:disabled, input:disabled { cursor: wait; opacity: .6; }

.help { margin: 10px 0 0; color: var(--muted); font-size: 15px; }

.message { min-height: 24px; margin: 18px 0 0; font-weight: 700; }
.message:not(:empty) { padding-left: 14px; border-left: 6px solid var(--red); }
.message.is-info:not(:empty) { border-left-color: var(--yellow); }

.choices { margin-top: 20px; }
.choices-title { margin: 0 0 10px; font-weight: 700; }
.choice {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  width: 100%;
  min-height: 0;
  padding: 12px 14px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 400;
  text-align: left;
}
.choice + .choice { margin-top: -2px; }
.choice:hover { background: var(--yellow); color: var(--ink); }
.choice strong { font-weight: 700; }
.choice small { font-size: 15px; color: var(--muted); }
.choice:hover small { color: var(--ink); }

.result { margin-top: 44px; }
.result:focus { outline: none; }
.actions { display: flex; justify-content: flex-end; gap: 10px; margin-bottom: 14px; }
.secondary { background: var(--ink); }
.text-button { background: transparent; color: var(--ink); border-color: transparent; }
.text-button:hover { background: transparent; border-color: var(--ink); }

/* ---------- Carta: sin cambios respecto del MVP ---------- */
.letter {
  width: 816px;
  min-height: 1056px;
  margin: 0 auto;
  padding: 82px 82px 70px;
  background: var(--paper);
  box-shadow: 0 16px 44px rgba(20,44,63,.14);
  color: #111;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 16px;
  line-height: 1.48;
}

.letter-header img { display: block; width: 220px; height: auto; margin: 0 auto 72px; }
.letter-header p { margin: 0 0 56px; text-align: right; }
.letter-body > p { margin: 0 0 43px; }
.letter-body > p:nth-of-type(2) { margin-bottom: 18px; }
.letter-body > p:nth-of-type(3) { margin-bottom: 20px; }
.confirmation-data { margin: 0 0 43px; }
.confirmation-data div { display: flex; gap: 6px; }
.confirmation-data dt { font-weight: 700; }
.confirmation-data dd { margin: 0; }
.signature { display: flex; flex-direction: column; align-items: center; margin-top: 86px; line-height: 1.45; text-align: center; }
.signature strong { margin-bottom: 18px; }

@media (max-width: 860px) {
  .lines span { height: 8px; }
  .page-shell { width: min(100% - 32px, 720px); margin-top: 32px; }
  .search-row { flex-direction: column; }
  .search-row > button { width: 100%; }
  .letter { width: 100%; min-height: 0; padding: 52px 34px; font-size: 15px; }
  .letter-header img { width: 190px; margin-bottom: 50px; }
  .letter-header p { margin-bottom: 42px; }
  .signature { margin-top: 62px; }
  .actions { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: no-preference) {
  .choice, button { transition: background-color .12s ease, color .12s ease; }
}

@media print {
  @page { size: Letter; margin: 0; }
  body { background: white; }
  .no-print, .lookup-panel, .lines { display: none !important; }
  .page-shell, .result { width: auto; margin: 0; }
  .letter {
    width: 8.5in;
    min-height: 11in;
    padding: .85in .85in .65in;
    box-shadow: none;
    font-size: 12pt;
  }
  .letter-header img { width: 2.2in; margin-bottom: .7in; }
  .letter-header p { margin-bottom: .55in; }
  .letter-body > p { margin-bottom: .42in; }
  .letter-body > p:nth-of-type(2) { margin-bottom: .18in; }
  .letter-body > p:nth-of-type(3) { margin-bottom: .2in; }
  .confirmation-data { margin-bottom: .42in; }
  .signature { margin-top: .78in; }
}
