/* ============================================================
   Celestine — Component & layout styles
   Loaded after Astra's style.css + tokens.css. All visual
   decisions map to tokens in tokens.css.
   ============================================================ */

/* ============================================================
   1. Base & ambient page treatment
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-relaxed);
  color: var(--text-body);
  /* !important so Astra's dynamic global-colour CSS (which sets a white
     background-color and background-image:none on body) can't flatten the
     cosmos backdrop — that leak made transparent sections render white. */
  background-color: var(--surface-page) !important;
  background-image: var(--gradient-aura), var(--gradient-cosmos) !important;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

img, svg, video { display: block; max-width: 100%; height: auto; }

a {
  color: var(--link);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}
a:hover { color: var(--gold-100); }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--weight-medium);
  line-height: var(--leading-tight);
  color: var(--text-heading);
  letter-spacing: var(--tracking-tight);
  margin: 0;
  text-wrap: balance;
}

::selection { background: rgba(217, 180, 91, 0.28); color: var(--moon-100); }

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

* { scrollbar-width: thin; scrollbar-color: rgba(217,180,91,0.35) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb {
  background: rgba(217,180,91,0.3);
  border-radius: var(--radius-pill);
  border: 3px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-track { background: transparent; }

/* Astra resets — neutralise its light-theme defaults */
.ast-container, #content, .site-content { background: transparent; }

/* ============================================================
   2. Layout primitives
   ============================================================ */
.cel-section { padding: var(--section-y) var(--gutter); position: relative; }
.cel-section--night { background: var(--gradient-night); }
.cel-section--tight { padding-top: clamp(2.5rem, 6vw, 4rem); padding-bottom: clamp(2.5rem, 6vw, 4rem); }

.cel-container { max-width: var(--container); margin-inline: auto; }
.cel-container--wide { max-width: var(--container-wide); margin-inline: auto; }
.cel-container--text { max-width: var(--container-text); margin-inline: auto; }

.cel-section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto clamp(2.25rem, 5vw, 3.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}
.cel-section-head__title { font-size: clamp(2rem, 5vw, 3.125rem); color: var(--gold-300); }
.cel-section-head__lede { color: var(--moon-400); font-size: var(--text-lg); line-height: var(--leading-relaxed); margin: 0; }

/* flex head (title left, link right) */
.cel-flex-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--space-6); flex-wrap: wrap; margin-bottom: clamp(2rem, 4vw, 3rem);
}
.cel-flex-head .cel-section-head { text-align: left; align-items: flex-start; margin: 0; }

/* Responsive grids */
.cel-grid { display: grid; gap: var(--space-6); }
.cel-grid > * { margin-block: 0; max-width: none; }
.cel-grid--4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.cel-grid--3 { grid-template-columns: repeat(auto-fit, minmax(285px, 1fr)); }
.cel-grid--2 { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }

/* ============================================================
   3. Ornament helpers — labels, dividers, starfield, glyphs
   ============================================================ */
.cel-label {
  display: inline-flex; align-items: center; gap: 0.7em;
  font-family: var(--font-body);
  font-size: var(--text-xs); font-weight: var(--weight-semibold);
  text-transform: uppercase; letter-spacing: var(--tracking-label);
  color: var(--accent); margin: 0;
}
.cel-label--center { justify-content: center; }
.cel-label__glyph, .cel-label::before {
  font-family: var(--font-display); font-size: 1.3em; letter-spacing: 0; line-height: 1;
}

.cel-rule { height: 1px; border: 0; background: var(--rule-gold); margin: var(--space-8) 0; }

.cel-glyph { font-family: var(--font-display); color: var(--accent); line-height: 1; display: inline-block; }
.cel-glyph--silver { color: var(--jewel); }

.cel-starfield {
  position: absolute; inset: 0;
  background-image: var(--starfield);
  background-size: 480px 360px;
  opacity: 0.6; pointer-events: none; z-index: 0;
}

/* ============================================================
   4. Buttons — bespoke + core block button styles
   ============================================================ */
.cel-btn {
  font-family: var(--font-body); font-weight: var(--weight-semibold);
  letter-spacing: 0.02em; font-size: var(--text-sm);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  border: 0; cursor: pointer; text-decoration: none; white-space: nowrap;
  padding: 12px 24px; border-radius: var(--radius-sm);
  transition: transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              background var(--dur-base) var(--ease-out),
              color var(--dur-base) var(--ease-out);
}
.cel-btn:active { transform: scale(0.975); }
.cel-btn--lg { font-size: var(--text-base); padding: 16px 34px; }
.cel-btn--sm { font-size: var(--text-xs); padding: 8px 16px; }
.cel-btn--full { width: 100%; }

.cel-btn--primary { background: var(--gradient-gold); color: var(--text-on-gold); box-shadow: var(--shadow-sm); }
.cel-btn--primary:hover { box-shadow: var(--glow-gold-strong); transform: translateY(-1px); color: var(--text-on-gold); }

.cel-btn--secondary { background: transparent; color: var(--gold-300); box-shadow: inset 0 0 0 1px var(--line-gold-strong); }
.cel-btn--secondary:hover { color: var(--gold-100); box-shadow: inset 0 0 0 1px var(--gold-300), var(--glow-gold); background: rgba(217,180,91,0.06); }

.cel-btn--ghost { background: transparent; color: var(--gold-300); padding-inline: 4px; border-radius: 0; position: relative; }
.cel-btn--ghost::after {
  content: ""; position: absolute; left: 4px; right: 4px; bottom: 2px; height: 1px;
  background: var(--gold-300); transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur-base) var(--ease-celestial);
}
.cel-btn--ghost:hover { color: var(--gold-100); }
.cel-btn--ghost:hover::after { transform: scaleX(1); }
.cel-btn--ghost:active { transform: none; }
.cel-btn svg { width: 1.1em; height: 1.1em; }

/* Core block buttons — map block styles to our button looks */
.wp-block-button__link { border-radius: var(--radius-sm); font-family: var(--font-body); font-weight: var(--weight-semibold); padding: 13px 28px; transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out); }
.wp-block-button.is-style-cel-primary .wp-block-button__link { background: var(--gradient-gold); color: var(--text-on-gold); box-shadow: var(--shadow-sm); }
.wp-block-button.is-style-cel-primary .wp-block-button__link:hover { box-shadow: var(--glow-gold-strong); transform: translateY(-1px); }
.wp-block-button.is-style-cel-secondary .wp-block-button__link { background: transparent; color: var(--gold-300); box-shadow: inset 0 0 0 1px var(--line-gold-strong); }
.wp-block-button.is-style-cel-secondary .wp-block-button__link:hover { color: var(--gold-100); box-shadow: inset 0 0 0 1px var(--gold-300), var(--glow-gold); background: rgba(217,180,91,0.06); }
.wp-block-button.is-style-cel-ghost .wp-block-button__link { background: transparent; color: var(--gold-300); padding-inline: 4px; box-shadow: none; }
.wp-block-button.is-style-cel-ghost .wp-block-button__link:hover { color: var(--gold-100); box-shadow: 0 1px 0 0 var(--gold-300); }
.wp-block-button .wp-block-button__link:active { transform: scale(0.975); }

/* ============================================================
   5. Badges
   ============================================================ */
.cel-badge {
  display: inline-flex; align-items: center; gap: 0.4em;
  font-family: var(--font-body); font-weight: var(--weight-semibold);
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 12px; border-radius: var(--radius-pill); line-height: 1; white-space: nowrap;
}
.cel-badge--gold { color: var(--gold-300); box-shadow: inset 0 0 0 1px var(--line-gold); background: rgba(217,180,91,0.06); }
.cel-badge--solid { color: var(--text-on-gold); background: var(--gradient-gold); }
.cel-badge--jewel { color: var(--silver-200); box-shadow: inset 0 0 0 1px rgba(201,210,227,0.3); background: rgba(201,210,227,0.06); }

/* ============================================================
   6. Header (sticky translucent chrome)
   ============================================================ */
.cel-header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-6);
  padding: 16px var(--gutter);
  background: rgba(10, 13, 36, 0.6);
  backdrop-filter: var(--blur-chrome); -webkit-backdrop-filter: var(--blur-chrome);
  border-bottom: 1px solid var(--line-moon-soft);
  transition: background var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.cel-header.is-scrolled { background: rgba(8, 10, 30, 0.86); border-bottom-color: var(--line-gold); }

.cel-header__brand { display: flex; align-items: center; gap: 12px; }
.cel-header__brand img { width: 38px; height: 38px; filter: drop-shadow(0 0 10px rgba(217,180,91,0.35)); }

/* Custom logo (Appearance → Customize → Site Identity → Logo): compact mark tight
   against the wordmark, overriding Astra's default logo sizing/margins. */
.cel-header__brand .custom-logo-link {
  display: inline-flex;
  align-items: center;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 0;
}
.cel-header__brand .custom-logo {
  display: block;
  width: auto !important;
  height: 40px !important;
  max-width: none !important;
  margin: 0 !important;
}
.cel-header__word { font-family: var(--font-display); font-weight: var(--weight-medium); font-size: 1.7rem; color: var(--gold-300); letter-spacing: 0.04em; line-height: 1; }

.cel-header__nav { display: flex; align-items: center; }

/* ---- Primary nav: multi-level menu (up to 3 levels) ---- */
.cel-nav-row { display: flex; align-items: center; gap: 30px; list-style: none; margin: 0; padding: 0; }
.cel-nav-item { position: relative; list-style: none; }
.cel-nav-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-body); font-size: var(--text-sm); font-weight: var(--weight-medium);
  color: var(--moon-200); padding: 4px 0; position: relative; cursor: pointer;
}
.cel-nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: var(--gold-300); transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur-base) var(--ease-celestial);
}
.cel-nav-link:hover,
.cel-nav-item:focus-within > .cel-nav-link,
.cel-nav-link.is-current { color: var(--gold-200); }
.cel-nav-link:hover::after,
.cel-nav-item:focus-within > .cel-nav-link::after,
.cel-nav-link.is-current::after { transform: scaleX(1); }
.cel-nav-item--has-children > .cel-nav-link svg { transition: transform var(--dur-base) var(--ease-out); }
.cel-nav-item--has-children:hover > .cel-nav-link svg,
.cel-nav-item--has-children:focus-within > .cel-nav-link svg { transform: rotate(180deg); }

/* Dropdown panel (level 2) */
.cel-submenu {
  position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%) translateY(6px);
  min-width: 230px; padding: var(--space-2);
  background: var(--surface-overlay); backdrop-filter: var(--blur-chrome); -webkit-backdrop-filter: var(--blur-chrome);
  border: 1px solid var(--line-gold); border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden;
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
  z-index: 60;
}
/* Transparent bridge over the gap so the dropdown stays open while the
   pointer travels from the top-level link into the panel. */
.cel-submenu::before { content: ""; position: absolute; top: -16px; left: 0; right: 0; height: 16px; }
.cel-nav-item:hover > .cel-submenu,
.cel-nav-item:focus-within > .cel-submenu {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.cel-submenu__list, .cel-submenu__sub { list-style: none; margin: 0; padding: 0; }
.cel-submenu__item { list-style: none; }
.cel-submenu__link {
  display: block; flex: 1 1 auto; min-width: 0;
  padding: 9px 12px; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: var(--text-sm); color: var(--moon-200);
  transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}
.cel-submenu__link:hover,
.cel-submenu__link.is-current { background: rgba(217, 180, 91, 0.1); color: var(--gold-200); }

/* Accordion row (level 3): label link + caret toggle */
.cel-submenu__row { display: flex; align-items: center; gap: 2px; }
.cel-submenu__caret {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  box-sizing: border-box; width: 32px; min-width: 32px; height: 32px; padding: 0;
  border: 0; background: transparent; border-radius: var(--radius-sm);
  color: var(--moon-400); cursor: pointer;
  transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}
.cel-submenu__caret:hover { background: rgba(217, 180, 91, 0.1); color: var(--gold-200); }
.cel-submenu__caret svg { transition: transform var(--dur-base) var(--ease-out); }
.cel-submenu__item.is-open > .cel-submenu__row > .cel-submenu__caret svg { transform: rotate(180deg); }

/* Nested branch (level 3) — indented with a hairline */
.cel-submenu__sub {
  margin: 2px 0 6px 10px; padding-left: 10px;
  border-left: 1px solid var(--line-gold);
  display: flex; flex-direction: column; gap: 1px;
}
.cel-submenu__sub[hidden] { display: none; }
.cel-submenu__sub .cel-submenu__link { font-size: var(--text-xs); padding: 7px 10px; }

.cel-header__actions { display: flex; align-items: center; gap: 14px; }

.cel-header__toggle {
  display: none; background: transparent; border: 0; cursor: pointer; color: var(--gold-300);
  padding: 6px; border-radius: var(--radius-sm);
}
.cel-header__toggle .hidden { display: none; }

/* ---- Mobile nav: same walker markup, expanded inline ---- */
.cel-header__mobile {
  display: none; flex-direction: column; gap: var(--space-1);
  padding: var(--space-4) var(--gutter) var(--space-8);
  background: var(--surface-overlay); backdrop-filter: var(--blur-chrome); -webkit-backdrop-filter: var(--blur-chrome);
  border-bottom: 1px solid var(--line-gold);
}
.cel-header__mobile.is-open { display: flex; }
.cel-header__mobile .cel-nav-row { flex-direction: column; align-items: stretch; gap: 0; width: 100%; }
.cel-header__mobile .cel-nav-item { position: static; }
.cel-header__mobile .cel-nav-link {
  justify-content: space-between; padding: 13px 4px;
  font-family: var(--font-display); font-size: var(--text-xl); color: var(--moon-100);
  border-bottom: 1px solid var(--line-moon-soft);
}
.cel-header__mobile .cel-nav-link::after { display: none; }
.cel-header__mobile .cel-nav-link:hover,
.cel-header__mobile .cel-nav-link.is-current { color: var(--gold-300); }
/* Dropdown panel becomes a static inline block on mobile */
.cel-header__mobile .cel-submenu {
  position: static; transform: none; opacity: 1; visibility: visible;
  min-width: 0; padding: 4px 0 8px 14px;
  background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none;
  border: 0; border-radius: 0; box-shadow: none;
}
.cel-header__mobile .cel-submenu::before { display: none; }
.cel-header__mobile .cel-submenu__link { font-size: var(--text-base); padding: 10px 8px; }
.cel-header__mobile .cel-submenu__caret { width: 38px; min-width: 38px; height: 38px; }
.cel-header__mobile-cta { margin-top: var(--space-4); }

/* ============================================================
   7. Hero
   ============================================================ */
.cel-hero { overflow: hidden; text-align: center; padding: clamp(5rem, 16vh, 11rem) var(--gutter) clamp(4rem, 12vh, 8rem); }
.cel-hero__veil { position: absolute; inset: 0; background: var(--gradient-moon-veil); pointer-events: none; z-index: 0; }
.cel-hero__inner { position: relative; z-index: 1; max-width: 820px; margin-inline: auto; display: flex; flex-direction: column; align-items: center; gap: var(--space-6); }
.cel-hero__inner > * { margin-block: 0; }
.cel-hero__emblem { margin: 0 auto; }
.cel-hero__emblem img { filter: drop-shadow(0 0 24px rgba(217,180,91,0.4)); }
.cel-hero__title { font-size: var(--text-6xl); line-height: 1.14; color: var(--gold-200); letter-spacing: -0.015em; }
.cel-hero__title em { font-family: var(--font-script); font-style: normal; color: var(--silver-400); font-size: 1.05em; line-height: 1; }
.cel-hero__sub { font-size: clamp(1.125rem, 2.4vw, 1.4rem); color: var(--moon-200); max-width: 560px; line-height: 1.6; text-wrap: pretty; }
.cel-hero__cta { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: var(--space-2); }
.cel-hero__cta.wp-block-buttons { gap: 14px; }

/* ============================================================
   8. Offering / pathway tiles
   ============================================================ */
.cel-tile {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
  border-radius: var(--radius-lg); box-shadow: var(--edge-gold); background: var(--surface-card);
  padding: 30px 28px; height: 100%;
  transition: transform var(--dur-base) var(--ease-celestial), box-shadow var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out);
}
.cel-tile > * { margin-block: 0; }
.cel-tile:hover { transform: translateY(-4px); box-shadow: var(--edge-gold), var(--glow-gold); background: rgba(22,26,61,0.7); }
.cel-tile__badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 60px; height: 60px; border-radius: var(--radius-pill);
  box-shadow: var(--edge-gold);
  background: radial-gradient(circle at 50% 35%, rgba(217,180,91,0.16), rgba(217,180,91,0) 70%);
  font-family: var(--font-display); font-size: var(--text-2xl); color: var(--accent);
  transition: box-shadow var(--dur-base) var(--ease-out);
}
.cel-tile:hover .cel-tile__badge { box-shadow: var(--edge-gold), var(--glow-gold); }
.cel-tile__title { font-family: var(--font-display); font-weight: var(--weight-medium); font-size: 1.625rem; line-height: 1.15; color: var(--gold-300); }
.cel-tile__text { color: var(--moon-400); font-size: var(--text-sm); line-height: 1.6; }

/* ============================================================
   9. Featured (split media + body)
   ============================================================ */
.cel-featured.wp-block-columns { align-items: center; gap: clamp(1.75rem, 5vw, 4rem); }
.cel-featured__media {
  position: relative; aspect-ratio: 4/3; border-radius: var(--radius-xl); overflow: hidden;
  box-shadow: var(--edge-gold), var(--shadow-lg);
  background: radial-gradient(70% 70% at 60% 30%, rgba(46,28,82,0.85), var(--cosmos-900));
  display: flex; align-items: center; justify-content: center;
}
.cel-featured__media.wp-block-image { margin: 0; }
.cel-featured__media img { width: 100%; height: 100%; object-fit: cover; }
.cel-featured__media .cel-glyph { font-size: 120px; color: var(--gold-500); opacity: 0.55; }
.cel-featured__body > * { margin-block: 0; }
.cel-featured__body { display: flex; flex-direction: column; gap: var(--space-5); align-items: flex-start; }
.cel-featured__title { font-size: clamp(1.875rem, 4vw, 2.875rem); color: var(--gold-300); }
.cel-featured__text { color: var(--moon-400); font-size: var(--text-base); line-height: var(--leading-relaxed); }
.cel-featured__price { font-family: var(--font-display); font-size: var(--text-xl); color: var(--moon-100); }
.cel-featured__price small { font-family: var(--font-body); font-size: var(--text-xs); color: var(--moon-500); }
.cel-featured__meta { display: flex; gap: var(--space-5); align-items: center; flex-wrap: wrap; }

/* ============================================================
   10. About teaser
   ============================================================ */
.cel-about.wp-block-columns { align-items: center; gap: clamp(1.75rem, 5vw, 4rem); }
.cel-about__portrait {
  aspect-ratio: 3/4; border-radius: var(--radius-xl); overflow: hidden;
  box-shadow: var(--edge-gold), var(--shadow-lg);
  background: linear-gradient(180deg, var(--violet-800), var(--cosmos-900));
  display: flex; align-items: flex-end; justify-content: center; position: relative;
}
.cel-about__portrait.wp-block-image { margin: 0; }
.cel-about__portrait img { width: 100%; height: 100%; object-fit: cover; }
.cel-about__portrait .cel-glyph { font-size: 110px; color: var(--gold-500); opacity: 0.4; margin-bottom: 30px; }
.cel-about__body > * { margin-block: 0; }
.cel-about__body { display: flex; flex-direction: column; gap: var(--space-5); align-items: flex-start; }
.cel-about__quote { font-family: var(--font-display); font-style: italic; font-size: clamp(1.5rem, 3vw, 2.125rem); line-height: 1.35; color: var(--moon-100); }
.cel-about__text { color: var(--moon-400); font-size: var(--text-base); line-height: var(--leading-relaxed); }

/* ============================================================
   11. Testimonials
   ============================================================ */
.cel-quote {
  position: relative; border-radius: var(--radius-lg); box-shadow: var(--edge-gold);
  background: var(--surface-card); padding: 32px 30px 28px;
  display: flex; flex-direction: column; gap: var(--space-5); height: 100%;
}
.cel-quote > * { margin-block: 0; }
.cel-quote__stars { color: var(--gold-300); font-size: 14px; letter-spacing: 4px; }
.cel-quote__body { font-family: var(--font-display); font-style: italic; font-size: 1.3125rem; line-height: 1.5; color: var(--moon-100); }
.cel-quote__name { font-weight: var(--weight-bold); font-size: var(--text-sm); color: var(--moon-200); }
.cel-quote__role { font-size: var(--text-xs); color: var(--moon-500); }
.cel-quote__foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; }

/* ============================================================
   12. Article / journal cards
   ============================================================ */
.cel-article-grid { display: grid; gap: var(--space-6); grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.cel-article {
  display: flex; flex-direction: column; border-radius: var(--radius-lg);
  box-shadow: var(--edge-gold); background: var(--surface-card); overflow: hidden;
  transition: transform var(--dur-base) var(--ease-celestial), box-shadow var(--dur-base) var(--ease-out);
}
.cel-article:hover { transform: translateY(-4px); box-shadow: var(--edge-gold), var(--glow-gold); }
.cel-article__media { position: relative; aspect-ratio: 3/2; overflow: hidden; background: var(--gradient-night); display: flex; align-items: center; justify-content: center; }
.cel-article__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-out); }
.cel-article:hover .cel-article__media img { transform: scale(1.04); }
.cel-article__glyph { font-family: var(--font-display); font-size: 52px; color: var(--gold-500); opacity: 0.45; }
.cel-article__cat { position: absolute; top: 14px; left: 14px; z-index: 2; }
.cel-article__body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.cel-article__meta { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--moon-500); }
.cel-article__title { font-family: var(--font-display); font-weight: var(--weight-medium); font-size: var(--text-xl); line-height: 1.18; color: var(--gold-300); transition: color var(--dur-base) var(--ease-out); margin: 0; }
.cel-article__title a { color: inherit; }
.cel-article:hover .cel-article__title { color: var(--gold-100); }
.cel-article__excerpt { color: var(--moon-400); font-size: var(--text-sm); line-height: 1.6; margin: 0; }
.cel-article__more { margin-top: auto; padding-top: 6px; font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--gold-300); }

/* ============================================================
   13. Footer
   ============================================================ */
.cel-footer { padding: clamp(3rem, 7vw, 5rem) var(--gutter) 36px; border-top: 1px solid var(--line-moon-soft); position: relative; }
.cel-footer__top { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 36px; max-width: var(--container); margin-inline: auto; }
.cel-footer__brand img { width: 44px; height: 44px; margin-bottom: 14px; filter: drop-shadow(0 0 12px rgba(217,180,91,0.35)); }
/* A Site Identity logo is rarely square, so let it keep its aspect ratio
   instead of being squashed into the 44x44 box the crescent mark uses. */
.cel-footer__brand .custom-logo { width: auto; height: 44px; max-width: 200px; }
.cel-footer__tag { font-family: var(--font-script); font-size: var(--text-xl); color: var(--moon-400); margin: 0; }
.cel-footer__col h4 { font-family: var(--font-body); font-size: 12px; font-weight: var(--weight-bold); letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin: 0 0 16px; }
.cel-footer__col a { display: block; color: var(--moon-400); font-size: var(--text-sm); padding: 5px 0; }
.cel-footer__col a:hover { color: var(--gold-200); }
.cel-footer__rule { max-width: var(--container); margin: clamp(2.25rem,5vw,3.5rem) auto 24px; height: 1px; background: var(--rule-gold); }
.cel-footer__bottom { max-width: var(--container); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--moon-500); font-size: var(--text-xs); flex-wrap: wrap; }
.cel-footer__legal { display: inline-flex; gap: 18px; flex-wrap: wrap; }
.cel-footer__social { display: flex; gap: 14px; }
.cel-footer__social a { color: var(--moon-400); }
.cel-footer__social a:hover { color: var(--gold-300); }

/* ============================================================
   14. Editorial / single & page prose
   ============================================================ */
.cel-page-hero { text-align: center; padding: clamp(5rem, 12vh, 8rem) var(--gutter) clamp(2rem, 6vw, 3.5rem); position: relative; }
.cel-page-hero__title { font-size: clamp(2.125rem, 5.5vw, 3.75rem); color: var(--gold-200); line-height: 1.08; }
.cel-page-hero__meta { display: flex; gap: 16px; align-items: center; justify-content: center; color: var(--moon-500); font-size: var(--text-sm); margin-top: var(--space-4); }

.cel-prose { color: var(--moon-200); font-size: var(--text-lg); line-height: 1.8; }
.cel-prose > * { margin-block: 0 1.2em; }
.cel-prose h2 { font-family: var(--font-display); font-size: var(--text-2xl); color: var(--gold-300); margin: 1.5em 0 0.5em; }
.cel-prose h3 { font-family: var(--font-display); font-size: var(--text-xl); color: var(--gold-300); margin: 1.3em 0 0.4em; }
.cel-prose a { text-decoration: underline; text-decoration-color: var(--line-gold-strong); text-underline-offset: 3px; }
.cel-prose blockquote { margin: 1.5em 0; padding-left: 24px; border-left: 2px solid var(--gold-500); font-family: var(--font-display); font-style: italic; font-size: var(--text-xl); color: var(--moon-100); line-height: 1.4; }
.cel-prose img { border-radius: var(--radius-md); }
.cel-prose code { background: var(--surface-input); padding: 2px 6px; border-radius: var(--radius-xs); font-size: 0.9em; }

.cel-cover { aspect-ratio: 16/9; border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 40px; box-shadow: var(--edge-gold); }
.cel-cover img { width: 100%; height: 100%; object-fit: cover; }

.cel-pagination { display: flex; justify-content: center; gap: var(--space-3); margin-top: var(--space-12); }
.cel-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 12px; border-radius: var(--radius-sm); color: var(--moon-300); box-shadow: inset 0 0 0 1px var(--line-moon); }
.cel-pagination .page-numbers.current { color: var(--text-on-gold); background: var(--gradient-gold); box-shadow: none; }
.cel-pagination a.page-numbers:hover { color: var(--gold-200); box-shadow: inset 0 0 0 1px var(--line-gold); }

/* Blog page (home.php): the owner's editable intro above the post listing,
   the shared empty state, and the editor-only hint from [cel_blog_loop]. */
.cel-blog-intro { margin-bottom: var(--space-10); }
.cel-blog-intro > *:first-child { margin-top: 0; }
.cel-blog-intro > *:last-child { margin-bottom: 0; }
.cel-loop-empty { text-align: center; padding: var(--space-16) 0; }
.cel-editor-note { margin: var(--space-6) 0; padding: 14px 18px; border-radius: var(--radius-sm); border: 1px dashed var(--line-gold); background: var(--surface-input); color: var(--moon-300); font-size: var(--text-sm); }

/* ============================================================
   15. Reveal animation (enhances already-visible content)
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .cel-reveal { opacity: 0; transform: translateY(18px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }
  .cel-reveal.is-visible { opacity: 1; transform: none; }
}

/* ============================================================
   16. Responsive
   ============================================================ */
@media (max-width: 900px) {
  .cel-header__nav { display: none; }
  .cel-header__toggle { display: inline-flex; }
  .cel-footer__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .cel-footer__top { grid-template-columns: 1fr; }
  .cel-footer__bottom { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ============================================================
   SIDEBAR — Astra "Seitenleiste" control (Design → Customizer)
   Position: astra_page_layout()  ·  Width: site-sidebar-width
   Style:    astra_is_sidebar_style_boxed()
   Own class names on purpose: Astra ships #primary/#secondary width,
   float and padding rules that would fight this grid.
   ============================================================ */

.cel-layout__main { min-width: 0; }
.cel-sidebar      { min-width: 0; }

.cel-layout--left,
.cel-layout--right {
  display: grid;
  align-items: start;
  column-gap: clamp(2rem, 4vw, 4rem);
  row-gap: var(--space-10);
}

/* --cel-main-col / --cel-side-col come from the theme's
   *_output_sidebar_css(). Fallbacks match Astra's 30% default.
   minmax(0,…) stops long words, <pre> and wide images blowing the track out. */
.cel-layout--right {
  grid-template-columns: minmax(0, var(--cel-main-col, 70fr)) minmax(0, var(--cel-side-col, 30fr));
}
.cel-layout--left {
  grid-template-columns: minmax(0, var(--cel-side-col, 30fr)) minmax(0, var(--cel-main-col, 70fr));
}

/* Article stays first in the DOM for reading order and SEO; the grid
   places it visually for the left-sidebar case. */
.cel-layout--right .cel-layout__main { grid-column: 1; grid-row: 1; }
.cel-layout--right .cel-sidebar      { grid-column: 2; grid-row: 1; }
.cel-layout--left  .cel-layout__main { grid-column: 2; grid-row: 1; }
.cel-layout--left  .cel-sidebar      { grid-column: 1; grid-row: 1; }

/* Sticky only when Astra's "Klebrige Seitenleiste" is on. */
body.ast-sticky-sidebar .cel-sidebar__inner {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 116px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

@media (max-width: 1024px) {
  .cel-layout--left,
  .cel-layout--right { display: block; }
  .cel-sidebar { margin-top: var(--space-10); }
  body.ast-sticky-sidebar .cel-sidebar__inner {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

/* ---- Widget rhythm ---- */
.cel-sidebar .widget { margin: 0 0 var(--space-8); }
.cel-sidebar .widget:last-child { margin-bottom: 0; }

/* ---- Boxed (Seitenleisten-Stil → Box-Layout) ---- */
.cel-sidebar--boxed .widget {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-5);
}

/* ---- Titles: classic (.widget-title) and block-based widgets ---- */
.cel-sidebar .widget-title,
.cel-sidebar .widget_block > h1,
.cel-sidebar .widget_block > h2,
.cel-sidebar .widget_block > h3,
.cel-sidebar .widget_block > h4,
.cel-sidebar .wp-block-heading {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-heading);
  margin: 0 0 var(--space-4);
  line-height: var(--leading-snug);
}

/* ---- Generic ---- */
.cel-sidebar ul,
.cel-sidebar ol { list-style: none; margin: 0; padding: 0; }
.cel-sidebar li { margin: 0 0 var(--space-3); line-height: var(--leading-snug); }
.cel-sidebar li:last-child { margin-bottom: 0; }
.cel-sidebar a {
  color: var(--text-body);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}
.cel-sidebar a:hover,
.cel-sidebar a:focus-visible { color: var(--accent-hover); }
.cel-sidebar p {
  margin: 0 0 var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: var(--leading-normal);
}
.cel-sidebar__inner > *:last-child { margin-bottom: 0; }
.cel-sidebar img { max-width: 100%; height: auto; }
.cel-sidebar select,
.cel-sidebar .wp-block-categories__dropdown {
  width: 100%;
  padding: 0.6rem 0.8rem;
  font: inherit;
  font-size: var(--text-sm);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-input);
  color: var(--text-body);
}

/* ---- Search: classic widget + core Search block ----
   Astra absolutely-positions the button and makes the submit text
   transparent so its own icon can overlay the field. Undo all of it. */
.cel-sidebar .search-form,
.cel-sidebar .wp-block-search__inside-wrapper {
  display: flex;
  gap: var(--space-2);
  position: relative;
}
.cel-sidebar .search-field,
.cel-sidebar .wp-block-search__input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  padding: 0.7rem 0.9rem;
  font: inherit;
  font-size: var(--text-sm);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-pill);
  background: var(--surface-input);
  color: var(--text-body);
}
.cel-sidebar .search-field:focus-visible,
.cel-sidebar .wp-block-search__input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--focus-ring);
  border-color: var(--accent);
}
.cel-sidebar .widget_search .search-form button,
.cel-sidebar .widget_search .search-form input[type="submit"],
.cel-sidebar .widget_search .search-form input[type="submit"]:hover,
.cel-sidebar .widget_search .search-form input[type="submit"]:focus,
.cel-sidebar .search-submit,
.cel-sidebar .wp-block-search__button {
  position: static;
  top: auto;
  right: auto;
  z-index: auto;
  max-width: none;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--text-on-gold);
  cursor: pointer;
}
.cel-sidebar .widget_search .search-form .search-field { padding-right: 0.9rem; }

/* ---- Categories / Archives / Pages ---- */
.cel-sidebar .wp-block-categories-list,
.cel-sidebar .wp-block-archives-list,
.cel-sidebar .wp-block-page-list { list-style: none; margin: 0; padding: 0; }
.cel-sidebar .cat-item,
.cel-sidebar .wp-block-categories-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
}
.cel-sidebar__count {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.cel-sidebar .children { margin-top: var(--space-2); padding-left: var(--space-4); }

/* ---- Recent / Latest Posts ---- */
.cel-sidebar .wp-block-latest-posts__list,
.cel-sidebar .widget_recent_entries ul { display: grid; gap: var(--space-4); }
.cel-sidebar .wp-block-latest-posts__featured-image img {
  border-radius: var(--radius-sm);
  width: 100%;
}
.cel-sidebar .wp-block-latest-posts__post-title,
.cel-sidebar .widget_recent_entries a {
  display: block;
  font-weight: var(--weight-semibold);
  color: var(--text-heading);
  line-height: var(--leading-snug);
}
.cel-sidebar .wp-block-latest-posts__post-date,
.cel-sidebar__meta {
  display: block;
  margin-top: 2px;
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.cel-sidebar .wp-block-latest-posts__post-excerpt {
  margin: 0.25rem 0 0;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* ---- Tag cloud. Core inlines style="font-size:22.4pt" per tag, and an
        author !important declaration outranks a non-important inline. ---- */
.cel-sidebar .wp-block-tag-cloud a,
.cel-sidebar .tagcloud a {
  font-size: var(--text-xs) !important;
  display: inline-block;
  margin: 0 4px 6px 0;
  padding: 0.35em 0.8em;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-pill);
  background: var(--surface-alt);
  color: var(--text-body);
  line-height: 1.5;
}
.cel-sidebar .wp-block-tag-cloud a:hover,
.cel-sidebar .tagcloud a:hover {
  background: var(--surface-raised);
  border-color: var(--accent);
  color: var(--accent);
}

/* ---- Other blocks a site owner may drop in ---- */
.cel-sidebar .wp-block-group,
.cel-sidebar .widget_block > .wp-block-group { margin: 0; }
.cel-sidebar .wp-block-image { margin: 0 0 var(--space-3); }
.cel-sidebar .wp-block-image img { border-radius: var(--radius-md); }
.cel-sidebar .wp-block-buttons { margin: 0; }
.cel-sidebar .wp-block-button__link {
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
}
.cel-sidebar .wp-block-latest-comments,
.cel-sidebar .wp-block-latest-comments__comment {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-sm);
}
.cel-sidebar .wp-block-calendar table,
.cel-sidebar .widget_calendar table { width: 100%; font-size: var(--text-sm); }
.cel-sidebar .wp-block-social-links { margin: 0; }
.cel-sidebar .wp-block-separator { margin: var(--space-5) 0; border-color: var(--border-soft); }

/* ---- Starter-widget CTA + editor-only hint ---- */
.cel-sidebar__cta .btn,
.cel-sidebar__cta .cel-btn { width: 100%; justify-content: center; }
.cel-sidebar__hint {
  font-size: var(--text-xs);
  color: var(--text-faint);
  margin-top: var(--space-5);
}

/* .cel-prose / .cel-cover centre on their own measures; inside a sidebar
   column they must fill the track. (single.php swaps .cel-container--text for
   .cel-container when a sidebar is active — see cel_has_sidebar().) */
.cel-layout__main .cel-prose,
.cel-layout__main .cel-cover {
  max-width: none;
  margin-inline: 0;
}
