/* ACEA Jury Voting Platform — shared styles
   Layout concept: the ballot reads like a race classification sheet —
   a white logo band, a yellow start-line banner, then numbered places. */
:root {
  --bg: #f4f4ef;          /* page ground, faint yellow bias */
  --surface: #ffffff;
  --ink: #17160f;
  --muted: #625f53;
  --line: #dcd9cc;
  --line-strong: #b9b5a4;
  --yellow: #fdc50c;      /* ACEA yellow, sampled from the official logo */
  --on-yellow: #17160f;
  --yellow-soft: #fdf3cc;
  --band: #ffffff;        /* logo band: CAC and KGEG logos always on white */
  --band-ink: #17160f;
  --ok: #1d7a4b;  --ok-soft: #e1f2e8;
  --bad: #b3261e; --bad-soft: #fbe6e4;
  --warn: #8a5a00; --warn-soft: #fbefd5;
  --focus: #1f5fd1;
  --shadow: 0 1px 2px rgb(23 22 15 / .06), 0 6px 24px rgb(23 22 15 / .06);
  --font-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 6px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11110e; --surface: #1b1a16; --ink: #f0eee4; --muted: #a8a596;
    --line: #322f27; --line-strong: #4a4639; --yellow: #fdc50c; --on-yellow: #17160f;
    --yellow-soft: #3a3010; --band: #ffffff; --band-ink: #17160f;
    --ok: #57c78f; --ok-soft: #173326; --bad: #ff8a80; --bad-soft: #3b1a17;
    --warn: #f0c060; --warn-soft: #3a2e12; --focus: #7aa7ff;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 6px 24px rgb(0 0 0 / .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #11110e; --surface: #1b1a16; --ink: #f0eee4; --muted: #a8a596;
  --line: #322f27; --line-strong: #4a4639; --yellow: #fdc50c; --on-yellow: #17160f;
  --yellow-soft: #3a3010; --band: #ffffff; --band-ink: #17160f;
  --ok: #57c78f; --ok-soft: #173326; --bad: #ff8a80; --bad-soft: #3b1a17;
  --warn: #f0c060; --warn-soft: #3a2e12; --focus: #7aa7ff;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 6px 24px rgb(0 0 0 / .3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 16px; line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
.wrap {
  max-width: 920px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.05; text-wrap: balance; margin: 0; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- logo band (always white) ---------- */
.band { background: var(--band); color: var(--band-ink); border-bottom: 1px solid #e7e5dc; }
.band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; flex-wrap: wrap; }
.band .partners { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; min-height: 40px; }
.logo img { height: 44px; width: auto; display: block; }
.logo .mark { display: none; font-family: var(--font-display); font-weight: 700; letter-spacing: .04em; line-height: 1; }
.logo.nologo img { display: none; }
.logo.nologo .mark { display: inline-flex; align-items: center; gap: 8px; }
.mark-acea { font-size: 28px; }
.mark-acea b { background: var(--yellow); color: var(--on-yellow); padding: 4px 7px 2px; border-radius: 3px; }
.mark-acea small { font-family: var(--font-body); font-weight: 500; font-size: 11px; letter-spacing: .02em; max-width: 13ch; line-height: 1.15; color: #4c4a40; }
.mark-partner { font-size: 18px; border: 1.5px solid #17160f; padding: 5px 8px 3px; border-radius: 3px; }
.mark-partner small { font-family: var(--font-body); font-weight: 500; font-size: 10.5px; letter-spacing: 0; max-width: 18ch; line-height: 1.15; color: #4c4a40; }
.band-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #6a675c; }

/* ---------- start-line banner ---------- */
.banner { background: var(--yellow); color: var(--on-yellow); position: relative; overflow: hidden; }
.banner::after { /* chequered finish strip */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px;
  background: conic-gradient(#17160f 25%, transparent 0 50%, #17160f 0 75%, transparent 0) 0 0 / 20px 20px;
  opacity: .9;
}
.banner .wrap { padding-block: 28px 38px; display: grid; gap: 6px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.banner h1 { font-size: clamp(40px, 8vw, 76px); font-weight: 800; letter-spacing: -.01em; text-transform: uppercase; }
.banner .sub { font-size: 17px; max-width: 60ch; }

/* ---------- generic UI ---------- */
.btn {
  appearance: none; border: 1.5px solid var(--ink); background: var(--ink); color: var(--bg);
  font: 600 15px/1 var(--font-body); padding: 12px 18px; border-radius: var(--radius); cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; white-space: nowrap;
}
.btn:hover { filter: brightness(1.15); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn.ghost:hover { border-color: var(--ink); filter: none; }
.btn.yellow { background: var(--yellow); color: var(--on-yellow); border-color: var(--yellow); }
.btn.small { font-size: 13px; padding: 7px 11px; }
.btn.danger { background: transparent; color: var(--bad); border-color: var(--bad); }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }

label.field { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.hint { font-weight: 400; font-size: 13px; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=datetime-local], input[type=number], select, textarea {
  font: 400 16px/1.3 var(--font-body); color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line-strong); border-radius: var(--radius); padding: 11px 12px; width: 100%; min-width: 0;
}
textarea { resize: vertical; min-height: 120px; line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 35%, transparent); }
input.invalid, select.invalid { border-color: var(--bad); background: var(--bad-soft); }

.notice { border-radius: var(--radius); padding: 12px 14px; font-size: 14px; border: 1px solid; }
.notice.bad { background: var(--bad-soft); border-color: var(--bad); color: var(--ink); }
.notice.ok { background: var(--ok-soft); border-color: var(--ok); }
.notice.warn { background: var(--warn-soft); border-color: var(--warn); }
.notice.info { background: var(--yellow-soft); border-color: var(--yellow); }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line-strong); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.ok { color: var(--ok); border-color: currentColor; }
.pill.bad { color: var(--bad); border-color: currentColor; }
.pill.warn { color: var(--warn); border-color: currentColor; }
.pill.muted { color: var(--muted); }

.lang { display: inline-flex; border: 1.5px solid #17160f; border-radius: 4px; overflow: hidden; }
.lang button { border: 0; background: transparent; color: #17160f; font: 700 12px/1 var(--font-body); letter-spacing: .06em; padding: 7px 9px; cursor: pointer; }
.lang button[aria-pressed=true] { background: #17160f; color: #fff; }

.demo-strip { background: var(--ink); color: var(--bg); font-size: 13px; }
.demo-strip .wrap { padding-block: 8px; display: flex; gap: 10px 16px; flex-wrap: wrap; align-items: center; }
.demo-strip code { background: color-mix(in srgb, var(--bg) 16%, transparent); padding: 1px 6px; border-radius: 3px; font-size: 13px; }
.demo-strip .linkbtn { color: var(--yellow); }

footer.foot { border-top: 1px solid var(--line); margin-top: 48px; }
footer.foot .wrap { padding-block: 20px 32px; font-size: 13px; color: var(--muted); display: grid; gap: 4px; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--radius); font-size: 14px; box-shadow: var(--shadow); z-index: 50; max-width: calc(100% - 32px); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 560px) {
  .band .wrap { padding-block: 8px; gap: 8px; }
  .band .partners { gap: 8px; }
  .logo img { height: 34px; }
  .mark-partner small, .mark-acea small { display: none; }
  .mark-acea { font-size: 22px; }
  .mark-partner { font-size: 15px; }
  .banner .wrap { padding-block: 18px 28px; }
  .banner .sub { font-size: 15px; }
}

/* ---------- logo placement: CAC on the white band, ACEA on its own yellow ---------- */
.band .partners { flex: 1 1 auto; }
.band .lang { margin-left: auto; }
.logo-cac img { height: 52px; }
.band .band-label { line-height: 1.25; }
.banner .wrap.has-logo { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 28px; align-items: center; }
.banner-text { display: grid; gap: 6px; min-width: 0; }
.logo-acea img { height: 112px; width: auto; max-width: none; }
.logo-acea .mark-acea b { background: #17160f; color: var(--yellow); }
a.logo { color: inherit; text-decoration: none; }
@media (max-width: 560px) {
  .banner .wrap.has-logo { grid-template-columns: minmax(0, 1fr); }
  .logo-acea img { height: 64px; }
  .logo-cac img { height: 40px; }
  .band .band-label { font-size: 10px; }
}

/* KGEG credit: present but discreet */
footer.foot .copyright { font-size: 11.5px; opacity: .75; margin-top: 6px; }

/* ---------- links back to www.acea-awards.org ---------- */
.home-link { font-size: 13px; font-weight: 600; color: #17160f; text-decoration: none; border-bottom: 1.5px solid #fdc50c; padding-bottom: 1px; white-space: nowrap; }
.home-link:hover { border-bottom-color: #17160f; }
.band .home-link { margin-left: auto; }
.band .home-link + .lang { margin-left: 0; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 4px; }
.foot-links a { color: var(--ink); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.foot-links a:hover { border-bottom-color: var(--ink); }
.rules .more { font-size: 14px; }
.rules .more a { color: var(--ink); font-weight: 600; }
@media (max-width: 560px) { .band .home-link { display: none; } }
