/* Formulario de fichas · Time of Spain 2027 — sin cursivas en ningún sitio */
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url(/fonts/inter-400.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url(/fonts/inter-500.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url(/fonts/inter-600.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-display: swap; src: url(/fonts/inter-700.woff2) format('woff2'); }

:root {
  --red: #d42d27;
  --red-ink: #b0201b;
  --red-soft: #fcecea;
  --bg: #ffffff;
  --paper: #faf8f6;
  --ink: #1d1b19;
  --ink-soft: #4b4641;
  --muted: #847d76;
  --line: #e9e4de;
  --line-strong: #d6cec5;
  --ok: #2e7d52;
  --ok-soft: #e8f3ec;
  --radius: 12px;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
em, i, cite, address { font-style: normal; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--red-ink); }

/* Cabecera */
.top { background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.top__in { max-width: 920px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 14px; }
.logo { height: 38px; width: auto; color: var(--red); flex: none; }
.top__name { font-weight: 600; font-size: 15px; color: var(--ink-soft); margin-left: auto; text-align: right; line-height: 1.25; }

.wrap { max-width: 920px; margin: 0 auto; padding: 0 16px 140px; }
.intro { padding: 36px 0 12px; }
.intro__kicker { color: var(--red); font-weight: 600; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 8px; }
.intro h1 { font-size: clamp(28px, 5vw, 40px); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 14px; }
.intro p { color: var(--ink-soft); margin: 0 0 10px; max-width: 680px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pill { font-size: 13px; padding: 6px 12px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--ink-soft); }
.pill b { color: var(--ink); }
.pill--state { border-color: var(--ok); color: var(--ok); background: var(--ok-soft); }

/* Secciones */
.section { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 28px 8px; margin-top: 20px; }
.section__num { color: var(--red); font-weight: 600; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.section h2 { font-size: 23px; letter-spacing: -.01em; margin: 4px 0 6px; }
.section__sub { color: var(--muted); margin: 0 0 22px; font-size: 15px; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.grid--3 { grid-template-columns: 1fr 1fr 1fr; }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.span-2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }

.field { margin-bottom: 20px; min-width: 0; }
.lab { display: block; font-weight: 600; font-size: 14.5px; margin-bottom: 6px; }
.req { color: var(--red); }
.opt { color: var(--muted); font-weight: 400; font-size: 13px; }
.help { color: var(--muted); font-size: 13.5px; margin: 6px 0 0; }
input[type=text], input[type=email], input[type=tel], input[type=url], input[type=time], select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line-strong); border-radius: 9px; padding: 11px 13px; min-height: 46px;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(29,27,25,.08); }
.counter { float: right; font-weight: 400; color: var(--muted); font-size: 12.5px; }
.lang { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; padding: 1px 6px; border-radius: 4px; background: var(--paper); border: 1px solid var(--line); color: var(--ink-soft); margin-right: 6px; vertical-align: 1px; }

.field.has-err input, .field.has-err textarea, .field.has-err select, .field.has-err .drop { border-color: var(--red); }
.err-msg { display: none; color: var(--red-ink); font-size: 13px; margin-top: 6px; }
.field.has-err .err-msg { display: block; }

/* Casillas */
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.chk { position: relative; }
.chk input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chk span { display: inline-flex; flex-direction: column; align-items: center; min-width: 58px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 9px; font-size: 14px; background: var(--bg); line-height: 1.2; }
.chk span small { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.chk input:checked + span { border-color: var(--red); background: var(--red-soft); color: var(--red-ink); font-weight: 600; }
.chk input:checked + span small { color: var(--red-ink); }
.chk input:focus-visible + span { box-shadow: 0 0 0 3px rgba(212,45,39,.25); }
.checks--lang .chk span { min-width: 0; flex-direction: row; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--ink-soft); }
.consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--red); flex: none; }

/* Archivos */
.drop { display: flex; align-items: center; gap: 14px; border: 1.5px dashed var(--line-strong); border-radius: 10px; padding: 14px 16px; cursor: pointer; background: var(--paper); transition: border-color .15s; }
.drop:hover, .drop.is-over { border-color: var(--red); }
.drop__icon { width: 36px; height: 36px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); display: grid; place-items: center; color: var(--red); flex: none; }
.drop__t { font-weight: 600; font-size: 14.5px; }
.drop__s { color: var(--muted); font-size: 13px; }
.files { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.file { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); font-size: 14px; }
.file__th { width: 44px; height: 44px; border-radius: 6px; background: var(--paper) center/contain no-repeat; border: 1px solid var(--line); flex: none; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.file__n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file__s { color: var(--muted); font-size: 12.5px; flex: none; }
.file__bar { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; margin-top: 4px; }
.file__bar i { display: block; height: 100%; width: 0; background: var(--red); transition: width .2s; }
.file.is-err { border-color: var(--red); color: var(--red-ink); }
.x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 20px; line-height: 1; padding: 6px 8px; border-radius: 6px; }
.x:hover { color: var(--red); background: var(--red-soft); }

/* Bloques repetibles */
.card { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 22px 22px 4px; margin-bottom: 20px; background: var(--bg); }
.card--sub { background: var(--paper); border-color: var(--line); padding: 16px 16px 2px; margin-bottom: 12px; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card__title { font-weight: 700; font-size: 18px; margin: 0; }
.card--sub .card__title { font-size: 15px; }
.sub-h { font-weight: 700; font-size: 15px; margin: 8px 0 4px; padding-top: 16px; border-top: 1px solid var(--line); }
.sub-p { color: var(--muted); font-size: 13.5px; margin: 0 0 14px; }

.btn { font: inherit; font-weight: 600; font-size: 15px; border-radius: 10px; padding: 12px 18px; min-height: 46px; cursor: pointer; border: 1px solid var(--ink); background: var(--ink); color: #fff; }
.btn:hover { background: #000; }
.btn--red { background: var(--red); border-color: var(--red); }
.btn--red:hover { background: var(--red-ink); }
.btn--ghost { background: var(--bg); color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--paper); border-color: var(--ink); }
.btn--add { width: 100%; background: var(--bg); color: var(--red-ink); border: 1.5px dashed var(--line-strong); margin-bottom: 20px; }
.btn--add:hover { border-color: var(--red); background: var(--red-soft); }
.btn--small { min-height: 36px; padding: 6px 12px; font-size: 13.5px; }
.btn--link { border: 0; background: none; color: var(--muted); padding: 6px 8px; min-height: 0; font-weight: 500; font-size: 13.5px; }
.btn--link:hover { color: var(--red); background: none; }
.btn:disabled { opacity: .5; cursor: default; }

/* Barra inferior */
.bar { position: fixed; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,.96); border-top: 1px solid var(--line); z-index: 40; backdrop-filter: blur(8px); }
.bar__in { max-width: 920px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 12px; }
.bar__st { flex: 1; font-size: 13.5px; color: var(--muted); min-width: 0; }
.bar__st b { color: var(--ink); font-weight: 600; }

/* Avisos */
.alert { border-radius: var(--radius); padding: 16px 18px; margin-top: 20px; font-size: 15px; }
.alert--err { background: var(--red-soft); border: 1px solid #f2c4c1; color: var(--red-ink); }
.alert--ok { background: var(--ok-soft); border: 1px solid #bfdcc9; color: var(--ok); }
.alert ul { margin: 8px 0 0; padding-left: 20px; }
.alert a { color: inherit; }
.full { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 40px 16px; }
.full h1 { font-size: 28px; margin: 0 0 10px; }
.full p { color: var(--ink-soft); max-width: 460px; margin: 0 auto; }

dialog { border: 0; border-radius: 14px; padding: 26px; max-width: 460px; width: calc(100% - 32px); box-shadow: 0 30px 80px -20px rgba(0,0,0,.35); }
dialog::backdrop { background: rgba(29,27,25,.45); }
dialog h3 { margin: 0 0 8px; font-size: 20px; }
dialog p { color: var(--ink-soft); margin: 0 0 18px; }
.dlg__btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 14.5px; opacity: 0; transition: .25s; z-index: 50; pointer-events: none; max-width: calc(100% - 32px); }
.toast.is-on { opacity: 1; transform: translateX(-50%); }

@media (max-width: 720px) {
  .section { padding: 22px 16px 4px; }
  .card { padding: 18px 14px 2px; }
  .grid, .grid--3 { grid-template-columns: 1fr; }
  .grid--4 { grid-template-columns: 1fr 1fr; }
  .span-2 { grid-column: auto; }
  .top__name { font-size: 13px; }
  .bar__in { flex-wrap: wrap; }
  .bar__st { flex-basis: 100%; }
  .bar .btn { flex: 1; }
}

/* Bloques opcionales plegados */
.more { border: 1px solid var(--line); border-radius: 10px; margin: 4px 0 20px; background: var(--bg); }
.more > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; padding: 14px 44px 14px 16px; position: relative; min-height: 48px; }
.more > summary::-webkit-details-marker { display: none; }
.more > summary::after { content: '+'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 22px; font-weight: 400; color: var(--red); line-height: 1; }
.more[open] > summary::after { content: '−'; }
.more > summary:hover { background: var(--paper); border-radius: 10px; }
.more__t { font-weight: 600; font-size: 15px; }
.more__s { color: var(--muted); font-size: 13.5px; }
.more__b { padding: 6px 16px 0; border-top: 1px solid var(--line); }
.more__b > .btn--add:last-child { margin-bottom: 16px; }
#sec-extra { padding-top: 20px; padding-bottom: 0; }
#sec-extra > .more { margin-bottom: 20px; }
.logo-th { display: inline-block; flex: none; width: 128px; height: 48px; background-origin: content-box; padding: 4px 6px; margin-right: 12px; vertical-align: middle; background: var(--bg) center/contain no-repeat; border: 1px solid var(--line); border-radius: 6px; }
.more > summary .more__t { display: inline-flex; align-items: center; }
.field > .more { margin-bottom: 0; }
