/* Export section — our changes, loaded after css/home-edit-retouch.css + css/home-export.css + css/sep-b.css.
   Markup: export/section.html · scripts: export/js/export-section.js (copy, lightened: the map),
   export/js/export-title.js (the title). Lightened 2026-11-13: title + one line, then the photo and three cards. */

.exx { --display: "SF Pro Display", "SF Pro", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif; }

/* The sheet's top space, as the Stacking, Edit and Retouch sheets'. */
.sb-slot > .cx.exx { padding-top: clamp(48px, 5vw, 80px); }

/* ---------- Title: the other section titles' twin, written out like a file being exported ---------- */

.exx-open { margin: 0 auto clamp(56px, 7vw, 104px); text-align: center; font-family: var(--display); }
.exx-word {
  position: relative;
  width: fit-content;
  margin: 0 auto;
  font-size: clamp(60px, 12.4vw, 196px);    /* section titles: Stacking, Editing, Retouching share it */
  font-weight: 700;
  letter-spacing: -0.04em;                  /* 2026-11-17: was -0.055em */
  line-height: 1;
  white-space: nowrap;
}
.exx-word__text { display: block; padding: 0 0.04em 0.1em; color: transparent; }
/* The styles below are the end state (written out, line gone); the scroll motion after them starts as an outline. */
/* Not written yet: the word's outline. */
.exx-word__ghost {
  position: absolute; inset: 0; padding: 0 0.04em 0.1em;
  color: transparent;
  -webkit-text-stroke: 0.012em rgba(241, 244, 242, 0.32);
  opacity: 0.3;
  will-change: opacity;
}
/* Written: solid up to the progress edge, with a soft lead-in (6 % of the word). The edge is a fixed gradient mask
   on a strip twice the word's width that slides right (__mask) while the word inside slides back and stays put
   (__fill): two transforms, no mask redrawn. __wipe keeps the strip from widening the page (a clip at the word's
   sides, 0.2em of room above and below). Edge at p (0 → 1): opaque to (106 p − 6) %, then the lead-in. */
.exx-word__wipe { position: absolute; inset: -0.2em 0; overflow: hidden; pointer-events: none; }
.exx-word__mask {
  position: absolute; top: 0; bottom: 0; left: 0; width: 200%;
  -webkit-mask-image: linear-gradient(90deg, #000 97%, transparent);
          mask-image: linear-gradient(90deg, #000 97%, transparent);
  transform: translateX(-47%);                          /* (53 p − 100) % */
  will-change: transform;
}
.exx-word__fill {
  position: absolute; top: 0.2em; bottom: 0.2em; left: 0; width: 50%;
  padding: 0 0.04em 0.1em;
  color: var(--text);
  transform: translateX(94%);                           /* (200 − 106 p) % */
  will-change: transform;
}
/* The progress line under the word: fills with it, then lets go. */
.exx-word__bar {
  position: absolute;
  left: 0.06em; right: 0.06em; bottom: -0.04em;
  height: max(2px, 0.016em);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.10);
  opacity: 0;
  overflow: hidden;
  will-change: opacity;
}
.exx-word__bar i {
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 230, 220, 0.5), #ffe6dc);
  box-shadow: 0 0 12px #e0644a;
  transform-origin: left;
  will-change: transform;
}

/* Scroll motion (2026-11-16, phone perf pass): only transform and opacity move. The run starts when the word's top
   is at 90 % of the screen and ends when it is at a third, eased with cubic-bezier(1/3, 0, 2/3, 1) (= smoothstep);
   the line's fades are placed along that same curve (in at p = 1/8, out from p = 11/12). Scroll timelines where the
   browser has them (Safari 26, Chrome 115+); elsewhere export-title.js holds the animations paused and sets their
   time on scroll. */
@keyframes exx-ghost { from { opacity: 1; } to { opacity: 0.3; } }
@keyframes exx-mask { from { transform: translateX(-100%); } to { transform: translateX(-47%); } }
@keyframes exx-fill { from { transform: translateX(200%); } to { transform: translateX(94%); } }
@keyframes exx-bar { 0% { opacity: 0; } 22.11% { opacity: 1; } 82.25% { opacity: 1; } 100% { opacity: 0; } }
@keyframes exx-line { from { transform: scaleX(0); } to { transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .exx-word__ghost { animation: exx-ghost 1s cubic-bezier(0.3333, 0, 0.6667, 1) both; }
  .exx-word__mask { animation: exx-mask 1s cubic-bezier(0.3333, 0, 0.6667, 1) both; }
  .exx-word__fill { animation: exx-fill 1s cubic-bezier(0.3333, 0, 0.6667, 1) both; }
  .exx-word__bar { animation: exx-bar 1s linear both; }
  .exx-word__bar i { animation: exx-line 1s cubic-bezier(0.3333, 0, 0.6667, 1) both; }
  @supports (animation-timeline: view()) {
    .exx-word { view-timeline: --exx-word block; }
    .exx-word__ghost, .exx-word__mask, .exx-word__fill, .exx-word__bar, .exx-word__bar i {
      animation-duration: auto;
      animation-timeline: --exx-word;
      animation-range-start: cover 10dvh;
      animation-range-end: cover 67dvh;
    }
  }
}

.exx-lede {
  margin-top: clamp(20px, 2.4vw, 36px);
  font-size: clamp(20px, 2vw, 30px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--muted);
}
.exx-lede span { color: var(--text); }

/* ---------- The map: Share left, Keep editing right, Print under the photo ---------- */

.exx .exc__map {
  max-width: 1180px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr) minmax(0, 1fr);
  grid-template-areas:
    "share hub   keep"
    ".     print .";
  column-gap: clamp(40px, 5vw, 80px);
  row-gap: clamp(40px, 4.4vw, 64px);
}
.exx .exc__card[data-dest] { align-self: center; justify-self: stretch; font-family: var(--display); }
.exx .exc__card[data-dest="print"] { justify-self: center; width: min(100%, 250px); }

/* Fewer words, bigger: a title, the formats, one line. */
.exx .exc__card { padding: 20px 22px 22px; }
.exx .exc__card h3 { font-size: 21px; letter-spacing: -0.02em; }
.exx .exc__fmt { margin-top: 16px; }
.exx .exc__fmt b { padding: 4px 10px; font-size: 12px; }
.exx .exc__line { margin-top: 12px; font-size: 15px; font-weight: 500; color: var(--muted); }

/* Nothing dims while pointing: the lit card is enough. */
.exx .exc__map.has-active .exc__card:not(.is-active) { opacity: .62; }

.exx .cx__more { margin-top: clamp(40px, 4.4vw, 64px); }

/* ---------- narrower: the photo on top, the three cards under it, no wires ---------- */
@media (max-width: 1060px) {
  .exx .exc__map {
    max-width: 720px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas:
      "hub   hub   hub"
      "share print keep";
    column-gap: 12px; row-gap: 12px;
  }
  .exx .exc__card[data-dest] { align-self: stretch; }
  .exx .exc__card[data-dest="print"] { justify-self: stretch; width: auto; }
}
@media (max-width: 640px) {
  .exx-word { font-size: clamp(44px, 15vw, 60px); }
  .exx .exc__map { grid-template-columns: minmax(0, 1fr); grid-template-areas: "hub" "share" "print" "keep"; }
  .exx .exc__card { padding: 14px 16px 16px; }
  .exx .exc__card h3 { font-size: 17px; }
  .exx .exc__line { font-size: 14px; }
}
