/* ==================================================================
   December Apparels — The Essay
   Identity: an illustrated long-form feature. Seven chapters, each
   with its own band colour and its own visual, joined by a seam.
   ================================================================== */

.pg-essay { --ex-pad: clamp(4.5rem, 3rem + 6vw, 9rem); }

/* ---------- Chapter furniture ---------- */
.ch-mark { display: flex; align-items: center; gap: 1rem; margin: 0 0 1.6rem; }
.ch-num {
  font-family: var(--f-display); font-style: italic; font-weight: 400;
  font-size: clamp(2.6rem, 2rem + 2vw, 3.6rem); line-height: .8;
  color: transparent; -webkit-text-stroke: 1.2px var(--steel);
}
.on-ink .ch-num, .ex-finish .ch-num { -webkit-text-stroke-color: var(--thread); }
.ch-rule { width: 48px; border-top: 1.5px dashed var(--thread); }
.ch-mark .label { color: var(--steel-2); }
.on-ink .ch-mark .label, .ex-finish .ch-mark .label { color: var(--thread); }

.ex { position: relative; padding-block: var(--ex-pad); scroll-margin-top: 70px; }
.ex-title {
  font-family: var(--f-display); font-weight: 400; letter-spacing: -.025em;
  font-size: clamp(2.1rem, 1.4rem + 2.3vw, 3.4rem); line-height: 1.06; text-wrap: balance;
  margin-bottom: 1.8rem;
}
.ex-title em { color: var(--steel-2); }
.on-ink .ex-title em { color: var(--thread); }
.ex-lead {
  font-family: var(--f-display); font-size: clamp(1.2rem, 1.08rem + .45vw, 1.48rem);
  line-height: 1.42; letter-spacing: -.005em; color: var(--ink); max-width: 34ch; text-wrap: pretty;
}
.on-ink .ex-lead { color: var(--on-ink); }
.ex p:not(.ex-lead):not(.ch-mark):not(.label) { font-size: 1.06rem; line-height: 1.85; color: #3a4a58; max-width: 60ch; }
.on-ink.ex p:not(.ex-lead):not(.ch-mark):not(.label) { color: var(--on-ink-muted); }
.ex p + p { margin-top: 1.3rem; }
.dropcap::first-letter {
  float: left; font-family: var(--f-display); font-style: italic; font-size: 4.4em; line-height: .78;
  padding: .08em .14em 0 0; color: var(--steel);
}

/* ---------- Seam navigation (desktop) ---------- */
.seam { display: none; }
@media (min-width: 1240px) {
  .seam { display: block; position: fixed; z-index: 35; right: calc(22px + env(safe-area-inset-right, 0px)); top: 50%; transform: translateY(-50%); }
  .seam ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; position: relative; }
  .seam ol::before { content: ""; position: absolute; right: 5px; top: 6px; bottom: 6px; border-right: 1.5px dashed var(--thread); }
  .seam a { position: relative; display: flex; align-items: center; justify-content: flex-end; gap: .7rem; text-decoration: none; }
  .seam-dot { position: relative; width: 12px; height: 12px; border-radius: 50%; background: var(--frost); box-shadow: 0 0 0 1.5px var(--ink), 0 0 0 4px rgba(238,243,247,.5); transition: transform .35s var(--ease), background .35s; }
  .seam-label {
    position: absolute; right: 24px; white-space: nowrap;
    padding: .35rem .7rem; border-radius: 999px; background: var(--ink); color: var(--on-ink);
    font-size: .78rem; opacity: 0; transform: translateX(6px); pointer-events: none;
    transition: opacity .3s, transform .3s var(--ease);
  }
  .seam-label em { font-family: var(--f-display); color: var(--thread); margin-right: .25rem; }
  .seam a:hover .seam-label, .seam a:focus-visible .seam-label { opacity: 1; transform: none; }
  .seam a.is-active .seam-dot { background: var(--thread); transform: scale(1.35); }
}

/* ---------- Cover ---------- */
.ex-cover {
  position: relative; overflow: hidden;
  padding-block: clamp(2.2rem, 1.5rem + 2vw, 3.2rem) clamp(3.5rem, 2.5rem + 3vw, 5.5rem);
  background-color: var(--ink);
  background-image:
    radial-gradient(ellipse at 90% 10%, rgba(78,139,177,.32), transparent 55%),
    radial-gradient(ellipse at 0% 100%, rgba(217,164,65,.08), transparent 45%),
    repeating-linear-gradient(135deg, rgba(255,255,255,.02) 0 2px, transparent 2px 8px);
}
.cover-loop { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 55%; opacity: .32; pointer-events: none; }
.cover-loop path { stroke-dashoffset: 0; animation: loopDraw 4s .3s var(--ease) both; }
@keyframes loopDraw { from { stroke-dasharray: 0 2400; } }
.cover-inner { position: relative; display: grid; gap: 3rem; align-items: end; }
@media (min-width: 1000px) { .cover-inner { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 5rem; } }
.cover-main { display: grid; gap: 1.5rem; justify-items: start; min-width: 0; }
.cover-main .crumbs { margin-bottom: .6rem; }
.cover-kicker {
  display: inline-flex; align-items: center; gap: .6rem; padding: .45rem .9rem .45rem .7rem; border-radius: 999px;
  border: 1px solid rgba(159,178,195,.28); background: rgba(255,255,255,.04);
  font-family: var(--f-mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--thread);
}
.cover-kicker .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--thread); }
.cover-title {
  font-family: var(--f-display); font-weight: 400; letter-spacing: -.02em;
  font-size: clamp(2.5rem, 1.4rem + 3.4vw, 4.6rem); line-height: 1.04; color: var(--on-ink);
}
.cover-title span { display: block; animation: coverRise 1s var(--ease) both; }
.cover-title span:nth-child(2) { animation-delay: .1s; }
.cover-title span:nth-child(3) { animation-delay: .2s; }
.cover-title em { color: var(--steel); }
.cover-title .ct-accent { font-style: italic; color: var(--thread); }
@keyframes coverRise { from { opacity: 0; transform: translateY(22px); } }
.cover-standfirst { font-family: var(--f-display); font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); line-height: 1.5; color: var(--on-ink-muted); max-width: 40ch; }
.cover-meta { display: flex; flex-wrap: wrap; gap: 1rem 2.2rem; margin: .4rem 0 0; padding-top: 1.2rem; border-top: 1px solid rgba(159,178,195,.2); width: 100%; max-width: 560px; }
.cover-meta dt { font-family: var(--f-mono); font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; color: var(--on-ink-muted); }
.cover-meta dd { margin: .3rem 0 0; font-family: var(--f-display); font-size: 1.1rem; color: var(--on-ink); }

.cover-contents {
  min-width: 0; padding: 1.6rem 1.6rem 1rem; border-radius: var(--radius-lg);
  background: rgba(22,41,59,.72); border: 1px solid rgba(159,178,195,.18);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.6);
}
.cover-contents .label { color: var(--thread); padding-bottom: .9rem; border-bottom: 1.5px dashed rgba(217,164,65,.55); }
.cover-contents ol { list-style: none; margin: 0; padding: 0; }
.cover-contents a {
  display: grid; grid-template-columns: 2.2rem 1fr 18px; align-items: center; gap: .6rem;
  padding: .72rem 0; border-bottom: 1px solid rgba(159,178,195,.14);
  text-decoration: none; color: var(--on-ink); font-size: .95rem;
  transition: color .3s, padding .35s var(--ease);
}
.cover-contents li:last-child a { border-bottom: 0; }
.cover-contents em { font-family: var(--f-display); color: var(--thread); }
.cover-contents svg { width: 16px; height: 16px; opacity: 0; transform: translateX(-6px); transition: opacity .3s, transform .35s var(--ease); color: var(--thread); }
.cover-contents a:hover { color: var(--thread); padding-left: .3rem; }
.cover-contents a:hover svg { opacity: 1; transform: none; }

/* ---------- I · Legacy ---------- */
.ex-legacy { background: var(--paper); }
.legacy-grid { display: grid; gap: 1.5rem 6rem; align-items: start; }
@media (min-width: 1000px) { .legacy-grid { grid-template-columns: 1fr 1fr; } .legacy-copy { padding-top: 4.6rem; } }
.legacy-head .ex-title { margin-bottom: 0; }

/* Heritage timeline */
.heritage-line {
  position: relative; margin-top: clamp(3.5rem, 2.5rem + 3vw, 5.5rem);
  padding: clamp(1.8rem, 1.2rem + 2.4vw, 3.4rem);
  border-radius: calc(var(--radius-lg) + 6px);
  background-color: var(--ink); color: var(--on-ink);
  background-image:
    radial-gradient(ellipse at 100% 0%, rgba(78,139,177,.3), transparent 55%),
    repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0 2px, transparent 2px 8px);
  box-shadow: 0 40px 80px -40px rgba(14,27,40,.55);
  overflow: hidden;
}
.heritage-line::after { content: ""; position: absolute; inset: 12px; border: 1.5px dashed rgba(217,164,65,.45); border-radius: var(--radius-lg); pointer-events: none; }
.hl-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .6rem 2rem; margin-bottom: clamp(2rem, 1.5rem + 2vw, 3rem); }
.hl-head .label { color: var(--thread); }
.hl-intro { font-family: var(--f-display); font-style: italic; font-size: clamp(1.15rem, 1rem + .5vw, 1.45rem); color: var(--on-ink-muted); }

.hl-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2.6rem; position: relative; }
@media (min-width: 900px) {
  .hl-steps { grid-template-columns: repeat(3, 1fr); gap: 2.4rem; padding-top: 2.6rem; }
  .hl-steps::before {          /* the stitched thread joining the milestones */
    content: ""; position: absolute; left: 0; right: 0; top: 8px;
    border-top: 2px dashed var(--thread);
  }
  .hl-steps::after {           /* needle at the end of the thread */
    content: ""; position: absolute; right: -2px; top: 3px; width: 34px; height: 10px;
    background: var(--paper); clip-path: polygon(0 50%, 100% 0, 100% 100%);
  }
}
.hl-step { position: relative; display: grid; gap: .9rem; align-content: start; padding-left: 2.2rem; }
@media (min-width: 900px) { .hl-step { padding-left: 0; } }
.hl-step::before { content: ""; position: absolute; left: 8px; top: 18px; bottom: -2.6rem; border-left: 2px dashed var(--thread); }
.hl-step:last-child::before { display: none; }
@media (min-width: 900px) { .hl-step::before { display: none; } }
.hl-node {
  position: absolute; left: 0; top: .55rem; width: 18px; height: 18px; border-radius: 50%;
  background: var(--ink); box-shadow: inset 0 0 0 4px var(--thread), 0 0 0 5px rgba(217,164,65,.18);
}
@media (min-width: 900px) { .hl-node { top: -2.6rem; } }
.hl-year {
  font-family: var(--f-display); font-weight: 500; letter-spacing: -.03em; line-height: .9;
  font-size: clamp(3.4rem, 2.4rem + 3.4vw, 5.6rem); color: var(--on-ink);
}
.hl-step:first-child .hl-year { color: var(--thread); }
.hl-year sup { font-size: .5em; vertical-align: .7em; color: var(--thread); }
.hl-year small { font-family: var(--f-mono); font-size: .7rem; font-weight: 400; letter-spacing: .16em; text-transform: uppercase; color: var(--on-ink-muted); vertical-align: .5em; margin-left: .2rem; }
.hl-plate { aspect-ratio: 16 / 10; border-radius: var(--radius-lg); margin-block: .4rem .3rem; }
.hl-plate > svg { width: 82%; height: auto; }
.hl-step h3 { font-family: var(--f-display); font-weight: 500; font-size: clamp(1.4rem, 1.2rem + .6vw, 1.75rem); line-height: 1.15; }
.hl-step p { color: var(--on-ink-muted) !important; font-size: .96rem !important; line-height: 1.6 !important; max-width: 36ch; }

.flag-cloth { transform-origin: 80px 90px; animation: wave 6s ease-in-out infinite; }
@keyframes wave { 0%,100% { transform: skewY(0deg) scaleX(1); } 50% { transform: skewY(-2deg) scaleX(.985); } }
.hl-tee { width: 52%; }
.hl-tee svg { width: 100%; height: auto; }
.hl-tag {
  position: absolute; right: 16%; top: 16%; display: grid; gap: .2rem; justify-items: center;
  padding: .9rem .7rem .7rem; background: var(--ink); color: var(--on-ink); transform: rotate(8deg);
  clip-path: polygon(22% 0, 78% 0, 100% 14%, 100% 100%, 0 100%, 0 14%);
  box-shadow: var(--shadow);
}
.hl-tag b { font-family: var(--f-display); font-weight: 500; font-size: 1rem; }
.hl-tag i { font-family: var(--f-mono); font-style: normal; font-size: .55rem; letter-spacing: .16em; text-transform: uppercase; color: var(--thread); }
.hl-cluster span { position: absolute; }
.hl-cluster svg { width: 100%; height: auto; filter: drop-shadow(0 12px 14px rgba(14,27,40,.25)); }
.hl-cluster .c1 { width: 40%; left: 6%; top: 8%; transform: rotate(-8deg); }
.hl-cluster .c2 { width: 38%; left: 32%; top: 14%; z-index: 2; }
.hl-cluster .c3 { width: 34%; right: 4%; bottom: 6%; transform: rotate(6deg); }
.heritage-line.reveal-in .hl-steps::before { animation: threadIn 1.6s var(--ease) both; }
@keyframes threadIn { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* ---------- II · Idea ---------- */
.ex-idea { background: var(--frost); overflow: hidden; }
.idea-head { max-width: 1100px; }
.idea-quote {
  margin: 0; font-family: var(--f-display); font-weight: 400; letter-spacing: -.03em;
  font-size: clamp(2.3rem, 1.3rem + 3.4vw, 4.6rem); line-height: 1.04; text-wrap: balance;
}
.idea-quote em { color: var(--steel-2); }
.idea-body { display: grid; gap: 1.6rem 5rem; margin-top: clamp(2.5rem, 2rem + 2vw, 4rem); }
@media (min-width: 900px) { .idea-body { grid-template-columns: 1fr 1fr; } .idea-body p { margin-top: 0 !important; } }

.uphill { margin: clamp(3rem, 2rem + 3vw, 5rem) 0 0; padding: clamp(1.4rem, 1rem + 2vw, 2.6rem); background: var(--paper); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.uphill figcaption { color: var(--steel-2); margin-bottom: 1.4rem; }
.uphill-stage { position: relative; padding-top: 2.6rem; }
.uphill-art { width: 100%; height: auto; overflow: visible; }
.uphill-path { animation: pathDraw 2.6s var(--ease) both; }
.reveal-pending .uphill-path { animation: none; }
@keyframes pathDraw { from { stroke-dasharray: 0 1400; } }
.uphill-pts circle { fill: var(--ink); stroke: var(--paper); stroke-width: 4; }
.uphill-labels { list-style: none; margin: 0; padding: 0; }
.uphill-labels li {
  position: absolute; left: var(--x); top: calc(2.6rem + (100% - 2.6rem) * var(--y));
  transform: translate(-50%, -165%);
  display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap;
  padding: .3rem .7rem; border-radius: 999px; background: var(--ink); color: var(--on-ink);
  font-size: .8rem; font-weight: 500;
}
.uphill-labels li:first-child { transform: translate(-18%, -165%); }
.uphill-labels li:last-child { transform: translate(-82%, 60%); background: var(--thread); color: var(--ink); }
.uphill-labels em { font-family: var(--f-mono); font-style: normal; font-size: .62rem; opacity: .7; }
@media (max-width: 720px) {
  .uphill-stage { padding-top: 0; }
  .uphill-labels { display: grid; gap: .5rem; margin-top: 1.4rem; counter-reset: none; }
  .uphill-labels li { position: static; transform: none !important; justify-self: start; }
}

/* ---------- III · Five years ---------- */
.ex-growth { background-color: var(--ink); background-image: radial-gradient(ellipse at 100% 100%, rgba(78,139,177,.25), transparent 55%); }
.growth-grid { display: grid; gap: 3rem 6rem; align-items: start; }
@media (min-width: 1000px) { .growth-grid { grid-template-columns: 1fr 1fr; align-items: center; } }
.client-tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; grid-template-columns: 1fr; background: rgba(159,178,195,.18); border-radius: var(--radius-lg); overflow: hidden; }
@media (min-width: 560px) { .client-tiles { grid-template-columns: 1fr 1fr; } }
.client-tiles li { display: grid; gap: .5rem; align-content: start; padding: 1.8rem 1.6rem; background: var(--ink-2); transition: background .4s var(--ease); }
.client-tiles li:hover { background: #1c3349; }
.client-tiles svg { width: 44px; height: 44px; color: var(--thread); margin-bottom: .6rem; }
.client-tiles strong { font-family: var(--f-display); font-weight: 400; font-size: 1.35rem; line-height: 1.2; color: var(--on-ink); }
.client-tiles span { color: var(--on-ink-muted); font-size: .9rem; }

/* ---------- IV · Process ---------- */
.ex-process { background: var(--paper); }
.process-head { display: grid; gap: 1rem 6rem; }
@media (min-width: 1000px) { .process-head { grid-template-columns: 1fr 1fr; align-items: end; } }
.process-copy { display: grid; gap: 0; }
.prod-line { list-style: none; margin: clamp(3rem, 2rem + 3vw, 5rem) 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem 1rem; counter-reset: ln; position: relative; }
@media (min-width: 760px) { .prod-line { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 760px) { .prod-line::before { content: ""; position: absolute; left: 10%; right: 10%; top: 48px; border-top: 1.5px dashed var(--thread); } }
.prod-line li { position: relative; display: grid; justify-items: center; gap: .9rem; text-align: center; counter-increment: ln; }
.pl-icon {
  position: relative; width: 96px; height: 96px; display: grid; place-items: center;
  border-radius: 50%; background: var(--frost); color: var(--ink);
  box-shadow: 0 0 0 8px var(--paper); transition: background .4s var(--ease), color .4s, transform .5s var(--ease);
}
.pl-icon::after {
  content: counter(ln, decimal-leading-zero); position: absolute; top: -4px; right: -4px;
  width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%;
  background: var(--thread); color: var(--ink); font-family: var(--f-mono); font-size: .64rem;
}
.pl-icon svg { width: 42px; height: 42px; }
.prod-line li:hover .pl-icon { background: var(--ink); color: var(--thread); transform: translateY(-4px); }
.prod-line h3 { font-family: var(--f-display); font-weight: 400; font-size: 1.25rem; line-height: 1.2; }
.qualities { list-style: none; margin: clamp(2.5rem, 2rem + 2vw, 3.5rem) 0 0; padding: 1.6rem 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.qualities li { padding: .5rem 1.1rem; border-radius: 999px; border: 1.5px dashed var(--thread); font-family: var(--f-display); font-style: italic; font-size: 1.1rem; }

/* ---------- V · Finish ---------- */
.ex-finish {
  background-color: var(--steel); color: var(--paper);
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.06) 0 2px, transparent 2px 7px);
}
.ex-finish .ex-lead { color: var(--paper); }
.finish-grid { display: grid; gap: 3rem 6rem; align-items: end; }
@media (min-width: 1000px) { .finish-grid { grid-template-columns: .8fr 1.2fr; } }
.finish-quote {
  margin: 0; font-family: var(--f-display); font-weight: 400; letter-spacing: -.025em;
  font-size: clamp(1.8rem, 1.2rem + 2.1vw, 3rem); line-height: 1.1; text-wrap: balance;
}
.finish-quote .strike { position: relative; white-space: nowrap; }
.finish-quote .strike::after {
  content: ""; position: absolute; left: -2%; right: -2%; top: 55%; height: 3px; background: var(--thread);
  transform: scaleX(0); transform-origin: left; animation: strike 1s 1s var(--ease) forwards;
}
.reveal-pending .strike::after { animation: none; }
@keyframes strike { to { transform: scaleX(1); } }
.finish-quote em { display: block; margin-top: .4em; color: var(--ink); }

/* ---------- VI · Stories ---------- */
.ex-stories { background: var(--frost); }
.stories-head { display: grid; gap: 1rem 6rem; }
@media (min-width: 1000px) { .stories-head { grid-template-columns: 1fr 1fr; align-items: end; } }
.story-tees { list-style: none; margin: clamp(2.5rem, 2rem + 2vw, 4rem) 0 0; padding: 0; display: grid; gap: 1.2rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .story-tees { grid-template-columns: repeat(4, 1fr); } }
.story-tee { display: grid; gap: .9rem; }
.tee-plate { aspect-ratio: 4 / 5; border-radius: var(--radius-lg); }
.tee-plate svg { width: 80%; transition: transform .7s var(--ease); }
.story-tee:nth-child(even) { transform: translateY(2rem); }
.story-tee:hover .tee-plate svg { transform: rotate(-4deg) scale(1.05); }
.story-tee p { font-size: .95rem !important; color: var(--muted) !important; line-height: 1.5 !important; }
.mission {
  margin-top: clamp(4rem, 3rem + 3vw, 6rem) !important; text-align: center; max-width: 22ch !important; margin-inline: auto;
  font-family: var(--f-display); font-size: clamp(1.8rem, 1.2rem + 2.1vw, 3rem) !important; line-height: 1.12 !important;
  letter-spacing: -.025em; color: var(--ink) !important; text-wrap: balance;
}
.mission em { color: var(--steel-2); }

/* ---------- VII · Road ahead ---------- */
.ex-ahead { background: var(--paper); }
.ahead-grid { display: grid; gap: 3rem 6rem; align-items: center; }
@media (min-width: 1000px) { .ahead-grid { grid-template-columns: 1.2fr .8fr; } }
.seal { margin: 0; display: grid; justify-items: center; gap: 1.2rem; }
.seal-disc { position: relative; width: min(100%, 340px); aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: var(--frost); }
.seal-disc::before { content: ""; position: absolute; inset: 14px; border-radius: 50%; border: 1.5px dashed var(--thread); }
.seal-ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 40s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.seal-logo { position: relative; width: 52%; display: grid; place-items: center; text-align: center; }
.seal-img { height: auto; width: 100%; max-width: none; }
.seal-logo .logo-fallback { font-size: 1.6rem; white-space: normal; }
.seal-logo .logo-fallback i { display: block; margin: .3rem 0 0; }
.seal figcaption { color: var(--muted); }

@media (max-width: 560px) {
  .story-tee:nth-child(even) { transform: none; }
}
.ex-finish .ch-mark .label { color: var(--paper); }
.ex-finish .ch-rule { border-top-color: var(--paper); }
@media (max-width: 759px) { .prod-line li:last-child { grid-column: 1 / -1; } .cover-loop { opacity: .28; } }
