/* elanacaplan.com — redesign */

:root {
  --paper: #e7e9e4;
  --paper-deep: #dde0da;
  --slate: #16262b;
  --slate-type: #dfe4e0;
  --ink: #101619;
  --ink-soft: #4a5257;
  --rule: #c6cac3;
  --rule-slate: #2c3d42;
  --accent: #2447f0;

  --font-display: "Bricolage Grotesque", sans-serif;
  --font-body: "Source Serif 4", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --max: 1320px;
  --gutter: clamp(20px, 4vw, 56px);
  --section-y: clamp(72px, 10vw, 128px);
  --rail-col: 72px;
  --rail-w: 16px;
  --measure: 42rem;

  --header-h: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
  overflow-x: clip;
}

[data-section],
section[id] {
  scroll-margin-top: calc(var(--header-h) + 20px);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.62;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Reserved left column for the deal rail; no content enters it */
.site {
  padding-left: var(--rail-col);
  min-width: 0;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.shell {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.content-col {
  width: 100%;
  max-width: 100%;
}

.band-paper {
  background: var(--paper);
}

.band-deep {
  background: var(--paper-deep);
}

.band-slate {
  background: var(--slate);
  color: var(--slate-type);
  /* Bleed into the reserved rail column so the strip isn't paper */
  margin-left: calc(-1 * var(--rail-col));
  width: calc(100% + var(--rail-col));
  padding-left: var(--rail-col);
  box-sizing: border-box;
}

@media (max-width: 899px) {
  .band-slate {
    margin-left: 0;
    width: 100%;
    padding-left: 0;
  }
}

.mono-label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--ink-soft);
}

.band-slate .mono-label {
  color: color-mix(in srgb, var(--slate-type) 72%, transparent);
}

.section-label {
  margin-bottom: 1.25rem;
}

.section-title {
  margin: 0 0 2rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 4.2vw, 52px);
  letter-spacing: -0.03em;
  line-height: 1.08;
  max-width: 20ch;
}

.reading,
.prose p {
  max-width: var(--measure);
}

.prose p {
  margin: 0 0 1.15em;
}

.prose p:last-child {
  margin-bottom: 0;
}

.section {
  padding: var(--section-y) 0;
  position: relative;
}

#contact.section {
  padding: clamp(48px, 6vw, 72px) 0 clamp(36px, 5vw, 56px);
}

.text-link {
  display: inline-block;
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28em;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.text-link:hover {
  text-decoration-thickness: 2px;
}

/* ----- mobile progress ----- */
.progress-bar {
  display: none;
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 60;
  background: var(--rule);
}

.progress-bar__fill {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
}

@media (max-width: 899px) {
  .progress-bar {
    display: block;
  }

  .deal-rail {
    display: none !important;
  }

  .site {
    padding-left: 0;
  }
}

/* ----- deal rail: lives only inside the reserved left column ----- */
.deal-rail {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--rail-col);
  z-index: 40;
  pointer-events: none;
  padding-top: calc(var(--header-h) + 32px);
  padding-bottom: 48px;
}

.deal-rail__track {
  position: absolute;
  top: calc(var(--header-h) + 32px);
  bottom: 48px;
  /* Sit about a third into the reserved column so space remains on both sides */
  left: 62%;
  width: 1px;
  transform: translateX(-50%);
  background: color-mix(in srgb, var(--ink-soft) 55%, transparent);
}

.deal-rail__fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: var(--accent);
}

.deal-rail__markers {
  list-style: none;
  margin: 0;
  padding: 0;
  height: 100%;
  position: relative;
}

.deal-rail__marker {
  position: absolute;
  left: 62%;
  transform: translate(-50%, -50%);
}

.deal-rail__dot {
  display: block;
  width: 5px;
  height: 5px;
  background: color-mix(in srgb, var(--ink-soft) 70%, transparent);
}

.deal-rail__marker.is-active .deal-rail__dot {
  background: var(--accent);
}

/* ----- header ----- */
.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: var(--rail-col);
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: transparent;
  transition: background-color 180ms ease, color 180ms ease;
}

@media (max-width: 899px) {
  .site-header {
    left: 0;
  }
}

.site-header.is-scrolled {
  background: var(--paper);
  color: var(--ink);
}

.site-header:not(.is-scrolled) {
  color: var(--slate-type);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  padding-right: 4px;
}

.site-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  flex-shrink: 0;
}

.site-brand:hover {
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.85rem 1.15rem;
  min-width: 0;
}

.site-nav a {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28em;
}

@media (max-width: 720px) {
  .site-nav {
    display: none;
  }
}

/* ----- hero ----- */
.hero {
  min-height: 88vh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 24px) 0 clamp(48px, 8vh, 80px);
  overflow: hidden;
}

.hero__inner {
  width: min(100%, 36rem);
  max-width: 100%;
}

.hero__eyebrow {
  margin-bottom: 1.5rem;
  max-width: 42ch;
}

.hero__title {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.8vw, 48px);
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--slate-type);
  max-width: 100%;
}

.hero__line {
  display: block;
  opacity: 0;
  transform: translateY(16px);
  line-height: 1.08;
  white-space: nowrap;
}

.hero__br {
  display: none;
}

@media (max-width: 520px) {
  .hero__br {
    display: block;
  }

  .hero__line {
    white-space: normal;
  }

  .hero__title {
    font-size: clamp(26px, 7vw, 36px);
  }
}

.hero.is-ready .hero__line {
  animation: hero-line 520ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero.is-ready .hero__line:nth-child(1) {
  animation-delay: 0ms;
}
.hero.is-ready .hero__line:nth-child(2) {
  animation-delay: 80ms;
}
.hero.is-ready .hero__line:nth-child(3) {
  animation-delay: 160ms;
}

@keyframes hero-line {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero__scope {
  margin: 0 0 1.35rem;
  color: color-mix(in srgb, var(--slate-type) 68%, transparent);
}

.hero__lede {
  margin: 0 0 1.25rem;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.5;
  max-width: 34rem;
  color: var(--slate-type);
}

.hero__cred {
  margin: 0 0 2rem;
  max-width: 36rem;
  font-size: 15px;
  line-height: 1.5;
  color: color-mix(in srgb, var(--slate-type) 72%, transparent);
}

.hero .text-link {
  color: var(--slate-type);
}

/* ----- pattern ----- */
.pattern-list {
  margin: 2.5rem 0 0;
}

.pattern-entry {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 0.75rem 1.25rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--rule);
}

.pattern-entry:last-child {
  border-bottom: 1px solid var(--rule);
}

.pattern-entry__stage {
  padding-top: 0.2rem;
}

.pattern-entry .reading {
  margin: 0;
}

.pattern-closer {
  margin: 2.75rem 0 0;
  padding-left: clamp(1.5rem, 6vw, 4.5rem);
  font-size: 18px;
  max-width: calc(var(--measure) + 2rem);
}

@media (max-width: 640px) {
  .pattern-entry {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .pattern-closer {
    padding-left: 0;
  }
}

/* ----- why + diagram ----- */
.why__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 4vw, 4rem);
  align-items: start;
  max-width: 100%;
}

.why__copy {
  padding-left: 0;
  max-width: var(--measure);
}

.why__copy .section-title {
  max-width: 16ch;
}

.deal-diagram {
  margin: 0;
  padding-top: 0.5rem;
  min-width: 0;
  width: 100%;
}

.deal-diagram__svg {
  width: 100%;
  max-width: 640px;
  height: auto;
  display: block;
  overflow: hidden;
}

.deal-diagram__mobile {
  display: none;
}

.diagram-line {
  fill: none;
  stroke-linecap: butt;
}

.deal-diagram.is-animating .diagram-line[data-draw="top"] {
  transition: stroke-dashoffset 900ms ease;
  stroke-dashoffset: 0 !important;
}

.deal-diagram.is-animating .diagram-line[data-draw="bottom-a"] {
  transition: stroke-dashoffset 700ms ease 950ms;
  stroke-dashoffset: 0 !important;
}

.deal-diagram.is-animating .diagram-line[data-draw="bottom-b"] {
  transition: stroke-dashoffset 400ms ease 1950ms;
  stroke-dashoffset: 0 !important;
}

/* Mobile diagram: plain comparison, no scaled SVG */
.dd-path {
  margin: 0 0 2.25rem;
  padding: 0.1rem 0 0.1rem 1.1rem;
  border-left: 2px solid var(--ink);
}

.dd-path:last-child {
  margin-bottom: 0;
}

.dd-path--early {
  border-left-color: var(--accent);
}

.dd-path__label {
  margin: 0 0 0.75rem;
}

.dd-path__hit {
  margin: 0 0 0.65rem;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.45;
  color: var(--ink);
}

.dd-path__hit-mark {
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.dd-path--early .dd-path__hit-mark {
  color: var(--accent);
}

.dd-path__flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 0.4rem;
  row-gap: 0.25rem;
  margin: 0 0 0.85rem;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--ink-soft);
}

.dd-path__flow .is-hit {
  color: var(--ink);
}

.dd-path__caption {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  color: var(--ink-soft);
  max-width: 32ch;
}

@media (max-width: 900px) {
  .why__grid {
    grid-template-columns: 1fr;
  }

  .deal-diagram__svg,
  .deal-diagram__svg--h,
  .deal-diagram__svg--v {
    display: none !important;
  }

  .deal-diagram__mobile {
    display: block;
    width: 100%;
    max-width: 28rem;
    margin-top: 0.25rem;
  }
}

/* ----- method ----- */
.method-block {
  margin-bottom: 2.75rem;
}

.method-block__title {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.method-block .reading,
.pattern-entry .reading {
  margin: 0;
  max-width: var(--measure);
}

.pull-quote {
  margin: 3.5rem 0 0 clamp(1.5rem, 8vw, 5rem);
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--accent);
  max-width: 22rem;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

/* ----- cases accordion ----- */
.selected__lede {
  margin: 1rem 0 0;
  max-width: var(--measure);
}

.cases {
  margin-top: 2.5rem;
  border-top: 1px solid var(--rule);
}

.case {
  border-bottom: 1px solid var(--rule);
}

.case.is-open {
  border-bottom-color: var(--accent);
}

.case__trigger {
  width: 100%;
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 1rem 1.25rem;
  align-items: start;
  padding: 1.35rem 0.5rem 1.35rem 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.case__trigger:hover {
  background: color-mix(in srgb, var(--ink) 3%, transparent);
}

.case__num {
  padding-top: 0.45rem;
}

.case__title {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 2.6vw, 32px);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.35rem;
}

.case__summary {
  display: block;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink-soft);
  max-width: 40rem;
}

.case__panel[hidden] {
  display: none !important;
}

.case.is-open .case__panel {
  display: block;
  padding-bottom: 1.75rem;
}

.case__panel-inner {
  min-height: 0;
}

.case__block {
  margin-bottom: 1.35rem;
  padding-left: calc(3rem + 1.25rem);
}

.case__block:last-child {
  margin-bottom: 0;
}

.case__block .mono-label {
  margin-bottom: 0.45rem;
}

.case__block .reading {
  margin: 0;
}

@media (max-width: 640px) {
  .case__trigger {
    grid-template-columns: 2.25rem minmax(0, 1fr);
  }

  .case__block {
    padding-left: 0;
  }
}

/* ----- engagements ----- */
.engage-list {
  margin-top: 2.5rem;
  border-top: 1px solid var(--rule);
}

.engage-entry {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--rule);
  max-width: 48rem;
}

.engage-entry:last-of-type {
  border-bottom: 0;
}

.engage-entry__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-bottom: 0.75rem;
}

.engage-entry__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.engage-entry__meta {
  margin: 0;
  white-space: nowrap;
}

.engage-entry > .reading {
  margin: 0;
}

.engage-note {
  margin: 1.25rem 0 0;
  padding-top: 0;
  color: var(--ink-soft);
  border: 0;
  max-width: 48rem;
}

/* ----- about ----- */
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.about__portrait {
  position: relative;
  background: #1a3036;
  overflow: hidden;
}

.about__portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(0.25) contrast(1.04) saturate(0.7);
  opacity: 0.88;
}

.about__portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, #163038 70%, #2447f0 12%);
  mix-blend-mode: color;
  opacity: 0.55;
  pointer-events: none;
}

.about__copy {
  max-width: var(--measure);
}

.about .section-title {
  color: var(--slate-type);
  max-width: 14ch;
}

.about .prose {
  color: var(--slate-type);
}

.about .text-link {
  color: var(--slate-type);
}

@media (max-width: 860px) {
  .about__grid {
    grid-template-columns: 1fr;
    padding-left: 0;
  }

  .about__portrait {
    max-width: 280px;
  }
}

/* ----- contact ----- */
.contact__lede {
  margin: 0 0 1.25rem;
}

.contact-form {
  width: min(100%, 28rem);
  display: grid;
  gap: 1.15rem;
}

.contact-form__honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
}

.contact-field {
  display: grid;
  gap: 0.55rem;
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 2px 2px 0 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  padding: 0.55rem 0;
  resize: none;
}

.contact-field input:focus,
.contact-field textarea:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

.contact-form__submit {
  justify-self: start;
  margin-top: 0.25rem;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.contact-form__status {
  margin: 0;
  font-size: 15px;
  min-height: 1.4em;
}

/* ----- footer ----- */
.site-footer {
  padding: 2.5rem 0 2.25rem;
  border-top: 1px solid var(--rule);
}

.site-footer__inner {
  display: grid;
  gap: 0.75rem;
}

.site-footer__tag {
  margin: 0;
  color: var(--ink-soft);
  max-width: 28rem;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 1.25rem;
}

.site-footer__links a {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}

.site-footer__links a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.28em;
}

.site-footer__meta {
  margin: 0;
}

/* ----- legal pages ----- */
.site--legal {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.legal-top {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rule);
}

.legal-top__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.legal-top__back {
  text-decoration: none;
}

.legal-top__back:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

.legal-page {
  flex: 1;
  padding: clamp(48px, 8vw, 96px) 0 clamp(64px, 10vw, 120px);
}

.legal-page__inner {
  max-width: 40rem;
}

.legal-page__header {
  margin-bottom: 2.5rem;
}

.legal-page__title {
  margin: 0.65rem 0 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 48px);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.legal-page__effective {
  margin: 0;
}

.legal-page__prose {
  max-width: var(--measure);
}

.legal-page__prose > p,
.legal-page__prose section > p {
  margin: 0 0 1.15rem;
  font-size: 17px;
  line-height: 1.62;
  color: var(--ink);
}

.legal-page__prose section {
  margin-top: 2.25rem;
}

.legal-page__prose h2 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 2.8vw, 28px);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.legal-page__prose a {
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
  text-underline-offset: 0.22em;
}

.legal-page__prose a:hover {
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}

.site-footer__links a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.28em;
}

/* ----- reveal ----- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 480ms ease, transform 480ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  .hero__line {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }

  .diagram-line[data-draw],
  .diagram-line[data-draw-v] {
    stroke-dashoffset: 0 !important;
    transition: none !important;
  }

}
