/*
Theme Name: IGPME Conference Bold
Theme URI: https://www.igpme.org
Description: Bold, block-based, event-forward Blocksy child theme for IGPME (International Group for the Psychology of Mathematics Education). Energetic tech-conference identity: large duotone purple/green colour blocks, geometric accents, big type (Outfit + Rubik), WCAG-AA contrast, self-hosted fonts for UK data residency. Theme B of the IGPME staging redesign.
Author: External IT Consultant
Template: blocksy
Version: 3.0.3
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: igpme-conference-v2
*/

/* ==========================================================================
   IGPME CONFERENCE BOLD — Theme B
   Identity: BOLD / BLOCK-BASED / EVENT-FORWARD
   --------------------------------------------------------------------------
   0.  Design tokens (:root)
   1.  Self-hosted @font-face (GDPR / UK residency — no Google CDN)
   2.  Base / typography
   3.  Header (white bar, dark ink, centered larger logo, one-row nav)
   4.  Glass-bold dropdown menus
   5.  Header CTA buttons (.igpme-header-btns)
   6.  Subpage hero (.entry-header / .ct-page-header / .ct-page-hero-section)
   7.  Buttons (bold variants)
   8.  Section blocks + card grids (front page + subpages)
   9.  Front-page specific blocks (hero, countdown, agenda, etc.)
   10. Footer legal bar
   11. Focus rings + accessibility + reduced motion
   12. Responsive
   ========================================================================== */

/* ==========================================================================
   0. DESIGN TOKENS
   ========================================================================== */
:root {
  /* Palette — shared IGPME brand colour space (B = saturated / bold weighting).
     Navy #2E3092 = hero & big blocks; blue #2563EB = energy; orange = CTA only. */
  --bg: #F2F5FC;
  --surface: #FFFFFF;
  --ink: #1A1B33;              /* shared navy-tinted ink */
  --ink-soft: #4A4E66;
  --primary: #2E3092;          /* brand navy — hero, big blocks, primary */
  --primary-700: #232566;      /* navy hover/active */
  --secondary: #2563EB;        /* strong brand blue — B's energy */
  --accent: #C24E07;           /* AA-safe orange — CTAs (white text passes) */
  --accent-700: #9A3E06;       /* orange hover */
  --brand-orange: #EB5F0A;     /* raw brand spark (never white text on it) */
  --muted: #E7EBFA;
  --border: #C9D2F2;
  --on-primary: #FFFFFF;
  --on-accent: #FFFFFF;

  /* Derived surfaces */
  --tint: #EEF1FD;             /* soft cool block tint */
  --tint-2: #EEF1FD;
  --ink-on-tint: #1A1B33;

  /* Logo controls (override Blocksy defaults) */
  /* 72px: org-name text in the logo's blue block reads at the same cap-height as
     the .95rem uppercase main-nav labels (verified by render measurement).
     --logo-shrink-height is undefined here, so it inherits this value. */
  --logo-max-height: 72px;

  /* Type */
  --font-head: 'Outfit', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-body: 'Rubik', 'Segoe UI', system-ui, -apple-system, sans-serif;

  /* Spacing rhythm — big gaps for block feel */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --space-7: 96px;

  /* Radii — chunky, blocky */
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  /* Shadows — punchy */
  --shadow-sm: 0 2px 8px rgba(15, 27, 48, .06);
  --shadow: 0 12px 30px rgba(29, 78, 216, .12);
  --shadow-lg: 0 24px 60px rgba(29, 78, 216, .18);

  /* Motion */
  --t-fast: 180ms;
  --t: 240ms;
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* Layout */
  --content-max: 1180px;
  --content-wide: 1320px;

  /* Header */
  --igpme-header-bg: var(--surface);
  --igpme-header-ink: var(--ink);
}

/* ==========================================================================
   1. SELF-HOSTED @font-face  (integrator drops .woff2 into /fonts/)
   ========================================================================== */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/outfit-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/outfit-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/outfit-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/outfit-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/rubik-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/rubik-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/rubik-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/rubik-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/rubik-700.woff2') format('woff2');
}

/* ==========================================================================
   2. BASE / TYPOGRAPHY
   ========================================================================== */
body,
body.blocksy {
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6,
.entry-title,
.page-title,
.ct-page-title {
  font-family: var(--font-head);
  color: var(--ink);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;       /* tight tracking on headings */
}

h1 { font-size: clamp(2rem, 4vw + 1rem, 3.25rem); }
h2 { font-size: clamp(1.6rem, 2.4vw + .6rem, 2.4rem); }
h3 { font-size: clamp(1.3rem, 1.4vw + .6rem, 1.6rem); font-weight: 600; }
h4 { font-size: 1.2rem; font-weight: 600; }

p { margin: 0 0 1.1em; }

a {
  color: var(--primary-700);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
  transition: color var(--t-fast) var(--ease);
}
a:hover { color: var(--primary); }

strong, b { font-weight: 600; }

/* Selection in brand purple */
::selection { background: var(--secondary); color: var(--ink); }

img { max-width: 100%; height: auto; }

/* Generic block container helper used by template files */
.igpme-container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
}
.igpme-container--wide { max-width: var(--content-wide); }

.igpme-eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--primary-700);
}

/* ==========================================================================
   3. HEADER — white bar, dark ink, centered larger logo, one-row nav
   Override old navy !important rules from earlier child themes.
   ========================================================================== */
.ct-header,
header#header.ct-header {
  background: var(--igpme-header-bg) !important;   /* override old navy */
  color: var(--igpme-header-ink) !important;
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border);
}

/* Middle row: logo left, nav right, vertically centered, one row */
#header [data-row="middle"] > .ct-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  /* 120px → 24px of white above and below the 72px logo, matching Option A's
     airier header bar (A reaches 120px via Blocksy row padding on top of its
     96px min-height; B has no such padding, so we set the total directly). */
  min-height: 120px;
}

/* Brand block — vertically center the logo, hide the org-name TEXT */
.ct-header .site-branding,
#header .site-branding {
  display: flex;
  align-items: center;
}
.ct-header .site-logo-container,
#header .site-logo-container {
  /* larger logo, vertically centered */
  height: var(--logo-shrink-height, var(--logo-max-height, 64px)) !important;
  display: flex;
  align-items: center;
}
.ct-header .site-logo-container img,
.ct-header .default-logo,
#header .default-logo {
  height: var(--logo-max-height, 64px) !important;
  width: auto;
  max-width: initial;
  object-fit: contain;
  display: block;
}
/* Hide the org-name text link that Blocksy renders after the logo */
.ct-header .site-title-container,
#header .site-title-container {
  display: none !important;
}

/* Header nav links — dark ink on white, purple on hover */
.ct-header [data-column="end"] {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

#site-navigation,
.header-menu-1 {
  --igpme-nav-ink: var(--ink);
}

#menu-top-menu,
.ct-header .menu {
  display: flex;
  flex-wrap: nowrap;          /* keep nav to one row */
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ct-header .menu > li > .ct-menu-link,
.ct-header .menu .ct-menu-link {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: -0.005em;
  color: var(--ink) !important;            /* override old white */
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: color var(--t-fast) var(--ease),
              background-color var(--t-fast) var(--ease);
}
.ct-header .menu > li > .ct-menu-link:hover,
.ct-header .menu > li > .ct-menu-link:focus-visible {
  color: var(--primary-700) !important;
  background: var(--tint);
}

/* Active / current item */
.ct-header .menu .current-menu-item > .ct-menu-link,
.ct-header .menu .current-menu-ancestor > .ct-menu-link {
  color: var(--primary-700) !important;
}

/* Neutralise any hard-coded orange <font> tags left in menu labels */
.ct-header .menu .ct-menu-link font {
  color: inherit !important;
}

/* Caret / sub-menu indicator color */
.ct-header .menu .ct-toggle-dropdown-desktop svg,
.ct-header .menu .ct-icon { color: currentColor; }

/* ==========================================================================
   4. GLASS-BOLD DROPDOWN MENUS
   Override BOTH the Blocksy var (--dropdown-background-color) and the old
   opaque navy child rule. Translucent purple glass with a thick green
   top accent. Links stay readable (dark ink) on the light glass.
   ========================================================================== */
.ct-header .sub-menu,
[data-header*="type-1"] .ct-header [data-id="menu"] .sub-menu {
  --dropdown-background-color: transparent;
  background: rgba(255, 255, 255, .94) !important;     /* white glass — red links need a light bg */
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid var(--border) !important;
  border-top: 4px solid var(--accent) !important;        /* thicker accent (green) */
  border-radius: 0 0 var(--radius) var(--radius) !important;
  box-shadow: var(--shadow) !important;
  padding: 8px !important;
  overflow: hidden;
}

.ct-header .sub-menu .ct-menu-link {
  color: #D32F2F !important;                             /* red dropdown links (per request) */
  font-family: var(--font-head);
  font-weight: 500;
  border-radius: var(--radius-sm);
  padding: 9px 14px !important;
  transition: color var(--t-fast) var(--ease),
              background-color var(--t-fast) var(--ease);
}
.ct-header .sub-menu .ct-menu-link:hover,
.ct-header .sub-menu .ct-menu-link:focus-visible {
  color: #B71C1C !important;                             /* darker red on hover/focus */
  background: rgba(211, 47, 47, .08) !important;         /* faint red lift */
}
.ct-header .sub-menu .current-menu-item > .ct-menu-link {
  color: #B71C1C !important;                             /* active item also red */
  background: rgba(211, 47, 47, .08) !important;
}

/* Fallback for browsers without backdrop-filter — keep it readable */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .ct-header .sub-menu,
  [data-header*="type-1"] .ct-header [data-id="menu"] .sub-menu {
    background: #FFFFFF !important;
  }
}

/* ==========================================================================
   5. HEADER CTA BUTTONS  (.igpme-header-btns, injected via wp_footer JS)
   SOLID green pills — 'Register' + 'Members'
   ========================================================================== */
.igpme-header-btns {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-left: var(--space-2);
}
.igpme-header-btns .igpme-hbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .92rem;
  letter-spacing: -0.005em;
  line-height: 1;
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform var(--t-fast) var(--ease),
              background-color var(--t) var(--ease),
              color var(--t) var(--ease),
              border-color var(--t) var(--ease),
              box-shadow var(--t) var(--ease);
}
/* Primary CTA: solid green Register */
.igpme-header-btns .igpme-hbtn--primary {
  background: var(--accent);
  color: var(--on-accent) !important;
  box-shadow: 0 8px 18px rgba(235, 95, 10, .28);
}
.igpme-header-btns .igpme-hbtn--primary:hover {
  background: var(--accent-700);
  transform: translateY(-2px);
}
/* Secondary CTA: outline-on-white Members, fills purple on hover */
.igpme-header-btns .igpme-hbtn--ghost {
  background: transparent;
  color: var(--primary-700) !important;
  border-color: var(--primary);
}
.igpme-header-btns .igpme-hbtn--ghost:hover {
  background: var(--primary);
  color: var(--on-primary) !important;
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* ==========================================================================
   6. SUBPAGE HERO — uniform purple block band on EVERY subpage
   Blocksy emits .entry-header / .ct-page-header / .ct-page-hero-section.
   The custom hero injected by functions.php uses .igpme-page-hero.
   Override old navy gradient rules with the bold purple block.
   ========================================================================== */
.entry-header,
.ct-page-header,
.ct-page-hero-section {
  background: var(--primary) !important;
  background-image:
    radial-gradient(circle at 88% 18%, rgba(255,255,255,.10) 0 22%, transparent 22%),
    linear-gradient(135deg, var(--primary) 0%, var(--primary-700) 100%) !important;
  color: var(--on-primary) !important;
  padding: clamp(2.5rem, 6vw, 4rem) clamp(20px, 5vw, 48px) !important;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.entry-header .page-title,
.ct-page-header .page-title,
.ct-page-hero-section .page-title,
.entry-header h1,
.ct-page-header h1 {
  color: var(--on-primary) !important;
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

/* The custom uniform hero we render in functions.php (preferred banner) */
.igpme-page-hero {
  position: relative;
  background: var(--primary);
  background-image:
    linear-gradient(135deg, var(--primary) 0%, var(--primary-700) 100%);
  color: var(--on-primary);
  padding: clamp(2.75rem, 6vw, 4.5rem) clamp(20px, 5vw, 48px);
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}
/* Geometric accent shapes — energetic, block feel */
.igpme-page-hero::before,
.igpme-page-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: var(--radius-lg);
  opacity: .55;
}
.igpme-page-hero::before {
  width: 220px; height: 220px;
  right: -60px; top: -70px;
  background: var(--secondary);
  transform: rotate(18deg);
  border-radius: 40px;
}
.igpme-page-hero::after {
  width: 140px; height: 140px;
  left: -50px; bottom: -60px;
  background: var(--accent);
  opacity: .35;
  border-radius: 32px;
  transform: rotate(-12deg);
}
.igpme-page-hero__inner {
  max-width: var(--content-max);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}
/* Centered icon chip */
.igpme-page-hero__icon {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: var(--radius);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.igpme-page-hero__icon svg {
  width: 40px;
  height: 40px;
  stroke: var(--on-primary);
  fill: none;
  stroke-width: 1.9;
}
.igpme-page-hero__title {
  margin: 0;
  color: var(--on-primary);
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: clamp(2rem, 4vw + .5rem, 3.1rem);
}
.igpme-page-hero__sub {
  margin: 0;
  max-width: 60ch;
  color: rgba(255, 255, 255, .9);
  font-size: 1.1rem;
}

/* ==========================================================================
   7. BUTTONS — bold variants
   ========================================================================== */
.igpme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.005em;
  line-height: 1;
  padding: 15px 28px;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease),
              background-color var(--t) var(--ease),
              color var(--t) var(--ease),
              border-color var(--t) var(--ease),
              box-shadow var(--t) var(--ease);
}
.igpme-btn--accent {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 10px 24px rgba(235, 95, 10, .30);
}
.igpme-btn--accent:hover {
  background: var(--accent-700);
  color: var(--on-accent);
  transform: translateY(-3px);
}
.igpme-btn--primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 10px 24px rgba(37, 99, 235, .30);
}
.igpme-btn--primary:hover {
  background: var(--primary-700);
  color: var(--on-primary);
  transform: translateY(-3px);
}
.igpme-btn--ghost {
  background: transparent;
  color: var(--on-primary);
  border-color: rgba(255, 255, 255, .7);
}
.igpme-btn--ghost:hover {
  background: rgba(255, 255, 255, .14);
  color: var(--on-primary);
  border-color: #fff;
  transform: translateY(-3px);
}
.igpme-btn--outline {
  background: transparent;
  color: var(--primary-700);
  border-color: var(--primary);
}
.igpme-btn--outline:hover {
  background: var(--primary);
  color: var(--on-primary);
  transform: translateY(-3px);
}

/* WP / Blocksy core buttons re-skinned to match */
.wp-block-button__link,
.entry-content .wp-block-button__link,
button.ct-button,
.ct-button {
  background: var(--accent) !important;
  color: var(--on-accent) !important;
  border-radius: var(--radius-pill) !important;
  font-family: var(--font-head);
  font-weight: 700;
  transition: transform var(--t-fast) var(--ease), background-color var(--t) var(--ease);
}
.wp-block-button__link:hover,
.ct-button:hover {
  background: var(--accent-700) !important;
  transform: translateY(-2px);
}

/* ==========================================================================
   8. SECTION BLOCKS + CARD GRIDS
   ========================================================================== */
.igpme-section {
  padding-block: clamp(var(--space-6), 8vw, var(--space-7));
}
.igpme-section--tint { background: var(--tint); }
.igpme-section--green-tint { background: var(--tint-2); }
.igpme-section--purple {
  background: var(--primary);
  background-image: linear-gradient(135deg, var(--primary) 0%, var(--primary-700) 100%);
  color: var(--on-primary);
}
.igpme-section--purple h1,
.igpme-section--purple h2,
.igpme-section--purple h3,
.igpme-section--purple .igpme-eyebrow { color: var(--on-primary); }
.igpme-section--green {
  background: var(--accent);
  background-image: linear-gradient(135deg, var(--accent) 0%, var(--accent-700) 100%);
  color: var(--on-accent);
}
.igpme-section--green h1,
.igpme-section--green h2,
.igpme-section--green h3,
.igpme-section--green .igpme-eyebrow { color: var(--on-accent); }

.igpme-section__head {
  max-width: 64ch;
  margin: 0 auto clamp(var(--space-4), 5vw, var(--space-6));
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.igpme-section__head h2 { margin: 0; }
.igpme-section__head p { margin: 0; font-size: 1.12rem; color: var(--ink-soft); }
.igpme-section--purple .igpme-section__head p,
.igpme-section--green .igpme-section__head p { color: rgba(255,255,255,.92); }

/* Card grid — blocky, big gaps */
.igpme-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.igpme-grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.igpme-grid--4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.igpme-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-3), 3vw, var(--space-5));
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  transition: transform var(--t) var(--ease),
              box-shadow var(--t) var(--ease),
              border-color var(--t) var(--ease);
  position: relative;
  overflow: hidden;
}
.igpme-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
/* Bold hover color shift accent bar */
.igpme-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 5px;
  background: var(--secondary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t) var(--ease), background-color var(--t) var(--ease);
}
.igpme-card:hover::after { transform: scaleX(1); background: var(--accent); }

.igpme-card__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--tint);
  color: var(--primary-700);
  margin-bottom: var(--space-1);
}
.igpme-card__icon svg {
  width: 30px;
  height: 30px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
}
.igpme-card:hover .igpme-card__icon {
  background: var(--primary);
  color: var(--on-primary);
}
.igpme-card h3 { margin: 0; }
.igpme-card p { margin: 0; color: var(--ink-soft); font-size: 1rem; }
.igpme-card .igpme-card__link {
  margin-top: auto;
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--primary-700);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.igpme-card .igpme-card__link::after { content: "\2192"; transition: transform var(--t-fast) var(--ease); }
.igpme-card:hover .igpme-card__link::after { transform: translateX(4px); }

/* ==========================================================================
   9. FRONT-PAGE SPECIFIC BLOCKS
   ========================================================================== */
/* HERO */
.igpme-hero {
  position: relative;
  background: var(--primary);
  /* HANDOFF: hero gradient brand-navy -> brand-blue, NO violet drift */
  background-image: linear-gradient(135deg, var(--primary) 0%, #2E3092 45%, var(--secondary) 100%);
  color: var(--on-primary);
  overflow: hidden;
  isolation: isolate;
}
.igpme-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 520px; height: 520px;
  right: -120px; top: -160px;
  background: radial-gradient(circle, rgba(96, 165, 250,.6) 0%, transparent 70%);
}
.igpme-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 320px; height: 320px;
  left: -120px; bottom: -140px;
  /* HANDOFF: keep the hero pure navy->blue; soft light glow, no orange field */
  background: radial-gradient(circle, rgba(255, 255, 255,.10) 0%, transparent 70%);
}
.igpme-hero__inner {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding: clamp(var(--space-6), 10vw, 120px) clamp(20px, 5vw, 48px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
}
.igpme-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .9rem;
  letter-spacing: .02em;
}
.igpme-hero__badge .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(235, 95, 10,.35);
}
.igpme-hero h1 {
  color: var(--on-primary);
  font-size: clamp(2.6rem, 6vw + .5rem, 5rem);
  max-width: 16ch;
  margin: 0;
}
.igpme-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.25rem;
}
.igpme-hero__meta span { display: inline-flex; align-items: center; gap: 10px; }
.igpme-hero__meta svg { width: 24px; height: 24px; stroke: var(--secondary); fill: none; stroke-width: 2; }
.igpme-hero__lede {
  font-size: 1.2rem;
  max-width: 52ch;
  color: rgba(255,255,255,.92);
  margin: 0;
}
.igpme-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

/* COUNTDOWN */
.igpme-countdown {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}
.igpme-countdown__unit {
  min-width: 92px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.30);
  border-radius: var(--radius);
  padding: 14px 18px;
  text-align: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.igpme-countdown__num {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 2.4rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--on-primary);
}
.igpme-countdown__label {
  display: block;
  margin-top: 6px;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.85);
}

/* AGENDA / AT-A-GLANCE STRIP */
.igpme-agenda {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.igpme-agenda__item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 6px solid var(--primary);
  border-radius: var(--radius);
  padding: var(--space-3);
  transition: border-color var(--t) var(--ease), transform var(--t) var(--ease);
}
.igpme-agenda__item:nth-child(2) { border-left-color: var(--accent); }
.igpme-agenda__item:nth-child(3) { border-left-color: var(--secondary); }
.igpme-agenda__item:nth-child(4) { border-left-color: var(--primary-700); }
.igpme-agenda__item:hover { transform: translateY(-4px); }
.igpme-agenda__day {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--primary-700);
}
.igpme-agenda__title { font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; margin: 6px 0 4px; }
.igpme-agenda__desc { color: var(--ink-soft); font-size: .98rem; margin: 0; }

/* STATS strip */
.igpme-stats {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  text-align: center;
}
.igpme-stat__num {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(2.2rem, 4vw, 3rem);
  line-height: 1;
  color: var(--on-primary);
}
.igpme-stat__label { margin-top: 8px; font-weight: 500; color: rgba(255,255,255,.9); }

/* Split / join block */
.igpme-split {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: 1.1fr .9fr;
  align-items: center;
}
.igpme-join-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-4), 5vw, var(--space-6));
  box-shadow: var(--shadow);
}
.igpme-price {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 2.6rem;
  color: var(--ink);
  line-height: 1;
}
.igpme-price small { font-size: 1rem; font-weight: 500; color: var(--ink-soft); }
.igpme-checklist { list-style: none; margin: var(--space-3) 0; padding: 0; display: grid; gap: 10px; }
.igpme-checklist li { display: flex; gap: 10px; align-items: flex-start; }
.igpme-checklist li::before {
  content: "";
  flex: 0 0 22px;
  height: 22px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--tint-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2315803D' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* ==========================================================================
   10. FOOTER LEGAL BAR
   ========================================================================== */
.igpme-legal-footer {
  background: var(--ink);
  color: rgba(255,255,255,.82);
  font-size: .9rem;
  padding: var(--space-4) clamp(20px, 5vw, 48px);
}
.igpme-legal-footer__inner {
  max-width: var(--content-wide);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.igpme-legal-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
}
.igpme-legal-footer a {
  color: rgba(255,255,255,.82);
  text-decoration: none;
  font-family: var(--font-head);
  font-weight: 500;
  transition: color var(--t-fast) var(--ease);
}
.igpme-legal-footer a:hover { color: var(--secondary); }
.igpme-legal-footer__meta { color: rgba(255,255,255,.6); }

/* ==========================================================================
   11. FOCUS RINGS + A11Y + REDUCED MOTION
   ========================================================================== */
a:focus-visible,
button:focus-visible,
.igpme-btn:focus-visible,
.igpme-hbtn:focus-visible,
.ct-menu-link:focus-visible,
.wp-block-button__link:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.igpme-card:focus-within {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
/* On dark/purple surfaces use a light ring for contrast */
.igpme-hero a:focus-visible,
.igpme-section--purple a:focus-visible,
.igpme-page-hero a:focus-visible,
.igpme-legal-footer a:focus-visible {
  outline-color: #FFFFFF;
}

/* Skip link */
.skip-link.screen-reader-text:focus {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100000;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-head);
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .igpme-card:hover,
  .igpme-btn:hover,
  .igpme-hbtn:hover,
  .igpme-agenda__item:hover { transform: none; }
}

/* ==========================================================================
   12. RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
  .igpme-split { grid-template-columns: 1fr; }
  .ct-header .menu .ct-menu-link { font-size: .9rem; padding: 8px 9px; }
}

@media (max-width: 880px) {
  /* Below Blocksy's mobile breakpoint the builder swaps to the off-canvas
     menu; keep header tidy and let CTA buttons wrap under the logo row. */
  #header [data-row="middle"] > .ct-container { min-height: 72px; }
  /* Smaller logo on mobile (desktop --logo-max-height is 72px) so it keeps
     breathing room inside the compact mobile bar. */
  :root { --logo-max-height: 60px; }
  .igpme-header-btns { margin-left: var(--space-1); }
  .igpme-header-btns .igpme-hbtn { padding: 9px 14px; font-size: .85rem; }
}

@media (max-width: 640px) {
  body, body.blocksy { font-size: 1rem; }
  .igpme-hero__inner { padding-block: var(--space-6); }
  .igpme-hero__meta { font-size: 1.05rem; }
  .igpme-countdown__unit { min-width: 72px; padding: 12px 12px; }
  .igpme-countdown__num { font-size: 1.9rem; }
  .igpme-header-btns .igpme-hbtn--ghost { display: none; } /* keep one CTA on small screens */
  .igpme-legal-footer__inner { flex-direction: column; align-items: flex-start; }
}

/* R2 fix: hide Blocksy default footer credit row — the custom legal bar is the footer */
#footer.ct-footer{display:none !important}

/* ================= R2 round-3 fixes ================= */
/* Blue tint instead of purple */
:root { --tint: #EEF1FD; }
/* Hide Blocksy's default page title/hero — our .igpme-page-hero is the ONLY banner (fixes duplicate Legal Notice / Publications titles + reclaims space) */
.entry-header, .ct-page-header, .ct-page-hero-section { display: none !important; }
/* Compact hero so it no longer dominates the page */
.igpme-page-hero { padding: clamp(1.6rem, 3.4vw, 2.6rem) clamp(20px, 5vw, 48px) !important; }
.igpme-page-hero__icon { width: 60px !important; height: 60px !important; }
.igpme-page-hero__icon svg { width: 32px !important; height: 32px !important; }
.igpme-page-hero__title { font-size: clamp(1.7rem, 3vw + .4rem, 2.5rem) !important; }
/* Header CTA buttons -> orange-themed (Register solid orange via --accent; Members orange outline) */
.igpme-header-btns .igpme-hbtn--ghost { color: var(--accent) !important; border-color: var(--accent) !important; background: transparent !important; }
.igpme-header-btns .igpme-hbtn--ghost:hover { background: var(--accent) !important; color: #fff !important; border-color: var(--accent) !important; }

/* Remove Blocksy page-title hero wrapper on subpages (our .igpme-page-hero is the only banner) — kills duplicate title + leftover gap */
body:not(.home) .hero-section { display: none !important; }

/* Kopfnavigation: keine Aufklapp-Pfeile (uebernommen aus igpme-redesign-nav.php, 2026-07-27) */
.igpme-nav-caret-off .ct-header .ct-toggle-dropdown-desktop,
.ct-header .ct-toggle-dropdown-desktop,
.ct-header .ct-toggle-dropdown-desktop-ghost,
.ct-header [data-id="menu"] .sub-menu-toggle { display: none !important; }
.ct-header .menu > li > .ct-menu-link { padding-inline-end: .6rem; }

/* igpme-logo-mobile-fix (2026-07-27, Stufe 55%): Kopf-Logo nutzt auf Handy und Tablet 55 Prozent
   der Bildschirmbreite; die zweite Grenze haelt rechts Platz fuer das Menue-Icon frei. Desktop unveraendert. */
.site-logo-container img,
.ct-header [data-id="logo"] img { max-width: 100%; width: auto; height: auto; }
@media (max-width: 999px) {
  .ct-header [data-id="logo"],
  .site-logo-container { max-width: min(55vw, calc(100vw - 96px)); display: inline-flex; align-items: center; }
  .site-logo-container img { max-height: 40px; }
  .ct-header [data-id="menu-trigger"],
  .ct-header .ct-header-trigger { flex: 0 0 auto; min-width: 40px; }
}
@media (max-width: 480px) {
  .ct-header [data-id="logo"],
  .site-logo-container { max-width: min(55vw, calc(100vw - 88px)); }
  .site-logo-container img { max-height: 34px; }
}

/* igpme-btn-content-fix (2026-07-27): Buttons im Seiteninhalt ohne Rahmen, Schrift weiss,
   kein Schlagschatten und kein Anheben beim Hover. Statt 3D-Anmutung ein ruhiger Glow,
   der atmet und beim Ueberfahren aufleuchtet. Respektiert reduzierte Bewegung. */
.entry-content a.igpme-btn,
a.igpme-btn.igpme-btn--primary {
  border: 0 !important;
  color: #fff !important;
  text-decoration: none !important;
  transform: none !important;
  box-shadow: 0 0 16px 1px rgba(46, 48, 146, .32);
  animation: igpme-btn-glow 3.2s ease-in-out infinite;
  will-change: box-shadow;
}
.entry-content a.igpme-btn:hover,
.entry-content a.igpme-btn:focus-visible,
a.igpme-btn.igpme-btn--primary:hover,
a.igpme-btn.igpme-btn--primary:focus-visible {
  color: #fff !important;
  border: 0 !important;
  text-decoration: none !important;
  transform: none !important;
  box-shadow: 0 0 30px 6px rgba(46, 48, 146, .60);
  animation-play-state: paused;
}
@keyframes igpme-btn-glow {
  0%, 100% { box-shadow: 0 0 14px 1px rgba(46, 48, 146, .26); }
  50%      { box-shadow: 0 0 26px 4px rgba(46, 48, 146, .52); }
}
@media (prefers-reduced-motion: reduce) {
  .entry-content a.igpme-btn,
  a.igpme-btn.igpme-btn--primary { animation: none; box-shadow: 0 0 18px 2px rgba(46, 48, 146, .34); }
}
