/* Editorial lab: homepage sections below the hero, set as art directed spreads.
   Loaded after ../../styles.css. Everything here is prefixed .ed so it can be lifted section by section. */

:root {
  --ed-ease: cubic-bezier(.16, 1, .3, 1);
  --ed-slow: 1.6s;
  /* a 12 column measure the spreads hang from */
  --ed-measure: calc(min(100vw, var(--max)) - 2 * var(--gutter));
  --ed-col: calc(var(--ed-measure) / 12);
}

/* Big type is allowed to reach the page edge, never past it */
.ed-band, .ed-footer { overflow: hidden; overflow: clip; }
.ed-band { padding: clamp(96px, 14vw, 200px) 0; }

/* Safari honours this: quotes and apostrophes sit outside the measure */
.ed-band p, .ed-band h2, .ed-band h3 { hanging-punctuation: first last; }

/* ---------- Shared: split scale headlines ----------
   One headline, two scales. The plain words stay at reading size, the italic phrase becomes the graphic. */
.ed-head { margin-bottom: clamp(64px, 10vw, 140px); }
.ed-head .eyebrow { margin-bottom: clamp(20px, 3vw, 32px); }
.ed-split {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.15;
}
.ed-line { display: block; overflow: hidden; padding: 0 .12em .14em 0; margin-bottom: -.14em; }
.ed-line > span { display: block; }
.ed-big {
  font-size: clamp(64px, 13.5vw, 200px);
  line-height: .98;
  letter-spacing: -.025em;
  margin-left: -.05em;           /* optical: italic O and L sit flush with the column edge */
}
.ed-big em { font-style: italic; color: var(--accent); }
.on-black .ed-big em, .on-charcoal .ed-big em { color: var(--gold); }

/* ---------- About ---------- */
.ed-about { padding-bottom: clamp(160px, 22vw, 320px); }
.ed-about-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(12px, 2vw, 28px);
  position: relative; z-index: 1;
}
.ed-about-label { grid-column: 1 / span 3; margin-bottom: clamp(28px, 4vw, 48px); }
.ed-about-statement {
  grid-column: 1 / -1;
  font-family: var(--serif);
  font-size: clamp(34px, 5.4vw, 82px);
  line-height: 1.08;
  letter-spacing: -.012em;
  text-indent: calc(3 * var(--ed-col));   /* first line starts three columns in, the rest return to the edge */
  max-width: 15.5em;
}
.ed-about-statement em { font-style: italic; white-space: nowrap; }
.ed-about-copy {
  grid-column: 8 / -1;
  margin-top: clamp(48px, 7vw, 96px);
  color: var(--fg-soft);
  font-size: clamp(16px, 1.2vw, 18px);
  max-width: 28em;
}
.ed-about-copy::first-letter {
  float: left;
  font-family: var(--serif);
  font-style: italic;
  font-size: 5.2em;
  line-height: .8;
  padding: .04em .12em 0 0;
  color: var(--black);
}
/* a true three line initial where the browser supports it (Safari and Chrome) */
@supports ((initial-letter: 3) or (-webkit-initial-letter: 3)) {
  .ed-about-copy::first-letter { float: none; font-size: inherit; line-height: inherit; padding: 0 .14em 0 0; -webkit-initial-letter: 3; initial-letter: 3; }
}
/* the craft, cropped by the page: tonal gold on gold, flat */
.ed-ghost {
  position: absolute;
  left: calc(var(--gutter) * -.2);
  bottom: -.24em;
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(130px, 27vw, 420px);
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--gold-deep);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

/* ---------- Services: a typographic index ---------- */
.ed-index { list-style: none; display: grid; gap: clamp(44px, 6vw, 88px); }
.ed-index li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 15em);
  align-items: end;
  column-gap: clamp(24px, 4vw, 64px);
  /* each line steps one column further in */
  padding-left: calc(var(--i, 0) * var(--ed-col));
}
.ed-index li:nth-child(2) { --i: 1; }
.ed-index li:nth-child(3) { --i: 2; }
.ed-index li:nth-child(4) { --i: 3; }
.ed-index h3 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(34px, 4.3vw, 66px);
  line-height: 1.02;
  letter-spacing: -.015em;
  color: var(--white);
}
.ed-index .amp { color: var(--gold); padding: 0 .04em; }
.ed-index p {
  color: var(--fg-soft);
  font-size: 15px;
  line-height: 1.6;
  padding-bottom: .5em;
}

/* ---------- Pricing ---------- */
.ed-plans {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(12px, 2vw, 28px);
}
.ed-plan { grid-column: 1 / span 5; }
.ed-plan-offset { grid-column: 7 / span 6; margin-top: clamp(80px, 12vw, 180px); }
.ed-price {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(56px, 7.5vw, 116px);
  line-height: 1;
  letter-spacing: -.02em;
  margin: clamp(16px, 2vw, 24px) 0 14px -.04em;
}
.ed-price small {
  display: inline-block;
  margin-left: .5em;
  font-family: var(--serif);
  font-size: clamp(18px, 1.6vw, 24px);
  letter-spacing: 0;
  color: var(--fg-soft);
  vertical-align: .3em;
}
.ed-term {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(18px, 1.6vw, 22px);
  color: var(--fg-soft);
  margin-bottom: clamp(28px, 3vw, 40px);
}
/* no bullets, no rules: the rhythm is the leading */
.ed-plan-list { list-style: none; display: grid; gap: 12px; max-width: 24em; }
.ed-plan-list li { line-height: 1.5; }
.ed-plans-note {
  grid-column: 7 / span 5;
  margin-top: clamp(64px, 9vw, 120px);
  color: var(--fg-soft);
  font-size: 15px;
  max-width: 26em;
}

/* ---------- Work: the feature spread ---------- */
.ed-work-top { display: flex; justify-content: space-between; gap: 20px; margin-bottom: clamp(36px, 5vw, 64px); }
.ed-work-year { color: rgba(255, 255, 255, .5); }
.ed-feature {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(12px, 2vw, 28px);
  position: relative;
}
.ed-feature-media {
  grid-column: 5 / -1; grid-row: 1;
  align-self: start;
  margin-top: clamp(60px, 8vw, 120px);
  display: block;
  overflow: hidden;
}
.ed-feature-media img { width: 100%; transition: transform 2.4s var(--ed-ease); }
.ed-feature-media:hover img { transform: scale(1.02); }
/* the name crosses onto the picture */
.ed-feature-title {
  grid-column: 1 / -1; grid-row: 1;
  position: relative; z-index: 2;
  pointer-events: none;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(56px, 10vw, 160px);
  line-height: .94;
  letter-spacing: -.025em;
  color: var(--white);
}
.ed-feature-title .ed-step { padding-left: calc(2 * var(--ed-col)); }
.ed-feature-title .ed-step2 { color: var(--gold); }
.ed-feature-phone {
  grid-column: 2 / span 3; grid-row: 2;
  margin: clamp(-120px, -6vw, -48px) 0 0;
  position: relative; z-index: 3;
  max-width: 220px;
  justify-self: end;
}
.ed-feature-phone img {
  border-radius: 20px;
  border: 6px solid var(--black);
}
.ed-feature-body {
  grid-column: 6 / span 5; grid-row: 2;
  margin-top: clamp(40px, 5vw, 72px);
}
.ed-feature-body > p { color: var(--fg-soft); max-width: 32em; }
.ed-meta { display: grid; gap: 14px; margin: 32px 0 40px; }
.ed-meta dt { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: 2px; }
.ed-meta dd { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--white); }
.ed-pull {
  grid-column: 2 / -1; grid-row: 3;
  margin-top: clamp(80px, 12vw, 180px);
  font-family: var(--serif);
  font-size: clamp(36px, 5.4vw, 84px);
  line-height: 1.04;
  letter-spacing: -.015em;
  color: var(--white);
}
.ed-pull em { font-style: italic; color: var(--gold); }

/* ---------- Editorial links: text with a slow drawn underline, in place of pill buttons ---------- */
.ed-links { display: flex; flex-wrap: wrap; gap: 14px clamp(28px, 4vw, 44px); }
.ed-link {
  display: inline-block;
  padding: 6px 0;
  font-size: 13px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase;
  color: var(--fg);
  background:
    linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat;
  opacity: .72;
  transition: opacity .8s var(--ed-ease), background-size 1.2s var(--ed-ease);
}
.ed-link:hover { opacity: 1; }
.ed-link-primary { opacity: 1; color: var(--accent); background-size: 100% 1px; }
.on-charcoal .ed-link-primary { color: var(--gold); }
.ed-link-primary:hover { background-size: 0 1px; background-position: right bottom; }

/* ---------- Contact ---------- */
.ed-contact { padding-bottom: clamp(80px, 10vw, 140px); }
.ed-contact .eyebrow { margin-bottom: clamp(24px, 4vw, 40px); }
.ed-contact-title { font-family: var(--serif); font-weight: 400; }
.ed-q { font-size: clamp(24px, 2.6vw, 36px); line-height: 1.2; padding-left: calc(6 * var(--ed-col)); margin-bottom: clamp(4px, 1vw, 12px); }
.ed-contact .ed-big { font-size: calc(var(--ed-measure) * .145); white-space: nowrap; }   /* fills the measure on one line */
.ed-contact-row {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 32px 48px;
  margin-top: clamp(56px, 8vw, 112px);
}
.ed-contact-lines { display: grid; gap: 4px; }
.ed-contact-lines a {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(24px, 3vw, 44px);
  line-height: 1.2;
  overflow-wrap: anywhere;
  background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat;
  transition: background-size 1.2s var(--ed-ease);
  justify-self: start;
}
.ed-contact-lines a:hover { background-size: 100% 1px; }

/* ---------- Footer ---------- */
.ed-footer {
  background: var(--black);
  color: rgba(255, 255, 255, .6);
  padding: clamp(44px, 6vw, 72px) 0 0;
}
.ed-footer-row {
  display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center;
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
}
.ed-footer .logo-mark { width: 44px; height: 44px; }
.ed-footer a { transition: color .8s var(--ed-ease); }
.ed-footer a:hover { color: var(--gold-light); }
/* the sign off: the name at full measure, cut by the bottom of the page */
.ed-signoff {
  margin: clamp(32px, 5vw, 64px) 0 -.2em -.04em;
  font-family: var(--serif);
  font-size: calc(var(--ed-measure) * .125);   /* set to fill the measure exactly */
  line-height: 1;
  letter-spacing: -.035em;
  white-space: nowrap;
  color: var(--charcoal);
}
.ed-signoff em { font-style: italic; color: var(--gold-deep); }

/* ---------- Motion: one calm rise, lines lift from their own baseline ---------- */
.js [data-ed] { opacity: 0; transform: translateY(28px); transition: opacity var(--ed-slow) var(--ed-ease), transform var(--ed-slow) var(--ed-ease); }
.js [data-ed].in { opacity: 1; transform: none; }
.js .ed-line > span { transform: translateY(105%); transition: transform var(--ed-slow) var(--ed-ease); transition-delay: calc(var(--n, 0) * 120ms); }
.js .ed-line.in > span { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js [data-ed], .js .ed-line > span { opacity: 1; transform: none; transition: none; }
  .ed-feature-media img, .ed-link, .ed-contact-lines a { transition: none; }
}

/* ---------- Tablet ---------- */
@media (max-width: 980px) {
  .ed-index li { grid-template-columns: 1fr; row-gap: 12px; }
  .ed-index p { max-width: 26em; }
  .ed-feature-body { grid-column: 5 / -1; }
  .ed-feature-phone { grid-column: 1 / span 4; }
}

/* ---------- Phone ---------- */
@media (max-width: 640px) {
  .ed-about-statement { text-indent: 18%; font-size: clamp(30px, 8.6vw, 40px); line-height: 1.12; }
  .ed-about-label { grid-column: 1 / -1; }
  .ed-about-copy { grid-column: 3 / -1; }
  .ed-ghost { font-size: 34vw; }

  .ed-big { font-size: clamp(54px, 16vw, 96px); }
  .ed-q { padding-left: 0; }

  .ed-index li { padding-left: calc(var(--i, 0) * 6vw); }
  .ed-index h3 { font-size: clamp(32px, 9.4vw, 44px); }

  .ed-plan, .ed-plan-offset { grid-column: 1 / -1; }
  .ed-plan-offset { margin-top: 88px; padding-left: 12vw; }
  .ed-plans-note { grid-column: 1 / -1; padding-left: 12vw; }

  .ed-feature-title { font-size: 17vw; }
  /* on a phone the name sits above the picture and only grazes its empty top edge */
  .ed-feature-media { grid-column: 2 / -1; grid-row: 2; margin-top: -5vw; margin-right: calc(var(--gutter) * -1); }
  .ed-feature-phone { grid-column: 1 / span 5; grid-row: 3; justify-self: start; margin-top: -16vw; max-width: 32vw; }
  .ed-feature-phone img { border-radius: 14px; border-width: 4px; }
  .ed-feature-body { grid-column: 1 / -1; grid-row: 4; }
  .ed-pull { grid-column: 1 / -1; grid-row: 5; font-size: clamp(34px, 10vw, 46px); }
  .ed-meta dd { font-size: 18px; }

  .ed-footer-row { flex-direction: column; align-items: flex-start; gap: 14px; }
}

/* ---------- Services, centred (owner, 2026-11-06) ----------
   No staircase: one centred column, each title with its line of description right beneath it,
   matching the centred About and Pricing. */
.ed-services .wrap { text-align: center; }
.ed-services .ed-split .ed-line > span { margin: 0 auto; }
.ed-services .ed-big { margin-left: 0; font-size: clamp(52px, 10vw, 168px); }
.ed-index { gap: clamp(40px, 5.5vw, 72px); justify-items: center; }
.ed-index li,
.ed-index li:nth-child(2), .ed-index li:nth-child(3), .ed-index li:nth-child(4) {
  display: block; padding-left: 0; max-width: 100%;
}
.ed-index h3 { font-size: clamp(32px, 4vw, 60px); white-space: normal; }
.ed-index p { margin: 14px auto 0; padding-bottom: 0; max-width: 30em; font-size: 16px; }
@media (max-width: 640px) {
  .ed-services .ed-big { font-size: clamp(44px, 13vw, 80px); }
  .ed-index h3 { font-size: clamp(30px, 8.6vw, 40px); }
}

/* ---------- Contact, centred (owner, 2026-11-06): one axis, details stacked under the headline ---------- */
.ed-contact .wrap { text-align: center; }
.ed-contact .ed-q { padding-left: 0; }
.ed-contact .ed-line > span { margin: 0 auto; }
.ed-contact .ed-big { margin-left: 0; }
.ed-contact-row { flex-direction: column; align-items: center; justify-content: center; gap: 28px; }
.ed-contact-lines { justify-items: center; }
.ed-contact-lines a { justify-self: center; }

/* Work title (owner, 2026-11-07): the three words on one left edge, kept on the black, never over the picture */
.ed-feature-title { grid-column: 1 / 5; align-self: start; margin-top: clamp(60px, 8vw, 120px); font-size: clamp(40px, 6.4vw, 100px); line-height: .98; }
.ed-feature-title .ed-step, .ed-feature-title .ed-step2 { padding-left: 0 !important; margin-left: 0 !important; }
@media (max-width: 640px) {
  .ed-feature-title { grid-column: 1 / -1; margin-top: 0; font-size: 15vw; }
  .ed-feature-media { grid-column: 1 / -1; margin-top: 44px; }
}

/* "Let's build yours." always fully on screen (owner, 2026-11-07): sized to the window, room for the italic overhang */
.ed-contact .ed-big { font-size: min(calc(var(--ed-measure) * .13), 12.5vw) !important; white-space: normal !important; padding: 0 .08em; }
.ed-contact .ed-line, .ed-contact .ed-line > span { overflow: visible; }

/* the phone sits centred under the "Charles Bridge Partners" title (owner, 2026-11-07) */
.ed-feature-phone { grid-column: 1 / 5 !important; justify-self: center !important; margin-top: clamp(28px, 3vw, 48px) !important; }
@media (max-width: 640px) {
  .ed-feature-phone { grid-column: 1 / -1 !important; margin-top: 28px !important; max-width: 46vw; }
}

/* "Let's build yours." fills the whole screen (owner, 2026-11-07), headline and button centred in it */
.ed-contact {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: clamp(80px, 10vh, 140px) !important; padding-bottom: clamp(80px, 10vh, 140px) !important;
  margin-top: 0 !important;
}
.ed-contact > .wrap { width: 100%; }

/* Pricing holds and Selected Work slides up over it (owner, 2026-11-07), like the gold card over About */
.ed-pricing[data-stack] { position: sticky; z-index: 0; }
#work { position: relative; z-index: 1; margin-top: 70vh; margin-top: 70svh; }
#work ~ section, #work ~ footer { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) { .ed-pricing[data-stack] { position: relative; top: auto !important; } #work { margin-top: 0; } }

/* a second project under the first (Polk Vending Co., 2026-11-08) */
.ed-feature--next { margin-top: clamp(120px, 16vw, 220px); }
