/* ==========================================================================
   editorial.css — Concept B: "Editorial"
   Light, print-inspired layout. Serif display type, hairline rules,
   asymmetric 12-column grid, slow and tasteful motion.
   Loads after base.css. Brand colours come from site-config.js.

   Contents
   01 Tokens            08 Services / contents
   02 Shared pieces     09 Live preview
   03 Preloader         10 Process
   04 Header & menu     11 Quotes
   05 Hero              12 Pricing menu
   06 Editor's note     13 Ribbon
   07 Selected work     14 Contact
                        15 Footer
   ========================================================================== */

/* ---------- 01 Tokens ---------- */
:root {
  --bg: var(--c-paper);
  --fg: var(--c-ink);
  --muted: color-mix(in oklab, var(--fg) 62%, var(--bg));
  --line: color-mix(in oklab, var(--fg) 16%, transparent);
  --surface: color-mix(in oklab, var(--fg) 4%, var(--bg));
  --accent: var(--c-primary);
  /* Accent darkened toward ink so italic words stay readable on paper */
  --accent-ink: color-mix(in oklab, var(--c-primary) 78%, var(--c-ink));

  --f-display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --f-body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --f-serif: "Instrument Serif", Georgia, "Times New Roman", serif;

  --col-gap: clamp(1rem, .5rem + 1.6vw, 2.25rem);
  --header-h: 72px;
  --radius: 4px;
}

/* Mini-website mock-ups keep their own type so portfolio pieces look varied */
.layout-editorial .mock {
  --f-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --f-body: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  border-radius: 10px;
}

.layout-editorial { font-size: var(--fs-base); }
body.menu-open { overflow: hidden; }

/* Buttons: ink by default, accent sweep on hover (keeps AA contrast) */
.layout-editorial .btn {
  --btn-bg: var(--fg); --btn-fg: var(--bg);
  --btn-hover: var(--c-primary); --btn-hover-fg: var(--c-ink);
  border-radius: 999px;
}
.layout-editorial .btn--ghost {
  --btn-bg: transparent; --btn-fg: var(--fg);
  --btn-hover: var(--fg); --btn-hover-fg: var(--bg);
  border-color: color-mix(in oklab, var(--fg) 30%, transparent);
}

/* ---------- 02 Shared pieces ---------- */
.ed-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
}
.ed-grid > * { grid-column: 1 / -1; min-width: 0; }

.ed-kicker {
  display: flex; align-items: baseline; gap: .9em;
  font-family: var(--f-mono); font-size: var(--fs-xs);
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink);
}
.ed-kicker span { color: var(--muted); }

.ed-h2 {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(2.6rem, 1.4rem + 5vw, 6.5rem);
  line-height: .92; letter-spacing: -.025em;
  text-wrap: balance;
}
.ed-h2 em, .ed-statement em, .ed-hero__title em, .ed-contact__title em, .ed-pull__quote em {
  font-style: italic; color: var(--accent-ink);
}

.ed-head {
  display: grid; gap: 1.25rem 2rem;
  grid-template-columns: 1fr;
  padding-top: 1.4rem; border-top: 1px solid var(--fg);
  margin-bottom: clamp(3rem, 2rem + 4vw, 6rem);
}
.ed-head__meta { font-family: var(--f-mono); font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
@media (min-width: 1024px) {
  .ed-head { grid-template-columns: 3fr 6fr 3fr; align-items: end; }
  .ed-head .ed-kicker { align-self: start; }
  .ed-head__meta { text-align: right; }
}

.ed-caption {
  display: block; margin-top: .8rem;
  font-family: var(--f-mono); font-size: var(--fs-xs); letter-spacing: .06em;
  color: var(--muted);
}

.ed-textlink {
  display: inline-flex; align-items: center; gap: .55em;
  min-height: 44px; font-weight: 600;
  background: linear-gradient(currentColor, currentColor) 0 calc(100% - 10px) / 100% 1px no-repeat;
  transition: background-size .5s var(--ease), color .3s;
}
.ed-textlink::after { content: "→"; transition: transform .5s var(--ease); }
.ed-textlink:hover { color: var(--accent-ink); background-size: 0 1px; background-position: 100% calc(100% - 10px); }
.ed-textlink:hover::after { transform: translateX(5px); }

.ed-tags { display: flex; flex-wrap: wrap; gap: .45rem; }
.ed-tags .tag { border-color: color-mix(in oklab, var(--fg) 22%, transparent); border-radius: 2px; font-family: var(--f-mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; }

/* Hairline that draws in from the left */
.ed-line { height: 1px; background: var(--fg); transform: scaleX(0); transform-origin: left center; transition: transform 1.6s var(--ease), opacity .6s; }
.ed-line.is-in { transform: none; }

.ed-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-inline: .35em; vertical-align: middle; animation: ed-pulse 2.4s ease-in-out infinite; }
@keyframes ed-pulse { 50% { opacity: .35; } }

.ed-zoom { overflow: hidden; }
.ed-zoom img { width: 100%; transition: transform 1.4s var(--ease); }
.ed-zoom:hover img { transform: scale(1.05); }

.ed-footnote { margin-top: 1.5rem; font-family: var(--f-mono); font-size: var(--fs-xs); color: var(--muted); }

/* ---------- 03 Preloader ---------- */
.ed-preloader {
  position: fixed; inset: 0; z-index: 300;
  display: grid; place-items: center;
  background: var(--bg); color: var(--fg);
  transition: transform 1s var(--ease-in-out), opacity .6s;
}
html:not(.js) .ed-preloader { display: none; }
.ed-preloader.is-done { transform: translateY(-100%); }
.ed-preloader__inner { display: grid; gap: 1.1rem; width: min(80vw, 420px); }
.ed-preloader__name { font-family: var(--f-display); font-size: clamp(2.4rem, 1.6rem + 3vw, 4rem); line-height: 1; letter-spacing: -.02em; }
.ed-preloader__rule { position: relative; height: 1px; background: var(--line); overflow: hidden; }
.ed-preloader__rule::after { content: ""; position: absolute; inset: 0; background: var(--fg); transform-origin: left; transform: scaleX(var(--p, 0)); }
.ed-preloader__meta { display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* ---------- 04 Header & menu ---------- */
.ed-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: transform .6s var(--ease), border-color .4s, background-color .4s;
}
.ed-header.is-scrolled { border-bottom-color: var(--line); }
.ed-header.is-hidden { transform: translateY(-100%); }

.ed-mast { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .5s var(--ease); border-bottom: 1px solid var(--line); }
.ed-mast > * { overflow: hidden; }
.ed-header.is-scrolled .ed-mast { grid-template-rows: 0fr; border-bottom-color: transparent; }
.ed-mast__inner {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  min-height: 34px;
  font-family: var(--f-mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.ed-mast__inner p { white-space: nowrap; }
.ed-mast__inner a { text-transform: none; letter-spacing: .02em; }
.ed-mast__issue { display: none; }
@media (min-width: 768px) { .ed-mast__issue { display: block; } }
@media (max-width: 520px) { .ed-mast__inner > p:last-child { display: none; } }

.ed-bar { display: flex; align-items: center; gap: 1.5rem; min-height: var(--header-h); }

.ed-brand { display: inline-flex; align-items: center; gap: .7rem; margin-right: auto; min-height: 44px; }
.ed-brand__mark {
  display: grid; place-items: center;
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  border: 1px solid var(--fg);
  font-family: var(--f-display); font-style: italic; font-size: 1.05rem; letter-spacing: -.02em;
  transition: background-color .4s, color .4s;
}
.ed-brand__mark.has-logo { width: clamp(2.25rem, 2rem + .6vw, 2.75rem); height: auto; aspect-ratio: 1; border: 0; border-radius: 0; background: none; }
.ed-brand__mark.has-logo img { width: 100%; height: 100%; transition: transform .8s var(--ease); }
.ed-brand:hover .ed-brand__mark.has-logo img { transform: rotate(36deg); }
.ed-brand:hover .ed-brand__mark:not(.has-logo) { background: var(--fg); color: var(--bg); }
.ed-brand__name { font-family: var(--f-display); font-size: 1.6rem; line-height: 1; letter-spacing: -.015em; }

.ed-nav { display: none; }
.ed-nav__list { display: flex; gap: .4rem; }
.ed-nav__list > li { position: relative; }
.ed-nav__list > li > a {
  display: inline-flex; align-items: center; gap: .35em; min-height: 44px; padding-inline: .8rem;
  font-size: var(--fs-sm); font-weight: 500;
  background: linear-gradient(currentColor, currentColor) center calc(100% - 10px) / 0 1px no-repeat;
  transition: background-size .5s var(--ease);
}
.ed-nav__list > li > a:hover, .ed-nav__list > li > a:focus-visible { background-size: calc(100% - 1.6rem) 1px; }
.ed-nav__list > li.has-children > a::after { content: ""; width: .4em; height: .4em; border-right: 1px solid; border-bottom: 1px solid; transform: translateY(-.15em) rotate(45deg); transition: transform .4s var(--ease); }
.ed-nav__list > li.has-children:hover > a::after, .ed-nav__list > li.is-open > a::after { transform: translateY(.05em) rotate(-135deg); }

.ed-drop:empty { display: none; }
.ed-drop {
  position: absolute; top: calc(100% + 6px); left: -.4rem; z-index: 5;
  min-width: 320px; padding: .6rem;
  background: var(--bg); border: 1px solid var(--line);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.25);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .35s var(--ease), transform .45s var(--ease), visibility .35s;
}
.ed-drop::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.has-children:hover > .ed-drop, .has-children:focus-within > .ed-drop, .has-children.is-open > .ed-drop { opacity: 1; visibility: visible; transform: none; }
.ed-drop a { display: grid; gap: .1rem; padding: .75rem .9rem; transition: background-color .3s; }
.ed-drop a:hover, .ed-drop a:focus-visible { background: var(--surface); }
.ed-drop a span { font-family: var(--f-display); font-size: 1.3rem; line-height: 1.1; }
.ed-drop a small { font-size: var(--fs-xs); color: var(--muted); }

.ed-bar__cta { display: none; min-height: 2.9rem; }

.ed-menu-btn {
  display: inline-flex; align-items: center; gap: .8rem;
  min-height: 44px; padding: 0 .2rem 0 .9rem;
  font-family: var(--f-mono); font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase;
}
.ed-menu-btn__close { display: none; }
.ed-menu-btn[aria-expanded="true"] .ed-menu-btn__open { display: none; }
.ed-menu-btn[aria-expanded="true"] .ed-menu-btn__close { display: inline; }
.ed-menu-btn__lines { position: relative; width: 26px; height: 10px; }
.ed-menu-btn__lines i { position: absolute; left: 0; right: 0; height: 1px; background: currentColor; transition: transform .5s var(--ease), top .5s var(--ease); }
.ed-menu-btn__lines i:first-child { top: 0; }
.ed-menu-btn__lines i:last-child { top: 9px; }
.ed-menu-btn[aria-expanded="true"] .ed-menu-btn__lines i:first-child { top: 4.5px; transform: rotate(45deg); }
.ed-menu-btn[aria-expanded="true"] .ed-menu-btn__lines i:last-child { top: 4.5px; transform: rotate(-45deg); }

@media (min-width: 1024px) {
  .ed-nav { display: block; }
  .ed-bar__cta { display: inline-flex; }
  .ed-menu-btn { display: none; }
}

/* Full-screen menu */
.ed-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: var(--bg);
  padding-top: calc(var(--header-h) + 50px);
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path .9s var(--ease-in-out), visibility 0s .9s;
  overflow-y: auto;
}
.menu-open .ed-overlay { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .9s var(--ease-in-out), visibility 0s; }
.menu-open .ed-header { background: var(--bg); transform: none; }
.ed-overlay__inner { display: grid; gap: 2rem; padding-block: 1.5rem 3rem; min-height: calc(100% - 1px); align-content: space-between; }
.ed-overlay__list li { border-bottom: 1px solid var(--line); overflow: hidden; }
.ed-overlay__list a {
  display: flex; align-items: baseline; gap: 1rem; padding-block: .7rem;
  font-family: var(--f-display); font-size: clamp(2.6rem, 1.6rem + 6vw, 5rem); line-height: 1; letter-spacing: -.02em;
  transform: translateY(100%); transition: transform .9s var(--ease), color .3s;
}
.ed-overlay__list li:nth-child(2) a { transition-delay: .06s; }
.ed-overlay__list li:nth-child(3) a { transition-delay: .12s; }
.ed-overlay__list li:nth-child(4) a { transition-delay: .18s; }
.ed-overlay__list li:nth-child(5) a { transition-delay: .24s; }
.ed-overlay__list li:nth-child(n+6) a { transition-delay: .3s; }
.menu-open .ed-overlay__list a { transform: none; }
.ed-overlay__list a:hover { color: var(--accent-ink); font-style: italic; }
.ed-overlay__n { font-family: var(--f-mono); font-size: var(--fs-xs); letter-spacing: .1em; color: var(--muted); }
.ed-overlay__foot { display: flex; flex-wrap: wrap; gap: .5rem 2rem; font-size: var(--fs-sm); }
.ed-overlay__foot a { display: inline-flex; min-height: 44px; align-items: center; }
.ed-social { display: flex; flex-wrap: wrap; gap: 0 1.2rem; }

/* ---------- 05 Hero ---------- */
.ed-hero { padding-block: clamp(1.75rem, 1rem + 3vw, 3.5rem) clamp(4rem, 2rem + 7vw, 9rem); overflow: hidden; }
.ed-hero__meta {
  display: flex; justify-content: space-between; gap: 1rem;
  padding-bottom: .9rem; border-bottom: 1px solid var(--fg);
  font-family: var(--f-mono); font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.ed-hero__meta-mid { display: none; }
@media (min-width: 900px) { .ed-hero__meta-mid { display: block; } }

.ed-hero__title {
  margin-block: clamp(1.5rem, 1rem + 2.5vw, 3rem) clamp(2rem, 1rem + 3vw, 4rem);
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(3.1rem, .9rem + 9.4vw, 11.5rem);
  line-height: .88; letter-spacing: -.04em;
  max-width: 13ch;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.ed-hero__title .wi { transition-duration: 1.3s; }

.ed-hero__grid { row-gap: 0; align-items: start; }
.ed-hero__collage { margin-top: 3rem; }
.ed-standfirst { font-size: var(--fs-lg); line-height: 1.5; max-width: 36ch; text-wrap: pretty; }
.ed-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; margin-top: 2rem; }
.ed-hero__notes { display: grid; margin-top: 2.5rem; border-top: 1px solid var(--line); }
.ed-hero__notes li { display: flex; gap: 1rem; padding-block: .8rem; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.ed-hero__notes span { width: 1.6rem; font-family: var(--f-display); font-style: italic; color: var(--accent-ink); }

.ed-hero__collage { position: relative; padding-bottom: 18%; }
.ed-hero__photo { width: 86%; margin-left: auto; }
.ed-hero__photo-frame { aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface); }
.ed-hero__photo-frame img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); transition: transform 2.4s var(--ease); }
.ed-hero__photo-frame.is-in img { transform: scale(1); }
/* Caption sits above the photo so the overlapping mock-up never covers it */
.ed-hero__photo { display: flex; flex-direction: column-reverse; }
.ed-hero__photo .ed-caption { text-align: right; margin: 0 0 .6rem; }
.ed-hero__mock { position: absolute; left: 0; bottom: 0; width: 68%; z-index: 2; }
.ed-hero__mock .mock { box-shadow: 0 50px 90px -40px rgba(0,0,0,.5), 0 0 0 1px rgba(0,0,0,.06); }

@media (min-width: 768px) {
  .ed-hero__photo-frame { aspect-ratio: 5 / 4; }
}
@media (min-width: 1024px) {
  /* Headline + copy on the left, collage on the right from the top: no empty corner */
  .ed-hero__title {
    grid-column: 1 / 8; grid-row: 1;
    font-size: clamp(3.2rem, .2rem + 5.7vw, 8.25rem);
    max-width: none;
  }
  .ed-hero__copy { grid-column: 1 / 7; grid-row: 2; padding-top: 0; }
  .ed-hero__collage { grid-column: 8 / -1; grid-row: 1 / span 2; margin-top: clamp(1.5rem, 1rem + 2.5vw, 3rem); }
  .ed-hero__photo-frame { aspect-ratio: 4 / 5; }
  .ed-hero__photo { width: 82%; }
  .ed-hero__mock { width: 78%; bottom: 0; }
}

/* ---------- 06 Editor's note ---------- */
.ed-intro__grid { row-gap: 2.5rem; padding-top: 1.4rem; }
.ed-statement {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(2rem, 1.2rem + 3.2vw, 4.25rem);
  line-height: 1.02; letter-spacing: -.02em;
  text-wrap: balance;
}
.ed-intro__body p { max-width: 62ch; color: color-mix(in oklab, var(--fg) 85%, var(--bg)); }
.ed-intro__body p + p { margin-top: 1.1rem; }
.ed-dropcap::first-letter {
  float: left; margin: .02em .12em 0 0;
  font-family: var(--f-display); font-size: 5.4em; line-height: .78;
  color: var(--accent-ink);
}

.ed-facts { border-top: 2px solid var(--fg); }
.ed-facts__title { padding-block: .9rem; font-family: var(--f-mono); font-size: var(--fs-xs); letter-spacing: .14em; text-transform: uppercase; border-bottom: 1px solid var(--line); }
.ed-fact { display: flex; flex-direction: column-reverse; gap: .2rem; padding-block: 1rem; border-bottom: 1px solid var(--line); }
.ed-fact__num { font-family: var(--f-display); font-size: clamp(2.4rem, 1.8rem + 2vw, 3.6rem); line-height: 1; letter-spacing: -.02em; }
.ed-fact__label { font-size: var(--fs-sm); color: var(--muted); }

@media (min-width: 768px) {
  .ed-facts__list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 1.5rem; }
}
@media (min-width: 1024px) {
  .ed-intro__label { grid-column: 1 / 4; }
  .ed-statement { grid-column: 4 / -1; }
  .ed-intro__body { grid-column: 4 / 10; columns: 2; column-gap: var(--col-gap); }
  .ed-intro__body p { break-inside: avoid-column; }
  .ed-intro__body p + p { margin-top: 0; padding-top: 1.1rem; }
  .ed-facts { grid-column: 10 / -1; }
  .ed-facts__list { display: block; }
}

/* ---------- 07 Selected work ---------- */
.ed-feature { row-gap: 2.5rem; align-items: end; padding-bottom: clamp(3rem, 2rem + 4vw, 6rem); }
.ed-feature__visual { display: block; }
.ed-feature__visual .mock { transition: transform .6s var(--ease), box-shadow .6s var(--ease); }
.ed-feature__meta { display: grid; gap: 1.25rem; align-content: end; }
.ed-feature__title { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.4rem, 1.6rem + 3vw, 4.5rem); line-height: .95; letter-spacing: -.02em; }
.ed-feature__text { color: color-mix(in oklab, var(--fg) 82%, var(--bg)); max-width: 46ch; }

.ed-spec { border-top: 1px solid var(--fg); }
.ed-spec div { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; padding-block: .65rem; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.ed-spec dt { font-family: var(--f-mono); font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-top: .15em; }

@media (min-width: 1024px) {
  .ed-feature__visual { grid-column: 1 / 9; }
  .ed-feature__meta { grid-column: 9 / -1; }
}

.ed-index { border-top: 1px solid var(--fg); }
.ed-row { position: relative; border-bottom: 1px solid var(--line); }
.ed-row__link {
  display: grid; align-items: baseline;
  grid-template-columns: 2.5rem 1fr auto;
  grid-template-areas: "n client arrow" "n sector year";
  gap: .2rem 1rem;
  padding-block: 1.4rem;
  transition: color .4s;
}
.ed-row__n { grid-area: n; font-family: var(--f-mono); font-size: var(--fs-xs); color: var(--muted); }
.ed-row__client {
  grid-area: client;
  font-family: var(--f-display); font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3.6rem); line-height: 1.02; letter-spacing: -.02em;
  transition: transform .6s var(--ease), color .4s;
}
.ed-row__sector { grid-area: sector; font-size: var(--fs-sm); color: var(--muted); }
.ed-row__year { grid-area: year; font-family: var(--f-mono); font-size: var(--fs-xs); color: var(--muted); text-align: right; }
.ed-row__arrow { grid-area: arrow; width: 1.6rem; height: 1.6rem; align-self: center; transition: transform .6s var(--ease), color .4s; }
.ed-row__link:hover .ed-row__client, .ed-row__link:focus-visible .ed-row__client { font-style: italic; color: var(--accent-ink); transform: translateX(.4rem); }
.ed-row__link:hover .ed-row__arrow { transform: rotate(45deg); color: var(--accent-ink); }

/* Mobile/tablet: the preview sits under each row */
.ed-row__peek { padding-bottom: 1.6rem; max-width: 560px; }
.ed-row__peek .mock { box-shadow: 0 20px 50px -30px rgba(0,0,0,.4), 0 0 0 1px rgba(0,0,0,.06); }

@media (min-width: 1024px) {
  .ed-row__link {
    grid-template-columns: 4rem minmax(0, 5fr) minmax(0, 3fr) 4rem 2rem;
    grid-template-areas: "n client sector year arrow";
    padding-block: 1.8rem;
  }
  .ed-row__year { text-align: left; }
}
/* Desktop with a mouse: the preview floats in on hover */
@media (min-width: 1024px) and (hover: hover) {
  .ed-row__peek {
    position: absolute; z-index: 3; right: 16%; top: 50%;
    width: min(30vw, 420px); padding: 0;
    pointer-events: none; opacity: 0;
    transform: translateY(-50%) rotate(-4deg) scale(.85);
    transition: opacity .45s var(--ease), transform .7s var(--ease);
  }
  .ed-row:hover .ed-row__peek, .ed-row:focus-within .ed-row__peek { opacity: 1; transform: translateY(-50%) rotate(-2deg) scale(1); }
}

/* ---------- 08 Services / contents ---------- */
.ed-services { background: color-mix(in oklab, var(--fg) 3%, var(--bg)); }
.ed-services__head { row-gap: 1.5rem; padding-top: 1.4rem; border-top: 1px solid var(--fg); margin-bottom: clamp(3rem, 2rem + 4vw, 6rem); align-items: end; }
.ed-contents {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(4rem, 1.5rem + 11vw, 13rem); line-height: .8; letter-spacing: -.045em;
}
.ed-services__lead { max-width: 44ch; font-size: var(--fs-lg); line-height: 1.5; }
@media (min-width: 1024px) {
  .ed-services__kicker { grid-column: 1 / -1; }
  .ed-contents { grid-column: 1 / 8; }
  .ed-services__lead { grid-column: 8 / -1; padding-bottom: 1rem; }
}

.ed-toc-feature { row-gap: 2rem; padding-block: 2rem clamp(3rem, 2rem + 3vw, 5rem); border-top: 2px solid var(--fg); }
.ed-toc-feature__n { font-family: var(--f-display); font-style: italic; font-size: clamp(3rem, 2rem + 4vw, 6rem); line-height: .8; color: var(--accent-ink); }
.ed-toc-feature__body { display: grid; gap: 1.25rem; align-content: start; }
.ed-toc-feature__title { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.4rem, 1.5rem + 3.6vw, 5rem); line-height: .95; letter-spacing: -.025em; }
.ed-toc-feature__sum { font-size: var(--fs-lg); line-height: 1.5; max-width: 40ch; }
.ed-toc-feature__figure .ed-zoom { aspect-ratio: 4 / 3; }
.ed-toc-feature__figure img { height: 100%; object-fit: cover; }
@media (min-width: 1024px) {
  .ed-toc-feature__n { grid-column: 1 / 3; }
  .ed-toc-feature__body { grid-column: 3 / 8; }
  .ed-toc-feature__figure { grid-column: 8 / -1; }
}

.ed-toc { counter-reset: toc 1 page 8; border-top: 1px solid var(--fg); }
.ed-toc__item { counter-increment: toc page 6; padding-block: 1.6rem; border-bottom: 1px solid var(--line); }
.ed-toc__link { display: flex; align-items: baseline; gap: 1rem; min-height: 44px; }
.ed-toc__num::before { content: counter(toc, decimal-leading-zero); font-family: var(--f-mono); font-size: var(--fs-xs); color: var(--muted); }
.ed-toc__num { flex: 0 0 2.5rem; }
.ed-toc__title { font-family: var(--f-display); font-size: clamp(1.7rem, 1.2rem + 2vw, 3rem); line-height: 1.05; letter-spacing: -.015em; transition: color .4s; }
.ed-toc__leader { flex: 1; min-width: 2rem; border-bottom: 1px dotted color-mix(in oklab, var(--fg) 45%, transparent); transform: translateY(-.3em); }
.ed-toc__page::before { content: "p. " counter(page); font-family: var(--f-mono); font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; }
.ed-toc__link:hover .ed-toc__title { font-style: italic; color: var(--accent-ink); }
.ed-toc__sum, .ed-toc__tags { margin-left: 3.5rem; }
.ed-toc__sum { margin-top: .6rem; max-width: 58ch; color: var(--muted); }
.ed-toc__tags { margin-top: .9rem; }
@media (max-width: 520px) {
  .ed-toc__leader, .ed-toc__page { display: none; }
  .ed-toc__sum, .ed-toc__tags { margin-left: 0; }
}

/* ---------- 09 Live preview ---------- */
.ed-preview__grid { row-gap: 3rem; align-items: center; }
.ed-preview__copy { display: grid; gap: 1.5rem; align-content: start; }
.ed-preview__lead { max-width: 42ch; font-size: var(--fs-lg); line-height: 1.5; }
.ed-preview__form { display: grid; gap: 1.5rem; margin-top: .5rem; }
.ed-preview__note { font-size: var(--fs-sm); color: var(--muted); max-width: 40ch; }
.ed-preview__stage { position: relative; }
.ed-preview__stage::before {
  /* Printed "page" behind the browser */
  content: ""; position: absolute; inset: 6% -3% -5% 8%; z-index: -1;
  background: repeating-linear-gradient(0deg, transparent 0 27px, var(--line) 27px 28px), color-mix(in oklab, var(--fg) 4%, var(--bg));
  transform: rotate(2deg);
}
.ed-preview__mock { box-shadow: 0 60px 100px -50px rgba(0,0,0,.45), 0 0 0 1px rgba(0,0,0,.08); }
@media (min-width: 1024px) {
  .ed-preview__copy { grid-column: 1 / 6; }
  .ed-preview__stage { grid-column: 6 / -1; }
}

/* Editorial form fields: underlined, no boxes */
.ed-form .field label { font-family: var(--f-mono); font-size: var(--fs-xs); font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ed-form .input, .ed-form .select, .ed-form .textarea {
  border: 0; border-bottom: 1px solid color-mix(in oklab, var(--fg) 35%, transparent); border-radius: 0;
  padding-inline: 0; background: transparent; font-size: var(--fs-lg);
}
.ed-form .textarea { font-size: var(--fs-base); }
.ed-form .input:focus, .ed-form .select:focus, .ed-form .textarea:focus { border-bottom-color: var(--fg); box-shadow: 0 1px 0 0 var(--fg); }
.ed-form .select {
  appearance: none; -webkit-appearance: none; padding-right: 1.8rem;
  background: linear-gradient(45deg, transparent 50%, currentColor 50%) right .55rem center / 6px 6px no-repeat,
              linear-gradient(-45deg, transparent 50%, currentColor 50%) right .2rem center / 6px 6px no-repeat;
}
.ed-form .select option { color: #111; }
.ed-swatches { border: 0; padding: 0; margin: 0; display: grid; gap: .8rem; }
.ed-swatches legend { padding: 0; margin-bottom: .8rem; font-family: var(--f-mono); font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ed-swatches .swatch { min-width: 44px; min-height: 44px; display: grid; place-items: center; }

/* ---------- 10 Process ---------- */
.ed-process { border-top: 1px solid var(--line); }
.ed-process .ed-grid { row-gap: 3rem; }
.ed-process__sticky { display: grid; gap: 1.5rem; }
.ed-process__lead { max-width: 36ch; color: var(--muted); }
.ed-chapters { display: grid; }
.ed-chapter__grid { display: grid; grid-template-columns: 4.5rem 1fr; gap: 1rem; padding-block: 2rem 2.6rem; }
.ed-chapter__roman { font-family: var(--f-display); font-style: italic; font-size: clamp(2.6rem, 2rem + 2vw, 4rem); line-height: .85; color: var(--accent-ink); }
.ed-chapter__grid > :last-child { min-width: 0; }
.ed-chapter__meta { display: flex; width: 100%; max-width: none; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; font-family: var(--f-mono); font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ed-chapter__title { font-family: var(--f-display); font-weight: 400; font-size: clamp(2rem, 1.5rem + 2vw, 3.2rem); line-height: 1; letter-spacing: -.02em; margin-bottom: .9rem; }
.ed-chapter p { max-width: 54ch; }
.ed-chapter .ed-chapter__meta { max-width: none; } /* week label aligns to the right edge */
.ed-chapter__deliver { margin-top: 1.1rem; font-size: var(--fs-sm); color: var(--muted); font-style: italic; }
@media (min-width: 1024px) {
  .ed-process__aside { grid-column: 1 / 6; }
  .ed-process__sticky { position: sticky; top: calc(var(--header-h) + 3rem); }
  .ed-chapters { grid-column: 6 / -1; }
  .ed-chapter__grid { grid-template-columns: 7rem 1fr; padding-block: 2.6rem 3.4rem; }
}

/* ---------- 11 Quotes ---------- */
.ed-quotes { background: var(--fg); color: var(--bg); --line: color-mix(in oklab, var(--bg) 18%, transparent); --muted: color-mix(in oklab, var(--bg) 62%, var(--fg)); }
.ed-quotes .ed-pull__quote em { color: color-mix(in oklab, var(--c-primary) 75%, #fff); }
.ed-pull { max-width: 1180px; }
.ed-pull__quote {
  position: relative;
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(2.1rem, 1rem + 4.2vw, 5.4rem); line-height: 1.02; letter-spacing: -.02em;
  text-wrap: balance;
}
.ed-pull__quote::before {
  content: "\201C"; position: absolute; left: -.05em; top: -.42em;
  font-size: 2.6em; line-height: 1; color: var(--c-primary); opacity: .9;
}
.ed-pull__quote p { position: relative; padding-top: .6em; }
.ed-pull__by { display: flex; align-items: center; gap: 1rem; margin-top: 2.5rem; font-size: var(--fs-sm); }
.ed-pull__by img, .ed-quote figcaption img { border-radius: 50%; object-fit: cover; filter: grayscale(1); }
.ed-pull__by img { width: 56px; height: 56px; }
.ed-pull__by span, .ed-quote figcaption span { display: grid; }
.ed-pull__by span span, .ed-quote figcaption span span { color: var(--muted); font-size: var(--fs-xs); font-family: var(--f-mono); letter-spacing: .06em; }
.ed-quotes__grid { display: grid; gap: 2.5rem; margin-top: clamp(4rem, 3rem + 4vw, 7rem); }
.ed-quote { padding-top: 1.4rem; border-top: 1px solid var(--line); display: grid; gap: 1.5rem; align-content: space-between; }
.ed-quote blockquote { font-family: var(--f-display); font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem); line-height: 1.2; }
.ed-quote figcaption { display: flex; align-items: center; gap: .8rem; font-size: var(--fs-sm); }
.ed-quote figcaption img { width: 44px; height: 44px; }
@media (min-width: 900px) {
  .ed-quotes__grid { grid-template-columns: 1fr 1fr; gap: var(--col-gap); margin-left: 25%; }
}

/* ---------- 12 Pricing menu ---------- */
.ed-menu { display: grid; border-top: 1px solid var(--fg); }
.ed-menu__item {
  position: relative; display: flex; flex-direction: column; gap: 1.2rem;
  padding-block: 2rem 2.5rem; border-bottom: 1px solid var(--line);
}
.ed-menu__item.is-featured::before {
  content: "Most chosen";
  position: absolute; top: 0; transform: translateY(-50%);
  padding: .3rem .6rem; background: var(--c-primary); color: var(--c-ink);
  font-family: var(--f-mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
}
.ed-menu__item.is-featured { box-shadow: inset 0 3px 0 0 var(--c-primary); }
.ed-menu__head { display: flex; align-items: baseline; gap: .8rem; }
.ed-menu__name { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.2rem, 1.7rem + 1.6vw, 3.2rem); line-height: 1; letter-spacing: -.02em; }
.ed-menu__leader { flex: 1; min-width: 1.5rem; border-bottom: 1px dotted color-mix(in oklab, var(--fg) 45%, transparent); transform: translateY(-.35em); }
.ed-menu__price { font-family: var(--f-display); font-size: clamp(1.8rem, 1.4rem + 1.2vw, 2.5rem); line-height: 1; white-space: nowrap; }
.ed-menu__price small { display: block; text-align: right; margin-top: .3rem; font-family: var(--f-mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ed-menu__sum { font-style: italic; font-family: var(--f-display); font-size: 1.3rem; line-height: 1.3; color: color-mix(in oklab, var(--fg) 80%, var(--bg)); }
.ed-menu__list { display: grid; gap: .55rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: var(--fs-sm); }
.ed-menu__list li { display: flex; gap: .7rem; }
.ed-menu__list li::before { content: "—"; color: var(--accent-ink); }
.ed-menu__btn { margin-top: auto; align-self: flex-start; }
.ed-pricing__note { margin-top: 2.5rem; max-width: 70ch; font-size: var(--fs-sm); color: var(--muted); }
.ed-pricing__note a { color: var(--fg); }
@media (min-width: 900px) {
  .ed-menu { grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
  .ed-menu__item { padding-inline: var(--col-gap); border-bottom: 0; }
  .ed-menu__item:first-of-type { padding-left: 0; }
  .ed-menu__item:last-of-type { padding-right: 0; }
  .ed-menu__item + .ed-menu__item { border-left: 1px solid var(--line); }
  .ed-menu__item.is-featured { box-shadow: inset 0 3px 0 0 var(--c-primary); }
}

/* ---------- 13 Ribbon ---------- */
.ed-ribbon {
  display: flex; align-items: center;
  border-block: 1px solid var(--fg);
  overflow: hidden;
  --marquee-gap: 2.5rem; --marquee-speed: 30s;
}
.ed-ribbon__label {
  flex: 0 0 auto; align-self: stretch; display: flex; align-items: center;
  padding: 0 1.25rem 0 var(--gutter); border-right: 1px solid var(--fg);
  background: var(--bg); position: relative; z-index: 1;
  font-family: var(--f-mono); font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase;
}
.ed-ribbon .marquee { flex: 1; min-width: 0; padding-block: 1.1rem; }
.ed-ribbon__item {
  display: inline-flex; align-items: center; gap: 2.5rem; white-space: nowrap;
  font-family: var(--f-display); font-style: italic; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.6rem); line-height: 1;
}
.ed-ribbon__item::after { content: ""; width: .35em; height: .35em; border-radius: 50%; background: var(--c-primary); }
@media (max-width: 600px) { .ed-ribbon__label { display: none; } }

/* ---------- 14 Contact ---------- */
.ed-contact .ed-grid { row-gap: 3.5rem; }
.ed-contact__intro { display: grid; gap: 1.6rem; align-content: start; }
.ed-contact__title {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(3rem, 1.4rem + 6.5vw, 8rem); line-height: .9; letter-spacing: -.035em;
  text-wrap: balance;
}
.ed-contact__lead { max-width: 44ch; font-size: var(--fs-lg); line-height: 1.5; }
.ed-details { border-top: 1px solid var(--fg); }
.ed-details div { display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; padding-block: .85rem; border-bottom: 1px solid var(--line); }
.ed-details dt { font-family: var(--f-mono); font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-top: .25em; }
.ed-details dd { overflow-wrap: anywhere; }
.ed-details a { display: inline-flex; min-height: 28px; }

.ed-contact__form { display: grid; gap: 1.8rem; align-content: start; align-self: start; padding: clamp(1.5rem, 1rem + 2vw, 2.75rem); background: color-mix(in oklab, var(--fg) 4%, var(--bg)); border: 1px solid var(--line); }
.ed-form__row { display: grid; gap: 1.8rem; }
.ed-form__submit { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.ed-form__fine { font-size: var(--fs-xs); color: var(--muted); max-width: 30ch; }
@media (min-width: 640px) { .ed-form__row { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) {
  .ed-contact__intro { grid-column: 1 / 7; }
  .ed-contact__form { grid-column: 7 / -1; margin-top: 2.4rem; }
}

/* ---------- 15 Footer ---------- */
.ed-footer {
  --bg: var(--c-ink); --fg: var(--c-paper);
  --line: color-mix(in oklab, var(--c-paper) 16%, transparent);
  --muted: color-mix(in oklab, var(--c-paper) 60%, var(--c-ink));
  background: var(--bg); color: var(--fg);
  padding-top: clamp(4rem, 3rem + 4vw, 7rem); overflow: hidden;
}
.ed-footer ::selection { background: var(--c-primary); color: var(--c-ink); }
.ed-footer__grid { display: grid; gap: 2.5rem 2rem; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-bottom: 3rem; border-bottom: 1px solid var(--line); }
.ed-footer__about { grid-column: 1 / -1; display: grid; gap: 1rem; align-content: start; }
.ed-footer__about p { color: var(--muted); max-width: 30ch; }
.ed-brand--light .ed-brand__mark { border-color: var(--fg); }
.ed-footer__title { margin-bottom: 1rem; font-family: var(--f-mono); font-size: var(--fs-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.ed-footer__list { display: grid; gap: .25rem; font-size: var(--fs-sm); }
.ed-footer__list a, .ed-footer__list span { display: inline-flex; min-height: 32px; align-items: center; overflow-wrap: break-word; }
/* Phones/tablets: studio (contact) column full width so the email address never breaks */
@media (max-width: 899.98px) { .ed-footer__grid > :nth-child(4) { grid-column: 1 / -1; } }
@media (min-width: 900px) {
  .ed-footer__grid { grid-template-columns: 2fr 1fr 1.4fr 1.4fr 1fr; }
  .ed-footer__about { grid-column: auto; }
}
.ed-footer__word {
  padding-block: clamp(1.5rem, 1rem + 2vw, 3rem) .2rem;
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(3.5rem, 15.5vw, 17rem); line-height: .85; letter-spacing: -.05em;
  overflow-wrap: anywhere;
}
/* letter-spacing set on the span itself so it scales with the auto-fitted size (data-fit) */
.ed-footer__word span { display: block; letter-spacing: -.05em; padding-right: .04em; background: linear-gradient(180deg, var(--fg) 40%, color-mix(in oklab, var(--fg) 25%, var(--bg))); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ed-footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem;
  padding-block: 1.5rem 2rem; border-top: 1px solid var(--line);
  font-family: var(--f-mono); font-size: .7rem; letter-spacing: .06em; color: var(--muted);
}
.ed-footer__bottom a { display: inline-flex; min-height: 32px; align-items: center; }

/* ---------- Print ---------- */
@media print {
  .ed-header, .ed-overlay, .ed-preloader, .ed-preview, .ed-ribbon { display: none !important; }
  [data-reveal], [data-split] .wi { opacity: 1 !important; transform: none !important; clip-path: none !important; }
}
