/* ==========================================================================
   5th International Congress landing page (pgxcongress2027.esptnet-eu.gr)
   Font, base sizes and heading defaults come from theme.json.
   Sections: tokens · base · icons · header & menu · opening · sections ·
   welcoming message · cards · footer · motion
   ========================================================================== */

:root {
  /* Colours */
  --white: #fff;
  --text: #333;
  --text-2: #444;
  --heading: #3a3a3a;
  --muted: #666;
  --line: #dde3e3;
  --green: #88c53e;            /* EEPHARM logo green */
  --green-dark: #3f7d1c;       /* text-safe green */
  --green-soft: #b9d99a;       /* menu tile outline */
  --green-tint: #f2f8ec;       /* menu tile fill */
  --poster-bg: #f9fdfa;        /* the poster's pale background: the page ground */
  --poster-grey: #5f5754;      /* the poster's title grey */
  --poster-magenta: #7f1d63;   /* the poster's magenta, deepened */
  --signature: #9e1680;        /* the poster's magenta as printed (signature line) */
  --footer: #3f3937;           /* warm dark grey */
  --footer-text: #cfc8c4;

  /* Layout */
  --wide: 1220px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(64px, 9vw, 120px);
  --header-h: 76px;
  --hdr: 76px;                 /* measured header height, updated by site.js */
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* Halo that keeps text crisp over the wheels */
  --halo: 0 0 6px var(--poster-bg), 0 0 14px var(--poster-bg), 0 0 28px var(--poster-bg);
}
@media (max-width: 640px) { :root { --header-h: 62px; --hdr: 62px; } }


/* Base ------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  background: var(--footer);          /* past the bottom (scroll bounce) blends into the footer */
  overscroll-behavior-y: none;
}
body { overflow-x: clip; background: var(--poster-bg); -webkit-font-smoothing: antialiased; }
/* The page ground: the poster's pale tint with a faint network in the poster's style, behind every section */
main#main-content { background: var(--poster-bg) url("../img/network-faint.svg") 0 0 / 1400px auto repeat; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { text-wrap: balance; overflow-wrap: break-word; }
p { text-wrap: pretty; }
button, input, select, textarea { font-family: inherit; }
:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--white), 0 0 0 6px var(--green-dark); border-radius: 6px; }
::selection { background: #b5dc84; color: #003638; }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; padding: 10px 16px; border-radius: 8px; background: var(--footer); color: var(--white) !important; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Sections sit edge to edge: no WordPress block gap between them */
.wp-site-blocks { padding: 0; }
.wp-site-blocks > * + *, .wp-block-post-content > * + *, main.wp-block-group > * + * { margin-block-start: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}


/* Icons (CSS masks, so editors never touch SVG) ---------------------------- */

.ic { position: relative; padding-left: 30px; }
.ic::before { content: ""; position: absolute; left: 0; top: .2em; width: 20px; height: 20px; background: currentColor; -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.ic--calendar { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E"); }
.ic--pin { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E"); }
.ic--building { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='2' width='16' height='20' rx='2'/%3E%3Cpath d='M9 22v-4h6v4M8 6h.01M16 6h.01M12 6h.01M12 10h.01M12 14h.01M16 10h.01M16 14h.01M8 10h.01M8 14h.01'/%3E%3C/svg%3E"); }


/* Header: the two logos (no links) and the menu button ---------------------- */

.site-header { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--line); transition: border-color .2s, box-shadow .2s; }
.site-header.is-scrolled { border-bottom: 0; box-shadow: 0 2px 14px rgba(0, 0, 0, .08); }
.site-header__inner { display: flex; align-items: center; gap: 18px; max-width: calc(var(--wide) + 2 * var(--gutter)); min-height: var(--header-h); margin: 0 auto; padding: 8px var(--gutter); }

/* EEPHARM and University of Athens logos; phones show the university's compact emblem */
.brand { display: flex; flex: none; align-items: center; gap: 16px; min-width: 0; }
.brand__logo { display: block; width: auto; height: 54px; }
.brand__divider { flex: none; width: 1px; height: 40px; background: var(--line); }
.brand__uoa { display: block; flex: none; }
.brand__uoa img { display: block; width: auto; height: 42px; }
@media (max-width: 900px) { .brand { gap: 12px; } .brand__uoa img { height: 34px; } }
@media (max-width: 640px) { .site-header__inner { gap: 12px; padding-block: 6px; } .brand { gap: 10px; } .brand__logo { height: 44px; } .brand__divider { height: 30px; } }
@media (max-width: 380px) { .brand__logo { height: 38px; } .brand__uoa img { height: 30px; } }

/* Menu button: three lines, a "×" while open */
.home-menu { margin-left: auto; }
.home-menu__bar { display: inline-flex; overflow: hidden; border: 1.5px solid var(--green); border-radius: 12px; background: var(--white); transition: background-color .2s; }
.home-menu.is-open .home-menu__bar { background: var(--green-tint); }
.home-menu__toggle { position: relative; display: flex; align-items: center; justify-content: center; width: 46px; height: 44px; padding: 0; border: 0; background: transparent; color: var(--green-dark); cursor: pointer; }
.menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--green-dark); transition: transform .25s var(--ease), background-color .2s; }
.menu-icon { position: relative; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -6px; }
.menu-icon::after { top: 6px; }
.home-menu.is-open .menu-icon { background: transparent; }
.home-menu.is-open .menu-icon::before { transform: translateY(6px) rotate(45deg); }
.home-menu.is-open .menu-icon::after { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 640px) { .home-menu__toggle { width: 44px; } }

/* The menu: drops down under the header as an overlay; opens on click only (site.js) */
.header-nav { position: absolute; top: 100%; left: 0; right: 0; z-index: 60; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); box-shadow: 0 18px 30px -20px rgba(0, 0, 0, .3); visibility: hidden; opacity: 0; transform: translateY(-6px); transition: opacity .18s, transform .18s, visibility 0s linear .25s; }
.home-menu.is-open .header-nav { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.header-nav__list { display: flex; flex-wrap: wrap; justify-content: center; align-items: stretch; gap: 10px; max-width: calc(var(--wide) + 2 * var(--gutter)); margin: 0 auto; padding: 14px var(--gutter); list-style: none; scrollbar-width: none; }
.header-nav__list > li { display: flex; flex: none; }
.header-nav .nav-link a { display: flex; align-items: center; justify-content: center; width: 160px; min-height: 66px; padding: 8px 10px; border: 1px solid var(--green-soft); border-radius: 12px; background: transparent; color: var(--text) !important; font-size: .75rem; font-weight: 600; line-height: 1.25; text-align: center; text-decoration: none; text-wrap: balance; transition: background-color .2s, border-color .2s; }
.header-nav .nav-link a:hover, .header-nav .nav-link a[aria-current="true"] { background: var(--green-tint); border-color: var(--green); }
/* Phones: a full-width, scrollable list */
@media (max-width: 640px) {
  .header-nav__list { flex-direction: column; flex-wrap: nowrap; gap: 6px; max-height: calc(100svh - var(--hdr) - 24px); padding: 10px var(--gutter) 14px; overflow-y: auto; overscroll-behavior: contain; }
  .header-nav__list > li { display: block; }
  .header-nav .nav-link a { display: block; width: auto; min-height: auto; padding: 12px 14px; font-size: .9375rem; text-align: left; transition: none; }
}
/* No fades while the page loads (site.js adds .is-ready afterwards), so nothing flashes */
html:not(.is-ready) .header-nav, html:not(.is-ready) .home-menu__bar, html:not(.is-ready) .header-nav .nav-link a, html:not(.is-ready) .lp-hero > .lp-hero__inner { transition: none !important; }


/* Opening: fills the first screen; title, subtitle and details in one card ---- */

.lp-hero { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: center; min-height: calc(100vh - var(--hdr)); min-height: calc(100svh - var(--hdr)); padding-block: clamp(40px, 6vw, 96px); color: var(--text-2); }

/* The poster's data wheel, twice: bottom right (mirrored) and top left (turned 180°).
   Without JavaScript these static copies show; site.js swaps in the turning ones (Motion, below). */
.lp-hero::before, .lp-hero::after { content: ""; position: absolute; inset: -10px; pointer-events: none; filter: blur(.4px); background: url("../img/poster-wheel.webp") no-repeat; }
.lp-hero::before { z-index: -2; transform: scaleX(-1); background-size: auto 152%; background-position: left -60px bottom -120px; -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%); mask-image: linear-gradient(to bottom, #000 72%, transparent 100%); }
.lp-hero::after { z-index: -1; transform: scaleY(-1); background-size: auto 95%; background-position: left -60px bottom -60px; }
@media (max-aspect-ratio: 1/1) {
  .lp-hero::before { background-size: 115% auto; background-position: left -40px bottom -70px; }
  .lp-hero::after { background-size: 85% auto; background-position: left -40px bottom -40px; }
}

/* The card: no outline at rest; on hover a grey-green gradient, outline and lift
   (touch screens have no hover, so they show a lighter gradient all the time) */
.lp-hero > .lp-hero__inner { width: fit-content; max-width: min(100%, var(--wide)); margin-inline: auto; padding: clamp(16px, 3vw, 40px) clamp(14px, 3vw, 44px); border: 1px solid transparent; border-radius: 18px; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s var(--ease), border-color .25s var(--ease); }
.lp-hero > .lp-hero__inner:hover { background: linear-gradient(135deg, rgba(245, 247, 243, .96) 0%, rgba(232, 237, 228, .94) 55%, rgba(219, 227, 212, .92) 100%); border-color: rgba(120, 140, 105, .45); box-shadow: 0 26px 52px -26px rgba(0, 0, 0, .3); transform: translateY(-4px); }
@media (hover: none) { .lp-hero > .lp-hero__inner { background: linear-gradient(135deg, rgba(245, 247, 243, .84) 0%, rgba(232, 237, 228, .78) 100%); } }

.lp-hero .lp-title { margin: 0; color: var(--poster-grey); font-size: clamp(1.2rem, 5.6vw, 4.6rem); font-weight: 700; line-height: 1.05; letter-spacing: -.025em; white-space: nowrap; text-shadow: var(--halo); }
.lp-hero .lp-subtitle { margin: .6rem 0 0; color: var(--poster-grey); font-size: clamp(1.15rem, .9rem + 1.3vw, 2rem); font-weight: 600; line-height: 1.3; text-wrap: balance; text-shadow: var(--halo); }

/* Details: three rows with dividers and centred icons; magenta for the date and the venue name */
.lp-hero .lp-details { max-width: 760px; margin-top: clamp(18px, 2.4vw, 28px) !important; }
.lp-meta { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.lp-meta li { padding-block: 12px; color: var(--text-2); text-shadow: 0 0 6px var(--poster-bg), 0 0 14px var(--poster-bg); }
.lp-meta li + li { border-top: 1px solid rgba(95, 87, 84, .18); }
.lp-meta li.ic::before { top: 50%; transform: translateY(-50%); color: var(--poster-grey); }
.lp-meta strong { color: var(--poster-magenta); }


/* Sections ---------------------------------------------------------------- */

.lp-section { padding-block: var(--section); }
.lp-section h2 { margin: 0 0 1.2rem; color: var(--heading); font-weight: 600; }
.lp-head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 48px); }
.is-lead { color: var(--text-2); font-size: var(--wp--preset--font-size--large); }
.lp-head .is-lead { color: var(--muted); }


/* Welcoming message: text beside the poster from 1240px (starting and ending
   together), the poster under the text below that ----------------------------- */

.lp-welcome__grid { gap: clamp(32px, 5vw, 72px); align-items: center !important; }
.lp-welcome__grid > .lp-welcome { max-width: none; margin: 0; }
.lp-welcome__grid > .lp-welcome > :first-child { margin-top: 0 !important; }
.lp-welcome__grid > .lp-welcome > :last-child { margin-bottom: 0 !important; }
.lp-welcome p { color: var(--text-2); }
.lp-welcome .is-lead { color: var(--heading); }

.lp-signature { margin-top: 2rem !important; padding-left: 16px; border-left: 4px solid var(--signature); font-size: .9375rem; }
.lp-signature strong { display: inline-block; margin-bottom: 2px; color: var(--heading); font-size: 1.0625rem; }

.lp-welcome__media .wp-block-image { width: 100%; }
.lp-welcome__poster { margin: 0; }
.lp-welcome__poster a { display: block; border-radius: 3px; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.lp-welcome__poster a:hover { transform: translateY(-4px); }
.lp-welcome__poster img { display: block; width: 100%; border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .35); }

@media (min-width: 1240px) {
  .lp-welcome__grid { align-items: stretch !important; }
  .lp-welcome__grid > .lp-welcome { flex: 1 1 0% !important; display: flex; flex-direction: column; justify-content: space-between; }
  .lp-welcome__grid > .lp-welcome__media { flex: 0 0 50% !important; display: flex; align-items: flex-start; }
  .lp-welcome__grid .lp-welcome h2 { margin-bottom: .9rem; font-size: clamp(2.2rem, 1rem + 1.9vw, 2.75rem); line-height: 1; white-space: nowrap; }
  .lp-welcome__grid .lp-welcome p { margin-block: 0 .7rem; font-size: .9375rem; line-height: 1.6; }
  .lp-welcome__grid .lp-welcome .is-lead { font-size: 1.0625rem; font-weight: 500; }
  .lp-welcome__grid .lp-welcome .lp-signature { margin-top: .6rem !important; }
}
@media (min-width: 782px) { .lp-welcome__grid > .lp-welcome { flex: 1.25 1 0%; } .lp-welcome__grid > .lp-welcome__media { flex: 1 1 0%; } }
@media (max-width: 1239px) {
  .lp-welcome__grid { flex-wrap: wrap !important; }
  .lp-welcome__grid > .wp-block-column { flex-basis: 100% !important; }
  .lp-welcome__media { max-width: 600px; }
}


/* Cards: Scientific Topics and More Information Coming Soon ------------------
   A coloured left edge (green / magenta), a layered shadow with a lit top edge,
   and only a slight response on hover, since the cards are not links. */

.lp-topics, .lp-soon { display: grid; gap: 16px; max-width: var(--wide) !important; margin: 0 auto; padding: 0; list-style: none; }
.lp-topics { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.lp-soon { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.lp-topics li, .lp-soon li {
  min-width: 0;
  padding: 22px 24px;
  border: 1px solid rgba(95, 87, 84, .12);
  border-radius: 6px;
  background: linear-gradient(180deg, #fff 0%, #fbfcfb 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 1px 2px rgba(40, 48, 40, .08), 0 6px 14px -4px rgba(40, 48, 40, .11), 0 22px 40px -18px rgba(40, 48, 40, .24);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.lp-topics li:hover, .lp-soon li:hover,
html.m-reveals .lp-topics li.m-reveal.is-in:hover, html.m-reveals .lp-soon li.m-reveal.is-in:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 1px 2px rgba(40, 48, 40, .08), 0 7px 16px -4px rgba(40, 48, 40, .12), 0 24px 42px -18px rgba(40, 48, 40, .26);
}

.lp-topics li { display: flex; align-items: center; border-left: 4px solid var(--green); color: var(--heading); font-size: 1.0625rem; font-weight: 600; line-height: 1.35; overflow-wrap: break-word; }

.lp-soon li { border-left: 4px solid var(--poster-magenta); color: var(--muted); font-size: .9375rem; }
.lp-soon strong { display: block; margin-bottom: 4px; color: var(--heading); font-size: 1.0625rem; }
.lp-stay { margin: 2.5rem auto 0 !important; color: var(--poster-magenta); font-size: var(--wp--preset--font-size--large); font-weight: 700; text-align: center; }


/* Footer ------------------------------------------------------------------ */

.site-footer { background: var(--footer); color: var(--footer-text); font-size: .9375rem; }
.site-footer__inner { max-width: calc(var(--wide) + 2 * var(--gutter)); margin: 0 auto; padding: clamp(48px, 6vw, 72px) var(--gutter) clamp(40px, 5vw, 64px); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; max-width: 900px; }
.site-footer p { margin: 0 0 10px; color: var(--footer-text); }
.site-footer .footer-title { margin: 0 0 10px; color: var(--white); font-size: 1.1rem; font-weight: 700; }
.footer-contact { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.footer-contact .ic::before { top: .25em; width: 18px; height: 18px; color: var(--green); }


/* Motion ------------------------------------------------------------------
   All of it is switched on by site.js and off for "reduce motion". */

/* Turning wheels: a complete wheel (wheel-full.webp, centre at 50% / 50%) replaces each static
   copy and turns very slowly (--m-rot, set by site.js). Sizes and shifts make the resting
   position match the static wheels exactly. */
html.m-wheels .lp-hero::before, html.m-wheels .lp-hero::after { display: none; }
.m-wheel { position: absolute; inset: 0; z-index: -1; width: auto !important; max-width: none !important; margin: 0 !important; pointer-events: none; }
.m-wheel--br { -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%); mask-image: linear-gradient(to bottom, #000 72%, transparent 100%); }
.m-wheel__img { position: absolute; aspect-ratio: 1; background: url("../img/wheel-full.webp") center / contain no-repeat; filter: blur(.4px); transform-origin: 50% 50%; will-change: transform; }
.m-wheel--br .m-wheel__img { right: -60px; bottom: -120px; height: 242.4%; transform: translate(40.1%, 38.7%) rotate(var(--m-rot, 0deg)); }
.m-wheel--tl .m-wheel__img { left: -70px; top: -70px; height: 151.5%; transform: translate(-40.1%, -38.7%) rotate(var(--m-rot, 180deg)); }
@media (max-aspect-ratio: 1/1) {
  .m-wheel--br .m-wheel__img { width: 183.4%; height: auto; right: -40px; bottom: -70px; }
  .m-wheel--tl .m-wheel__img { width: 135.6%; height: auto; left: -40px; top: -40px; }
}

/* Scroll reveals: content below the opening fades up as it comes into view. Cards keep their own
   hover transition while still revealing. */
html.m-reveals .m-reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--m-delay, 0s); }
html.m-reveals .m-reveal.is-in { opacity: 1; transform: none; }
html.m-reveals .lp-topics li.m-reveal, html.m-reveals .lp-soon li.m-reveal { transition: opacity .7s var(--ease), transform .7s var(--ease), box-shadow .3s var(--ease); transition-delay: var(--m-delay, 0s), var(--m-delay, 0s), 0s; }
html.m-reveals .lp-topics li.m-reveal.is-in:hover, html.m-reveals .lp-soon li.m-reveal.is-in:hover { transition-delay: 0s; transition-duration: .7s, .3s, .3s; }
@media (prefers-reduced-motion: reduce) {
  html.m-reveals .m-reveal { opacity: 1; transform: none; transition: none; }
  .lp-topics li:hover, .lp-soon li:hover { transform: none; }
}
