/**
 * @file
 * COcyber Final Conference Popup — editorial save-the-date design.
 *
 * Aesthetic: editorial press card. Display serif (Fraunces) for the title,
 * geometric mono (IBM Plex Mono) for technical / dateline elements, refined
 * sans (IBM Plex Sans) for body. COcyber palette: deep navy with a single
 * lime accent. All selectors scoped under .cfcp- or #cocyberFinalConferenceModal.
 */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500;600&display=swap');

.cfcp-wrapper {
  --cfcp-navy: #0B4A89;
  --cfcp-navy-deep: #06305a;
  --cfcp-ink: #0d1622;
  --cfcp-paper: #fbfaf6;
  --cfcp-paper-warm: #f3efe5;
  --cfcp-rule: #1f2b3d;
  --cfcp-muted: #6b7180;
  --cfcp-lime: #AFFC29;
  --cfcp-green-deep: #2f6b2c;

  --cfcp-font-display: 'Fraunces', 'Times New Roman', Georgia, serif;
  --cfcp-font-body: 'IBM Plex Sans', system-ui, -apple-system, Segoe UI, sans-serif;
  --cfcp-font-mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;

  display: block;
  width: 100%;
}

/* ----------------------------------------------------------------------------
 * Modal shell — break out of Bootstrap defaults.
 * -------------------------------------------------------------------------- */

#cocyberFinalConferenceModal.cfcp-modal .cfcp-dialog {
  max-width: 560px;
  margin: 1.75rem auto;
}

#cocyberFinalConferenceModal .cfcp-content {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 4px;
  background: var(--cfcp-paper);
  color: var(--cfcp-ink);
  box-shadow:
    0 0 0 1px rgba(13, 22, 34, 0.08),
    0 30px 60px -20px rgba(6, 48, 90, 0.45),
    0 18px 40px -25px rgba(13, 22, 34, 0.35);
  font-family: var(--cfcp-font-body);
}

/* Subtle textured paper background — a tightly tiled noise of dots. */
#cocyberFinalConferenceModal .cfcp-content::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(13, 22, 34, 0.045) 1px, transparent 1px);
  background-size: 5px 5px;
  opacity: 0.6;
  mix-blend-mode: multiply;
}

#cocyberFinalConferenceModal .modal-backdrop.show {
  opacity: 0.55;
}

/* ----------------------------------------------------------------------------
 * Hero image — full-bleed top banner with overlay treatments.
 * -------------------------------------------------------------------------- */

#cocyberFinalConferenceModal .cfcp-hero {
  position: relative;
  margin: 0;
  height: 188px;
  overflow: hidden;
  background: var(--cfcp-navy-deep);
  isolation: isolate;
}

#cocyberFinalConferenceModal .cfcp-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.05) contrast(1.02);
  transform: scale(1.02);
}

/* Color veil — deepen navy and unify the image with the COcyber palette. */
#cocyberFinalConferenceModal .cfcp-hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(6, 48, 90, 0.10) 0%,
      rgba(6, 48, 90, 0.35) 55%,
      rgba(13, 22, 34, 0.65) 100%),
    linear-gradient(110deg,
      rgba(11, 74, 137, 0.25) 0%,
      rgba(47, 107, 44, 0.18) 100%);
  mix-blend-mode: multiply;
}

/* Faint grid overlay — distant nod to cyber / surveying motif. */
#cocyberFinalConferenceModal .cfcp-hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(175, 252, 41, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(175, 252, 41, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.7;
}

/* Hero stamp — bottom-right type detail, monospaced "INVITATION EU·2026". */
#cocyberFinalConferenceModal .cfcp-hero__stamp {
  position: absolute;
  right: 1.25rem;
  bottom: 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  font-family: var(--cfcp-font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  color: var(--cfcp-lime);
  text-transform: uppercase;
  line-height: 1.2;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

#cocyberFinalConferenceModal .cfcp-hero__stamp-line + .cfcp-hero__stamp-line {
  color: #e6f4d4;
}

/* Sharp lime accent strip — a single confident horizontal mark at the seam. */
#cocyberFinalConferenceModal .cfcp-hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--cfcp-lime);
  box-shadow: 0 0 18px 0 rgba(175, 252, 41, 0.55);
}

/* ----------------------------------------------------------------------------
 * Close button — minimal × in a circular frame, top-right over the hero.
 * -------------------------------------------------------------------------- */

#cocyberFinalConferenceModal .cfcp-close {
  position: absolute;
  top: 0.875rem;
  right: 0.875rem;
  z-index: 10;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(13, 22, 34, 0.45);
  color: #fbfaf6;
  cursor: pointer;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

#cocyberFinalConferenceModal .cfcp-close:hover,
#cocyberFinalConferenceModal .cfcp-close:focus-visible {
  background: rgba(13, 22, 34, 0.85);
  border-color: var(--cfcp-lime);
  color: var(--cfcp-lime);
  transform: rotate(90deg);
  outline: none;
}

/* ----------------------------------------------------------------------------
 * Body — editorial layout.
 * -------------------------------------------------------------------------- */

#cocyberFinalConferenceModal .cfcp-body {
  position: relative;
  padding: 1.75rem 2rem 1.25rem;
}

/* SAVE THE DATE eyebrow with leading hairline. */
#cocyberFinalConferenceModal .cfcp-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1rem;
  font-family: var(--cfcp-font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cfcp-navy);
}

#cocyberFinalConferenceModal .cfcp-eyebrow__mark {
  flex: 0 0 28px;
  height: 1px;
  background: var(--cfcp-navy);
}

/* Display title — Fraunces, generous tracking-tight, optical at large size. */
#cocyberFinalConferenceModal .cfcp-title {
  margin: 0 0 1.25rem;
  font-family: var(--cfcp-font-display);
  font-optical-sizing: auto;
  font-variation-settings: 'opsz' 96, 'SOFT' 0, 'WONK' 0;
  font-weight: 500;
  font-size: clamp(1.85rem, 2.4vw + 1rem, 2.4rem);
  line-height: 1.02;
  letter-spacing: -0.018em;
  color: var(--cfcp-ink);
  text-wrap: balance;
}

/* Date / Place meta block — formal save-the-date card style. */
#cocyberFinalConferenceModal .cfcp-meta {
  display: flex;
  align-items: stretch;
  gap: 1.1rem;
  margin-bottom: 1.1rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--cfcp-rule);
  border-bottom: 1px solid var(--cfcp-rule);
}

#cocyberFinalConferenceModal .cfcp-meta__block {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-width: 0;
}

#cocyberFinalConferenceModal .cfcp-meta__label {
  font-family: var(--cfcp-font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cfcp-muted);
}

#cocyberFinalConferenceModal .cfcp-meta__value {
  font-family: var(--cfcp-font-display);
  font-weight: 500;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--cfcp-ink);
  line-height: 1.15;
}

#cocyberFinalConferenceModal .cfcp-meta__divider {
  width: 1px;
  background: var(--cfcp-rule);
  opacity: 0.35;
}

/* Tagline — quiet editorial subtitle. */
#cocyberFinalConferenceModal .cfcp-tagline {
  margin: 0 0 1.4rem;
  font-family: var(--cfcp-font-body);
  font-size: 0.95rem;
  line-height: 1.5;
  color: #2a3344;
  max-width: 44ch;
}

/* ----------------------------------------------------------------------------
 * CTA + secondary link.
 * -------------------------------------------------------------------------- */

#cocyberFinalConferenceModal .cfcp-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
}

#cocyberFinalConferenceModal .cfcp-cta {
  --cta-bg: var(--cfcp-ink);
  --cta-fg: #fbfaf6;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.95rem 1.6rem;
  background: var(--cta-bg);
  color: var(--cta-fg);
  border: 1px solid var(--cta-bg);
  border-radius: 2px;
  font-family: var(--cfcp-font-body);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: color 200ms ease, border-color 200ms ease;
}

/* Lime fill sweep on hover — left-to-right, behind the label. */
#cocyberFinalConferenceModal .cfcp-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--cfcp-lime);
  transform: translateX(-101%);
  transition: transform 280ms cubic-bezier(0.7, 0, 0.2, 1);
}

#cocyberFinalConferenceModal .cfcp-cta:hover,
#cocyberFinalConferenceModal .cfcp-cta:focus-visible {
  color: var(--cfcp-ink);
  border-color: var(--cfcp-lime);
  outline: none;
}

#cocyberFinalConferenceModal .cfcp-cta:hover::before,
#cocyberFinalConferenceModal .cfcp-cta:focus-visible::before {
  transform: translateX(0);
}

#cocyberFinalConferenceModal .cfcp-cta__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 220ms cubic-bezier(0.7, 0, 0.2, 1);
}

#cocyberFinalConferenceModal .cfcp-cta:hover .cfcp-cta__arrow {
  transform: translateX(4px);
}

/* Read-the-programme link — italic display, animated underline. */
#cocyberFinalConferenceModal .cfcp-readmore {
  position: relative;
  font-family: var(--cfcp-font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 0.98rem;
  color: var(--cfcp-navy);
  text-decoration: none;
  padding-bottom: 2px;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: color 180ms ease, background-size 280ms cubic-bezier(0.7, 0, 0.2, 1);
}

#cocyberFinalConferenceModal .cfcp-readmore::after {
  content: ' →';
  font-style: normal;
  letter-spacing: -0.02em;
  transition: transform 220ms ease;
  display: inline-block;
}

#cocyberFinalConferenceModal .cfcp-readmore:hover {
  color: var(--cfcp-green-deep);
}

#cocyberFinalConferenceModal .cfcp-readmore:hover::after {
  transform: translateX(3px);
}

/* ----------------------------------------------------------------------------
 * Footer — discreet "don't show again" line.
 * -------------------------------------------------------------------------- */

#cocyberFinalConferenceModal .cfcp-footer {
  position: relative;
  padding: 0.9rem 2rem 1.15rem;
  border-top: 1px solid rgba(13, 22, 34, 0.08);
  background: var(--cfcp-paper-warm);
}

#cocyberFinalConferenceModal .cfcp-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  cursor: pointer;
  user-select: none;
}

#cocyberFinalConferenceModal .cfcp-checkbox input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

#cocyberFinalConferenceModal .cfcp-checkbox__box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: 1px solid var(--cfcp-rule);
  background: #ffffff;
  color: transparent;
  border-radius: 2px;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

#cocyberFinalConferenceModal .cfcp-checkbox input:checked ~ .cfcp-checkbox__box {
  background: var(--cfcp-ink);
  border-color: var(--cfcp-ink);
  color: var(--cfcp-lime);
}

#cocyberFinalConferenceModal .cfcp-checkbox input:focus-visible ~ .cfcp-checkbox__box {
  box-shadow: 0 0 0 3px rgba(175, 252, 41, 0.4);
}

#cocyberFinalConferenceModal .cfcp-checkbox__label {
  font-family: var(--cfcp-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cfcp-muted);
}

/* ----------------------------------------------------------------------------
 * Entrance animation — staggered reveal of body elements.
 * -------------------------------------------------------------------------- */

#cocyberFinalConferenceModal.show .cfcp-eyebrow,
#cocyberFinalConferenceModal.show .cfcp-title,
#cocyberFinalConferenceModal.show .cfcp-meta,
#cocyberFinalConferenceModal.show .cfcp-tagline,
#cocyberFinalConferenceModal.show .cfcp-actions {
  opacity: 0;
  transform: translateY(8px);
  animation: cfcp-rise 520ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

#cocyberFinalConferenceModal.show .cfcp-eyebrow  { animation-delay:  80ms; }
#cocyberFinalConferenceModal.show .cfcp-title    { animation-delay: 160ms; }
#cocyberFinalConferenceModal.show .cfcp-meta     { animation-delay: 260ms; }
#cocyberFinalConferenceModal.show .cfcp-tagline  { animation-delay: 340ms; }
#cocyberFinalConferenceModal.show .cfcp-actions  { animation-delay: 420ms; }

@keyframes cfcp-rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  #cocyberFinalConferenceModal.show .cfcp-eyebrow,
  #cocyberFinalConferenceModal.show .cfcp-title,
  #cocyberFinalConferenceModal.show .cfcp-meta,
  #cocyberFinalConferenceModal.show .cfcp-tagline,
  #cocyberFinalConferenceModal.show .cfcp-actions {
    opacity: 1;
    transform: none;
    animation: none;
  }

  #cocyberFinalConferenceModal .cfcp-close,
  #cocyberFinalConferenceModal .cfcp-cta,
  #cocyberFinalConferenceModal .cfcp-cta::before,
  #cocyberFinalConferenceModal .cfcp-cta__arrow,
  #cocyberFinalConferenceModal .cfcp-readmore,
  #cocyberFinalConferenceModal .cfcp-readmore::after {
    transition: none !important;
  }
}

/* ----------------------------------------------------------------------------
 * Responsive — comfortable on small screens.
 * -------------------------------------------------------------------------- */

@media screen and (max-width: 575px) {
  #cocyberFinalConferenceModal.cfcp-modal .cfcp-dialog {
    max-width: calc(100% - 1.5rem);
    margin: 0.75rem auto;
  }

  #cocyberFinalConferenceModal .cfcp-hero {
    height: 152px;
  }

  #cocyberFinalConferenceModal .cfcp-body {
    padding: 1.4rem 1.4rem 1rem;
  }

  #cocyberFinalConferenceModal .cfcp-footer {
    padding: 0.85rem 1.4rem 1rem;
  }

  #cocyberFinalConferenceModal .cfcp-title {
    font-size: 1.7rem;
  }

  #cocyberFinalConferenceModal .cfcp-meta {
    gap: 0.8rem;
  }

  #cocyberFinalConferenceModal .cfcp-meta__value {
    font-size: 1rem;
  }

  #cocyberFinalConferenceModal .cfcp-cta {
    width: 100%;
    justify-content: space-between;
  }
}
