/* ============================================================
   LAUGH SCHOOL™ — style refresh
   Motion & surface vocabulary remixed from react-bits
   (github.com/DavidHDev/react-bits): aurora field, spotlight
   cards, shiny text, gradient display type, count-up, click
   spark, magnet buttons — rewritten as dependency-free CSS/JS.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --gold: #FFC53D;
  --magenta: #FF4F81;
  --violet: #8A5CF6;
  --mint: #3FE0A8;

  --font-display: "Sofia Sans Extra Condensed", "Fira Sans Condensed", system-ui, sans-serif;
  --font-body: "Commissioner", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1140px;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 26px;

  --step: clamp(3.5rem, 7vw, 6rem);      /* section rhythm */
  --ease: cubic-bezier(.22, 1, .36, 1);
}

:root[data-theme="dark"] {
  --bg: #100A1C;
  --bg-deep: #08050F;
  --panel: rgba(255, 255, 255, .045);
  --panel-2: rgba(255, 255, 255, .08);
  --line: rgba(255, 255, 255, .11);
  --line-strong: rgba(255, 255, 255, .2);
  --text: #EFE9FB;
  --muted: #A79FC0;
  --glow: rgba(255, 197, 61, .3);
  --spot: rgba(255, 255, 255, .1);
  --shadow: 0 24px 60px rgba(3, 1, 10, .55);
}

:root[data-theme="light"] {
  --bg: #F5F1FF;
  --bg-deep: #EDE6FF;
  --panel: rgba(24, 12, 46, .045);
  --panel-2: rgba(24, 12, 46, .07);
  --line: rgba(24, 12, 46, .14);
  --line-strong: rgba(24, 12, 46, .28);
  --text: #1C1130;
  --muted: #5D5280;
  --glow: rgba(138, 92, 246, .28);
  --spot: rgba(138, 92, 246, .12);
  --shadow: 0 22px 50px rgba(50, 26, 92, .16);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.62;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 900; line-height: .95; margin: 0; letter-spacing: .01em; }

::selection { background: var(--gold); color: #12091F; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 99;
  background: var(--gold); color: #12091F; padding: .7rem 1.1rem; border-radius: 0 0 var(--r-sm) 0;
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { left: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Aurora field + dot veil ---------- */
.aurora {
  position: fixed; inset: 0; z-index: -2; overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% -10%, var(--bg-deep), transparent 60%),
    var(--bg);
}
.aurora__blob {
  position: absolute; display: block;
  width: 58vmax; height: 58vmax; border-radius: 50%;
  filter: blur(90px); opacity: .38;
  will-change: transform;
}
.aurora__blob--violet  { background: var(--violet);  top: -22vmax; left: -14vmax; animation: drift-a 26s ease-in-out infinite; }
.aurora__blob--magenta { background: var(--magenta); top: 6vmax;  right: -20vmax; opacity: .3; animation: drift-b 32s ease-in-out infinite; }
.aurora__blob--gold    { background: var(--gold);    top: 52vmax; left: 18vmax; opacity: .18; animation: drift-c 38s ease-in-out infinite; }

:root[data-theme="light"] .aurora__blob { opacity: .3; filter: blur(110px); }
:root[data-theme="light"] .aurora__blob--gold { opacity: .32; }

@keyframes drift-a { 50% { transform: translate3d(10vmax, 8vmax, 0) scale(1.12); } }
@keyframes drift-b { 50% { transform: translate3d(-12vmax, 10vmax, 0) scale(.9); } }
@keyframes drift-c { 50% { transform: translate3d(8vmax, -12vmax, 0) scale(1.08); } }

.grid-veil {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(currentColor 1px, transparent 1px);
  background-size: 26px 26px;
  color: var(--line);
  opacity: .5;
  -webkit-mask-image: radial-gradient(70% 55% at 50% 26%, #000 0%, transparent 78%);
  mask-image: radial-gradient(70% 55% at 50% 26%, #000 0%, transparent 78%);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  max-width: var(--wrap); margin: 0 auto;
  display: flex; align-items: center; gap: 1rem;
  padding: .7rem clamp(1rem, 4vw, 2rem);
}
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; }
.brand__mark { font-size: 1.4rem; filter: drop-shadow(0 0 12px var(--glow)); }
.brand__name {
  font-family: var(--font-display); font-weight: 900;
  font-size: 1.55rem; letter-spacing: .02em; text-transform: uppercase;
}
.brand__name sup { font-size: .5em; opacity: .6; }

.nav__links { margin-left: auto; display: flex; align-items: center; gap: .25rem; }
.nav__links a {
  text-decoration: none; color: var(--muted);
  font-size: .95rem; font-weight: 500;
  padding: .5rem .7rem; border-radius: 999px;
  transition: color .2s, background .2s;
}
.nav__links a:hover { color: var(--text); background: var(--panel); }
.nav__links a.is-here { color: var(--text); background: var(--panel-2); }
.nav__mc {
  border: 1px solid var(--line-strong);
  color: var(--text) !important;
}
.nav__mc:hover { border-color: var(--mint); color: var(--mint) !important; }

.nav__tools { display: flex; gap: .4rem; align-items: center; }
.icon-btn {
  border: 1px solid var(--line); background: var(--panel);
  color: var(--text); font-size: 1.05rem;
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; cursor: pointer;
  transition: transform .18s var(--ease), border-color .2s;
}
.icon-btn:hover { transform: translateY(-2px); border-color: var(--line-strong); }

.nav__burger { display: none; flex-direction: column; gap: 4px; }
.nav__burger span { width: 17px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .25s var(--ease), opacity .2s; }
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--wrap); margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5rem) clamp(1rem, 4vw, 2rem) clamp(2rem, 5vw, 3.5rem);
  text-align: center;
  position: relative;
}

.hero__seal { position: relative; width: 132px; height: 132px; margin: 0 auto .4rem; }
.seal { width: 100%; height: 100%; animation: spin 44s linear infinite; }
.seal__ring { fill: none; stroke: var(--line-strong); stroke-width: 1.5; }
.seal__ring--inner { stroke: var(--gold); stroke-dasharray: 3 7; opacity: .7; }
.seal__text {
  fill: var(--gold);
  font-family: var(--font-body);
  font-size: 13.5px; font-weight: 600; letter-spacing: .12em;
}
.hero__seal-face {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 2.4rem; filter: drop-shadow(0 0 22px var(--glow));
}
@keyframes spin { to { transform: rotate(360deg); } }

.hero__stamp {
  display: inline-flex; align-items: center; gap: .5rem;
  margin: 0 0 1.2rem;
  padding: .38rem .9rem;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--panel);
  font-size: .86rem; color: var(--muted);
}
.hero__stamp span { filter: none; }

.hero__title {
  font-size: clamp(4.4rem, 19vw, 13rem);
  line-height: .82;
  text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center;
  margin-bottom: .5rem;
}
.hero__word {
  background: linear-gradient(100deg, var(--gold) 0%, var(--magenta) 48%, var(--violet) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  animation: sweep 9s linear infinite;
}
.hero__word:nth-child(2) { animation-delay: -4.5s; }
@keyframes sweep { to { background-position: 200% 0; } }

/* ShinyText — a light pass travelling across the quote */
.shiny {
  background: linear-gradient(100deg, var(--muted) 40%, var(--text) 50%, var(--muted) 60%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  animation: shine 5.5s linear infinite;
}
@keyframes shine { to { background-position: -220% 0; } }

.hero__quote {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.15rem, 3.4vw, 1.9rem);
  letter-spacing: .02em;
  margin: 0 0 .6rem;
}
.hero__lede {
  color: var(--muted);
  max-width: 46ch; margin: 0 auto 1.9rem;
  font-size: 1.02rem;
}

.hero__cta { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; }

/* ---------- Buttons ---------- */
.btn {
  --spark: var(--gold);
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .78rem 1.35rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--text);
  font: 600 1rem/1 var(--font-body);
  text-decoration: none; cursor: pointer;
  transition: transform .2s var(--ease), background .2s, border-color .2s, box-shadow .25s;
}
.btn:hover { background: var(--panel-2); border-color: var(--text); }
.btn:active { transform: scale(.97); }

.btn--primary {
  --spark: #2A1400;
  background: linear-gradient(100deg, var(--gold), #FFAF3D);
  border-color: transparent; color: #180C00;
  box-shadow: 0 10px 30px -10px var(--glow);
}
.btn--primary:hover { background: linear-gradient(100deg, #FFD469, var(--gold)); border-color: transparent; }

.btn--ghost { background: transparent; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.spark {
  position: absolute; width: 6px; height: 6px; border-radius: 50%;
  background: var(--spark); pointer-events: none;
  animation: spark .5s var(--ease) forwards;
}
@keyframes spark {
  from { transform: translate(-50%, -50%) scale(1); opacity: .9; }
  to   { transform: translate(-50%, -50%) scale(0) translate(var(--dx), var(--dy)); opacity: 0; }
}

/* ---------- Stats ---------- */
.stats {
  display: flex; justify-content: center; gap: clamp(2rem, 8vw, 5rem);
  margin: 2.6rem 0 0;
}
.stat { text-align: center; display: flex; flex-direction: column-reverse; }
.stat__num {
  margin: 0;
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(3rem, 9vw, 4.6rem); line-height: 1;
  color: var(--gold);
  text-shadow: 0 0 38px var(--glow);
}
.stat__label { color: var(--muted); font-size: .92rem; }

/* ---------- Ticker ---------- */
.ticker {
  border-block: 1px solid var(--line);
  background: var(--panel);
  overflow: hidden; padding: .65rem 0;
  margin-top: 1.5rem;
}
.ticker__track { display: flex; width: max-content; animation: roll 42s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__group { display: flex; }
.ticker b {
  font-weight: 600; font-size: .92rem; color: var(--muted);
  padding: 0 1.6rem; white-space: nowrap;
  border-right: 1px solid var(--line);
}
@keyframes roll { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section {
  max-width: var(--wrap); margin: 0 auto;
  padding: var(--step) clamp(1rem, 4vw, 2rem) 0;
}
.section__head { max-width: 60ch; margin-bottom: 2.4rem; }
.eyebrow {
  margin: 0 0 .5rem; color: var(--gold);
  font-size: .82rem; font-weight: 600; letter-spacing: .04em;
}
.section__title { font-size: clamp(2.4rem, 6.5vw, 3.9rem); margin-bottom: .55rem; }
.section__lede { margin: 0; color: var(--muted); }

/* ---------- Ανακοινώσεις ---------- */
.board { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.notice {
  display: grid; grid-template-columns: 92px 1fr; gap: 1.4rem;
  padding: 1.5rem clamp(1rem, 3vw, 2rem);
  background: var(--bg);
  position: relative;
  transition: background .25s;
}
.notice:hover { background: var(--panel); }
.notice::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(var(--gold), var(--magenta));
  transform: scaleY(0); transform-origin: top; transition: transform .3s var(--ease);
}
.notice:hover::before { transform: scaleY(1); }

.notice__date {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--r-md);
  padding: .5rem; height: fit-content;
  background: var(--panel);
}
.notice__date b { font-family: var(--font-display); font-size: 2rem; line-height: 1; color: var(--gold); }
.notice__date span { font-size: .72rem; color: var(--muted); }

.notice__title { font-size: 1.5rem; margin-bottom: .25rem; }
.notice__body p { margin: 0; color: var(--muted); }
.notice__body strong { color: var(--text); font-weight: 600; }

/* ---------- Καθηγητές (spotlight cards) ---------- */
.faculty {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
}
.card {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--panel);
  padding: 1.4rem 1.2rem;
  transition: border-color .25s, transform .25s var(--ease);
}
.card:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.spot::before {
  content: ""; position: absolute; inset: -1px; pointer-events: none;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 0%), var(--spot), transparent 68%);
  opacity: 0; transition: opacity .3s;
}
.spot:hover::before { opacity: 1; }
.card__face { font-size: 2rem; display: block; margin-bottom: .55rem; }
.card h3 { font-size: 1.4rem; margin-bottom: .15rem; }
.card p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.45; }

/* ---------- Αστεία ---------- */
.jokes { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); overflow: hidden; }
.jokes__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .9rem clamp(1rem, 3vw, 1.6rem);
  border-bottom: 1px solid var(--line);
}
.jokes__collection { margin: 0; font-weight: 600; font-size: .95rem; }
.jokes__counter { margin: 0; color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }

.jokes__stage {
  position: relative;
  display: grid;
  padding: clamp(2rem, 6vw, 3.4rem) clamp(1.2rem, 4vw, 3rem);
  min-height: 210px;
  outline-offset: -3px;
}
.joke {
  grid-area: 1 / 1;
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: opacity .3s, transform .35s var(--ease), visibility .3s;
}
.joke.is-active { opacity: 1; visibility: visible; transform: none; }
.joke__tag { margin: 0 0 .8rem; color: var(--gold); font-size: .82rem; font-weight: 600; }
.joke__text {
  margin: 0; max-width: 62ch;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2.3rem); line-height: 1.16;
}

.jokes__nav {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem clamp(1rem, 3vw, 1.6rem);
  border-top: 1px solid var(--line);
}
.dots { display: flex; gap: .45rem; }
.dots button {
  width: 9px; height: 9px; padding: 0; border-radius: 50%;
  border: 1px solid var(--line-strong); background: transparent; cursor: pointer;
  transition: background .2s, transform .2s;
}
.dots button.is-on { background: var(--gold); border-color: var(--gold); transform: scale(1.25); }

/* ---------- Ορκωμοσία ---------- */
.grad { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.2rem, 3vw, 2.2rem); align-items: start; }
.grad__panel {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--panel); padding: clamp(1.4rem, 3vw, 2rem);
}
.grad__kicker { margin: 0 0 .5rem; font-family: var(--font-display); font-size: 1.7rem; font-weight: 900; }
.grad__copy { margin: 0 0 1.6rem; color: var(--muted); }
.grad__label { margin: 0 0 .7rem; font-weight: 600; font-size: .95rem; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.6rem; }
.chip {
  position: relative; overflow: hidden;
  --spark: var(--gold);
  border: 1px solid var(--line-strong); background: transparent; color: var(--muted);
  padding: .5rem .9rem; border-radius: 999px; cursor: pointer;
  font: 500 .92rem/1 var(--font-body);
  transition: color .2s, border-color .2s, background .2s, transform .2s var(--ease);
}
.chip:hover { color: var(--text); transform: translateY(-2px); }
.chip.is-on { background: var(--text); color: var(--bg); border-color: var(--text); }

/* Certificate — tilted card */
.cert { margin: 0; perspective: 1000px; }
.cert__sheet {
  border-radius: var(--r-lg);
  padding: clamp(1.6rem, 4vw, 2.4rem) clamp(1.2rem, 3vw, 2rem);
  text-align: center;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255, 197, 61, .16), transparent 60%),
    linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .4s var(--ease);
  transform-style: preserve-3d;
}
.cert__sheet::after {
  content: ""; position: absolute; inset: 10px; border: 1px dashed var(--line-strong);
  border-radius: calc(var(--r-lg) - 10px); pointer-events: none;
}
.cert { position: relative; }
.cert__crest { margin: 0; font-size: 2.4rem; filter: drop-shadow(0 0 20px var(--glow)); }
.cert__school { margin: .2rem 0 0; font-family: var(--font-display); font-weight: 900; font-size: 2rem; text-transform: uppercase; letter-spacing: .04em; }
.cert__kind { margin: 0 0 1.1rem; font-size: .82rem; color: var(--muted); letter-spacing: .12em; }
.cert__class {
  margin: 0 auto 1rem; display: inline-block;
  padding: .38rem 1rem; border-radius: 999px;
  border: 1px solid var(--gold); color: var(--gold); font-weight: 600; font-size: .95rem;
}
.cert__line { margin: 0 0 1.4rem; color: var(--muted); }
.cert__name {
  margin: 0 0 .5rem; font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.7rem, 4.5vw, 2.6rem); line-height: 1.05;
  border-bottom: 1px solid var(--line-strong); padding-bottom: .6rem;
}
.cert__teacher { margin: 0 0 1.5rem; font-size: .9rem; color: var(--muted); }
.cert__foot { margin: 0; font-size: .76rem; color: var(--muted); letter-spacing: .06em; }

/* ---------- Footer ---------- */
.foot {
  margin-top: var(--step);
  border-top: 1px solid var(--line);
  background: var(--panel);
  padding: clamp(2rem, 5vw, 3rem) clamp(1rem, 4vw, 2rem) 2.5rem;
  text-align: center;
}
.foot__top {
  max-width: var(--wrap); margin: 0 auto 1.4rem;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
}
.foot__links { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; justify-content: center; }
.foot__links a { color: var(--muted); text-decoration: none; font-size: .92rem; }
.foot__links a:hover { color: var(--text); }
.foot__legal { margin: 0; font-size: .9rem; color: var(--muted); }
.foot__credit { margin: .3rem 0 0; font-size: .82rem; color: var(--muted); opacity: .7; }

/* ---------- Modals ---------- */
.modal {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  padding: 1.2rem;
  background: rgba(6, 3, 14, .62);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  animation: fade .2s var(--ease);
}
.modal[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }

.modal__panel {
  position: relative;
  width: min(460px, 100%);
  background: var(--bg);
  border: 1px solid var(--line-strong); border-radius: var(--r-lg);
  padding: clamp(1.5rem, 4vw, 2rem);
  box-shadow: var(--shadow);
  animation: pop .28s var(--ease);
}
.modal__panel--slim { width: min(400px, 100%); }
@keyframes pop { from { transform: translateY(14px) scale(.97); opacity: 0; } }

.modal__title { font-size: 1.75rem; margin-bottom: 1.3rem; }
.modal__close {
  position: absolute; top: .8rem; inset-inline-end: .8rem;
  width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
  cursor: pointer;
}
.modal__actions { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1.4rem; }

.switch {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .85rem 0; border-bottom: 1px solid var(--line);
  cursor: pointer; font-size: .98rem;
}
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch__track {
  flex: none; width: 46px; height: 26px; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--line-strong);
  position: relative; transition: background .25s, border-color .25s;
}
.switch__track::after {
  content: ""; position: absolute; top: 2px; inset-inline-start: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--muted); transition: transform .25s var(--ease), background .25s;
}
.switch input:checked + .switch__track { background: var(--gold); border-color: var(--gold); }
.switch input:checked + .switch__track::after { transform: translateX(20px); background: #180C00; }
.switch input:focus-visible + .switch__track { outline: 3px solid var(--gold); outline-offset: 3px; }
.switch + .switch { border-bottom: 1px solid var(--line); }
.modal__panel .switch:last-of-type { margin-bottom: 1.5rem; }

.field { display: block; margin-bottom: .4rem; }
.field span { display: block; margin-bottom: .5rem; color: var(--muted); font-size: .95rem; }
.field input, .input {
  width: 100%; padding: .8rem 1rem;
  border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--panel); color: var(--text);
  font: 500 1rem/1.3 var(--font-body);
}
.field input:focus, .input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--glow); }
.field__error { margin: .4rem 0 0; color: var(--magenta); font-size: .85rem; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; z-index: 70;
  left: 50%; bottom: 24px; transform: translate(-50%, 20px);
  padding: .7rem 1.2rem; border-radius: 999px;
  background: var(--text); color: var(--bg);
  font-weight: 600; font-size: .92rem;
  opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ============================================================
   Minecraft server page
   ============================================================ */
.mc { max-width: 900px; margin: 0 auto; padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 4vw, 2rem) 0; }
.mc__head { text-align: center; margin-bottom: 2.4rem; }
.mc__title { font-size: clamp(2.6rem, 8vw, 4.4rem); margin-bottom: .6rem; }
.mc__lede { color: var(--muted); max-width: 52ch; margin: 0 auto; }

.probe {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--panel); padding: clamp(1.2rem, 3vw, 1.6rem);
  display: grid; gap: .9rem;
}
.seg { display: inline-flex; padding: 4px; gap: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); width: fit-content; }
.seg button {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  padding: .45rem 1.1rem; border-radius: 999px;
  font: 600 .92rem/1 var(--font-body); transition: background .2s, color .2s;
}
.seg button.is-on { background: var(--gold); color: #180C00; }
.probe__row { display: flex; gap: .6rem; flex-wrap: wrap; }
.probe--addresses { margin-top: 1.2rem; }
.probe__title { font-size: 1.6rem; margin: 0 0 .2rem; }
.presets { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.presets__label { color: var(--muted); font-size: .88rem; margin-inline-end: .2rem; }
.presets .chip.is-on { background: var(--gold); color: #180C00; border-color: var(--gold); }
.probe__row .input { flex: 1 1 240px; width: auto; }

.state { text-align: center; padding: clamp(2rem, 6vw, 3rem) 1rem; }
.state__icon { font-size: 2.6rem; margin: 0 0 .7rem; }
.state__title { font-size: 2rem; margin-bottom: .4rem; }
.state p { margin: 0 auto; color: var(--muted); max-width: 42ch; }
.state .btn { margin-top: 1.2rem; }

.pinging { display: flex; align-items: center; justify-content: center; gap: .7rem; color: var(--muted); padding: 2.4rem 1rem; }
.pinging::before {
  content: ""; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--line-strong); border-top-color: var(--gold);
  animation: spin 1s linear infinite;
}

.result { display: grid; gap: 1rem; }
.result__head {
  display: flex; gap: 1.1rem; align-items: center; flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--panel); padding: 1.2rem;
}
.result__icon { width: 64px; height: 64px; border-radius: 14px; image-rendering: pixelated; border: 1px solid var(--line); background: var(--bg); }
.result__id { flex: 1 1 200px; min-width: 0; }
.result__name { font-size: 1.9rem; margin-bottom: .2rem; overflow-wrap: anywhere; }
.result__motd { margin: 0; color: var(--muted); font-size: .95rem; overflow-wrap: anywhere; }

.pill {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .35rem .8rem; border-radius: 999px;
  font-size: .82rem; font-weight: 600;
  border: 1px solid var(--line-strong);
}
.pill--on { color: var(--mint); border-color: color-mix(in srgb, var(--mint) 50%, transparent); }
.pill--off { color: var(--magenta); border-color: color-mix(in srgb, var(--magenta) 50%, transparent); }
.pill i {
  width: 8px; height: 8px; border-radius: 50%; background: currentColor;
  box-shadow: 0 0 0 0 currentColor; animation: ping 2s ease-out infinite;
}
@keyframes ping { 70%, 100% { box-shadow: 0 0 0 7px transparent; } }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.fact { background: var(--bg); padding: 1.1rem 1.2rem; }
.fact dt { color: var(--muted); font-size: .82rem; margin-bottom: .25rem; }
.fact dd { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; overflow-wrap: anywhere; }

.players { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.2rem; background: var(--panel); }
.players h2 { font-size: 1.6rem; margin-bottom: .8rem; }
.players ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.players li {
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: .35rem .85rem; font-size: .9rem;
}
.players p { margin: 0; color: var(--muted); }

.mc__note { text-align: center; color: var(--muted); font-size: .85rem; padding: 2.5rem 1rem 3rem; }
.mc__note a { color: var(--gold); }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .grad { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav__burger { display: inline-flex; }
  .nav__links {
    position: absolute; inset-inline: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: .2rem;
    padding: .8rem clamp(1rem, 4vw, 2rem) 1.2rem;
    background: var(--bg); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: .75rem .9rem; }
  .nav__mc { text-align: center; margin-top: .4rem; }

  .notice { grid-template-columns: 1fr; gap: .9rem; }
  .notice__date { flex-direction: row; gap: .5rem; width: fit-content; padding: .35rem .8rem; }
  .notice__date b { font-size: 1.3rem; }

  .jokes__nav { flex-direction: column-reverse; }
  .jokes__nav .btn { width: 100%; justify-content: center; }
  .foot__top { justify-content: center; }
}

@media (max-width: 420px) {
  .hero__cta .btn { width: 100%; justify-content: center; }
  .stats { gap: 2rem; }
}

/* ---------- Motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .aurora__blob, .seal, .ticker__track, .hero__word, .shiny, .pill i { animation: none !important; }
  .shiny { color: var(--text); -webkit-text-fill-color: currentColor; }
  .hero__word { -webkit-text-fill-color: currentColor; color: var(--gold); }
  * { transition-duration: .01ms !important; }
}

@media print {
  .nav, .ticker, .hero__cta, .jokes__nav, .modal, .aurora, .grid-veil { display: none !important; }
  body { background: #fff; color: #000; }
}


/* ============================================================
   Scroll motion
   ============================================================ */
.progress {
  position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%;
  transform: scaleX(var(--p, 0)); transform-origin: left;
  background: linear-gradient(90deg, var(--gold), var(--magenta), var(--violet));
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s var(--ease), transform .7s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* the hero drifts a touch slower than the page */
.hero__seal, .hero__stamp { will-change: transform; }

/* ============================================================
   Πλήρη μαθήματα
   ============================================================ */
.courses-tools {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap; margin-bottom: 1.1rem;
}
.courses-tools__note { margin: 0; color: var(--muted); font-size: .9rem; }

.syllabus { display: grid; gap: .8rem; }

.course {
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--panel);
  overflow: hidden;
  transition: border-color .25s, background .25s;
}
.course:hover { border-color: var(--line-strong); }
.course[open] { background: var(--panel-2); border-color: var(--line-strong); }

.course__top {
  display: grid;
  grid-template-columns: 86px 1fr auto auto 34px;
  align-items: center; gap: 1rem;
  padding: 1.1rem clamp(1rem, 3vw, 1.6rem);
  cursor: pointer;
  list-style: none;
}
.course__top::-webkit-details-marker { display: none; }
.course__top:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }

.course__code {
  font-family: var(--font-display); font-weight: 800; font-size: 1.15rem;
  letter-spacing: .06em; color: var(--gold);
}
.course__name { font-weight: 600; line-height: 1.3; }
.course__teacher { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.course__chev {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  transition: transform .3s var(--ease), background .25s, color .25s;
}
.course__chev::before { content: "+"; font-size: 1.2rem; line-height: 1; }
.course[open] .course__chev { transform: rotate(135deg); background: var(--gold); color: #180C00; border-color: var(--gold); }

.course__body {
  padding: 0 clamp(1rem, 3vw, 1.6rem) 1.6rem;
  border-top: 1px solid var(--line);
  margin-top: -1px;
  animation: unfold .32s var(--ease);
}
@keyframes unfold { from { opacity: 0; transform: translateY(-8px); } }

.course__desc { margin: 1.2rem 0 1.4rem; max-width: 68ch; }
.course__cols { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(1rem, 3vw, 2.4rem); margin-bottom: 1.4rem; }
.course__h { margin: 0 0 .6rem; font-size: 1.25rem; }
.course__list { margin: 0; padding: 0; list-style: none; display: grid; gap: .45rem; }
.course__list li { position: relative; padding-inline-start: 1.3rem; color: var(--muted); }
.course__list li::before { content: "›"; position: absolute; inset-inline-start: 0; color: var(--gold); font-weight: 700; }

.course__facts { margin: 0; display: grid; gap: .7rem; align-content: start; }
.course__facts > div { display: grid; grid-template-columns: 122px 1fr; gap: .8rem; align-items: baseline; }
.course__facts dt { color: var(--muted); font-size: .85rem; }
.course__facts dd { margin: 0; font-weight: 600; font-size: .95rem; }

/* ============================================================
   Server κάρτες (home)
   ============================================================ */
.srv { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.srv__card {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--panel); padding: 1.4rem;
  display: grid; align-content: start; gap: .55rem;
}
.srv__badge {
  margin: 0; justify-self: start;
  padding: .28rem .7rem; border-radius: 999px;
  font-size: .78rem; font-weight: 600;
  border: 1px solid var(--line-strong); color: var(--muted);
}
.srv__badge--java { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
.srv__badge--bedrock { color: var(--mint); border-color: color-mix(in srgb, var(--mint) 45%, transparent); }
.srv__addr {
  margin: 0; font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.25rem, 3.4vw, 1.6rem); line-height: 1.15;
  overflow-wrap: anywhere;
}
.srv__hint { margin: 0 0 .5rem; color: var(--muted); font-size: .88rem; }
.srv__hint b { color: var(--text); }
.srv__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.srv__card .btn { justify-self: start; font-size: .92rem; padding: .55rem 1rem; }
.srv__cta { margin-top: 1.4rem; text-align: center; }

.linkish {
  border: 0; background: none; padding: 0; cursor: pointer;
  color: var(--gold); font: inherit; text-decoration: underline; text-underline-offset: 3px;
}

.foot__server { margin: 0 0 .5rem; font-size: .92rem; color: var(--muted); }

@media (max-width: 860px) {
  .course__top { grid-template-columns: 1fr 34px; row-gap: .35rem; }
  .course__code { grid-column: 1; }
  .course__name { grid-column: 1; }
  .course__teacher { grid-column: 1; }
  .course__top .stars { grid-column: 1; }
  .course__chev { grid-column: 2; grid-row: 1 / span 4; align-self: center; }
  .course__cols { grid-template-columns: 1fr; }
  .course__facts > div { grid-template-columns: 110px 1fr; }
}

/* motion switched off from the settings modal */
:root[data-motion="off"] .aurora__blob,
:root[data-motion="off"] .seal,
:root[data-motion="off"] .ticker__track,
:root[data-motion="off"] .hero__word,
:root[data-motion="off"] .shiny,
:root[data-motion="off"] .pill i,
:root[data-motion="off"] .course__body { animation: none !important; }
:root[data-motion="off"] .shiny,
:root[data-motion="off"] .hero__word { -webkit-text-fill-color: currentColor; color: var(--gold); }
:root[data-motion="off"] [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
