/* Σχόλασμα: the page's own CSS.
   The system (assets/system.css, layout.css, motion.css) carries the page. This file holds only what is this
   school's own: its clock mark, the afternoon timeline, the timetable board, the "Δείγμα" tags, the map,
   and how each section packs into a phone screen. */

html { font-synthesis: none; }
h1, h2, h3 { hyphens: manual; }
h1, h2 { text-wrap: balance; }
/* the narrowest phones: the section headings a step smaller, so no last word stands alone */
@media (max-width: 374px) { :root { --t-h2: 27px; } }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------------------------------------------------------------- the mark: a clock at 13:15 */
.clock { width: 24px; height: 24px; flex: none; fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; }
.footer__mark { color: inherit; }
.footer__mark .clock { width: .78em; height: .78em; margin-right: .2em; stroke: currentColor; stroke-width: 2; }

/* ---------------------------------------------------------------- nav: the phone number beside the button */
.nav__tel { font-variant-numeric: tabular-nums lining-nums; }
@media (min-width: 1024px) and (max-width: 1279px) { .nav__actions > .nav__tel { display: none; } }

/* ---------------------------------------------------------------- the second button; icons; the call and Viber pair */
/* the tonal fill alone stands too close to the cream to read as a button: it keeps its fill and takes a line in the ink */
.btn--secondary { border-color: color-mix(in oklab, var(--ink) 42%, transparent); }
.btn .ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.btn:has(> .ico) { gap: var(--s-2); }
.contact-row .call-short { display: none; }
@media (max-width: 639px) {
  /* on a phone the call and Viber stand side by side as two real buttons, with short words */
  .contact-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); width: 100%; }
  .contact-row > .btn { width: 100%; height: 48px; }
  .contact-row > .btn--primary { grid-column: 1 / -1; }
  .contact-row > .btn--secondary { text-decoration: none; background: color-mix(in oklab, var(--ink) 8%, var(--bg)); border-color: color-mix(in oklab, var(--ink) 42%, transparent); }
  .contact-row .call-long { display: none; }
  .contact-row .call-short { display: inline; }
}

/* ---------------------------------------------------------------- hero: three lines of headline in the box */
.hero--photo h1 { max-width: none; }
.hero--photo .hero__lead { max-width: 44ch; }
/* a small laptop: the box takes a little more than half, so the headline keeps its three lines */
@media (min-width: 1024px) and (max-width: 1279px) { .hero--photo .hero__text { width: min(60%, 560px); } }
.hero__viber { display: none; }
@media (max-width: 1023px) { .hero__viber { display: inline-flex; } }
@media (max-width: 639px) { .lead-more { display: none; } }

/* ---------------------------------------------------------------- the afternoon: a vertical timeline */
.day-grid { align-items: stretch; }
.day { --tcol: 78px; --rail: 28px; --pad: var(--s-3); --gap: var(--s-4); position: relative; display: grid; align-content: start; gap: var(--gap); margin: 0; padding: 0; list-style: none; }
.day > li { position: relative; padding-left: calc(var(--tcol) + var(--rail) + var(--pad)); max-width: calc(var(--tcol) + var(--rail) + var(--pad) + 58ch); }
/* the dot of each step, and the piece of rail that runs from it down to the next one */
.day > li::before { content: ""; position: absolute; left: calc(var(--tcol) + var(--rail) / 2 - 6px); top: 7px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent); z-index: 1; }
.day > li:last-child::before { background: var(--accent); }
.day > li:not(:last-child)::after { content: ""; position: absolute; left: calc(var(--tcol) + var(--rail) / 2 - 1px); top: 23px; bottom: calc(-1 * var(--gap) - 3px); width: 2px; border-radius: 2px;
  background: color-mix(in oklab, var(--accent) 36%, var(--bg)); transform-origin: 50% 0; }
/* the hour stands beside the whole step, on the page's left line */
.day__time { position: absolute; left: 0; top: 0; width: var(--tcol); padding-top: 2px; font: 500 15px/22px var(--font-text); font-variant-numeric: tabular-nums lining-nums; color: var(--accent); white-space: nowrap; }
.day h3 { margin-bottom: 2px; font: 500 var(--t-card)/1.3 var(--font-text); letter-spacing: -0.01em; }
.day__photo { margin: 0; min-height: 0; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.day__photo > img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 72%; }
@media (min-width: 1024px) { .day__photo { position: relative; } .day__photo > img { position: absolute; inset: 0; } }
@media (max-width: 1023px) { .day__photo { aspect-ratio: 4 / 3; margin-top: var(--s-5); } }
@media (max-width: 639px) {
  .day { --tcol: 72px; --rail: 24px; }
  .day { --pad: var(--s-2); }
  .day__time { font-size: 14px; }
  .day__photo { aspect-ratio: 5 / 6; }
}

/* its one entrance: the six steps arrive in order and the rail grows from each to the next, once, when the list
   comes on screen. site.js adds .is-armed (hidden) only after its observer has answered that the list is off
   screen, then .is-in when it arrives. Opacity and transform only. Without script, if the observer never answers,
   or under reduced motion, the list simply stands. */
@media (prefers-reduced-motion: no-preference) {
  .day.is-armed.is-in > li { transition: opacity 560ms cubic-bezier(.22, 1, .36, 1), transform 560ms cubic-bezier(.22, 1, .36, 1); transition-delay: calc(var(--i, 0) * 130ms + 80ms); }
  .day.is-armed.is-in > li::after { transition: transform 620ms cubic-bezier(.22, 1, .36, 1); transition-delay: calc(var(--i, 0) * 130ms + 260ms); }
  .day.is-armed:not(.is-in) > li { opacity: 0; transform: translateY(10px); }
  .day.is-armed:not(.is-in) > li::after { transform: scaleY(0); }
  .day > li:nth-child(2) { --i: 1; } .day > li:nth-child(3) { --i: 2; } .day > li:nth-child(4) { --i: 3; }
  .day > li:nth-child(5) { --i: 4; } .day > li:nth-child(6) { --i: 5; }
}

/* ---------------------------------------------------------------- the timetable: the classes at the left, the board at the right */
/* two columns of three: Δημοτικό, then Γυμνάσιο */
.tt__tabs { display: grid; grid-auto-flow: column; grid-template-rows: repeat(3, auto); grid-auto-columns: minmax(0, 1fr); gap: var(--s-2) var(--s-3); }
.tt .tab { display: flex; align-items: center; height: 48px; padding: 0 var(--s-4); border-radius: var(--r-sm); font-size: var(--t-body); color: var(--ink); text-align: left; }
/* the chosen class in the page's one accent, the fill of its main button */
.tt .tab[aria-selected="true"] { color: var(--action-ink); background: var(--action); border-color: var(--action); }
.tt .m-tab-ind { background: var(--action); border-radius: var(--r-sm); }
html:not([data-motion="off"]) .tt .tabs.m-has-ind .tab[aria-selected="true"] { border-color: var(--action); }
.tt__note { margin-top: var(--s-5); max-width: 46ch; font-size: var(--t-small); line-height: 1.5; }
.tt__panel { padding: var(--s-7); border-radius: var(--r-lg); background: var(--p-inv-bg); color: var(--p-inv-ink);
  --ink: var(--p-inv-ink); --muted: var(--p-inv-muted); --line: color-mix(in oklab, var(--p-inv-ink) 20%, transparent); }
.tt__panel:focus-visible { outline: 2px solid var(--action); outline-offset: 3px; }
.tt__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-1) var(--s-5); margin-bottom: var(--s-5); }
.tt__title { font: var(--display-weight) var(--t-h3)/1.2 var(--font-display); letter-spacing: var(--display-tracking); }
.tt__head p:not(.tt__title) { color: var(--muted); }
.tt__sum { color: var(--ink); font-weight: 500; font-variant-numeric: lining-nums; }
.tt__year { display: none; }
.tt__table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums lining-nums; }
.tt__table :is(th, td) { padding: 13px var(--s-3) 13px 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; vertical-align: baseline; }
.tt__table thead th { padding-top: 0; font-size: var(--t-label); font-weight: 500; color: var(--muted); }
.tt__table tbody th { width: 22%; font-weight: 500; }
.tt__table td:nth-child(2) { width: 23%; }
.tt__table td b { margin-left: .4em; font-weight: 500; }
.tt__table .is-none { color: var(--muted); }
.tt__week { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-2) var(--s-5); margin-top: var(--s-5); }
.tt__week-label { flex-basis: 100%; font-size: var(--t-label); font-weight: 500; color: var(--muted); }
.tt__bar { display: block; flex-basis: 100%; width: 100%; height: 24px; border-radius: 6px; overflow: hidden; }
.tt__bar-s { fill: var(--p-inv-ink); }
.tt__bar-l { fill: color-mix(in oklab, var(--p-accent) 62%, var(--p-inv-ink)); }
.tt__hours dt::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 2px; background: color-mix(in oklab, var(--p-accent) 62%, var(--p-inv-ink)); }
.tt__hours > div:first-child dt::before { background: var(--p-inv-ink); }
/* a new class's board: its bar fills from the left, once (transform only; still under reduced motion) */
@media (prefers-reduced-motion: no-preference) {
  .tt__bar rect { transform-box: fill-box; transform-origin: 0 50%; transition: transform 520ms cubic-bezier(.22, 1, .36, 1); }
  .tt__bar rect:nth-child(2) { transition-delay: 60ms; } .tt__bar rect:nth-child(3) { transition-delay: 100ms; }
  .tt__bar rect:nth-child(4) { transition-delay: 140ms; } .tt__bar rect:nth-child(5) { transition-delay: 180ms; }
  @starting-style { .tt__panel:not([hidden]) .tt__bar rect { transform: scaleX(0); } }
}
.tt__hours { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-5); margin: 0; }
.tt__hours > div { display: flex; align-items: baseline; gap: var(--s-2); }
.tt__hours dt { font-size: var(--t-small); color: var(--muted); }
.tt__hours dd { margin: 0; font-weight: 500; font-variant-numeric: lining-nums; }
/* with script: one class at a time. Until system.js has hidden the others, only the first shows (no flash of six). */
html.js .tt__panels:not(:has([hidden])) > .tt__panel ~ .tt__panel { display: none; }
/* without script: no switcher, every class listed one under the other */
html:not(.js) .tt__nav .tt__tabs { display: none; }
html:not(.js) .tt__panel + .tt__panel { margin-top: var(--s-5); }
html:not(.js) #programma { height: auto; }
@media (max-width: 1023px) {
  .tt__tabs { grid-auto-flow: row; grid-template-rows: none; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tt .tab { justify-content: center; padding: 0 var(--s-2); text-align: center; }
  .tt__note { max-width: none; margin-top: var(--s-4); }
  .tt__panels { margin-top: var(--s-5); }
}
@media (max-width: 639px) {
  /* one phone screen: the heading, six classes in two rows, the board with the week as five short lines */
  #programma .section-head p, .tt__note, .tt__week-label { display: none; }
  .tt__week { gap: var(--s-2); margin-top: var(--s-3); }
  .tt__hours { gap: 2px var(--s-3); }
  .tt__hours dt, .tt__hours dd { font-size: 13px; }
  .tt__tabs { gap: 6px; }
  .tt .tab { height: 44px; padding: 0 2px; font-size: 14px; }
  .tt__panels { margin-top: var(--s-4); }
  .tt__panel { padding: var(--s-5); }
  .tt__head { margin-bottom: var(--s-3); }
  .tt__head p:not(.tt__title) { font-size: var(--t-small); }
  .tt__year { display: inline; }
  .tt__table :is(thead, tbody) { display: block; }
  .tt__table tr { display: grid; grid-template-columns: 78px 92px minmax(0, 1fr); column-gap: var(--s-2); align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .tt__table thead tr { padding-top: 0; }
  .tt__table :is(th, td) { width: auto !important; padding: 0; border: 0; font-size: 14px; line-height: 1.5; }
  .tt__table td b { display: block; margin-left: 0; }
}
@media (max-width: 359px) {
  .tt__tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tt__table tr { grid-template-columns: 70px 84px minmax(0, 1fr); }
  .tt__table :is(th, td) { font-size: 13px; }
}

/* ---------------------------------------------------------------- study group or booster group: two short columns */
.duo .card > .panel--top { aspect-ratio: 3 / 1; min-height: 0; margin: 0 0 var(--s-5); border-radius: var(--r-lg); }
.duo .panel > .frame__img { object-position: 50% var(--py, 50%); }
/* on a phone each part is one screen (.g2m): the question and the study group, then the booster group;
   wider, the parts step aside and the two groups stand side by side under the question */
@media (min-width: 640px) {
  .duo { row-gap: 0; }
  .duo__part { display: contents; }
  .duo__part > .section-head { grid-column: 1 / -1; }
}
@media (min-width: 640px) and (max-width: 1023px) {
  .duo__part > .card { grid-column: auto / span 6; }
  .duo .card > .panel--top { aspect-ratio: 4 / 3; }
}
.facts { display: grid; margin: var(--s-4) 0 0; }
.facts > div { display: grid; grid-template-columns: 124px minmax(0, 1fr); column-gap: var(--s-4); padding: var(--s-3) 0; border-bottom: 1px solid var(--line); }
.facts > div:first-child { padding-top: 0; }
.facts dt { padding-top: 3px; font-size: var(--t-label); font-weight: 500; color: var(--muted); }
.facts dd { margin: 0; }
@media (max-width: 639px) {
  /* one phone screen: the two columns one under the other, as words only */
  #tmimata .section-head p { display: none; }
  .duo .card > .panel--top { aspect-ratio: 4 / 3; margin-bottom: var(--s-4); }
  .facts { margin-top: var(--s-3); }
  .facts > div { grid-template-columns: 104px minmax(0, 1fr); column-gap: var(--s-3); padding: var(--s-2) 0; }
}

/* ---------------------------------------------------------------- teachers, and the group size as the fourth tile */
.people .tile { gap: var(--s-3); }
.people .tile__facts { margin-top: calc(-1 * var(--s-2)); }
/* as tall as the portraits beside it, its words at its foot */
.group-size { display: flex; flex-direction: column; justify-content: flex-end; gap: var(--s-3); align-self: stretch; padding: var(--s-5); border-radius: var(--r-lg); background: var(--surface); }
.group-size__n { font: var(--display-weight) var(--t-h2)/1 var(--font-display); font-variant-numeric: lining-nums; color: var(--accent); }
.group-size__t { max-width: 26ch; }
.sample { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--p-bg); color: var(--p-ink);
  font: 500 var(--t-label)/1 var(--font-text); letter-spacing: 0.01em; white-space: nowrap; }
.tile__media > .sample { position: absolute; left: 12px; top: 12px; z-index: 1; }
.sample--line { margin-left: var(--s-2); vertical-align: 0.18em; background: none; border: 1px solid var(--line-strong); }
@media (min-width: 640px) and (max-width: 1023px) {
  /* a tablet held upright: two by two, on two of its screens; the trial and the visit cut to one */
  #apogevma, #daskaloi { --h: 2; }
  .form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .form > .field--full:has(select) { grid-column: auto; }
}
@media (max-width: 639px) {
  /* one phone screen: the heading, three faces and the group size, two by two */
  .people { row-gap: var(--s-4); }
  .people .tile { gap: var(--s-2); }
  .people .tile--portrait { --tile-ratio: 1 / 1; }
  .people .tile__media > img { object-position: 50% 18%; }
  .people .tile__media > .sample { left: 8px; top: 8px; }
  .people .tile:not(.group-size) > p:not(.tile__facts) { display: none; }
  .people .tile__facts { margin-top: -6px; font-size: var(--t-label); }
  .group-size { padding: var(--s-4); gap: var(--s-2); }
  .group-size__t { font-size: var(--t-small); line-height: 1.45; }
}

/* ---------------------------------------------------------------- progress, the trial, the visit */
#enimerosi .grid { align-items: stretch; }
.note-photo { --ratio: 0px; min-height: 320px; }
.note-photo > .frame__img { object-position: 50% 42%; }
@media (max-width: 1023px) { .note-photo { --ratio: 46%; min-height: 0; margin-top: var(--s-5); } }
@media (max-width: 639px) {
  /* one phone screen: three rhythms and a band of the desk */
  #enimerosi .section-head p, #enimerosi .row-wide { display: none; }
  .note-photo { --ratio: 34%; margin-top: var(--s-4); }
}

.rows--plain > li { grid-template-columns: minmax(0, 1fr); }
.trial .rows { margin-bottom: var(--s-6); }
.form-card { padding: var(--s-7); border-radius: var(--r-lg); background: var(--surface); }
.form-card .field :is(input, select, textarea) { background: var(--bg); }
.form-card .form { accent-color: var(--accent); caret-color: var(--accent); }
.form-card textarea { min-height: 96px; }
@media (max-width: 1023px) { .form-card { margin-top: var(--s-5); padding: var(--s-6); } }
@media (max-width: 639px) {
  .trial .rows { margin-bottom: var(--s-5); }
  .form-card { margin-top: 0; padding: var(--s-5); }
  .form { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
  .form-card textarea { min-height: 72px; }
}

.visit-text > * + * { margin-top: var(--s-5); }
.visit-text > .section-head { margin-bottom: 0; }
.visit-way { max-width: 42ch; }
.visit-text .hours { max-width: 400px; }
@media (max-width: 639px) {
  .visit-text > * + * { margin-top: var(--s-4); }
  .visit-link { display: none; }
}

/* the map: the real streets round the square, baked from OpenStreetMap, drawn in the page's colours. Still. */
.map { --ratio: 80%; background: var(--surface); }
.map__svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map__land { fill: var(--surface); }
.map__green { fill: color-mix(in oklab, #7d8a4a 30%, var(--surface)); }
.map__water { fill: color-mix(in oklab, #6f9bb0 38%, var(--surface)); }
.map__svg path:not(.map__green, .map__water, .map__plaza) { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.map__path { display: none; }
.map__minor { stroke: var(--bg); stroke-width: 6; }
.map__case { stroke: color-mix(in oklab, var(--ink) 13%, var(--surface)); stroke-width: 12; }
.map__case--major { stroke-width: 17; }
.map__street { stroke: var(--bg); stroke-width: 9.5; }
.map__major { stroke: #fffaf1; stroke-width: 14; }
.map__names text { font: 500 17px var(--font-text); letter-spacing: 0.02em; fill: var(--muted); paint-order: stroke; stroke: var(--bg); stroke-width: 4px; stroke-linejoin: round; }
.map__halo { fill: var(--accent); opacity: .18; }
.map__dot { fill: var(--accent); stroke: var(--p-bg); stroke-width: 4; }
.map__tag rect { fill: var(--p-bg); stroke: color-mix(in oklab, var(--ink) 18%, transparent); stroke-width: 1; }
.map__tag text { font: 500 20px var(--font-text); fill: var(--ink); }
@media (max-width: 1023px) { .map { --ratio: 34%; margin-top: var(--s-5); } }
@media (max-width: 639px) {
  .map { --ratio: 62%; margin-top: var(--s-4); }
  .map__names text:not(.is-main) { display: none; }
  .map__names text { font-size: 26px; stroke-width: 6px; }
  .map__pin { transform: scale(1.55); }
}

/* ---------------------------------------------------------------- the close on the deep olive */
.close__media > picture { display: contents; }
.close__media img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: var(--pos, 50% 50%); }
.footer__legal > span { max-width: 62ch; }
.credits > summary::after { content: "Πηγές"; }
.credits[open] > summary::after { content: "Απόκρυψη"; }
@media (max-width: 639px) {
  /* one phone screen: the phone's menu already lists the sections */
  .closing__links .footer__col { display: none; }
  .close__media img { object-position: 50% 50%; }
}

/* ---------------------------------------------------------------- the phone bar: call, Viber, the trial */
@media (max-width: 639px) {
  .actionbar--three { grid-auto-flow: row; grid-template-columns: 86px 86px minmax(0, 1fr); gap: var(--s-2); }
  .actionbar--three .btn { padding-inline: var(--s-2); gap: 6px; font-size: var(--t-small); }
  .actionbar--three .btn--primary { white-space: normal; text-align: center; line-height: 1.15; }
}
@media (max-width: 359px) {
  .actionbar--three { grid-template-columns: 62px 62px minmax(0, 1fr); padding-inline: var(--s-4); }
  .actionbar--three .ico { display: none; }
}
