/* ==========================================================================
   CoolGames — design system ("Flagship")
   ========================================================================== */

@font-face { font-family: 'Fredoka'; src: url('/assets/fonts/Fredoka-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Fredoka'; src: url('/assets/fonts/Fredoka-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Fredoka'; src: url('/assets/fonts/Fredoka-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('/assets/fonts/Manrope-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('/assets/fonts/Manrope-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('/assets/fonts/Manrope-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('/assets/fonts/Manrope-800.woff2') format('woff2'); font-weight: 800; font-display: swap; }

:root {
  /* CoolGames blue, sampled from the logo — pushed bolder for the Flagship system */
  --blue-900: #122a63;
  --blue-800: #16357a;
  --blue-700: #1c4bb0;
  --blue-600: #2158c9;
  --blue-500: #2f6bdb;
  --blue-400: #5a8aec;
  --blue-300: #8fb0f3;
  --blue-200: #c3d7fa;
  --blue-100: #e4edfd;
  --blue-50:  #f2f7fe;

  /* Playful accents */
  --coral-600: #e0492f;
  --coral-500: #ff5a3c;
  --coral-400: #ff7d5c;
  --sun-500:  #ffc93c;
  --sun-400:  #ffd766;

  /* Neutrals */
  --ink-900: #12213f;
  --ink-700: #2b3550;
  --ink-500: #5a6a8a;
  --ink-300: #9aa4c0;
  --ink-100: #e7eaf5;
  --ink-50:  #f7f8fc;
  --cream:   #fff6e4;
  --white:   #ffffff;

  --font-display: 'Fredoka', system-ui, sans-serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 8px rgba(18, 42, 99, 0.07);
  --shadow-md: 0 14px 30px rgba(18, 42, 99, 0.14);
  --shadow-lg: 0 30px 60px rgba(18, 42, 99, 0.22);

  --container-width: 1180px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-700);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, h5 { font-family: var(--font-display); color: var(--ink-900); line-height: 1.12; margin: 0 0 0.5em; font-weight: 600; }
p { margin: 0 0 1em; }
button { font-family: inherit; }

h1 { font-size: clamp(2.4rem, 5vw, 3.75rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.3rem; }
.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--blue-600);
  background: var(--blue-100);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 1em;
}
.eyebrow.on-dark { color: var(--ink-900); background: var(--sun-500); }
.lede { font-size: 1.15rem; color: var(--ink-500); }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 88px 0; }
.section--tight { padding: 56px 0; }
.section--dark { background: var(--blue-900); color: var(--ink-100); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--white); }
.section--dark .lede { color: var(--blue-200); }
.section--tint { background: var(--cream); }
.section-head { max-width: 640px; margin: 0 0 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.grid { display: grid; gap: 28px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(2px); }
.btn--primary {
  background: linear-gradient(180deg, var(--coral-400), var(--coral-500));
  color: var(--white);
  box-shadow: 0 5px 0 var(--coral-600);
}
.btn--primary:hover { transform: translateY(-2px); }
.btn--sun {
  background: linear-gradient(180deg, var(--sun-400), var(--sun-500));
  color: var(--blue-900);
  box-shadow: 0 5px 0 #cc9a1c;
}
.btn--sun:hover { transform: translateY(-2px); }
.btn--ghost { border-color: var(--blue-200); color: var(--blue-600); background: var(--white); }
.btn--ghost:hover { border-color: var(--blue-500); transform: translateY(-2px); }
.btn--on-dark { border-color: rgba(255,255,255,0.4); color: var(--white); }
.btn--on-dark:hover { border-color: var(--white); background: rgba(255,255,255,0.1); transform: translateY(-2px); }
.btn--sm { padding: 10px 18px; font-size: 0.86rem; }

/* ---------- Header / nav ---------- */
.site-header {
  background: var(--blue-500);
}
.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--white); }
.brand img { height: 56px; width: auto; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--blue-100);
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  transition: background 0.15s ease, color 0.15s ease;
}
.main-nav a:hover { background: rgba(255,255,255,0.12); color: var(--white); }
.main-nav a.is-active { color: var(--blue-900); background: var(--sun-500); }
.nav-toggle { display: none; }

@media (max-width: 900px) {
  .main-nav { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* ---------- Hero (homepage) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(480px 380px at 92% 6%, rgba(255,201,60,.30), transparent 62%),
    radial-gradient(420px 360px at 4% 96%, rgba(255,90,60,.24), transparent 60%),
    linear-gradient(150deg, var(--blue-500), var(--blue-700) 65%, var(--blue-900));
  color: var(--white);
  clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
  padding-bottom: 76px;
}
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero__inner { position: relative; padding: 40px 0 8px; }
.hero h1 { color: var(--white); margin-bottom: 0.35em; }
.hero .lede { color: var(--blue-100); margin-bottom: 1.8em; max-width: 34em; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero__flagship {
  background: var(--cream);
  border-radius: var(--radius-xl);
  padding: 14px;
  box-shadow: var(--shadow-lg);
  transform: rotate(1.5deg);
}
.hero__flagship img, .hero__flagship video { width: 100%; border-radius: calc(var(--radius-xl) - 10px); display: block; aspect-ratio: 16/10; object-fit: cover; background: #000; }
.hero__flagship-meta { display: flex; align-items: center; justify-content: space-between; padding: 14px 8px 4px; }
.hero__flagship-meta h3 { font-size: 1.1rem; margin: 0; color: var(--blue-900); }
.hero__flagship-badge {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); font-weight: 600;
  font-size: 12.5px; background: var(--blue-900); color: var(--white); padding: 8px 14px; border-radius: var(--radius-pill);
}

/* ---------- Page header (non-home hero) ---------- */
.page-header {
  background: linear-gradient(155deg, var(--blue-600), var(--blue-800) 75%);
  color: var(--white);
  padding: 72px 0 64px;
  text-align: center;
}
.page-header h1 { color: var(--white); }
.page-header .lede { color: var(--blue-100); max-width: 620px; margin-left: auto; margin-right: auto; }
.page-header .btn { margin-top: 0.5em; }

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--ink-100);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
a.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.card__body { padding: 26px; }

/* Workable jobs widget */
#whr_embed_hook .whr-items { list-style: none; margin: 0; padding: 0; }
#whr_embed_hook .whr-item { border-bottom: 1px solid var(--ink-100); padding: 6px 0; }
#whr_embed_hook .whr-item:last-child { border-bottom: none; }
#whr_embed_hook .whr-title { margin: 0; font-size: 1.05rem; }
#whr_embed_hook .whr-title a { color: var(--blue-600); font-weight: 700; transition: color 0.15s ease; }
#whr_embed_hook .whr-title a:hover { color: var(--coral-500); text-decoration: underline; }
#whr_embed_hook .whr-info { list-style: none; margin: 4px 0 0; padding: 0; }
.card__media { aspect-ratio: 16/10; overflow: hidden; background: var(--blue-50); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card h3 { font-size: 1.2rem; margin-bottom: 0.4em; }
.card p { color: var(--ink-500); font-size: 0.96rem; margin-bottom: 0; }
.card__link { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-weight: 700; color: var(--blue-600); font-size: 0.92rem; }

/* Game card specific */
.game-card__media { aspect-ratio: 1/1; }

/* Testimonial */
.testimonial {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--ink-100);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.testimonial p { font-size: 1.02rem; color: var(--ink-700); }
.testimonial p::before { content: "\201C"; color: var(--blue-300); font-family: var(--font-display); }
.testimonial cite { display: block; margin-top: 16px; font-style: normal; font-weight: 700; color: var(--ink-900); font-size: 0.92rem; }
.testimonial cite span { display: block; font-weight: 500; color: var(--ink-500); font-size: 0.85rem; margin-top: 2px; }

/* Stat row */
.stats { display: flex; flex-wrap: wrap; gap: 40px; }
.stat strong { display: block; font-family: var(--font-display); font-weight: 600; font-size: 2.2rem; color: var(--blue-600); }
.stat span { color: var(--ink-500); font-size: 0.92rem; }

/* News list */
.news-row {
  display: flex;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--ink-100);
}
.news-row__media { flex: 0 0 200px; aspect-ratio: 16/10; border-radius: var(--radius-md); overflow: hidden; background: var(--blue-50); }
.news-row__media img { width: 100%; height: 100%; object-fit: cover; }
.news-row__date { font-size: 0.82rem; font-weight: 700; color: var(--blue-500); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.news-row h3 { margin-bottom: 6px; font-size: 1.2rem; }
.news-row p { color: var(--ink-500); font-size: 0.95rem; }
@media (max-width: 640px) {
  .news-row { flex-direction: column; }
  .news-row__media { flex-basis: auto; }
}

/* Archive table */
.archive-table { width: 100%; border-collapse: collapse; }
.archive-table td { padding: 14px 10px; border-bottom: 1px solid var(--ink-100); font-size: 0.95rem; }
.archive-table td:first-child { color: var(--ink-500); white-space: nowrap; width: 160px; font-weight: 600; }
.archive-table a:hover { color: var(--blue-600); }

/* FAQ / accordion */
.faq-group h3.faq-group-title { margin: 40px 0 16px; font-size: 1.1rem; color: var(--blue-700); }
.faq-item {
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--white);
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 22px;
  font-weight: 700;
  color: var(--ink-900);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--blue-500);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body { padding: 0 22px 20px; color: var(--ink-500); }

/* Office / contact cards */
.office-card { padding: 30px; }
.office-card h3 { color: var(--blue-700); }
.office-card address { font-style: normal; color: var(--ink-500); margin-bottom: 16px; line-height: 1.7; }
.office-card a.mail { font-weight: 700; color: var(--blue-600); }

/* Team */
.team-card { text-align: center; }
.team-card img { width: 148px; height: 148px; border-radius: 50%; object-fit: cover; margin: 0 auto 18px; box-shadow: var(--shadow-md); }
.team-card h3 { margin-bottom: 2px; }
.team-card .role { color: var(--blue-500); font-weight: 700; font-size: 0.9rem; margin-bottom: 14px; display: block; }
.team-card p { color: var(--ink-500); font-size: 0.94rem; text-align: left; }

/* Legal / long-form text */
.prose { max-width: 780px; }
.prose h2 { margin-top: 2em; font-size: 1.4rem; }
.prose h3 { margin-top: 1.6em; font-size: 1.1rem; }
.prose p, .prose li { color: var(--ink-500); }
.prose ul { list-style: disc; padding-left: 1.4em; margin-bottom: 1em; }
.prose ul li { margin-bottom: 0.4em; }

/* Article */
.article-meta { color: var(--blue-200); font-size: 0.9rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.article-body { max-width: 720px; margin: 0 auto; }
.article-body img { border-radius: var(--radius-lg); margin: 32px 0; max-width: 100%; height: auto; }
.article-body p { color: var(--ink-700); font-size: 1.05rem; }
.article-body iframe { max-width: 100%; aspect-ratio: 16/9; width: 100%; height: auto; border-radius: var(--radius-lg); margin: 32px 0; }

/* CTA banner */
.cta-banner {
  background: linear-gradient(120deg, var(--blue-700), var(--blue-900));
  border-radius: var(--radius-xl);
  padding: 52px;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-banner h2 { color: var(--white); margin-bottom: 0.2em; }
.cta-banner p { color: var(--blue-100); margin: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--blue-900);
  color: var(--blue-200);
  padding: 64px 0 28px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); color: var(--white); font-weight: 600; font-size: 1.1rem; }
.footer-brand img { height: 34px; }
.footer-nav { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-nav h4 { color: var(--white); font-family: var(--font-display); font-weight: 500; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 14px; }
.footer-nav ul li { margin-bottom: 10px; }
.footer-nav a { font-size: 0.94rem; }
.footer-nav a:hover { color: var(--white); }
.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
}
.footer-social a:hover { background: var(--sun-500); border-color: var(--sun-500); color: var(--blue-900); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  font-size: 0.85rem;
}
.footer-bottom a:hover { color: var(--white); }
.footer-legal { display: flex; gap: 20px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__flagship { max-width: 480px; }
}
@media (max-width: 640px) {
  .cta-banner { padding: 32px; }
  .footer-nav { gap: 28px; }
  .hero { clip-path: polygon(0 0, 100% 0, 100% 96%, 0 100%); }
}
