/* SPX Table Hockey Challenge — shared styling, derived from SPX Broadcast */

@font-face { font-family: "UI-Light";   src: url("/fonts/EncodeSansSemiExpanded-Light.ttf"); font-display: swap; }
@font-face { font-family: "UI-Regular"; src: url("/fonts/EncodeSansSemiExpanded-Regular.ttf"); font-display: swap; }
@font-face { font-family: "UI-Bold";    src: url("/fonts/EncodeSansSemiExpanded-Bold.ttf"); font-display: swap; }
@font-face { font-family: "UI-Black";   src: url("/fonts/EncodeSansSemiExpanded-Black.ttf"); font-display: swap; }

:root {
    --bg: #374451;
    --bg-deep: #272833;
    --panel: #3f4c5b;
    --panel-inner: #2f3a46;
    --green: #54af3c;
    --green-lit: #6ad14e;
    --line: rgba(255, 255, 255, 0.08);
    --text: #ffffff;
    --text-dim: rgba(255, 255, 255, 0.55);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* `hidden` must win over any display we set later — .cta and friends declare
   display: block, which otherwise leaves hidden elements on screen. */
[hidden] { display: none !important; }

html, body {
    min-height: 100%;
    background-color: var(--bg);
    color: var(--text);
    font-family: "UI-Regular", Arial, Helvetica, sans-serif;
    -webkit-text-size-adjust: 100%;
}

a { color: var(--green); }

:focus-visible {
    outline: 2px solid var(--green-lit);
    outline-offset: 2px;
}

/* --- brand header --------------------------------------------------------- */

.brandbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1em;
}

.brandbar img {
    display: block;
    width: 3.1em;
    height: 3.1em;
}

.wordmark {
    font-family: "UI-Bold", Arial, Helvetica, sans-serif;
    font-size: 1.15em;
    text-align: right;
    background-image: url('../img/hclogo.png');
    background-repeat: no-repeat;
    background-position: right center;
    border: 2px solid red;
}

.wordmark em {
    font-style: normal;
    color: var(--green);
}

/* --- panels --------------------------------------------------------------- */

.panel {
    background-color: var(--panel);
    border-radius: 6px;
    overflow: hidden;
}

.panel + .panel { margin-top: 0.55em; }

.panel-head {
    display: flex;
    align-items: center;
    gap: 0.7em;
    width: 100%;
    padding: 0.85em 1em;
    background: none;
    border: 0;
    color: var(--text);
    font-family: "UI-Bold", Arial, Helvetica, sans-serif;
    font-size: 0.95em;
    text-transform: uppercase;
    text-align: left;
    cursor: pointer;
}

.panel-head::before {
    content: "";
    flex: none;
    width: 0;
    height: 0;
    border-left: 0.5em solid var(--green);
    border-top: 0.36em solid transparent;
    border-bottom: 0.36em solid transparent;
    transition: transform 0.18s ease;
}

.panel-head[aria-expanded="true"]::before { transform: rotate(90deg) translateX(0.1em); }

.panel-body { padding: 0 1em 1.1em; }

.panel-head[aria-expanded="false"] + .panel-body { display: none; }

/* --- buttons -------------------------------------------------------------- */

.cta {
    display: block;
    width: 100%;
    padding: 0.72em 1em;
    border: 0;
    border-radius: 5px;
    background-color: var(--green);
    background-image: linear-gradient(180deg, var(--green-lit), var(--green));
    color: #fff;
    font-family: "UI-Bold", Arial, Helvetica, sans-serif;
    font-size: 1.25em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
    transition: filter 0.15s ease, transform 0.05s ease;
}

.cta:hover:not(:disabled) { filter: brightness(1.08); }
.cta:active:not(:disabled) { transform: translateY(1px); box-shadow: none; }

.cta:disabled {
    cursor: not-allowed;
    filter: grayscale(0.55) brightness(0.62);
    box-shadow: none;
}

.cta.ghost {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.25);
    font-size: 1em;
    box-shadow: none;
}

/* --- text input ----------------------------------------------------------- */

.field {
    width: 100%;
    padding: 0.62em 0.8em;
    border: 0;
    border-radius: 5px;
    background-color: #fff;
    color: #21262E;
    font-family: "UI-Bold", Arial, Helvetica, sans-serif;
    font-size: 1.25em;
}

.field::placeholder {
    color: #9aa4b1;
    font-family: "UI-Light", Arial, Helvetica, sans-serif;
    font-style: italic;
}

.footnote a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.footnote a:hover { color: var(--green); }

.footnote {
    padding: 2em 0 1.2em;
    color: var(--text-dim);
    font-family: "UI-Light", Arial, Helvetica, sans-serif;
    font-size: 0.72em;
    text-align: center;
    text-transform: uppercase;
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
