/* /impact: "How far one card reaches". Chaptered editorial on the site's paper ground; one dark chapter (the scans);
   the peak is the chain drawing itself. Colours and type are the site's own (css/site.css). */
.imp { --gold: #c9a24a; --gold-2: #e8cf8e; --walnut: #1b120b; --brown: #532f16; --soft: #6b5743; }
.imp-num { font-variant-numeric: tabular-nums; font-family: var(--sc-font-display); font-weight: 700; color: var(--brown); white-space: nowrap; }

/* 1. title page */
.imp-title { min-height: 100svh; display: grid; align-items: end; padding: calc(var(--bar-h, 64px) + 6vh) 0 10vh; }
.imp-title__in { width: min(68rem, calc(100% - 32px)); margin: 0 auto; }
.imp-h1 { font-family: var(--sc-font-display); font-weight: 700; color: var(--brown); font-size: clamp(2.6rem, 9.5vw, 7.4rem); line-height: .98; letter-spacing: -.02em; margin: 0 0 .35em; max-width: 12ch; text-wrap: balance; }
.imp-lead { font-size: clamp(1.1rem, 2.4vw, 1.45rem); line-height: 1.5; color: var(--soft); max-width: 34rem; margin: 0 0 2.2rem; text-wrap: pretty; }
.imp-real { display: flex; flex-direction: column; gap: .3rem; border-top: 1px solid #dcc99a; padding-top: 1.1rem; max-width: 36rem; }
.imp-real__n { font-family: var(--sc-font-display); font-weight: 700; color: var(--brown); font-size: clamp(2.6rem, 8vw, 5.2rem); line-height: 1; font-variant-numeric: tabular-nums; }
.imp-real__l { color: var(--soft); font-size: 1.02rem; }
[dir="rtl"] .imp-real__n { text-align: right; }

/* shared stage for the pinned chapters */
.imp-stage { height: 100svh; display: grid; align-items: center; padding: calc(var(--bar-h, 64px) + 16px) 16px 24px; overflow: hidden; }
.imp-copy { position: relative; z-index: 2; width: min(32rem, 100%); display: grid; }
.imp-copy > .imp-big, .imp-copy > .imp-mid { grid-area: 2 / 1; margin: 0; }
.imp-copy > .imp-ex { grid-area: 1 / 1; }
.imp-big { font-family: var(--sc-font-display); font-weight: 700; color: var(--brown); font-size: clamp(1.7rem, 5.4vw, 3rem); line-height: 1.12; text-wrap: balance; }
.imp-mid { font-family: var(--sc-font-display); font-weight: 700; color: var(--brown); font-size: clamp(1.4rem, 4.2vw, 2.3rem); line-height: 1.15; text-wrap: balance; }
.imp-big .imp-num, .imp-mid .imp-num { display: block; font-size: 1.55em; line-height: 1.05; }
.imp-ex { justify-self: start; margin: 0 0 14px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brown); border: 1px solid #c9b584; border-radius: 999px; padding: 3px 10px; background: rgba(255, 255, 255, .55); }
[dir="rtl"] .imp-ex { justify-self: end; }

/* 2. one dedication: a stack of cards, the copy beside it */
.imp-stage--one { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 28px; align-content: center; }
.imp-stack { position: relative; width: min(46vw, 210px); aspect-ratio: 2 / 3; }
.imp-stack i { position: absolute; inset: 0; border-radius: 10px; background: #fffaf0; border: 1px solid #e2d3aa; box-shadow: 0 10px 28px -14px rgba(60, 35, 10, .45); }
.imp-stack i:nth-child(1) { transform: rotate(-7deg) translate(-10px, 6px); }
.imp-stack i:nth-child(2) { transform: rotate(5deg) translate(9px, 4px); }
.imp-stack i:nth-child(3) { transform: rotate(-2deg); }
.imp-stack__top { display: grid; place-items: center; background: linear-gradient(170deg, #fffaf0, #f6ead0) !important; }
.imp-stack__top span { font-family: var(--sc-font-display); font-weight: 700; color: var(--brown); font-size: clamp(1rem, 4.4vw, 1.5rem); writing-mode: horizontal-tb; }
@media (min-width: 820px) {
  .imp-stage--one { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); justify-items: stretch; width: min(68rem, 100%); margin: 0 auto; }
  .imp-stack { justify-self: center; width: min(26vw, 280px); }
}

/* 3. scans: the dark chapter; 60 small cards, 32 light up */
.imp-stage--scan { background: var(--walnut); grid-template-columns: minmax(0, 1fr); align-content: center; justify-items: center; gap: 26px; }
.imp-dots { display: grid; grid-template-columns: repeat(10, 1fr); gap: clamp(6px, 1.6vw, 12px); width: min(92vw, 520px); }
.imp-dots i { aspect-ratio: 2 / 3; border-radius: 3px; background: #3a281a; border: 1px solid #4a3424; transition: background .35s ease, box-shadow .35s ease, transform .35s ease; }
.imp-dots i.is-on { background: var(--gold-2); border-color: var(--gold); box-shadow: 0 2px 14px -3px rgba(232, 207, 142, .7); transform: translateY(-2px); }
.imp-copy--dark .imp-big, .imp-copy--dark .imp-num { color: #f8efd9; }
.imp-ex--dark { color: #f8efd9; border-color: #6b5236; background: rgba(0, 0, 0, .25); }
@media (min-width: 820px) {
  .imp-stage--scan { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); width: 100%; padding-inline: max(16px, calc((100% - 68rem) / 2)); justify-items: stretch; }
  .imp-dots { width: 100%; max-width: 560px; }
  [dir="ltr"] .imp-stage--scan .imp-copy { order: -1; }
}

/* 4. the quiet line */
.imp-quiet { min-height: 70svh; display: grid; place-items: center; padding: 10vh 16px; }
.imp-quiet__p { font-family: var(--sc-font-display); font-weight: 500; color: var(--brown); font-size: clamp(1.6rem, 5vw, 2.8rem); line-height: 1.2; text-align: center; max-width: 22ch; margin: 0; }
.imp-quiet__p .imp-num { font-size: 1.6em; display: block; }

/* 5. the peak: the chain draws itself under the copy */
.imp-stage--peak { align-items: start; justify-items: center; }
.imp-tree { position: absolute; inset: auto 0 0 0; width: 100%; height: calc(100% - var(--bar-h, 64px) - 150px); }
@media (min-width: 820px) { .imp-tree { height: calc(100% - var(--bar-h, 64px) - 24px); } }
.imp-br { fill: none; stroke: var(--gold); stroke-linecap: round; }
.imp-br--1 { stroke-width: 5; }
.imp-br--2 { stroke-width: 1.6; stroke: #d7b866; }
.imp-node rect { fill: #fffaf0; stroke: #c9b584; stroke-width: 1.2; }
.imp-node line { stroke: #d8c79f; stroke-width: 1; }
.imp-node { opacity: .0; transition: opacity .4s ease, transform .4s ease; }
.imp-node.is-on { opacity: 1; }
.imp-node--0 rect { fill: var(--brown); stroke: var(--brown); }
.imp-node--0 line { stroke: var(--gold-2); }
.imp-node--1.is-on rect { fill: #fff3d6; stroke: var(--gold); }
.imp-node--2.is-on rect { fill: #fff8e8; }
.imp-copy--peak { background: rgba(250, 245, 230, .86); border-radius: 14px; padding: 6px 4px; }
@media (min-width: 820px) { .imp-copy--peak { justify-self: start; margin-inline-start: max(0px, calc((100% - 68rem) / 2)); width: min(28rem, 100%); } }

/* 6. close */
.imp-close { padding: 14vh 0 0; }
.imp-close__in { width: min(46rem, calc(100% - 32px)); margin: 0 auto 12vh; }
.imp-h2 { font-family: var(--sc-font-display); font-weight: 700; color: var(--brown); font-size: clamp(2rem, 6vw, 3.6rem); line-height: 1.05; margin: 0 0 .5em; text-wrap: balance; }
.imp-close .imp-lead .imp-num { font-size: 1.25em; }
.imp-close .actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 1.6rem; }
.imp-note { font-size: .92rem; color: var(--soft); max-width: 34rem; }

@media (prefers-reduced-motion: reduce) {
  .imp-dots i, .imp-node { transition: none; }
}

/* the home page's section shadows (css/site.css "main > section:nth-of-type") are not for this page */
main.imp > section { box-shadow: none !important; z-index: auto; }
