/*
Theme Name: Hellenic Conference Classic
Theme URI: https://lsehellenicconference.com
Author: LSE Hellenic Conference
Author URI: https://lsehellenicconference.com
Description: Classic PHP variant of the LSE Hellenic Conference 2027 theme. Same design system as the block theme, built with PHP templates and a standard nav menu.
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 8.0
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hellenic-classic
Tags: classic-theme, custom-colors, custom-menu, block-styles
*/


/* ── Design tokens ─────────────────────────────────────────────────────── */
:root {
  --navy: #0a2342;
  --hellenic: #1b4fa0;
  --accent-blue: #2e86c1;
  --page: #f7f9fc;
  --ink: #1a1a1a;
  --ink-2: #4a5568;
  --hairline: #d4dce7;
  --metal: #b08d57;
  /* Accessible gold: --metal (#b08d57) is only 3.09:1 on white, so gold TEXT uses these. */
  --gold-ink: #8c652c;      /* 5.23:1 on white, 4.96:1 on --page, 4.53:1 on the table tint */
  --gold-on-dark: #c9a468;  /* 6.75:1 on navy bands and the footer */
  --band-kicker: #6fb0e2;   /* 6.74:1 kicker on navy bands */

  --heading: #0a2342;
  --band: #0a2342;
  --btn: #1b4fa0;
  --btn-hover: #173f80;
  --field-bg: #ffffff;

  --background: var(--page);
  --foreground: var(--ink);
  --brand: var(--hellenic);
  --brand-strong: #173f80;
  --accent: var(--accent-blue);
  --gold: var(--metal);
  --card: #ffffff;
  --card-border: var(--hairline);

  --font-serif: "Playfair Display", Georgia, serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  --shell: 1180px;
  --content: 720px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0a1524;
  --ink: #e8eef7;
  --ink-2: #a3b4c9;
  --hairline: #22334a;
  --heading: #f4f8fd;
  --band: #081c33;
  --btn: #2f6fbf;
  --btn-hover: #3b82d4;
  --field-bg: #0f2136;
  --hellenic: #8bb8ee;
  --accent-blue: #6fb0e2;
  --metal: #c9a468;
  /* On the dark page the gold text tokens return to the gold itself. */
  --gold-ink: var(--metal);

  --background: var(--page);
  --foreground: var(--ink);
  --card: #0f2136;
  --card-border: var(--hairline);
}

/* ── Base ──────────────────────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
}

body {
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.6;
  margin: 0;
}

/* ── Typography ────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--heading);
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

p { margin: 0 0 1em; }

a {
  color: var(--hellenic);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--accent-blue); }

/* ── Layout helpers ────────────────────────────────────────────────────── */
.shell {
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.rule-bottom { border-bottom: 1px solid var(--hairline); }
.rule-top { border-top: 1px solid var(--hairline); }

.kicker {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-ink);
  margin: 0 0 0.75rem;
}

.serif { font-family: var(--font-serif); }

/* ── Header ────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--page);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4rem;
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand__name {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--heading);
}

.brand__year {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-ink);
  margin-top: 2px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.site-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.15s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--hellenic);
}

/* ── Announcement bar ──────────────────────────────────────────────────── */
.announcement-bar {
  background: var(--band);
  text-align: center;
  padding: 0.4rem 1rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.85);
}

/* ── Footer ────────────────────────────────────────────────────────────── */
.site-footer {
  margin-top: 5rem;
  background: var(--band);
  color: rgba(255,255,255,0.7);
}

.site-footer a {
  color: rgba(255,255,255,0.7);
}
.site-footer a:hover {
  color: #fff;
}

.site-footer__grid {
  display: grid;
  gap: 2.5rem;
  padding-block: 3.5rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.site-footer h4 {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--metal);
  margin: 0 0 0.75rem;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li {
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-block: 1.5rem;
  font-size: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  border-radius: 0.375rem;
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--btn);
  color: #fff;
}
.btn-primary:hover {
  background: var(--btn-hover);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--hellenic);
  border: 1px solid var(--hellenic);
}
.btn-outline:hover {
  background: var(--hellenic);
  color: #fff;
}

/* ── Stats ─────────────────────────────────────────────────────────────── */
.stats {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.stat-numeral {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--metal);
  line-height: 1;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--ink-2);
  margin-top: 0.5rem;
}

/* ── Theme toggle ──────────────────────────────────────────────────────── */
.theme-toggle {
  background: none;
  border: none;
  border-left: 1px solid var(--hairline);
  padding-left: 1rem;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  cursor: pointer;
  transition: color 0.15s ease;
}
.theme-toggle:hover { color: var(--hellenic); }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .site-nav { display: none; }
  .site-nav.is-open { display: flex; flex-direction: column; }
}


/* ── Classic layout additions ──────────────────────────────────────────── */
.site-main { display: block; }

.content-area {
  padding-block: clamp(32px, 5vw, 64px);
}

.entry__title { margin-bottom: 1rem; }
.entry__content { max-width: var(--content); }

.nav-list {
  list-style: none;
  display: flex;
  gap: 1.75rem;
  padding: 0;
  margin: 0;
}

.nav-list a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.15s ease;
}

.nav-list a:hover,
.nav-list .current-menu-item > a {
  color: var(--hellenic);
}

.site-footer .nav-list {
  flex-direction: column;
  gap: 0.5rem;
}

.hero__lede {
  font-size: 1.125rem;
  color: var(--ink-2);
  max-width: 42rem;
  margin-top: 1.5rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.25rem;
}

.small { font-size: 0.875rem; }

@media (max-width: 900px) {
  .site-nav { display: none; }
}

/* ── Forms (lse-forms plugin) ─────────────────────────────────────────── */
.lse-form { max-width: var(--content); margin: 1.5rem 0; }
.lse-form__field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1.1rem; }
.lse-form label { font-size: .875rem; font-weight: 600; color: var(--heading); }
.lse-form input[type="text"], .lse-form input[type="email"], .lse-form textarea {
  width: 100%; padding: .6rem .75rem; border: 1px solid var(--hairline); border-radius: .375rem;
  background: var(--field-bg); color: var(--ink); font: inherit;
}
.lse-form input:focus, .lse-form textarea:focus { outline: 2px solid var(--accent-blue); outline-offset: 1px; border-color: var(--accent-blue); }
.lse-form button { display: inline-block; padding: .625rem 1.25rem; border: none; border-radius: .375rem; background: var(--btn); color: #fff; font-size: .92rem; font-weight: 500; cursor: pointer; }
.lse-form button:hover { background: var(--btn-hover); }
.lse-form__done { border-left: 3px solid var(--accent-blue); background: rgba(46,134,193,.12); padding: .75rem 1rem; }
.lse-form__error { border-left: 3px solid #b3261e; background: rgba(179,38,30,.10); padding: .75rem 1rem; }

/* ── Reveal on scroll — ported from the Next.js app ──────────────────── */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ═══ Advanced polish — motion & micro-interactions ═══════════════════════ */

/* 1. Card depth on hover (stagger delays are applied by reveal.js) */
.content-area .lse-speaker-card,
.content-area .lse-session-card {
  transition: transform .28s cubic-bezier(.2,.7,.3,1), box-shadow .28s cubic-bezier(.2,.7,.3,1);
}
.content-area .lse-speaker-card:hover,
.content-area .lse-session-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px -18px rgba(10, 35, 66, .35);
}

/* 2. Agenda tab gliding underline (indicator element created by reveal.js) */
.lse-agenda-tabs { position: relative; }
.lse-tab-indicator {
  position: absolute; bottom: 0; left: 0; width: 0; height: 2px;
  background: var(--metal); pointer-events: none;
  transition: left .3s cubic-bezier(.4,0,.2,1), width .3s cubic-bezier(.4,0,.2,1);
}

/* 3. Compact sticky header */
.site-header { transition: box-shadow .3s ease; }
.site-header__inner { transition: min-height .3s ease; }
.announcement-bar {
  max-height: 3.5rem; overflow: hidden;
  transition: max-height .35s ease, padding .35s ease, opacity .3s ease;
}
.site-header.is-scrolled { box-shadow: 0 8px 30px rgba(10, 35, 66, .10); }
.site-header.is-scrolled .announcement-bar { max-height: 0; padding-block: 0; opacity: 0; }
.site-header.is-scrolled .site-header__inner { min-height: 3.4rem; }

/* nav underline slide */
.nav-list a { position: relative; }
.nav-list a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px;
  background: var(--metal); transform: scaleX(0); transform-origin: left;
  transition: transform .25s ease;
}
.nav-list a:hover::after,
.nav-list .current-menu-item > a::after { transform: scaleX(1); }

/* 4. Page transitions — View Transitions API (Chrome/Edge/Safari; ignored elsewhere) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation-duration: .2s; }
::view-transition-new(root) { animation-duration: .26s; }

/* 5. Hero sheen — homepage hero band only, barely-there drift */
.home .content-area > section:first-child { position: relative; overflow: hidden; }
.home .content-area > section:first-child > * { position: relative; z-index: 1; }
.home .content-area > section:first-child::before {
  content: ""; position: absolute; inset: -20%; z-index: 0; pointer-events: none;
  background: linear-gradient(115deg,
    transparent 35%,
    rgba(176, 141, 87, .07) 48%,
    rgba(46, 134, 193, .06) 56%,
    transparent 66%);
  transform: translateX(-16%);
  animation: hero-drift 26s ease-in-out infinite alternate;
}
@keyframes hero-drift { from { transform: translateX(-16%); } to { transform: translateX(16%); } }

/* 6. Micro-touches */
.btn, .wp-element-button { position: relative; overflow: hidden; }
.btn::after, .wp-element-button::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 32%, rgba(255,255,255,.28) 50%, transparent 68%);
  transform: translateX(-135%);
  transition: transform .6s ease;
}
.btn:hover::after, .wp-element-button:hover::after { transform: translateX(135%); }

.lse-form input:focus, .lse-form textarea:focus { box-shadow: 0 0 0 3px rgba(46, 134, 193, .18); }

.content-area p a:not(.wp-element-button):not(.lse-social-btn),
.content-area li a:not(.wp-element-button):not(.lse-social-btn) {
  text-decoration: underline;
  text-decoration-color: rgba(176, 141, 87, .40);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color .25s ease, text-underline-offset .25s ease;
}
.content-area p a:not(.wp-element-button):not(.lse-social-btn):hover,
.content-area li a:not(.wp-element-button):not(.lse-social-btn):hover {
  text-decoration-color: var(--metal);
  text-underline-offset: 5px;
}

/* 7. Sponsor marquee — dormant until a .sponsor-marquee block exists */
.sponsor-marquee {
  position: relative; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.sponsor-marquee__track {
  display: flex; align-items: center; gap: 3rem; width: max-content;
  animation: sponsor-scroll 30s linear infinite;
}
.sponsor-marquee:hover .sponsor-marquee__track { animation-play-state: paused; }
@keyframes sponsor-scroll { to { transform: translateX(-50%); } }

/* Reduced motion — switch off everything added here */
@media (prefers-reduced-motion: reduce) {
  .site-header, .site-header__inner, .announcement-bar,
  .nav-list a::after, .btn::after, .wp-element-button::after,
  .lse-tab-indicator, .sponsor-marquee__track { transition: none !important; animation: none !important; }
  .content-area .lse-speaker-card, .content-area .lse-session-card { transition: none; }
  .content-area .lse-speaker-card:hover, .content-area .lse-session-card:hover { transform: none; }
  .home .content-area > section:first-child::before { animation: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
/* ==========================================================================
   Ported render fixes — stats band, stat grid, society grid, footer legibility
   Sourced from the original block theme (lse-hellenic-2027) with corrections:
   stat pairs flow as three columns; band is full-bleed; footer links brighter.
   ========================================================================== */

.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; overflow: hidden; position: absolute; width: 1px; word-wrap: normal !important;
}

/* Navy banded sections, full-bleed */
.band {
  background: var(--band);
  color: #ffffff;
  margin-inline: calc(50% - 50vw);
}
.band h1, .band h2, .band h3 { color: #ffffff; }
.band .kicker { color: var(--band-kicker); }
.band p:not(.stat-numeral), .band .stat-label { color: rgba(255, 255, 255, 0.85); }
.band em { color: rgba(255, 255, 255, 0.7); }

/* Statistics: numeral + label pairs in three columns */
.stat-grid { margin-top: 32px; }
.stat-grid > .wp-block-group__inner-container {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: auto auto;
  gap: 6px 40px;
}
@media (max-width: 639px) {
  .stat-grid > .wp-block-group__inner-container {
    grid-auto-flow: row;
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* Society grid */
.card-grid,
.card-grid > .wp-block-group__inner-container {
  display: grid;
  gap: 32px 40px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

/* Footer legibility */
.site-footer a { color: rgba(255, 255, 255, 0.88); }


/* Final polish pass (2026-09-29) */
.stat-grid .stat-numeral, .stat-grid .stat-label { margin: 0; }
html, body { overflow-x: clip; }
.site-footer .nav-list .current-menu-item > a { color: rgba(255, 255, 255, 0.95); }

/* ==========================================================================
   Accessibility audit fixes (29 Sep 2026)
   - gold text on light backgrounds raised to 4.5:1+
   - kickers on navy bands raised to 4.5:1+
   - a skip link and a visible focus ring for keyboard users
   ========================================================================== */

/* Footer column headings sit on the navy footer, so they keep the light gold. */
.site-footer .kicker, .site-footer h4 { color: var(--gold-on-dark); }

/* Bypass blocks (WCAG 2.4.1): visible only when focused. */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--navy); color: #fff; padding: 0.6rem 1rem;
  border-radius: 0 0 0.375rem 0; font-size: 0.9rem; font-weight: 600;
}
.skip-link:focus { left: 0; outline: 3px solid var(--accent-blue); outline-offset: 0; }

/* Visible focus ring for every interactive element. */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent-blue); outline-offset: 2px;
}

/* Empty states returned by the lse-speaker-agenda shortcodes when nothing is published yet.
   Without this the plugin's bare <div class="lse-empty"> reads as orphaned placeholder text. */
.lse-empty {
  max-width: 62ch;          /* sits on the same measure as the intro paragraph (672px) */
  margin: 1.5rem 0 0;
  padding: 1.25rem 1.15rem;
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--accent-blue);
  border-radius: 6px;       /* matches the buttons and inputs */
  background: rgba(46, 134, 193, 0.06);
  font-style: normal;
}

.lse-empty p {
  margin: 0;
}

.lse-empty p + p {
  margin-top: 0.6rem;
}
