/* ==========================================================================
   The front page - "Πρωτοσέλιδο" (refined broadsheet), on / and /en/ only (loaded by _layouts/default.html).
   Markup: _includes/front-page.html. Builds on newspaper.css (shared classes: .label, .kicker, .hl, .art,
   .cover, .tiles/.tile, .band, .index-box, .btn, .more). Everything new here is scoped under .h1.
   ========================================================================== */

.h1 { --h1-gap: calc(var(--gutter) * 1.25); --h1-thumb: 4.75rem; }

/* ---------- Top: three columns, hairline rules between them ---------- */
.h1-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2.3fr) minmax(0, 1.05fr);
    grid-template-areas: "briefs lead side";
    align-items: stretch;
}
.h1-briefs { grid-area: briefs; display: flex; flex-direction: column; padding-right: var(--h1-gap); }
.h1-center { grid-area: lead; padding-inline: var(--h1-gap); border-inline: 1px solid var(--rule); }
.h1-side { grid-area: side; padding-left: var(--h1-gap); }

/* Square thumbnails (datasets, the smaller analyses). */
.h1-thumb { margin: 0; }
.h1-thumb img { aspect-ratio: 1 / 1; }

/* Νέα δεδομένα: the thumbnail spans the kicker/headline and the ΖΩΝΤΑΝΑ / update line beside it; only the two
   lines of description run full width underneath. */
.h1-brief {
    display: grid;
    grid-template-columns: var(--h1-thumb) minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    column-gap: .8rem;
    align-items: start;
    margin-bottom: .95rem;
    padding-bottom: .95rem;
    border-bottom: 1px solid var(--rule);
}
.h1-brief__text { grid-column: 2; grid-row: 1; min-width: 0; }
.h1-brief .h1-thumb { grid-column: 1; grid-row: 1 / span 2; }
.h1-brief .h1-status {
    grid-column: 2;
    grid-row: 2;
    align-self: end;
    flex-direction: column;
    align-items: flex-start;
    margin-top: .35rem;
}
.h1-brief .kicker { margin-bottom: .25rem; }
.h1-brief .hl { margin: 0; }
.h1-brief__dek {
    grid-column: 1 / -1;
    grid-row: 3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    margin: .6rem 0 0;
    font-size: .86rem;
    line-height: 1.45;
    color: var(--ink-2);
}
.h1-status {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .15rem .45rem;
    margin: .45rem 0 0;
    font-family: var(--f-sans);
    font-size: .72rem;
    color: var(--ink-3);
}
.h1-briefs > .more { margin: 0 0 1.3rem; }

/* A small "live" figure under the datasets: how many update themselves. */
.h1-livebox {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: .8rem;
    align-items: center;
    margin-top: auto;
    padding: .85rem 0;
    border-block: 2px solid var(--rule-ink);
}
.h1-livebox__num {
    margin: 0;
    font-family: var(--f-display);
    font-size: 2.6rem;
    font-weight: 600;
    line-height: 1;
    color: var(--live);
    font-variant-numeric: tabular-nums;
}
.h1-livebox__num span { font-size: 1.2rem; color: var(--ink-3); }
.h1-livebox__text { margin: 0; font-family: var(--f-sans); font-size: .8rem; line-height: 1.4; color: var(--ink-2); }
.h1-livebox__text b { color: var(--live); }

/* Centre: the cover as a wide band, then the lead with a large picture and two columns of text. */
.h1-cover { margin-bottom: 1.2rem; }
.h1-cover .cover__photo img { aspect-ratio: 2 / 1; max-height: none; object-position: 62% 92%; }
.h1-cover .cover__title { font-size: clamp(1.3rem, 1.9vw, 1.75rem); }
.h1-lead .hl--xl { margin-bottom: .5rem; }
.h1-lead .byline { margin-bottom: .9rem; }
.h1-lead__art { margin-bottom: 1rem; }
.h1-lead__art img { aspect-ratio: 16 / 9; }
.h1-lead__excerpt { margin-bottom: .5rem; column-fill: balance; }
.h1-lead__excerpt p { orphans: 1; widows: 1; }

/* Εφαρμογές που ξεχωρίσαμε: a tinted panel with an accent rule above the analyses, so the apps read as their own
   section; each app is a row with a square picture at the left. */
.h1-apps {
    margin: 0 0 1.5rem;
    padding: .85rem 1rem 1rem;
    background: var(--paper-2);
    border-top: 3px solid var(--accent);
}
.h1-apps__label {
    margin: 0 0 .8rem;
    font-family: var(--f-sans);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--accent-strong, var(--accent));
}
.h1-apps__label a:hover { text-decoration: underline; }
.h1-app {
    display: grid;
    grid-template-columns: 5.25rem minmax(0, 1fr);
    column-gap: .8rem;
    align-items: start;
}
.h1-app + .h1-app { margin-top: .85rem; padding-top: .85rem; border-top: 1px solid var(--rule); }
.h1-app__art { margin: .15rem 0 0; }
.h1-app__art img { aspect-ratio: 1 / 1; border-radius: 3px; }
.h1-app__domain {
    margin: 0 0 .2rem;
    font-family: var(--f-sans);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .03em;
    color: var(--accent-strong, var(--accent));
}
.h1-app .hl { margin: 0 0 .25rem; }
.h1-app__dek {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
    margin: 0;
    font-size: .86rem;
    line-height: 1.42;
    color: var(--ink-2);
}
.h1-apps__more { margin-top: .85rem; }

/* Αναλύσεις: one big, then two rows with a thumbnail on the right. */
.h1-an { margin-bottom: 1rem; }
.h1-an + .h1-an { padding-top: 1rem; border-top: 1px solid var(--rule); }
.h1-an--big .art { margin-bottom: .65rem; }
.h1-an--big .kicker { margin-bottom: .3rem; }
.h1-an--big .story__dek {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    overflow: hidden;
}
.h1-an--row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--h1-thumb);
    column-gap: .8rem;
    align-items: start;
}
.h1-an--row .kicker { grid-column: 1 / -1; margin-bottom: .35rem; }
.h1-an--row .hl { margin-bottom: .1rem; }
.h1-an--row .byline { margin: .25rem 0 0; }
.h1-an .byline { margin-bottom: 0; }
.h1-index { margin-top: 0; padding-top: 1rem; border-top: 2px solid var(--rule-ink); }

/* ---------- Bands: a thick double rule above each, the label on a thin one ---------- */
.h1-band { margin-top: 2.4rem; }

/* Θέματα: 4 x 2, every tile in a row lined up on a shared sub-grid so the names, lines, latest analysis
   and buttons sit on the same lines whatever the text length. */
.h1-tiles { column-gap: calc(var(--gutter) * 1.6); }
.h1 .h1-tiles .tile:not(:nth-child(4n + 1))::before { left: calc(var(--gutter) * -.8); }
@media (min-width: 721px) {
    .h1-tiles { grid-auto-rows: auto; }
    .h1-tiles .tile {
        display: grid;
        grid-row: span 6;
        grid-template-rows: subgrid;
        row-gap: 0;
        padding: 1.1rem 0 1.3rem;
    }
    .h1-tiles .tile__body { display: contents; }
    .h1-tiles .tile__no { grid-row: 1; }
    .h1-tiles .tile__art { grid-row: 2; margin-bottom: .8rem; }
    .h1-tiles .tile__name { grid-row: 3; }
    .h1-tiles .tile__dek { grid-row: 4; }
    .h1-tiles .tile__latest { grid-row: 5; align-self: start; }
    .h1-tiles .tile__act { grid-row: 6; margin-top: .2rem; align-self: end; }
    .h1-tiles .tile__name { font-size: 1.28rem; }
    /* each band ends on one rule: no hairline under the last row of tiles */
    .h1-tiles .tile:nth-last-child(-n + 4) { border-bottom: 0; }
}
.h1-tiles .tile__latest { text-wrap: balance; }

/* Ειδικά αφιερώματα: under the 4 x 2 topic tiles, a slim dated strip. Its label sits in the first tile column and
   the features in the other three, behind the same hairline rule as the tiles, so one more topic or special never
   leaves a lone tile on a row of its own. */
.h1-specials {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: auto 1fr;
    column-gap: calc(var(--gutter) * 1.6);
    padding-top: 1.1rem;
    border-top: 1px solid var(--rule);
}
.h1-specials__label {
    grid-column: 1;
    align-self: start;
    margin: .1rem 0 0;
    font-family: var(--f-sans);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    color: var(--accent);
}
.h1-specials__label a:hover { text-decoration: underline; }
.h1-specials__dek { grid-column: 1; align-self: start; margin: .35rem 0 0; font-size: .85rem; line-height: 1.4; color: var(--ink-3); }
.h1-specials__list { position: relative; grid-column: 2 / -1; grid-row: 1 / span 2; display: grid; row-gap: 1rem; }
.h1-specials__list::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(var(--gutter) * -.8);
    border-left: 1px solid var(--rule);
}
.h1-sp {
    display: grid;
    grid-template-columns: 9.5rem minmax(0, 1fr) auto;
    column-gap: calc(var(--gutter) * 1.2);
    align-items: center;
}
.h1-sp__art { margin: 0; }
.h1-sp__when {
    margin: 0 0 .3rem;
    font-family: var(--f-sans);
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .08em;
    color: var(--accent);
}
.h1-sp__name { margin: 0 0 .25rem; font-size: 1.2rem; }
.h1-sp__dek { max-width: 46rem; margin: 0; font-size: .9rem; line-height: 1.45; color: var(--ink-2); }
.h1-sp__btn { padding: .7rem 1rem; letter-spacing: .1em; white-space: nowrap; text-align: center; }

/* Περισσότερες αναλύσεις: equal cards with column rules. */
.h1-cards {
    --n: 3;
    display: grid;
    grid-template-columns: repeat(var(--n), minmax(0, 1fr));
    column-gap: calc(var(--gutter) * 1.6);
    padding-top: 1.1rem;
    border-top: 2px solid var(--rule-ink);
}
.h1-cards--1 { --n: 1; }
.h1-cards--2 { --n: 2; }
.h1-cards--4 { --n: 4; }
.h1-card { position: relative; display: flex; flex-direction: column; }
/* Cards in one row share a sub-grid, so kicker, title, two-line titles' deks and the foot line up. */
@media (min-width: 721px) {
    .h1-cards { grid-auto-rows: auto; }
    .h1-card { display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 0; }
    .h1-card > .art { grid-row: 1; }
    .h1-card > .kicker { grid-row: 2; }
    .h1-card > .hl { grid-row: 3; }
    .h1-card > .story__dek { grid-row: 4; }
    .h1-card > .byline, .h1-card > .h1-status { grid-row: 5; align-self: end; }
}
/* Typographic cards (no pictures): a slightly bigger headline carries the row. */
.h1-cards--text .h1-card .hl--m { font-size: 1.32rem; }
.h1-cards--text .h1-card .story__dek { margin-bottom: .2rem; }
.h1-card + .h1-card::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(var(--gutter) * -.8);
    border-left: 1px solid var(--rule);
}
.h1-card .art { margin-bottom: .75rem; }
.h1-card .story__dek {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
}
.h1-card .byline, .h1-card .h1-status { margin-top: auto; padding-top: .35rem; margin-bottom: 0; }

/* Newsletter: one slim strip between two rules. */
.h1-news {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: .6rem 2rem;
    align-items: center;
    margin-top: 2.4rem;
    padding: 1rem 0;
    border-top: 4px double var(--rule-ink);
    border-bottom: 1px solid var(--rule-ink);
}
.h1-news__eyebrow {
    margin: 0;
    padding-right: 2rem;
    border-right: 1px solid var(--rule);
    font-family: var(--f-sans);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    white-space: nowrap;
}
.h1-news__text { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem 1rem; }
.h1-news__title { margin: 0; font-family: var(--f-head); font-size: 1.2rem; font-weight: 600; }
.h1-news__text p { margin: 0; font-size: .9rem; color: var(--ink-2); }

/* ---------- Salmon ---------- */
[data-theme="salmon"] .h1-livebox { padding: .85rem 1rem; border: 0; background: var(--paper-2); }
[data-theme="salmon"] .h1-livebox__num, [data-theme="salmon"] .h1-livebox__text b { color: var(--accent-strong); }
[data-theme="salmon"] .h1-index { border-top: 0; }
[data-theme="salmon"] .h1-cards { border-top: 1px solid var(--rule-ink); padding-top: 1.1rem; }
/* Salmon: crimson means "live" only, so the kickers go ink. */
[data-theme="salmon"] .h1 .kicker { color: var(--ink-2); }
[data-theme="salmon"] .h1-band { border-top: 0; }
[data-theme="salmon"] .h1-news { border: 0; padding: 1rem 1.2rem; background: var(--paper-2); }
[data-theme="salmon"] .h1-news__eyebrow { color: var(--accent-strong); border-color: var(--rule); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
    .h1-top {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        grid-template-areas: "lead lead" "side briefs";
    }
    .h1-center { margin-bottom: 1.4rem; padding: 0 0 .4rem; border-inline: 0; border-bottom: 1px solid var(--rule-ink); }
    .h1-side { padding: 0 var(--h1-gap) 0 0; border-right: 1px solid var(--rule); }
    .h1-briefs { padding: 0 0 0 var(--h1-gap); }
    .h1-cards--4 { --n: 2; row-gap: 1.6rem; }
    .h1-cards--4 > :nth-child(odd)::before { display: none; }
    .h1-cover .cover__photo img { aspect-ratio: 3 / 1; }
    .h1-cover .cover__title { font-size: clamp(1.5rem, 3.2vw, 2rem); }
    .h1-lead__art img { aspect-ratio: 2 / 1; }
    .h1 .h1-tiles .tile:nth-child(odd)::before { display: none; }
    .h1 .h1-tiles .tile:nth-child(even)::before { display: block; }
}
@media (min-width: 721px) and (max-width: 1080px) {
    .h1-tiles .tile__art img { aspect-ratio: 16 / 9; }
    .h1-specials { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; row-gap: .7rem; }
    .h1-specials__label, .h1-specials__list { grid-column: 1; grid-row: auto; }
    .h1-specials__dek { display: none; }
    .h1-specials__list::before { display: none; }
    .h1-tiles .tile:nth-last-child(n + 3) { border-bottom: 1px solid var(--rule); }
    .h1-tiles .tile:nth-last-child(-n + 2) { border-bottom: 0; }
}

@media (max-width: 720px) {
    .h1-top { grid-template-columns: minmax(0, 1fr); grid-template-areas: "lead" "side" "briefs"; }
    .h1-side { padding: 0; border-right: 0; }
    .h1-briefs { padding: 1rem 0 0; border-top: 4px double var(--rule-ink); }
    .h1-cover .cover__photo img { aspect-ratio: 4 / 3; }
    .h1-lead__excerpt { columns: 1; }
    .h1-an--big .art img { aspect-ratio: 16 / 9; }
    .h1-cards, .h1-cards--4 { grid-template-columns: minmax(0, 1fr); }
    .h1-card + .h1-card::before, .h1 .h1-tiles .tile:nth-child(n)::before { display: none; }
    .h1-card + .h1-card { margin-top: 1.1rem; padding-top: 1.1rem; border-top: 1px solid var(--rule); }
    /* Cards as rows on a phone: picture at the left, like the topic tiles. */
    .h1-card { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); column-gap: 1rem; align-content: start; }
    .h1-card > .art { grid-column: 1; grid-row: 1 / span 4; align-self: start; margin: .15rem 0 0; }
    .h1-card > :not(.art) { grid-column: 2; }
    .h1-card .story__dek { -webkit-line-clamp: 2; line-clamp: 2; font-size: .9rem; }
    .h1-card .hl--m { font-size: 1.1rem; }
    .h1-news { grid-template-columns: minmax(0, 1fr); text-align: left; }
    .h1-livebox { border-bottom: 0; }
    .h1-tiles .tile:last-child { border-bottom: 0; }
    .h1-specials { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; row-gap: .7rem; }
    .h1-specials__label, .h1-specials__list { grid-column: 1; grid-row: auto; }
    .h1-specials__dek { display: none; }
    .h1-specials__list::before { display: none; }
    .h1-sp { grid-template-columns: 8.5rem minmax(0, 1fr); column-gap: 1rem; align-items: start; }
    .h1-sp__art { grid-row: 1 / span 2; margin-top: .15rem; }
    .h1-sp__name { font-size: 1.1rem; }
    .h1-sp__dek { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
    .h1-sp__btn {
        grid-column: 2;
        justify-self: start;
        margin-top: .45rem;
        padding: 0;
        border: 0;
        background: none;
        color: var(--accent);
        font-size: .72rem;
        letter-spacing: .08em;
    }
    .h1-more .band__head { flex-wrap: wrap; row-gap: .35rem; padding-bottom: .5rem; }
    .h1-more .band__head .band__label { margin-bottom: .35rem; }
    .h1-cards--text .h1-card { display: block; }
    /* Topic tiles: the button becomes a small text link, so eight tiles don't stack eight outlined buttons. */
    .h1-tiles .tile__act { margin-top: .55rem; justify-items: start; }
    .h1-tiles .tile__act .btn {
        padding: 0;
        border: 0;
        background: none;
        color: var(--accent);
        font-size: .72rem;
        letter-spacing: .08em;
    }
    .h1-news__eyebrow { padding: 0; border: 0; }
    .h1-news .btn { justify-self: start; }
}
