/*
Theme Name:  Candidful
Theme URI:   https://candidful.com
Author:      Candidful
Description: Custom dark theme for Candidful — Games Marketing Consultancy. Clean, no legacy code.
Version:     2.3.0
License:     GNU General Public License v2 or later
Text Domain: candidful
Tags:        dark, one-column, custom-colors, custom-menu, featured-images, full-width-template, block-editor-patterns
*/

/* ═══════════════════════════════════════════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════════════════════════════════════════ */
:root {
  --brand:          #8EC7D2;
  --brand-dark:     #5ba8b5;
  --brand-light:    #b8dfe7;
  --brand-subtle:   rgba(142,199,210,0.10);
  --brand-border:   rgba(142,199,210,0.25);
  --brand-glow:     rgba(142,199,210,0.35);

  --surface:        #1a1d23;
  --surface-raised: #22262e;
  --surface-border: #2d333d;

  --text:           #e2e8f0;
  --text-muted:     #94a3b8;
  --text-faint:     #4a5568;
  --text-white:     #ffffff;

  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   14px;
  --radius-full: 9999px;

  --shadow-card:       0 0 0 1px var(--brand-border), 0 8px 32px rgba(0,0,0,0.4);
  --shadow-card-hover: 0 0 0 1px rgba(142,199,210,0.55), 0 16px 48px rgba(0,0,0,0.5);

  --max-w-content: 1152px;
  --max-w-text:    768px;
  --max-w-narrow:  672px;

  --section-py:  6rem;
  --nav-h:       64px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESET
═══════════════════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--surface); font-size: 16px; }
body {
  font-family: var(--font-sans);
  background: var(--surface);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-light); }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ═══════════════════════════════════════════════════════════════════════════
   ACCESSIBILITY
═══════════════════════════════════════════════════════════════════════════ */
.skip-link {
  position: absolute; top: -100%; left: 1rem; z-index: 9999;
  padding: 0.5rem 1rem; background: var(--brand); color: var(--surface);
  border-radius: var(--radius-sm); font-weight: 600; font-size: 0.875rem;
  transition: top 0.15s;
}
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: var(--radius-sm); }

/* ═══════════════════════════════════════════════════════════════════════════
   LAYOUT UTILITIES
═══════════════════════════════════════════════════════════════════════════ */
.cf-container { max-width: var(--max-w-content); margin-inline: auto; padding-inline: 1.25rem; }
.cf-section { padding-block: var(--section-py); border-top: 1px solid rgba(142,199,210,0.12); }
.cf-section--raised { background: var(--surface-raised); }
.cf-text-center { text-align: center; }

/* ═══════════════════════════════════════════════════════════════════════════
   GLOBAL TYPOGRAPHY — front page + page/post templates
═══════════════════════════════════════════════════════════════════════════ */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-sans); color: var(--text-white); line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem);      letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); letter-spacing: -0.015em; }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); }
h4 { font-size: 1.1rem; }
h5 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.06em; }
h6 { font-size: 0.85rem; color: var(--text-muted); }

p { color: var(--text-muted); line-height: 1.75; }
p + p { margin-top: 1em; }
strong, b { color: var(--text); font-weight: 600; }
em, i { color: var(--text-muted); }

.cf-lead { font-size: 1.1rem; color: var(--text-muted); max-width: var(--max-w-narrow); margin-inline: auto; }

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════════════════════ */
.cf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 1.75rem; border-radius: var(--radius-sm); font-weight: 600;
  font-size: 0.9375rem; transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap; text-decoration: none; cursor: pointer;
}
.cf-btn--primary { background: var(--brand); color: var(--surface); }
.cf-btn--primary:hover { background: var(--brand-dark); color: var(--surface); }
.cf-btn--outline { border: 1px solid var(--surface-border); color: var(--text); }
.cf-btn--outline:hover { border-color: var(--brand); color: var(--brand); }
.cf-btn--large { padding: 1rem 2.25rem; font-size: 1.0625rem; }

/* ═══════════════════════════════════════════════════════════════════════════
   NAVIGATION  v2.2.0
   Rendered by candidful_render_header() in functions.php.
   Logo:  the_custom_logo() (Appearance → Customize → Site Identity → Logo)
          or SVG wordmark fallback.
   Menu:  wp_nav_menu( theme_location: 'primary' )
          (Appearance → Customize → Menus → Primary Navigation)
═══════════════════════════════════════════════════════════════════════════ */

/* Header bar */
.cf-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26, 29, 35, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--surface-border);
}
.home .cf-nav { padding-top: 10px; }

/* Inner flex row */
.cf-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: var(--nav-h);
  padding-inline: 1.25rem;
  max-width: var(--max-w-content);
  margin-inline: auto;
}

/* ── Logo ──────────────────────────────────────────────────────────────────── */

/* Home link that wraps both the_custom_logo() and the SVG fallback */
.cf-nav__logo-home {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--brand);
  line-height: 1;
}
.cf-nav__logo-home:hover { color: var(--brand-light); }

/* SVG fallback wordmark */
.cf-nav__logo-svg { display: block; }

/* the_custom_logo() outputs: <a class="custom-logo-link"><img class="custom-logo"></a>
   We wrap it in .cf-nav__logo-home already, so strip the inner <a> link styles
   and constrain the image height to the nav height */
.cf-nav__logo-home .custom-logo-link {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.cf-nav__logo-home .custom-logo {
  height: 40px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  display: block;
}

/* ── Desktop navigation ────────────────────────────────────────────────────── */

/* wp_nav_menu() outputs <ul class="cf-nav__links"><li>…</li></ul>
   Hidden below 768 px, flex row above */
.cf-nav__links {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
  align-items: center;
}

.cf-nav__links li { margin: 0; padding: 0; }

.cf-nav__links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
  white-space: nowrap;
}
.cf-nav__links a:hover,
.cf-nav__links .current-menu-item > a,
.cf-nav__links .current_page_item > a { color: var(--brand); }

/* ── CTA button ────────────────────────────────────────────────────────────── */
.cf-nav__cta {
  font-size: 0.875rem !important;
  padding: 0.5rem 1.1rem !important;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Hamburger ─────────────────────────────────────────────────────────────── */
.cf-nav__hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: color 0.15s;
  background: none;
  border: none;
  cursor: pointer;
}
.cf-nav__hamburger:hover { color: var(--brand); }

/* ── Mobile drawer ─────────────────────────────────────────────────────────── */
.cf-nav__mobile {
  display: none;
  flex-direction: column;
  gap: 0;
  padding: 0.75rem 1.25rem 1.25rem;
  border-top: 1px solid var(--surface-border);
  background: var(--surface-raised);
}
.cf-nav__mobile.is-open { display: flex; }

/* Mobile menu list */
.cf-nav__mobile-list {
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.cf-nav__mobile-list li { margin: 0; }
.cf-nav__mobile-list a {
  display: block;
  padding: 0.65rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
  border-bottom: 1px solid rgba(142,199,210,0.07);
}
.cf-nav__mobile-list a:hover,
.cf-nav__mobile-list .current-menu-item > a { color: var(--brand); }

/* ── Desktop breakpoint ────────────────────────────────────────────────────── */
@media (min-width: 768px) {
  .cf-nav__links    { display: flex; }
  .cf-nav__hamburger { display: none; }
  .cf-nav__mobile   { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════════════════════════════ */
.cf-hero {
  position: relative; overflow: hidden;
  padding-top: calc(var(--section-py) * 1.25);
  padding-bottom: calc(var(--section-py) * 1.4);
  padding-inline: 1.25rem;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(142,199,210,0.12) 0%, transparent 70%);
}
.cf-hero__inner { max-width: var(--max-w-text); margin-inline: auto; text-align: center; }
.cf-hero__title { text-shadow: 0 0 40px var(--brand-glow); margin-bottom: 1.5rem; }
.cf-hero__sub { font-size: 1.1rem; max-width: 42rem; margin-inline: auto; margin-bottom: 2.5rem; }
.cf-hero__ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }

/* ═══════════════════════════════════════════════════════════════════════════
   CUSTOM BLOCK: Badge  (wp-block-candidful-badge / badge-wrap)
   v2.2.3:
   - Alignment via supports.typography.textAlign → adds has-text-align-{value}
     class to the wrapper; WordPress core CSS handles text-align from that.
   - Wrapper (.wp-block-candidful-badge-wrap): layout only, NO border/bg.
   - Pill  (.wp-block-candidful-badge): single border, the visible styled pill.
═══════════════════════════════════════════════════════════════════════════ */

/* Wrapper — layout only. Explicitly reset border/bg so wp-block-styles
   or any default block stylesheet cannot add a second visible border. */
.wp-block-candidful-badge-wrap {
  display: block;
  margin-bottom: 1.5rem;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
}

/* Pill — the only element that carries the brand styling */
.wp-block-candidful-badge {
  display: inline-block;
  background: var(--brand-subtle);
  border: 1px solid var(--brand-border);
  color: var(--brand);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CUSTOM BLOCK: Announcement Banner  (wp-block-candidful-banner)
═══════════════════════════════════════════════════════════════════════════ */
.wp-block-candidful-banner {
  max-width: 44rem; margin: 3.5rem auto 0;
  background: var(--surface-raised); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); padding: 1.25rem 1.5rem;
  text-align: center; transition: box-shadow 0.2s;
}
.wp-block-candidful-banner:hover { box-shadow: var(--shadow-card-hover); }
.wp-block-candidful-banner__label { color: var(--brand); font-weight: 700; font-size: 0.9rem; display: block; margin-bottom: 0.4rem; }
.wp-block-candidful-banner__body { font-size: 0.875rem; line-height: 1.65; color: var(--text-muted); margin: 0; }
.wp-block-candidful-banner__body strong { color: var(--text); }

/* ═══════════════════════════════════════════════════════════════════════════
   CUSTOM BLOCK: Phase Bar  (wp-block-candidful-phase-bar)
   v2.1.6: outer pills rounded, inner pills squared. Separator dividers.
           Link styles for <a> pills. Editor affordances hidden on front end.
═══════════════════════════════════════════════════════════════════════════ */
.wp-block-candidful-phase-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  margin-bottom: 3.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  user-select: none;
  gap: 0;
  -webkit-overflow-scrolling: touch;
}

/* Base pill — no rounding (inner pills stay square on both sides) */
.wp-block-candidful-phase-bar__item {
  padding: 0.45rem 1.1rem;
  background: #22262e;
  border: 1px solid #2d333d;
  color: var(--text-muted);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  border-radius: 0;
  transition: background 0.15s, color 0.15s;
  line-height: 1.4;
  cursor: default;
}

/* Inactive hover */
.wp-block-candidful-phase-bar__item:not(.is-active):hover {
  background: #2d333d;
  color: var(--text);
}

/* Active = brand fill */
.wp-block-candidful-phase-bar__item.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--surface);
}

/* Rounding: left cap on first pill only, right cap on last pill only */
.wp-block-candidful-phase-bar__item.is-first {
  border-radius: var(--radius-full) 0 0 var(--radius-full);
}
.wp-block-candidful-phase-bar__item.is-last {
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
}
/* Single pill gets fully rounded */
.wp-block-candidful-phase-bar__item.is-first.is-last {
  border-radius: var(--radius-full);
}

/* <a> pills — strip browser link defaults, keep pill visual identical to <span> */
a.wp-block-candidful-phase-bar__item {
  text-decoration: none;
  cursor: pointer;
}
a.wp-block-candidful-phase-bar__item:not(.is-active):hover {
  background: #2d333d;
  color: var(--text);
  text-decoration: none;
}
a.wp-block-candidful-phase-bar__item.is-active:hover {
  background: var(--brand-dark);
  color: var(--surface);
}
a.wp-block-candidful-phase-bar__item:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: inherit;
}

/* Thin teal separator between pills */
.wp-block-candidful-phase-bar__sep {
  display: inline-block;
  width: 1px;
  height: 1.25rem;
  background: var(--brand);
  opacity: 0.5;
  flex-shrink: 0;
  align-self: center;
}

/* ── Editor-only affordances — all hidden on the published front end ── */
.wp-block-candidful-phase-bar__link-hint { display: none; }
.cf-phase-link-btn                       { display: none; }

/* Canvas wrapper used only in the editor */
.cf-phase-bar-canvas {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0;
}

/* Pill wrapper used only in the editor */
.cf-phase-pill-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CUSTOM BLOCK: Phase Group  (wp-block-candidful-phase-group)
═══════════════════════════════════════════════════════════════════════════ */
.wp-block-candidful-phase-group { margin-bottom: 3.5rem; }
.wp-block-candidful-phase-group:last-child { margin-bottom: 0; }
.wp-block-candidful-phase-group__label {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 1.25rem; display: block;
}
.wp-block-candidful-phase-group__grid {
  display: grid; gap: 1.25rem; grid-template-columns: 1fr;
}
@media (min-width: 640px) { .wp-block-candidful-phase-group__grid { grid-template-columns: 1fr 1fr; } }

/* Service Card inside Phase Group */
.wp-block-candidful-service-card {
  background: var(--surface-raised); border-radius: var(--radius-lg);
  padding: 1.75rem; box-shadow: var(--shadow-card); transition: box-shadow 0.2s;
}
.wp-block-candidful-service-card:hover { box-shadow: var(--shadow-card-hover); }
.wp-block-candidful-service-card__icon {
  width: 2.5rem; height: 2.5rem; border-radius: var(--radius-sm);
  background: var(--surface); display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem; color: var(--brand); flex-shrink: 0;
}
/* Force brand tint on any SVG child — works with full SVG markup */
.wp-block-candidful-service-card__icon svg {
  width: 1.25rem; height: 1.25rem;
  fill: currentColor; stroke: currentColor; color: var(--brand); overflow: visible;
}
/* Preserve explicit none values so outline-only icons render correctly */
.wp-block-candidful-service-card__icon svg [fill="none"]   { fill: none !important; }
.wp-block-candidful-service-card__icon svg [stroke="none"] { stroke: none !important; }

/* Editor-only icon editor UI — hidden on published front end */
.cf-icon-editor,
.cf-icon-editor__btn,
.cf-icon-editor__field { display: none; }
.wp-block-candidful-service-card h4 { font-size: 1.05rem; margin-bottom: 0.65rem; }
.wp-block-candidful-service-card p { font-size: 0.875rem; line-height: 1.7; }
.wp-block-candidful-service-card__list { margin-top: 0.75rem; display: flex; flex-direction: column; gap: 0.4rem; list-style: none; padding: 0; }
.wp-block-candidful-service-card__list li { display: flex; gap: 0.5rem; font-size: 0.875rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 0; }
.wp-block-candidful-service-card__list .arrow { color: var(--brand); flex-shrink: 0; margin-top: 0.1rem; }

/* ═══════════════════════════════════════════════════════════════════════════
   ENGAGEMENT SCOPE TABLE
═══════════════════════════════════════════════════════════════════════════ */
.cf-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cf-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; text-align: left; }
.cf-table thead tr { border-bottom: 1px solid var(--surface-border); }
.cf-table th { padding: 0.75rem 1.5rem 0.75rem 0; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand); }
.cf-table th:first-child { color: var(--text-white); }
.cf-table tbody tr { border-bottom: 1px solid var(--surface-border); }
.cf-table tbody tr:last-child { border-bottom: none; }
.cf-table td { padding: 1.25rem 1.5rem 1.25rem 0; vertical-align: top; color: var(--text-muted); line-height: 1.7; }
.cf-table td:first-child { font-weight: 600; color: var(--brand); white-space: nowrap; }
.cf-table td:nth-child(2) { white-space: nowrap; }
.cf-table td:nth-child(3) { color: var(--text); }
.cf-table__note { margin-top: 0.75rem; font-size: 0.75rem; color: var(--text-faint); }

/* ═══════════════════════════════════════════════════════════════════════════
   CUSTOM BLOCK: Assessment Grid  (wp-block-candidful-assessment-grid)
═══════════════════════════════════════════════════════════════════════════ */
.wp-block-candidful-assessment-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .wp-block-candidful-assessment-grid { grid-template-columns: repeat(3, 1fr); } }

.wp-block-candidful-assessment-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 1.75rem; box-shadow: var(--shadow-card); transition: box-shadow 0.2s;
}
.wp-block-candidful-assessment-card:hover { box-shadow: var(--shadow-card-hover); }
.wp-block-candidful-assessment-card h3 { color: var(--brand); font-size: 1.05rem; margin-bottom: 0.75rem; }
.wp-block-candidful-assessment-card p { font-size: 0.875rem; line-height: 1.7; }

/* ═══════════════════════════════════════════════════════════════════════════
   CUSTOM BLOCK: Work Grid + Game Card  (wp-block-candidful-work-grid)
═══════════════════════════════════════════════════════════════════════════ */
.wp-block-candidful-work-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 480px) { .wp-block-candidful-work-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .wp-block-candidful-work-grid { grid-template-columns: repeat(4, 1fr); } }

.wp-block-candidful-game-card {
  background: var(--surface-raised); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-card); transition: box-shadow 0.2s;
}
.wp-block-candidful-game-card:hover { box-shadow: var(--shadow-card-hover); }
.wp-block-candidful-game-card__thumb {
  /* Intrinsic aspect ratio for 920×430 source images: 430/920 = 46.739% */
  position: relative;
  width: 100%;
  padding-top: 46.74%;
  overflow: hidden;
  background: var(--surface);
}
.wp-block-candidful-game-card__thumb img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s;
  display: block;
}
.wp-block-candidful-game-card:hover .wp-block-candidful-game-card__thumb img { transform: scale(1.04); }

/* Placeholder shown on published page when no image is set */
.wp-block-candidful-game-card__thumb-placeholder {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--surface-raised);
  border: 1px dashed var(--surface-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-faint); font-size: 0.75rem;
}
.wp-block-candidful-game-card__body { padding: 1.1rem 1.25rem 1.25rem; }
.wp-block-candidful-game-card__tag { display: inline-block; background: var(--brand-subtle); border: 1px solid var(--brand-border); color: var(--brand); font-size: 0.7rem; padding: 0.15rem 0.5rem; border-radius: var(--radius-full); }
.wp-block-candidful-game-card__title { font-size: 0.95rem; font-weight: 600; color: var(--text-white); margin: 0.4rem 0 0.2rem; }
.wp-block-candidful-game-card__meta { font-size: 0.72rem; color: var(--text-faint); margin-bottom: 0.6rem; }
.wp-block-candidful-game-card__desc { font-size: 0.825rem; line-height: 1.65; color: var(--text-muted); }
.wp-block-candidful-game-card__desc strong { color: var(--brand); }

/* ═══════════════════════════════════════════════════════════════════════════
   CUSTOM BLOCK: FAQ List  (wp-block-candidful-faq)
═══════════════════════════════════════════════════════════════════════════ */
.wp-block-candidful-faq { display: flex; flex-direction: column; gap: 0.75rem; }

.wp-block-candidful-faq-item {
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); transition: box-shadow 0.2s; overflow: hidden;
}
.wp-block-candidful-faq-item:hover { box-shadow: var(--shadow-card-hover); }
.wp-block-candidful-faq-item summary {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.25rem; cursor: pointer; list-style: none;
  font-weight: 500; color: var(--text); transition: color 0.15s; gap: 1rem;
}
.wp-block-candidful-faq-item summary::-webkit-details-marker { display: none; }
.wp-block-candidful-faq-item summary:hover { color: var(--brand); }
.wp-block-candidful-faq-item .cf-faq__chevron { width: 1rem; height: 1rem; color: var(--brand); flex-shrink: 0; transition: transform 0.2s; }
.wp-block-candidful-faq-item[open] .cf-faq__chevron { transform: rotate(180deg); }
.wp-block-candidful-faq-item .cf-faq__body { padding: 0 1.25rem 1.1rem; font-size: 0.875rem; line-height: 1.7; color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════════════════════
   CTA
═══════════════════════════════════════════════════════════════════════════ */
.cf-cta__title { text-shadow: 0 0 40px var(--brand-glow); margin-bottom: 1.25rem; }

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER — brand strip + widget area
═══════════════════════════════════════════════════════════════════════════ */
.cf-footer {
  border-top: 1px solid rgba(142,199,210,0.12);
  padding-block: 2.5rem; padding-inline: 1.25rem; background: var(--surface);
}
.cf-footer__inner { max-width: var(--max-w-content); margin-inline: auto; }

.cf-footer__top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem; font-size: 0.8125rem; color: var(--text-faint); margin-bottom: 0;
}
.cf-footer__brand { font-weight: 700; font-size: 0.95rem; color: var(--brand); }
.cf-footer__copyright { color: var(--text-faint); }
.cf-footer__links { display: flex; gap: 1.25rem; list-style: none; padding: 0; margin: 0; }
.cf-footer__links a { color: var(--text-faint); transition: color 0.15s; }
.cf-footer__links a:hover { color: var(--text-muted); }

/* ─── Front-page block content wrapper ──────────────────────────────────── */
.cf-front-page-content {
  padding-block: 0;
}

/* Hero wrapping context — hero gradient spans full width */
.cf-front-page-content > .cf-hero__title,
.cf-front-page-content > .cf-hero__sub,
.cf-front-page-content > .wp-block-buttons.cf-hero__ctas,
.cf-front-page-content > .wp-block-candidful-banner {
  display: block;
  text-align: center;
}

.cf-front-page-content > h1.cf-hero__title {
  text-shadow: 0 0 40px var(--brand-glow);
}

.cf-front-page-content > p.cf-hero__sub {
  font-size: 1.1rem;
  max-width: 42rem;
  margin-inline: auto;
  color: var(--text-muted);
}

.cf-front-page-content > .wp-block-buttons.cf-hero__ctas {
  justify-content: center;
}

/* Sections inside the block front page */
.cf-front-page-content > .wp-block-separator {
  border-color: rgba(142,199,210,0.12);
  margin-block: 4rem;
}

.cf-front-page-content > h2 {
  margin-top: 4rem;
  margin-bottom: 1rem;
}

.cf-front-page-content > .cf-lead {
  margin-bottom: 2rem;
}

/* Assessment section raised bg */
.cf-front-page-content > .wp-block-candidful-assessment-grid {
  background: var(--surface-raised);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-top: 2rem;
}

/* FAQ raised bg */
.cf-front-page-content > .wp-block-candidful-faq {
  margin-top: 1.5rem;
}

/* ─── Footer column ──────────────────────────────────────────────────────── */
.cf-footer__col { min-width: 0; }

/* Widget area — visible only when widgets added */
.cf-footer__widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid var(--surface-border);
}
.cf-footer__widgets .widget-title {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 1rem;
  display: block;
}
.cf-footer__widgets .widget ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.cf-footer__widgets .widget ul li { margin: 0; }
.cf-footer__widgets .widget ul a { font-size: 0.875rem; color: var(--text-muted); transition: color 0.15s; }
.cf-footer__widgets .widget ul a:hover { color: var(--brand); }
.cf-footer__widgets .widget p { font-size: 0.875rem; line-height: 1.65; color: var(--text-muted); margin: 0; }
.cf-footer__widgets .widget p + p { margin-top: 0.5rem; }

/* ═══════════════════════════════════════════════════════════════════════════
   PAGE / POST TEMPLATE STYLING
   Matches front-page design: dark bg, glowing headings, muted text, teal links
═══════════════════════════════════════════════════════════════════════════ */
.cf-page-wrap {
  padding-block: var(--section-py);
  padding-inline: 1.25rem;
  border-top: 1px solid rgba(142,199,210,0.12);
}

.cf-page-header {
  max-width: var(--max-w-content);
  margin-inline: auto;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--surface-border);
}

.cf-page-header__title {
  text-shadow: 0 0 40px var(--brand-glow);
  margin-bottom: 0.75rem;
}

.cf-page-header__meta {
  font-size: 0.8125rem; color: var(--text-faint);
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-top: 0.75rem;
}
.cf-page-header__meta .meta-cat { color: var(--brand); font-weight: 600; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; }
.cf-page-header__meta .meta-date { color: var(--text-faint); }

.cf-page-body { max-width: var(--max-w-content); margin-inline: auto; }

/* Featured image */
.cf-featured-image {
  max-width: var(--max-w-content);
  margin: 0 auto 2.5rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.cf-featured-image img { width: 100%; height: auto; display: block; }

/* Entry content — rich text matching front-page typography */
.entry-content { line-height: 1.8; }
.entry-content > * + * { margin-top: 1.25em; }

.entry-content h2 { color: var(--brand-light); margin-top: 2.5rem; font-size: clamp(1.4rem, 3vw, 1.9rem); }
.entry-content h3 { color: var(--text-white); margin-top: 2rem; }
.entry-content h4 { color: var(--brand); margin-top: 1.5rem; }

.entry-content p { color: var(--text-muted); }
.entry-content strong { color: var(--text); }

.entry-content a { color: var(--brand); border-bottom: 1px solid var(--brand-border); transition: color 0.15s, border-color 0.15s; }
.entry-content a:hover { color: var(--brand-light); border-color: var(--brand); }

.entry-content ul { list-style: disc; padding-left: 1.5rem; }
.entry-content ol { list-style: decimal; padding-left: 1.5rem; }
.entry-content ul li, .entry-content ol li { color: var(--text-muted); margin-bottom: 0.4rem; line-height: 1.7; }

.entry-content blockquote {
  border-left: 3px solid var(--brand); padding-left: 1.25rem;
  margin: 1.75rem 0; color: var(--text-muted); font-style: italic;
}
.entry-content blockquote p { color: var(--text-muted); }
.entry-content blockquote cite { font-size: 0.8rem; color: var(--text-faint); font-style: normal; display: block; margin-top: 0.5rem; }

.entry-content code {
  background: var(--surface-raised); border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm); padding: 0.15em 0.4em;
  font-size: 0.875em; color: var(--brand);
}
.entry-content pre {
  background: var(--surface-raised); border: 1px solid var(--surface-border);
  border-radius: var(--radius-md); padding: 1.25rem; overflow-x: auto;
}
.entry-content pre code { background: none; border: none; padding: 0; }

.entry-content hr { border: none; border-top: 1px solid var(--surface-border); margin-block: 2rem; }

.entry-content img { border-radius: var(--radius-md); max-width: 100%; height: auto; }
.entry-content figure { margin: 2rem 0; }
.entry-content figcaption { text-align: center; font-size: 0.8rem; color: var(--text-faint); margin-top: 0.5rem; }

/* Post navigation */
.cf-post-nav {
  max-width: var(--max-w-content); margin: 3rem auto 0;
  padding-top: 2rem; border-top: 1px solid var(--surface-border);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.cf-post-nav a { font-size: 0.875rem; color: var(--text-muted); transition: color 0.15s; }
.cf-post-nav a:hover { color: var(--brand); }
.cf-post-nav span { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); display: block; margin-bottom: 0.4rem; }

/* ═══════════════════════════════════════════════════════════════════════════
   GUTENBERG BLOCK OVERRIDES — dark theme
═══════════════════════════════════════════════════════════════════════════ */
.wp-block-post-content { max-width: 100%; }
.wp-site-blocks { background: var(--surface); }
.wp-block-template-part { display: contents; }
.wp-block-separator { border-color: var(--surface-border); }
.wp-block-quote { border-left-color: var(--brand); color: var(--text-muted); }
.wp-block-code { background: var(--surface-raised); border-color: var(--surface-border); color: var(--brand); }
.wp-block-table td, .wp-block-table th { border-color: var(--surface-border); color: var(--text-muted); }
.wp-block-table thead th { color: var(--brand); }
.alignwide { max-width: var(--max-w-content); margin-inline: auto; }
.alignfull { max-width: 100%; width: 100%; }

/* ═══════════════════════════════════════════════════════════════════════════
   EDITOR-ONLY UI: remove buttons, add-card tiles, image overlay
   Hidden on the front end — these are editor affordances only.
   The .block-editor-* scope targets the Gutenberg editor canvas.
═══════════════════════════════════════════════════════════════════════════ */

/* Remove buttons — ×  overlay on top-right of each card */
.cf-editor-remove-btn {
  display: none; /* hidden on front end */
}

/* Add-card tiles */
.cf-editor-add-card {
  display: none; /* hidden on front end */
}

/* Image replace overlay button */
.cf-editor-thumb-replace {
  display: none; /* hidden on front end */
}

/* ═══════════════════════════════════════════════════════════════════════════
   WORK-GRID: auto-fill so 5+ cards wrap to new rows naturally
═══════════════════════════════════════════════════════════════════════════ */
@media (min-width: 1024px) {
  .wp-block-candidful-work-grid {
    /* repeat(auto-fill) instead of repeat(4) so 5+ cards wrap */
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   CUSTOM BLOCK: Button  (wp-block-candidful-button)
   v2.1.1 NEW — primary (brand fill) and outline variants
═══════════════════════════════════════════════════════════════════════════ */
.wp-block-candidful-button {
  display: block;
}

.wp-block-candidful-button__link {
  /* inherits cf-btn base styles; these reinforce for saved output */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9375rem;
  font-family: var(--font-sans);
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}

/* Primary */
.wp-block-candidful-button__link.cf-btn--primary {
  background: var(--brand);
  color: var(--surface);
  border: 1px solid transparent;
}
.wp-block-candidful-button__link.cf-btn--primary:hover,
.wp-block-candidful-button__link.cf-btn--primary:focus-visible {
  background: var(--brand-dark);
  color: var(--surface);
  box-shadow: 0 0 0 3px rgba(142,199,210,0.35);
}

/* Outline */
.wp-block-candidful-button__link.cf-btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--surface-border);
}
.wp-block-candidful-button__link.cf-btn--outline:hover,
.wp-block-candidful-button__link.cf-btn--outline:focus-visible {
  border-color: var(--brand);
  color: var(--brand);
  box-shadow: 0 0 0 3px rgba(142,199,210,0.18);
}

/* Large size */
.wp-block-candidful-button__link.cf-btn--large {
  padding: 1rem 2.25rem;
  font-size: 1.0625rem;
}

/* Focus ring for accessibility */
.wp-block-candidful-button__link:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CUSTOM BLOCK: Section Divider  (wp-block-candidful-section-divider)
   v2.1.1 NEW — brand-coloured hr matching index.html section-divider style
═══════════════════════════════════════════════════════════════════════════ */

/* Plain <hr> variant */
.wp-block-candidful-section-divider__hr {
  border: none;
  height: 1px;
  width: 100%;
  display: block;
}

/* Labelled variant — flex row with lines either side of label */
.wp-block-candidful-section-divider__labelled {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
}
.wp-block-candidful-section-divider__line {
  flex: 1;
  height: 1px;
  display: block;
}
.wp-block-candidful-section-divider__label {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Colour variants */
.cf-sd-colour-brand .wp-block-candidful-section-divider__line,
.cf-sd-colour-brand.wp-block-candidful-section-divider__hr {
  background: rgba(142, 199, 210, 0.25);
}
.cf-sd-colour-brand .wp-block-candidful-section-divider__label { color: var(--brand); }

.cf-sd-colour-muted .wp-block-candidful-section-divider__line,
.cf-sd-colour-muted.wp-block-candidful-section-divider__hr {
  background: var(--surface-border);
}
.cf-sd-colour-muted .wp-block-candidful-section-divider__label { color: var(--text-muted); }

.cf-sd-colour-faint .wp-block-candidful-section-divider__line,
.cf-sd-colour-faint.wp-block-candidful-section-divider__hr {
  background: rgba(74, 85, 104, 0.5);
}
.cf-sd-colour-faint .wp-block-candidful-section-divider__label { color: var(--text-faint); }

/* Spacing variants — applied as margin-block on the wrapper */
.cf-sd-spacing-normal {
  margin-block: 4rem;
}
.cf-sd-spacing-tight {
  margin-block: 2rem;
}
.cf-sd-spacing-wide {
  margin-block: 6rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CUSTOM BLOCK: Engagement Table  (wp-block-candidful-engagement-table)
   v2.1.2 NEW
═══════════════════════════════════════════════════════════════════════════ */
.wp-block-candidful-engagement-table { width: 100%; }

.wp-block-candidful-engagement-table .cf-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.wp-block-candidful-engagement-table .cf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  text-align: left;
}

/* Header row */
.wp-block-candidful-engagement-table .cf-table thead tr {
  border-bottom: 1px solid var(--surface-border);
}
.wp-block-candidful-engagement-table .cf-table th {
  padding: 0.75rem 1.5rem 0.75rem 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  vertical-align: bottom;
}
/* First header cell — white label */
.wp-block-candidful-engagement-table .cf-table thead th:first-child {
  color: var(--text-white);
}

/* Body rows */
.wp-block-candidful-engagement-table .cf-table tbody tr {
  border-bottom: 1px solid var(--surface-border);
  vertical-align: top;
}
.wp-block-candidful-engagement-table .cf-table tbody tr:last-child {
  border-bottom: none;
}
.wp-block-candidful-engagement-table .cf-table tbody td,
.wp-block-candidful-engagement-table .cf-table tbody th {
  padding: 1.25rem 1.5rem 1.25rem 0;
  color: var(--text-muted);
  line-height: 1.7;
  vertical-align: top;
}
/* First body column (th[scope=row]) — brand teal, semibold */
.wp-block-candidful-engagement-table .cf-table tbody th[scope='row'] {
  font-weight: 600;
  color: var(--brand);
  white-space: nowrap;
}
.wp-block-candidful-engagement-table .cf-table__note {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-faint);
}

/* ─── Service card icon picker (editor-only affordance) ──────────────────
   Front end: icon container unchanged. Editor: clickable + pencil hint.
─────────────────────────────────────────────────────────────────────────── */
/* Editor icon hint overlay — hidden on front end */
.cf-editor-icon-hint {
  display: none;
}

/* Editor table controls — hidden on front end */
.cf-editor-col-remove,
.cf-editor-row-remove,
.cf-editor-add-col-btn,
.cf-editor-add-row-btn {
  display: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PAGE TEMPLATE: Candidful Landing Page  (page-landing.php)
   Body class: .candidful-landing  (added via body_class filter)
═══════════════════════════════════════════════════════════════════════════ */

/* Remove nav border-bottom so content sits flush against the header */
.candidful-landing .cf-nav {
  border-bottom: none !important;
}

/* Full-width content wrapper — no max-width container constraint */
.cf-landing-wrap {
  width: 100%;
}

/* Body area — content goes edge-to-edge unless the blocks themselves add padding */
.cf-landing-body {
  width: 100%;
}

.cf-landing-body .entry-content {
  max-width: 100%;
}
