/* === CDO.me — page-level styles === */

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Skip link — visible only when focused via keyboard. WCAG 2.4.1. */
.cdo-skip-link {
  position: absolute;
  top: -40px;
  left: 8px;
  background: #141414;
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 4px;
  text-decoration: none;
  font-family: var(--font-family-body, "Inter", sans-serif);
  font-size: 14px;
  z-index: 9999;
  transition: top 120ms ease;
}
.cdo-skip-link:focus,
.cdo-skip-link:focus-visible {
  top: 8px;
  outline: 3px solid #ffbb00;
  outline-offset: 2px;
}

/* Strong visible focus ring everywhere. Interactive elements that had
   outline: none in the legacy styling are bailed out here via the
   :focus-visible pseudo-class so mouse users don't see extra rings. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #0a3a8f;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Respect user motion preferences. WCAG 2.3.3. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto; }
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  min-height: 100vh;
  font-family: var(
    --font-family-body,
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif
  );
  background: var(--colors-gray-100, #f5f5f5);
  color: var(--colors-gray-900, #141414);
}

/* --- Custom CDO.me navigation --- */
.cdo-nav-wrapper {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.cdo-nav {
  display: flex;
  align-items: center;
  padding: 16px 5rem;
  gap: 2rem;
}

.cdo-nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  position: relative;
}

.cdo-nav-logo img {
  height: 80px;
  width: auto;
  display: block;
}

.cdo-nav-logo canvas {
  position: absolute;
  top: 0;
  left: 0;
  height: 80px;
  width: auto;
  display: none;
}

.cdo-nav__links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex: 1;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.cdo-nav__links a {
  color: var(--colors-gray-900, #141414);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
  padding: 8px 16px;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}

.cdo-nav__links a[aria-current="page"] {
  font-weight: 900;
}

.cdo-nav__links a:hover {
  color: #052273;
  background: #e0e4f2;
}

.cdo-nav__linkedin {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--colors-gray-300, #d6d6d6);
  background: transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.cdo-nav__linkedin:hover {
  background: transparent;
  border-color: var(--colors-gray-900, #141414);
}

.cdo-nav__linkedin svg {
  width: 20px;
  height: 20px;
  fill: var(--colors-gray-900, #141414);
}

.cdo-nav__cta {
  flex-shrink: 0;
  display: inline-block;
  background: #000;
  color: #fff;
  padding: 10px 24px;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.cdo-nav__cta:hover {
  background: #222;
}

/* Mobile nav */
.cdo-nav__menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.cdo-nav__menu-btn svg {
  width: 24px;
  height: 24px;
  stroke: var(--colors-gray-900, #141414);
  stroke-width: 2;
  fill: none;
}

/* Mobile menu panel */
.cdo-nav__mobile-menu {
  display: none;
  flex-direction: column;
  gap: 0;
  background: #fff;
  padding: 16px 1.5rem 24px;
  border-top: 1px solid #e5e5e5;
}

.cdo-nav__mobile-menu.is-open {
  display: flex;
}

.cdo-nav__mobile-menu a {
  color: var(--colors-gray-900, #141414);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.cdo-nav__mobile-menu a:last-child {
  border-bottom: none;
}

@media (max-width: 768px) {
  .cdo-nav {
    padding: 12px 1.5rem;
  }

  .cdo-nav__links {
    display: none;
  }

  .cdo-nav__linkedin {
    display: none;
  }

  .cdo-nav__cta {
    display: none;
  }

  .cdo-nav__menu-btn {
    display: block;
    margin-left: auto;
  }

  .cdo-section {
    overflow-x: hidden;
  }

  .batarang-prose-area {
    overflow: hidden;
  }
}

/* --- Hero section --- */
.cdo-hero {
  background: #000;
  min-height: 80vh;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  position: relative;
}

.cdo-hero__photo {
  flex: 0 0 50%;
  position: relative;
  overflow: hidden;
}

.cdo-hero__photo img,
.cdo-hero__photo video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top; /* center face in available space */
  display: block;
  cursor: pointer;
}

.cdo-hero__img {
  position: relative;
  z-index: 2; /* above video so opacity fade overlays it */
}

.cdo-hero__video {
  position: absolute;
  top: 0;
  left: 0;
  display: none;
  z-index: 1;
}

.cdo-hero__photo::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 25%;
  background: linear-gradient(to right, transparent, #000);
  pointer-events: none;
  z-index: 3;
}

.cdo-hero__copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 56px;
  color: #fff;
}

.cdo-hero__eyebrow {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: #999;
  margin-bottom: 20px;
  font-weight: 500;
  white-space: nowrap;
}

.cdo-hero__headline {
  font-size: clamp(28px, 3.5vw, 48px);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 32px;
  white-space: nowrap;
}

.cdo-hero__cta {
  display: inline-block;
  background: #fff;
  color: #000;
  padding: 14px 32px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  width: fit-content;
  transition: opacity 0.15s ease;
}

.cdo-hero__cta:hover {
  opacity: 0.9;
}

/* --- Page content column --- */
.cdo-page-content {
  max-width: 75rem;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* --- Content sections --- */
.cdo-section {
  padding: 64px 0;
}

.cdo-section--alt {
  background: var(--colors-base-white, #fff);
}

.cdo-section__prose {
  max-width: 48rem;
  font-size: var(--font-size-text-md, 1rem);
  line-height: 1.7;
  color: var(--colors-gray-700, #404040);
}

.cdo-section__prose p {
  margin: 0 0 1.5em;
}

/* --- Dark sections (Hero, Batman) --- */
.cdo-section--dark {
  background: #0a0a0a;
  color: #fff;
}

.cdo-section--dark .cdo-section__prose {
  color: #bbb;
}

/* Custom section headers (replacing fragno-section-header) */
.cdo-section-header {
  margin-bottom: 24px;
}

.cdo-section-header .cdo-section-header__eyebrow {
  color: var(--colors-gray-900, #141414);
}

.cdo-section-header .cdo-section-header__title {
  color: var(--colors-gray-900, #141414);
}

/* Dark background variant */
.cdo-section-header--dark {
  margin-bottom: 24px;
}

.cdo-section-header__eyebrow {
  font-size: var(--font-size-text-md, 1rem);
  font-weight: 700;
  color: #999;
  margin: 0 0 4px;
}

.cdo-section-header__title {
  font-size: var(--font-size-display-xl, 3.75rem);
  font-weight: var(--font-weight-medium, 500);
  line-height: var(--line-height-display-xl, 1.15);
  letter-spacing: var(--letter-spacing-display-xl, -0.02em);
  color: #fff;
  margin: 0;
}

/* --- Carousel section --- */
.cdo-carousel-wrap {
  padding-bottom: var(--spacing-md, 8px);
}

/* --- News grid --- */
.cdo-news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 24px;
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
}

.cdo-news-item {
  padding: 24px;
  background: var(--colors-base-white, #fff);
  border-radius: var(--radius-xl, 12px);
  border: 1px solid var(--colors-gray-200, #e5e5e5);
}

.cdo-news-item__source {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--colors-gray-500, #737373);
  margin-bottom: 8px;
}

.cdo-news-item__title {
  font-size: var(--font-size-text-lg, 1.125rem);
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 8px;
}

.cdo-news-item__title a {
  color: inherit;
  text-decoration: none;
}

.cdo-news-item__title a:hover {
  text-decoration: underline;
}

.cdo-news-item__excerpt {
  font-size: var(--font-size-text-sm, 0.875rem);
  color: var(--colors-gray-600, #737373);
  line-height: 1.5;
  margin: 0;
}

/* --- Placeholder page --- */
.cdo-placeholder {
  text-align: center;
  padding: 120px 24px;
}

.cdo-placeholder__title {
  font-size: var(--font-size-display-sm, 1.875rem);
  font-weight: 700;
  margin: 0 0 16px;
}

.cdo-placeholder__text {
  font-size: var(--font-size-text-md, 1rem);
  color: var(--colors-gray-600, #737373);
  margin: 0;
}

/* --- Custom footer --- */
.cdo-footer {
  background: #000;
  color: #fff;
  padding: 64px 0 32px;
}

.cdo-footer__inner {
  max-width: 75rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.cdo-footer__brand {
  margin-bottom: 48px;
}

.cdo-footer__row {
  display: grid;
  grid-template-columns: 1fr 2fr 3fr;
  gap: 32px;
  align-items: start;
  margin-bottom: 48px;
}

.cdo-footer__heading {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #999;
  margin: 0 0 16px;
}

.cdo-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cdo-footer__links li {
  margin-bottom: 10px;
}

.cdo-footer__links a {
  color: #ccc;
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 0.15s ease;
}

.cdo-footer__links a:hover {
  color: #fff;
}

/* Social icons within the footer row */

.cdo-footer__social-icons {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.cdo-footer__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid #444;
  color: #ccc;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.cdo-footer__icon:hover {
  color: #fff;
  border-color: #fff;
}

.cdo-footer__icon svg {
  width: 20px;
  height: 20px;
}

.cdo-footer__copyright {
  padding-top: 24px;
  border-top: 1px solid #222;
}

.cdo-footer__copyright p {
  margin: 0;
  font-size: 0.8125rem;
  color: #8a8a8a; /* WCAG AA: 6.2:1 on #000; #666 was 3.66:1, failed 4.5:1 minimum */
}

@media (max-width: 768px) {
  .cdo-footer__row {
    grid-template-columns: 1fr;
  }
}

/* --- Newsletter signup form in footer --- */
.cdo-newsletter-form__label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.cdo-newsletter-form__row {
  display: flex;
  gap: 8px;
}

.cdo-newsletter-form__input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid #444;
  background: #1a1a1a;
  color: #fff;
  font-size: 0.875rem;
  outline: none;
  min-width: 0;
}

.cdo-newsletter-form__input::placeholder {
  color: #888;
}

.cdo-newsletter-form__input:focus {
  border-color: #fff;
}

.cdo-newsletter-form__btn {
  padding: 10px 20px;
  border-radius: 999px;
  border: none;
  background: #fff;
  color: #000;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s ease;
}

.cdo-newsletter-form__btn:hover {
  opacity: 0.9;
}

.cdo-newsletter-form__status {
  font-size: 0.8125rem;
  margin-top: 8px;
  display: none;
}

.cdo-newsletter-form__status--success {
  display: block;
  color: #4caf50;
}

.cdo-newsletter-form__status--error {
  display: block;
  color: #ef5350;
}

/* --- Footer logo (matches header nav logo size and morph behavior) --- */
.cdo-footer-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  position: relative;
}

.cdo-footer-logo__img {
  height: 80px;
  width: auto;
  display: block;
}

.cdo-footer-logo canvas {
  position: absolute;
  top: 0;
  left: 0;
  height: 80px;
  width: auto;
  display: none;
}

/* --- Hiring page --- */
.cdo-hiring {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 1rem 80px;
}

.cdo-hiring__hero {
  margin-bottom: 56px;
}

.cdo-hiring__eyebrow {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--colors-gray-500, #737373);
  margin: 0 0 4px;
}

.cdo-hiring__title {
  font-size: var(--font-size-display-xl, 3.75rem);
  font-weight: var(--font-weight-medium, 500);
  line-height: 1.15;
  margin: 0 0 24px;
  color: var(--colors-gray-900, #141414);
}

.cdo-hiring__intro {
  font-size: var(--font-size-text-lg, 1.125rem);
  line-height: 1.7;
  color: var(--colors-gray-700, #404040);
  margin: 0 0 32px;
  max-width: 600px;
}

.cdo-hiring__cta {
  display: inline-block;
  background: #000;
  color: #fff;
  padding: 16px 40px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.cdo-hiring__cta:hover {
  opacity: 0.85;
}

.cdo-hiring__job {
  border-top: 1px solid var(--colors-gray-200, #e5e5e5);
  padding-top: 40px;
}

.cdo-hiring__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.cdo-hiring__tag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--colors-gray-100, #f5f5f5);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--colors-gray-700, #404040);
}

.cdo-hiring__job-title {
  font-size: var(--font-size-display-sm, 1.875rem);
  font-weight: 700;
  margin: 0 0 32px;
  color: var(--colors-gray-900, #141414);
}

.cdo-hiring__section {
  margin-bottom: 32px;
}

.cdo-hiring__section h3 {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--colors-gray-500, #737373);
  margin: 0 0 12px;
}

.cdo-hiring__section p {
  font-size: var(--font-size-text-md, 1rem);
  line-height: 1.7;
  color: var(--colors-gray-700, #404040);
  margin: 0;
}

.cdo-hiring__section ul {
  margin: 0;
  padding: 0 0 0 20px;
  list-style: disc;
}

.cdo-hiring__section li {
  font-size: var(--font-size-text-md, 1rem);
  line-height: 1.7;
  color: var(--colors-gray-700, #404040);
  margin-bottom: 6px;
}

.cdo-hiring__apply {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--colors-gray-200, #e5e5e5);
}

.cdo-hiring__or {
  margin-top: 16px;
  font-size: 0.9375rem;
  color: var(--colors-gray-600, #737373);
}

.cdo-hiring__or a {
  color: var(--colors-gray-900, #141414);
  font-weight: 600;
  text-decoration: none;
}

.cdo-hiring__or a:hover {
  text-decoration: underline;
}

/* --- Mobile responsive --- */
@media (max-width: 768px) {
  .cdo-hero {
    flex-direction: column;
    min-height: auto;
  }

  .cdo-hero__photo {
    flex: none;
    height: 60vw;
    max-height: 400px;
  }

  .cdo-hero__photo::after {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to bottom, transparent, #000);
  }

  .cdo-hero__copy {
    padding: 24px 24px 48px;
  }

  .cdo-hero__headline {
    white-space: normal;
  }

  .cdo-hero__eyebrow {
    white-space: normal;
  }
}

/* === Batarang interactive system === */

/* The section containing the arm needs relative positioning */
.batarang-section {
  position: relative;
}

/* Arm container — JS handles scroll-based sticky behavior */
.batarang-arm {
  position: absolute;
  top: 0;
  width: 180px;
  z-index: 100;
  transform-origin: 50% 94%;
  cursor: grab;
  will-change: top, position, left;
}

/* Prose area wrapper — relative context for the arm */
.batarang-prose-area {
  position: relative;
}



/* White SVGs in dark sections — arm and stuck wall */
.cdo-section--dark .batarang-arm__img {
  filter: invert(1);
}

/* Green arrow on dark backgrounds (not inverted — use hue-rotate to get #1cc659) */
.cdo-section--dark .batarang-arm__arrow {
  filter: none;
}

.batarang-impact--inverted img {
  filter: invert(1);
}

.batarang-arm:active {
  cursor: grabbing;
}

.batarang-arm__img {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
  user-select: none;
}

.batarang-arm__arrow {
  position: absolute;
  right: -10px;
  top: 30%;
  width: 50px;
  height: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.batarang-arm--hint .batarang-arm__arrow {
  opacity: 1;
}

/* Flying batarang — hidden by default, JS shows it during flight */
.batarang-flying--inverted {
  filter: invert(1);
}

.batarang-flying {
  display: none;
  position: fixed;
  width: 100px;
  height: auto;
  z-index: 500;
  pointer-events: none;
  transform-origin: center center;
}

/* Wall impact */
.batarang-impact {
  position: absolute;
  left: 0;
  z-index: 50;
  pointer-events: none;
}

/* Pretext canvas sections */
[data-pretext-canvas] {
  display: block;
  width: 100%;
  max-width: 100%;
}

/* Hide original prose when canvas is active (JS adds this class) */
.cdo-section__prose--hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* Idle shake animation */
@keyframes batarang-shake {
  0% { transform: rotate(0deg); }
  15% { transform: rotate(3deg); }
  35% { transform: rotate(-3deg); }
  55% { transform: rotate(2deg); }
  75% { transform: rotate(-1deg); }
  100% { transform: rotate(0deg); }
}

.batarang-arm--shaking {
  animation: batarang-shake 0.6s ease-in-out;
}

@media (max-width: 768px) {
  .batarang-arm {
    display: none; /* hide arm on mobile */
  }
}

/* ---------- May 4 launch banner (Star Wars Day) ----------
 * Thin top strip above the nav that announces both games.
 * Dark Tatooine-tone background with a tan eyebrow star — reads
 * as "event banner" without screaming. Removable after May 5:
 *   1. Delete the .cdo-may4-banner block in index.html
 *   2. Delete this CSS block
 * Mobile: stacks vertically; CTAs wrap.
 */
.cdo-may4-banner {
  background: linear-gradient(90deg, #1a0a06 0%, #2c1a0a 50%, #1a0a06 100%);
  color: #f4e6d3;
  border-bottom: 1px solid rgba(255, 196, 110, 0.35);
  font-family: var(--cdo-font-body, "Inter", system-ui, sans-serif);
}
.cdo-may4-banner__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 14px;
  line-height: 1.4;
}
.cdo-may4-banner__eyebrow {
  display: inline-block;
  font-size: 14px;
  color: #ffc46e;
  text-shadow: 0 0 12px rgba(255, 196, 110, 0.7);
  flex: 0 0 auto;
}
.cdo-may4-banner__copy {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}
.cdo-may4-banner__copy strong {
  font-weight: 700;
  margin-right: 6px;
}
.cdo-may4-banner__ctas {
  display: inline-flex;
  gap: 8px;
  flex: 0 0 auto;
  flex-wrap: wrap;
}
.cdo-may4-banner__cta {
  color: #ffc46e;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.4px;
  padding: 4px 10px;
  border: 1px solid rgba(255, 196, 110, 0.45);
  border-radius: 999px;
  white-space: nowrap;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.cdo-may4-banner__cta:hover,
.cdo-may4-banner__cta:focus-visible {
  background: rgba(255, 196, 110, 0.16);
  color: #fff5e0;
  border-color: rgba(255, 196, 110, 0.85);
  outline: none;
}
@media (max-width: 720px) {
  .cdo-may4-banner__inner {
    padding: 12px 16px;
    gap: 8px;
    font-size: 13px;
  }
  .cdo-may4-banner__copy { text-align: center; flex: 1 1 100%; }
  .cdo-may4-banner__ctas { justify-content: center; flex: 1 1 100%; }
  /* Bump the CTA tap area so it meets the 44 px minimum touch
   * target on mobile. Padding goes from 4×10 to 10×14. */
  .cdo-may4-banner__cta {
    padding: 10px 14px;
    font-size: 13px;
  }
}
