/* ki_sleep_gap — full-bleed editorial "luxury" section: catchline + serif
   headline + accent rule + centered paragraphs + optional image + a refined
   dark "ritual summary" milestone bar. All selectors scoped under
   `.ki-scope .ki-sleep-gap`. Background is full-width (the wrapping Elementor
   section is stretched) and editable from Style → Section; every text block
   has color + typography controls. */

.ki-scope .ki-sleep-gap {
  background: var(--ki-cream);   /* default; overridden by the Style control */
  padding: clamp(72px, 11vw, 150px) 0;
  position: relative;
  overflow: hidden;
}
/* Full-bleed background image + overlay layers (native Elementor bg controls
   target .ki-sleep-gap-bg / .ki-sleep-gap-overlay). Transparent until set. */
.ki-scope .ki-sleep-gap .ki-sleep-gap-bg,
.ki-scope .ki-sleep-gap .ki-sleep-gap-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.ki-scope .ki-sleep-gap .ki-sleep-gap-bg { z-index: 0; }
.ki-scope .ki-sleep-gap .ki-sleep-gap-overlay { z-index: 1; }
.ki-scope .ki-sleep-gap > .wrap { position: relative; z-index: 2; }

/* ── Heading group (centered by default; alignment is a control) ── */
.ki-scope .ki-sleep-gap .gap-head {
  text-align: center;
  max-width: 1000px;
  margin: 0 auto;
}
.ki-scope .ki-sleep-gap .gap-catchline {
  display: block;
  font-family: var(--ki-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ki-blue-2);
  margin-bottom: 26px;
}
.ki-scope .ki-sleep-gap .gap-head h2 {
  font-family: var(--ki-serif);
  font-weight: 400;
  font-size: clamp(34px, 4.4vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: #1F3A47;            /* deep navy — overridden by the Style control */
  margin: 0;
}
/* Thin accent rule under the headline — follows text alignment. */
.ki-scope .ki-sleep-gap .gap-accent {
  display: inline-block;
  width: 64px;
  height: 1px;
  margin: 30px 0 4px;
  background: var(--ki-gold);
}
.ki-scope .ki-sleep-gap .gap-paras {
  max-width: 760px;
  margin: 26px auto 0;
}
.ki-scope .ki-sleep-gap .gap-paras p {
  font-family: var(--ki-sans);
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--ki-ink-soft);   /* darker for legibility over a photo bg */
  margin: 0 0 18px;
}
.ki-scope .ki-sleep-gap .gap-paras p:last-child { margin-bottom: 0; }

/* ── Image (Elementor-style controls drive size/radius/border/shadow) ── */
.ki-scope .ki-sleep-gap .gap-image {
  margin: 64px auto 0;
  text-align: center;
}
.ki-scope .ki-sleep-gap .gap-image img {
  display: inline-block;
  width: 100%;
  height: auto;
  border-radius: 10px;                       /* refined default; control overrides */
  box-shadow: 0 30px 60px -28px rgba(22, 22, 26, 0.28);
}
/* editor-only placeholder box (never shown on the live frontend) */
.ki-scope .ki-sleep-gap .gap-image-ph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 220px;
  border: 1px dashed var(--ki-rule);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.45);
}
.ki-scope .ki-sleep-gap .gap-image-ph span {
  font-family: var(--ki-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ki-ink-mute);
}

/* ── Divider ── */
.ki-scope .ki-sleep-gap .gap-rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ki-rule) 18%, var(--ki-rule) 82%, transparent);
  margin: 64px 0 0;
}

/* ── Summary bar — frosted-glass milestone card (homepage redesign) ── */
.ki-scope .ki-sleep-gap .ritual-summary {
  margin-top: 72px;
  padding: 36px 56px;
  background: rgba(255, 255, 255, 0.42);
  -webkit-backdrop-filter: blur(16px) saturate(125%);
  backdrop-filter: blur(16px) saturate(125%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 22px;
  box-shadow: 0 24px 60px -30px rgba(31, 58, 71, 0.45);
  color: #1F3A47;
  display: flex;
  align-items: center;
  gap: 28px;
}
.ki-scope .ki-sleep-gap .ritual-summary .gap-cell {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.ki-scope .ki-sleep-gap .ritual-summary .pill {
  font-family: var(--ki-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(31, 58, 71, 0.85);
  margin-bottom: 10px;
}
.ki-scope .ki-sleep-gap .ritual-summary .big {
  font-family: var(--ki-serif);
  font-size: clamp(22px, 2.3vw, 32px);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: #1F3A47;
}

/* ── Progress rings ── */
.ki-scope .ki-sleep-gap .ritual-summary .pill { margin-bottom: 18px; }

.ki-scope .ki-sleep-gap .gap-ring {
  position: relative;
  width: 150px;
  aspect-ratio: 1 / 1;
}
.ki-scope .ki-sleep-gap .gap-ring .ring-svg {
  width: 100%;
  height: 100%;
  display: block;
}
.ki-scope .ki-sleep-gap .gap-ring .ring-track { stroke: rgba(31, 58, 71, 0.14); }
.ki-scope .ki-sleep-gap .gap-ring .ring-arc {
  transition: stroke-dashoffset 900ms cubic-bezier(0.16, 1, 0.3, 1);
}
/* Style variants */
.ki-scope .ki-sleep-gap .gap-ring.ring-muted .ring-arc { stroke: #6E94A4; }
.ki-scope .ki-sleep-gap .gap-ring.ring-solid .ring-arc { stroke: var(--ki-blue-deep); }
.ki-scope .ki-sleep-gap .gap-ring.ring-glow  .ring-arc {
  stroke: var(--ki-blue);
  filter: drop-shadow(0 0 2px rgba(0, 153, 204, 0.30));
}
.ki-scope .ki-sleep-gap .gap-ring.ring-glow .ring-track { stroke: rgba(0, 153, 204, 0.16); }

.ki-scope .ki-sleep-gap .gap-ring .ring-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.ki-scope .ki-sleep-gap .gap-ring .ring-val {
  font-family: var(--ki-serif);
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1;
  color: #16303B;
}
/* The 100% glow ring centers a longer value — nudge it down a touch so it
   never crowds the stroke. */
.ki-scope .ki-sleep-gap .gap-ring.ring-glow .ring-val { font-size: clamp(28px, 2.8vw, 38px); }
.ki-scope .ki-sleep-gap .gap-ring .ring-ic {
  display: block;
  width: 38%;
  color: var(--ki-blue);
}
.ki-scope .ki-sleep-gap .gap-ring .ring-ic svg,
.ki-scope .ki-sleep-gap .gap-ring .ring-ic img { width: 100%; height: auto; display: block; }

.ki-scope .ki-sleep-gap .gap-caption {
  margin-top: 22px;
  font-family: var(--ki-serif-italic);
  font-style: italic;
  font-size: clamp(18px, 1.7vw, 22px);
  line-height: 1.3;
  color: #1F3A47;
}

/* ── Footline ── */
.ki-scope .ki-sleep-gap .gap-footline {
  text-align: center;
  margin: 48px 0 0;
  font-family: var(--ki-serif-italic);
  font-style: italic;
  font-size: clamp(20px, 2vw, 24px);
  color: #1F3A47;
}

.ki-scope .ki-sleep-gap .ritual-summary .arrow {
  flex: 0 0 auto;
  font-family: var(--ki-sans);
  font-style: normal;
  font-size: 24px;
  font-weight: 300;
  color: rgba(31, 58, 71, 0.6);
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .ki-scope .ki-sleep-gap .ritual-summary {
    flex-direction: column;
    align-items: stretch;
    padding: 30px 26px;
    gap: 18px;
    border-radius: 18px;
  }
  .ki-scope .ki-sleep-gap .ritual-summary .arrow { display: none; }
}
