/* Oksigenia Hechauka: the screen templates, by the art direction (31 October 2026). Two layouts on one sheet of styles:
 * «horizontal» (1920 × 1080) and «vertical» (1080 × 1920), each in light and dark. Seen in passing, from 3 to 10 m.
 *
 * What the player has to keep in mind:
 * - Old browsers: Samsung's touch screen runs Chromium 56. So flexbox only (no CSS Grid, no flex gap: margins), no
 *   clamp(), no color-mix(), no :is(), no inset, no aspect-ratio, no prefers-color-scheme: the theme is
 *   data-tema="claro|oscuro" on <html>, set by the player (by schedule, or by the screen).
 * - Proportional to the canvas: 1rem is a hundred-and-eighth of the screen's short side (10 px on a 1080 screen), and
 *   every size is in rem, so a LED wall of a strange size keeps the same proportions.
 * - The client's identity is only variables (hk-*.css of each client): colours for both themes, the two fonts, the logo
 *   for each theme. Nothing of Oksigenia's on screen.
 *
 * The type scale, from 3 to 10 m (on a 55" 1080 screen, 1rem ≈ 6.3 mm):
 *   clock 10rem · photo title 5.6rem · first line (a dish, a notice, an event) 4rem · second line 3.2rem ·
 *   block label 2.8rem in capitals · ticker 4rem. Nothing under 2.8rem.
 */

/* --- The client's identity: defaults, overridden by each client's sheet ------------------------------------------ */
:root {
    --hk-esquina: 1; /* how round the corners go, a multiple of each one's own: «Tu centro» */
    --hk-letra-titulos: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --hk-letra-texto: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    /* light */
    --hk-fondo: #f3f5f8;
    --hk-superficie: #ffffff;
    --hk-texto: #16191d;
    --hk-texto-suave: #4b5563;
    --hk-linea: #dfe3e9;
    --hk-primario: #1f5f8b;
    --hk-sobre-primario: #ffffff;
    --hk-acento: #e8a33a;
    --hk-sobre-acento: #16191d;
    /* four colours to tell kinds apart (stages, departments, menus); the client's own when it has them */
    --hk-marca-1: #1f5f8b;
    --hk-marca-2: #2f8a55;
    --hk-marca-3: #c9842a;
    --hk-marca-4: #b23a48;
    --hk-sobre-marca-1: #ffffff;             /* the text on each of them (a yellow wants dark text) */
    --hk-sobre-marca-2: #ffffff;
    --hk-sobre-marca-3: #ffffff;
    --hk-sobre-marca-4: #ffffff;
    --hk-marca-1-oscuro: #6aa6d6;            /* each of them, light enough to be read as text on the dark theme */
    --hk-marca-2-oscuro: #6cc79a;
    --hk-marca-3-oscuro: #f0b452;
    --hk-marca-4-oscuro: #f08a96;
    --hk-acento-texto: #8f5a12;              /* the accent dark enough to be read as text on the light surface */
}
[data-tema="oscuro"] {
    --hk-fondo: #0f141b;
    --hk-superficie: #19212c;
    --hk-texto: #f2f4f7;
    --hk-texto-suave: #aab4c2;
    --hk-linea: #2a3442;
    --hk-primario: #2f78ad;
    --hk-sobre-primario: #ffffff;
    --hk-acento: #f0b452;
    --hk-sobre-acento: #16191d;
}

/* --- The page ----------------------------------------------------------------------------------------------------- */
html {
    font-size: calc(100vmin / 108);
    background: var(--hk-fondo);
}
html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
}
body {
    color: var(--hk-texto);
    font-family: var(--hk-letra-texto);
    -webkit-font-smoothing: antialiased;
}
.hk {
    display: -webkit-box;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    padding: 3rem 4rem 0;
}
.hk *,
.hk *::before,
.hk *::after {
    box-sizing: border-box;
}
.hk h1,
.hk h2,
.hk h3,
.hk p,
.hk ul,
.hk ol {
    margin: 0;
    padding: 0;
}
.hk li {
    list-style: none;
}

/* The logo for each theme: the player gives both, the theme shows one. */
.hk-logo-oscuro,
[data-tema="oscuro"] .hk-logo-claro {
    display: none;
}
[data-tema="oscuro"] .hk-logo-oscuro {
    display: block;
}

/* --- Header: the logo, the screen's name, the date and the clock -------------------------------------------------- */
.hk-cabecera {
    display: flex;
    flex: none;
    align-items: center;
    height: 10rem;
    margin-bottom: 2.4rem;
}
.hk-cabecera img {
    height: 7.6rem;
    width: auto;
}
.hk-lugar {
    margin-left: 3.2rem;
    padding-left: 3.2rem;
    border-left: .3rem solid var(--hk-linea);
    color: var(--hk-texto-suave);
    font-family: var(--hk-letra-titulos);
    font-size: 3.6rem;
    font-weight: 700;
    line-height: 1.1;
}
.hk-hora {
    display: flex;
    align-items: center;
    margin-left: auto;
    text-align: right;
}
.hk-fecha {
    margin-right: 3.2rem;
    color: var(--hk-texto-suave);
    font-size: 3.4rem;
    font-weight: 700;
    line-height: 1.15;
}
.hk-fecha b {
    display: block;
    color: var(--hk-texto);
    font-weight: 800;
}
.hk-reloj {
    color: var(--hk-texto);
    font-family: var(--hk-letra-titulos);
    font-size: 10rem;
    font-weight: 800;
    line-height: .9;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
}
.hk-reloj span {
    color: var(--hk-acento);
}

/* --- The body: the media zone and the «Today» column ------------------------------------------------------------- */
.hk-cuerpo {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
}
.hk-medio {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    border-radius: calc(2.4rem * var(--hk-esquina));
    background: #000;
}
.hk-medio img,
.hk-medio video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* the photo's title over a dark fade at the bottom, always white on dark, in any theme */
.hk-pie {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12rem 4.4rem 3.6rem;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, .78));
    color: #fff;
}
.hk-pie h2 {
    font-family: var(--hk-letra-titulos);
    font-size: 5.6rem;
    font-weight: 800;
    line-height: 1.08;
}
.hk-pie p {
    margin-top: 1.2rem;
    font-size: 3.4rem;
    font-weight: 600;
    line-height: 1.2;
    opacity: .92;
}

.hk-hoy {
    display: flex;
    flex: none;
    flex-direction: column;
    width: 72rem;
    margin-left: 3.2rem;
}
.hk-bloque {
    position: relative;
    margin-bottom: 2rem;
    padding: 2.2rem 3rem 2.4rem 3.6rem;
    border-radius: calc(2rem * var(--hk-esquina));
    background: var(--hk-superficie);
    box-shadow: 0 .2rem .8rem rgba(0, 0, 0, .06);
}
.hk-bloque:last-child {
    margin-bottom: 0;
}
.hk-bloque::before {                      /* a colour edge on the left: what kind of block it is */
    content: "";
    position: absolute;
    top: 2.2rem;
    bottom: 2.2rem;
    left: 0;
    width: .8rem;
    border-radius: 0 calc(.8rem * var(--hk-esquina)) calc(.8rem * var(--hk-esquina)) 0;
    background: var(--hk-color, var(--hk-primario));
}
.hk-bloque-crece {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}
.hk-etiqueta {
    margin-bottom: 1.4rem;
    color: var(--hk-color, var(--hk-primario));
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: .08em;
    line-height: 1;
    text-transform: uppercase;
}
[data-tema="oscuro"] .hk-etiqueta {
    color: var(--hk-color-oscuro, var(--hk-texto));
}

/* The menu of the day: course and dish, one per line. */
.hk-plato {
    display: flex;
    align-items: baseline;
    margin-top: .8rem;
}
.hk-plato:first-of-type {
    margin-top: 0;
}
.hk-plato small {
    flex: none;
    width: 13.4rem;
    color: var(--hk-texto-suave);
    font-size: 2.8rem;
    font-weight: 700;
}
.hk-plato span {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.12;
}
.hk-nota {
    margin-top: 1.6rem;
    color: var(--hk-texto-suave);
    font-size: 3rem;
    font-weight: 600;
    line-height: 1.2;
}

/* Notices: a title and one line. */
.hk-aviso {
    margin-top: 1.8rem;
    padding-top: 1.8rem;
    border-top: .2rem solid var(--hk-linea);
}
.hk-aviso:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}
.hk-aviso h3 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
}
.hk-aviso p {
    margin-top: .6rem;
    color: var(--hk-texto-suave);
    font-size: 3.2rem;
    font-weight: 600;
    line-height: 1.2;
}

/* Events: the time and what, with the colour of who it is for. */
.hk-evento {
    display: flex;
    align-items: center;
    margin-top: 1.2rem;
}
.hk-evento:first-of-type {
    margin-top: 0;
}
.hk-evento time {
    flex: none;
    width: 13rem;
    margin-right: 2rem;
    padding: .6rem 0;
    border-radius: calc(1.2rem * var(--hk-esquina));
    background: var(--hk-ev, var(--hk-primario));
    color: var(--hk-sobre-ev, #fff);
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.hk-evento span {
    font-size: 3.6rem;
    font-weight: 700;
    line-height: 1.12;
}
.hk-evento small {
    display: block;
    color: var(--hk-texto-suave);
    font-size: 2.8rem;
    font-weight: 600;
}

/* --- The ticker at the bottom ------------------------------------------------------------------------------------ */
.hk-cinta {
    display: flex;
    flex: none;
    align-items: center;
    height: 8.4rem;
    margin: 2.4rem -4rem 0;
    overflow: hidden;
    background: var(--hk-primario);
    color: var(--hk-sobre-primario);
}
.hk-cinta b {
    position: relative;
    z-index: 1;
    flex: none;
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 3.2rem 0 4rem;
    background: var(--hk-acento);
    color: var(--hk-sobre-acento);
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.hk-cinta-pista {
    flex: 1 1 auto;
    overflow: hidden;
    white-space: nowrap;
}
.hk-cinta-texto {
    display: inline-block;
    padding-left: 100%;
    font-size: 4rem;
    font-weight: 700;
    line-height: 8.4rem;
    -webkit-animation: hk-cinta 48s linear infinite;
    animation: hk-cinta 48s linear infinite;
}
.hk-cinta-texto i {
    display: inline-block;
    width: 1.4rem;
    height: 1.4rem;
    margin: 0 3.2rem;
    border-radius: 50%;
    background: var(--hk-acento);
    vertical-align: .6rem;
}
@-webkit-keyframes hk-cinta {
    to { -webkit-transform: translateX(-100%); transform: translateX(-100%); }
}
@keyframes hk-cinta {
    to { -webkit-transform: translateX(-100%); transform: translateX(-100%); }
}

/* --- Vertical: the media on top, «Today» under it, full width ---------------------------------------------------- */
.hk-vertical .hk-cabecera {
    height: 13rem;
}
.hk-vertical .hk-hora {
    display: block;
}
.hk-vertical .hk-fecha {
    margin: 0 0 .8rem;
}
.hk-vertical .hk-fecha b {
    display: inline;
    margin-right: .5em;
}
.hk-vertical .hk-cuerpo {
    flex-direction: column;
}
.hk-vertical .hk-medio {
    flex: none;
    height: 56.25rem;                     /* 16:9 across the full width of a 1080 screen */
}
.hk-vertical .hk-hoy {
    flex: 1 1 auto;
    width: auto;
    margin: 2.8rem 0 0;
}
/* Only in the mock-ups: the «example data» mark. */
.hk-muestra {
    position: absolute;
    top: 2.4rem;
    left: 2.4rem;
    padding: .8rem 1.6rem;
    border-radius: calc(1rem * var(--hk-esquina));
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: 2.4rem;
    font-weight: 700;
}

/* ================================================================================================================
 * What the player adds to the templates: slides that fade into each other, pictures and videos that do not fill
 * their zone, an empty zone, a screen without «Today» or without a ticker, the screen asleep and the pairing screen.
 * Same rules as above: flexbox only, sizes in rem, nothing newer than Chromium 56.
 * ============================================================================================================= */
#hechauka {
    width: 100%;
    height: 100%;
}
.hk-diapo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    -webkit-transition: opacity .8s ease;
    transition: opacity .8s ease;
}
.hk-diapo.hk-visible {
    opacity: 1;
}
/* A vertical picture in a wide zone (or the other way round): whole, over a blurred copy of itself. */
.hk-diapo-fondo {
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    background-color: #000;
    background-position: center;
    background-size: cover;
}
.hk-diapo-fondo.hk-difuminar {
    -webkit-filter: blur(4rem) brightness(.7);
    filter: blur(4rem) brightness(.7);
}
.hk-medio-vacio {
    background: var(--hk-superficie);
}
.hk-sin-hoy .hk-hoy {
    display: none;
}
.hk-sin-cinta .hk-cinta {
    display: none;
}
.hk-sin-cinta.hk {
    padding-bottom: 3rem;
}
/* No logo: the name of the centre stands in for it, with the same mark as what leads. */
.hk-sin-logo .hk-lugar {
    margin-left: 0;
    padding-left: 2rem;
    border-left: 1.2rem solid var(--hk-primario);
    color: var(--hk-texto);
    font-size: calc(var(--hk-t-min) * 1.15);
    font-weight: 800;
    letter-spacing: -.01em;
}
.hk-aviso-importante h3 {
    color: var(--hk-acento-texto);
}
[data-tema="oscuro"] .hk-aviso-importante h3 {
    color: var(--hk-acento);
}
/* Outside the power hours: black, which a device agent may follow by turning the display off. */
.hk-apagada {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 50;
    background: #000;
    cursor: none;
}

/* --- Pairing: a new screen shows its code and a QR, readable from across the room ------------------------------- */
.hk-emparejar {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 8rem 10rem;
    box-sizing: border-box;
    background: #f3f5f8;
    color: #16191d;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.hk-emparejar-texto {
    flex: 1 1 auto;
    min-width: 0;
}
.hk-emparejar h1 {
    margin: 0 0 3rem;
    font-size: 7rem;
    font-weight: 800;
    line-height: 1.05;
}
.hk-emparejar p {
    margin: 0;
    font-size: 4rem;
    font-weight: 600;
    line-height: 1.3;
    color: #4b5563;
}
.hk-emparejar .hk-emparejar-codigo {
    margin: 5rem 0 3rem;
    color: #16191d;
    font-size: 18rem;
    font-weight: 800;
    letter-spacing: .08em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.hk-emparejar .hk-emparejar-url {
    font-size: 3.2rem;
}
.hk-emparejar-qr {
    flex: none;
    width: 52rem;
    height: 52rem;
    margin-left: 8rem;
    padding: 3rem;
    border-radius: calc(3rem * var(--hk-esquina));
    background: #fff;
    box-sizing: border-box;
}
.hk-emparejar-qr svg,
.hk-emparejar-qr img {
    display: block;
    width: 100%;
    height: 100%;
}
@media (orientation: portrait) {
    .hk-emparejar {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }
    .hk-emparejar-qr {
        margin: 6rem 0 0;
    }
}
