/* Clarity resting state — Figma 33:259
   Applied when body.is-resting (slider at max, focus/hover off) */

/* Shared rest headline tokens — match journey u=100 keyframe end (95px) */
body.complexity-start {
  --cx-rest-title-size: 95px;
  --cx-rest-title-lh: 1.08;
  --cx-rest-title-max-w: 42.167rem;
  --cx-rest-content-gap: 0;
  --cx-rest-hero-pad-top: 0;
}

body.complexity-start.is-resting:not(.clarity-journey) {
  --chaos: 0;
  --width-site: 980px;
  padding-top: 0;
}

/* ——— Chrome: hide chaos, reset fixed header stack ——— */
body.complexity-start.is-resting:not(.clarity-journey) .chaos-layer {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.complexity-start.is-resting:not(.clarity-journey) .cx-page {
  padding-top: 0;
}

body.complexity-start.is-resting:not(.clarity-journey):not(.journey-layout-lock) .cx-header.site-header {
  position: sticky;
  top: 0;
  box-shadow: none;
  height: auto;
  min-height: 0;
  padding-top: var(--cx-header-pad-top-compact, 2.333rem);
  padding-bottom: var(--cx-header-pad-bottom-compact, 1.667rem);
}

body.complexity-start.is-resting:not(.clarity-journey) .cx-header__inner {
  align-items: baseline;
}

body.complexity-start.is-resting:not(.clarity-journey) .cx-logo__tm {
  display: none;
}

body.complexity-start.is-resting:not(.clarity-journey) .cx-logo__name {
  font-size: 1.111rem;
}

body.complexity-start.is-resting:not(.clarity-journey) .cx-nav--complex {
  display: none;
}

body.complexity-start.is-resting:not(.clarity-journey) .cx-nav--clarity {
  display: flex;
  align-items: center;
}

/* ——— Hero ——— */
body.complexity-start.is-resting:not(.clarity-journey) .cx-hero {
  border-bottom: none;
  padding-bottom: 1.5rem;
}

body.complexity-start.is-resting:not(.clarity-journey) .cx-hero__bg,
body.complexity-start.is-resting:not(.clarity-journey) .cx-hero__portrait,
body.complexity-start.is-resting:not(.clarity-journey) .cx-hero__venn,
body.complexity-start.is-resting:not(.clarity-journey) .cx-hero__title-complex,
body.complexity-start.is-resting:not(.clarity-journey) .cx-slider__heading,
body.complexity-start.is-resting:not(.clarity-journey) .cx-slider {
  display: none;
}

/* Keep eyebrow slot height — skills gone but space preserved (matches u=100) */
body.complexity-start.is-resting:not(.clarity-journey) .cx-hero__eyebrow {
  visibility: hidden;
  min-height: var(--cx-eyebrow-reserved-height, var(--cx-layout-eyebrow-slot));
  margin-bottom: max(0.5rem, calc(1rem - var(--cx-hero-lift) * 0.15));
  overflow: hidden;
  pointer-events: none;
}

body.complexity-start.is-resting:not(.clarity-journey) .cx-hero__inner {
  align-items: stretch;
  gap: 0;
  padding-top: var(--cx-rest-hero-pad-top);
  padding-bottom: 0;
  min-height: auto;
}

body.complexity-start.is-resting:not(.clarity-journey) .cx-hero__content {
  justify-content: flex-start;
  gap: var(--cx-rest-content-gap);
  padding-bottom: 0;
  min-height: auto;
  margin-left: 0;
}

body.complexity-start.is-resting:not(.clarity-journey) .cx-hero__headline-row {
  display: block;
}

body.complexity-start.is-resting:not(.clarity-journey) .cx-hero__copy {
  flex: none;
  max-width: none;
}

body.complexity-start.is-resting:not(.clarity-journey) .cx-hero__title-clarity {
  display: block;
  margin: 0;
  max-width: var(--cx-rest-title-max-w);
  font-family: var(--font-serif);
  font-size: var(--cx-rest-title-size);
  font-weight: 500;
  line-height: var(--cx-rest-title-lh);
  letter-spacing: -0.02em;
  color: var(--color-ink);
}

body.complexity-start.is-resting:not(.clarity-journey) .cx-hero__slider-block {
  margin-top: 0;
}

/* ——— Rest panel (replaces slider) ——— */
.cx-rest-panel {
  display: none;
}

body.complexity-start.is-resting:not(.clarity-journey) .cx-rest-panel {
  opacity: 1;
  pointer-events: auto;
}

.cx-rest-panel__cta {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  background: var(--color-rule);
  font-family: var(--font-sans);
  font-size: 0.778rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-ink);
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.cx-rest-panel__cta:hover {
  background: var(--color-ink);
  color: var(--color-paper);
}

.cx-rest-panel__restore {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font-family: var(--font-sans);
  font-size: 0.722rem;
  font-weight: 400;
  color: var(--color-ink-faint);
  cursor: pointer;
  white-space: nowrap;
}

.cx-rest-panel__restore:hover {
  color: var(--color-ink-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ——— Hero rule ——— */
.cx-hero-rule {
  display: none;
  margin: 0;
  border: none;
  border-top: 1px solid var(--color-rule);
}

body.complexity-start.is-resting:not(.clarity-journey) .cx-hero-rule {
  display: block;
}

/* ——— Complexity-only sections ——— */
body.complexity-start.is-resting:not(.clarity-journey) .cx-complex-only {
  display: none;
}

/* ——— Selected work ——— */
body.clarity-journey .cx-work-rest {
  display: block;
  padding-block: 3rem;
}

body.complexity-start.is-resting:not(.clarity-journey) .cx-work-rest {
  padding-block: 3.556rem;
}

.cx-work-rest__eyebrow {
  margin: 0 0 2rem;
  font-family: var(--font-sans);
  font-size: 0.667rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-ink-faint);
}

.cx-work-rest__intro-title {
  margin: 0 0 0.375rem;
  font-family: var(--font-serif);
  font-size: 1.333rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--color-ink);
}

.cx-work-rest__intro-desc {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--color-ink-muted);
}

.cx-work-rest__list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cx-work-rest__item {
  margin: 0;
}

.cx-work-rest__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.cx-work-rest__link:hover .cx-work-rest__title {
  color: var(--color-accent);
}

.cx-work-rest__title {
  margin: 0 0 0.444rem;
  font-family: var(--font-serif);
  font-size: 1.333rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--color-ink);
  transition: color 0.2s ease;
}

.cx-work-rest__thesis {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-ink-muted);
}

/* ——— Footer ——— */
body.complexity-start.is-resting:not(.clarity-journey) .cx-footer__complex {
  display: flex;
}

.cx-footer__clarity {
  display: none;
}

/* ——— Default: hide clarity-only elements ——— */
.cx-hero__title-clarity,
.cx-nav--clarity {
  display: none;
}

/* ——— Responsive ——— */
@media (max-width: 768px) {
  body.complexity-start {
    --cx-rest-title-size: clamp(2.25rem, 11vw, 95px);
    --cx-rest-hero-pad-top: 0;
  }

  body.complexity-start.is-resting:not(.clarity-journey) .cx-hero__inner {
    padding-top: var(--cx-rest-hero-pad-top);
    min-height: auto;
  }

  body.complexity-start.is-resting:not(.clarity-journey) .cx-hero__content {
    min-height: auto;
  }

  body.complexity-start.is-resting:not(.clarity-journey) .cx-rest-panel {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  body.complexity-start.is-resting:not(.clarity-journey) .cx-rest-panel__cta {
    justify-content: center;
  }
}

/* Cold resting — paint final headline before clarity-journey.js (no size jump on refresh) */
html.journey-skip-entry body.clarity-journey .cx-hero__title-complex {
  max-width: var(--cx-rest-title-max-w);
  letter-spacing: -0.02em;
}

html.journey-skip-entry body.clarity-journey .cx-hero__title-complex .frag[data-threshold],
html.journey-skip-entry body.clarity-journey .cx-hero__title-complex #frag-verb-ing {
  opacity: 0 !important;
  position: absolute;
  width: 0;
  overflow: hidden;
  pointer-events: none;
}

html.journey-skip-entry body.clarity-journey .cx-hero__title-complex .frag-ideas-break {
  display: inline;
}

html.journey-skip-entry body.clarity-journey .cx-hero__title-complex #frag-verb-plain,
html.journey-skip-entry body.clarity-journey .cx-hero__title-complex #frag-prefix-i {
  opacity: 1;
}

html.journey-skip-entry body.clarity-journey .cx-hero__eyebrow [data-threshold] {
  opacity: 0 !important;
  position: absolute;
  width: 0;
  overflow: hidden;
  pointer-events: none;
}

html.journey-skip-entry body.clarity-journey .cx-hero__venn {
  opacity: 0 !important;
  pointer-events: none !important;
}

html.journey-skip-entry body.clarity-journey .cx-hero__portrait {
  opacity: 0;
  pointer-events: none;
}
