/* Preview only. Scoped replacement for the introduction and selected-work carousel. */
#editorial-top{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(40px,7vw,110px);box-sizing:border-box;text-align:left}
#editorial-top #hero,#editorial-top #selected-work{display:block!important;max-width:none!important;width:100%!important;min-height:0!important;margin:0!important;padding:0!important;border:0!important;background:none!important}
#editorial-top #hero .name{font-size:27px!important;line-height:1.25!important;letter-spacing:-.045em!important;font-weight:300!important;margin:0 0 24px!important;color:var(--ink,#181818)}
#editorial-top .editorial-title{font-size:clamp(22px,2.1vw,30px);line-height:1.32;letter-spacing:-.04em;color:var(--ink,#181818);margin:0 0 30px;font-weight:300}
#editorial-top #hero .bio{font-size:15px!important;line-height:1.65!important;letter-spacing:-.01em!important;color:var(--ink-soft,#666);margin:0 0 16px!important;max-width:50ch!important;text-transform:none}
#editorial-top #selected-work{padding-top:42px!important}
#editorial-top .editorial-label{font-size:11px;letter-spacing:.05em;line-height:1.4;font-weight:300;color:var(--ink-faint,#888);margin:0 0 19px;text-transform:uppercase}
#editorial-top .editorial-projects{list-style:none;padding:0;margin:0}
#editorial-top .editorial-projects li{margin:0;padding:0;border:0}
#editorial-top .work-link{appearance:none;display:flex;align-items:center;gap:14px;text-align:left;border:0;background:none;border-radius:0;padding:7px 0;color:var(--ink-soft,#666);font:inherit;font-size:20px;line-height:1.35;letter-spacing:-.035em;cursor:pointer;max-width:100%;transition:color .16s}
#editorial-top .work-link:hover,#editorial-top .work-link[aria-pressed=true]{color:var(--ink,#111)}
#editorial-top .project-arrow{font-size:14px;opacity:0;transition:opacity .16s}
#editorial-top .work-link:hover .project-arrow,#editorial-top .work-link[aria-pressed=true] .project-arrow{opacity:1}
#editorial-top button:focus-visible,#editorial-top a:focus-visible{outline:2px solid currentColor;outline-offset:5px}
#editorial-top .editorial-links{display:flex;flex-wrap:wrap;gap:12px 22px;margin-top:34px;padding:0;background:none;position:static;border:0;box-shadow:none;backdrop-filter:none}
#editorial-top .editorial-links a{font-size:13px;line-height:2;color:var(--ink-soft,#666);text-decoration:none;border-bottom:1px solid var(--line,#ddd)}
#editorial-top .editorial-links a:hover{color:var(--ink,#111)}
#editorial-top .editorial-stage{min-width:0;align-self:stretch;position:relative;padding-top:24px}
#editorial-top #project-preview{margin:0;position:sticky;top:110px;width:100%;color:var(--ink-soft,#666)}
#editorial-top #project-preview[hidden]{display:none!important}
#editorial-top .preview-frame{position:relative;aspect-ratio:16/10;overflow:hidden;background:transparent}
#editorial-top .preview-frame :is(img,video){width:100%;height:100%;object-fit:contain;position:absolute;inset:0;border-radius:0;filter:none}
#editorial-top #preview-motion{opacity:0;transition:opacity .22s}
#editorial-top #preview-motion.is-loaded{opacity:1}
#editorial-top figcaption{margin-top:18px;font-size:12px;line-height:1.6}
#editorial-top .preview-caption{display:flex;gap:12px;justify-content:space-between;align-items:baseline}
#editorial-top #preview-name{color:var(--ink,#222)}
#editorial-top #preview-description{font-size:12px;line-height:1.65;margin:12px 0 0;max-width:48ch}
#editorial-top .preview-status{font-size:10px;margin:8px 0 0;min-height:16px;color:var(--ink-faint,#888)}
@media(min-width:901px){#editorial-top .editorial-copy{max-width:510px}}
@media(max-width:1100px) and (min-width:761px){#editorial-top{gap:38px}#editorial-top .work-link{font-size:18px}.wide-break{display:none}}
@media(max-width:760px){#editorial-top{display:block}#editorial-top .editorial-stage{display:none}#editorial-top #hero .name{font-size:26px!important;margin-bottom:22px!important}#editorial-top .editorial-title{font-size:25px;line-height:1.32;max-width:23ch}#editorial-top #hero .bio{font-size:15px!important;line-height:1.65!important;margin-bottom:16px!important}#editorial-top #selected-work{padding-top:34px!important}#editorial-top .work-link{min-height:44px;font-size:19px;padding:9px 0}#editorial-top #project-preview{position:static;margin:14px 0 24px}#editorial-top .preview-frame{aspect-ratio:16/10}#editorial-top .editorial-links{gap:8px 20px;margin-top:26px}#editorial-top #preview-description{font-size:12px}.wide-break{display:none}}
@media(prefers-reduced-motion:reduce){#editorial-top *{transition:none!important}}
/* Long project lists must not inherit section reveal thresholds from the old carousel. */
#editorial-top #hero,#editorial-top #selected-work{opacity:1!important;transform:none!important}
#editorial-top .work-link{scroll-margin-top:90px}
/* Andre's review: use the same compact typography as the existing client lists. */
#editorial-top #hero .name{font-size:18px!important;letter-spacing:-.025em!important;line-height:1.4!important;margin-bottom:16px!important}
#editorial-top .editorial-title{font-size:18px;line-height:1.45;letter-spacing:-.025em;margin-bottom:28px;max-width:34ch}
#editorial-top .wide-break{display:none}
#editorial-top .work-link{font-family:'Graphik Light','Graphik',sans-serif!important;font-size:.7rem;line-height:1.8;font-weight:300;letter-spacing:normal;padding:0;min-height:0;gap:10px}
#editorial-top .project-arrow{font-size:10px}
#editorial-top .editorial-label{margin-bottom:16px}
#editorial-top .editorial-links{margin-top:28px;gap:10px 20px}
#editorial-top .editorial-links a{font-size:.7rem;line-height:1.8}
@media(max-width:760px){#editorial-top #hero .name{font-size:18px!important}#editorial-top .editorial-title{font-size:18px;max-width:32ch}#editorial-top .work-link{font-size:.7rem;line-height:1.8;padding:0;min-height:0}#editorial-top #project-preview{margin-top:12px;margin-bottom:18px}}
#editorial-top .work-link{font-weight:400}

/* Vertically balance the desktop preview with the introduction and work list. */
@media (min-width:761px) {
  #editorial-top .editorial-stage { padding-top:clamp(24px,calc(44svh - 286px),148px); }
}
@media (min-width:761px) and (max-height:650px) {
  #editorial-top #project-preview { top:min(110px,12svh); }
  #editorial-top .preview-frame { max-height:max(120px,calc(80svh - 205px)); }
}

/* One content edge for every homepage section, including the Overview grid. */
main > .container:not(#hero) {
  --page-gutter-start: clamp(28px, 6vw, 80px);
  --page-gutter-end: var(--page-gutter-start);
  box-sizing: border-box;
  width: min(100%, 1200px);
  max-width: 1200px;
  margin-inline: auto !important;
  padding-inline: var(--page-gutter-start) var(--page-gutter-end) !important;
}
/* Viewport-sized panels keep their common gutters; tall archives can grow. */
html:has(#editorial-top) {
  scroll-snap-type: y proximity;
  scroll-padding-block-start: 0;
}
html.is-panel-jump:has(#editorial-top) { scroll-snap-type: none; }
main > .container:not(#hero):not([hidden]) {
  min-height: 100vh !important;
  min-height: 100svh !important;
  margin-block: 0 !important;
  scroll-snap-align: start;
  scroll-snap-stop: normal;
}
/* Snap positions must not move when the legacy reveal observer fires. */
main > .container.reveal { opacity: 1; transform: none; }
main > section.container:not([hidden]):not(#contact) {
  display: flex;
  flex-direction: column;
  justify-content: safe center;
}
main > #contact.container:not([hidden]) { align-content: center; }
@media (max-width: 900px) {
  main > section.container:not(#hero):not([hidden]) { padding-block-start: 76px !important; }
}
@media (prefers-reduced-motion: reduce) {
  html:has(#editorial-top) { scroll-snap-type: none; scroll-behavior: auto; }
}
main > #editorial-top.container { padding-block: 100px 58px !important; }
@media (max-width: 1200px) {
  main > .container:not(#hero) { --page-gutter-start: 20px; --page-gutter-end: 20px; }
}
@media (min-width: 761px) and (max-width: 1100px) {
  main > #editorial-top.container { padding-block: 90px 42px !important; }
}
@media (max-width: 760px) {
  main > #editorial-top.container { padding-block: 74px 32px !important; }
}
@media (max-width: 520px) {
  main > .container:not(#hero) { --page-gutter-start: 16px; }
}

/* The reel trigger follows the typography of the adjacent text links. */
#editorial-top #editorial-reel {
  appearance: none; background: none; border: 0; border-bottom: 1px solid var(--line,#ddd);
  border-radius: 0; padding: 0; color: var(--ink-soft,#666); cursor: pointer;
  font: inherit; font-size: .7rem; line-height: 1.8;
}
#editorial-top #editorial-reel:hover { color: var(--ink,#111); }
html:has(#reel-modal-container[open]) { overflow: hidden; }
#reel-modal-container {
  box-sizing: border-box; width: min(960px, calc(100vw - 32px)); max-width: none;
  max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
  margin: auto; padding: 0; overflow: auto; border: 1px solid #353535; border-radius: 12px;
  background: #111; color: #fff; box-shadow: 0 20px 90px #0008;
}
#reel-modal-container::backdrop { background: #000a; }
#reel-modal-container .reel-dialog-header {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 48px; padding: 0 8px 0 16px;
}
#reel-modal-container #reel-dialog-title { font: inherit; font-size: 15px; margin: 0 !important; }
#reel-modal-container .reel-dialog-close {
  appearance: none; background: none; border: 0; color: inherit;
  width: 44px; height: 44px; font: 24px/1 sans-serif; cursor: pointer;
}
#reel-modal-container .reel-dialog-close:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
#reel-modal-container video {
  display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain;
  max-height: calc(100vh - 82px); max-height: calc(100dvh - 82px); background: #000;
}
#reel-modal-container .reel-dialog-status { margin: 0; padding: 12px 16px; font-size: 13px; }

#reel-modal-container:not([open]) { display: none; }

/* Full-height sections still snap near their edges but leave space for the last item. */
@media (hover: none), (pointer: coarse) {
  #editorial-top .project-arrow { display: none; }
  main > .container:not(#hero):not([hidden]) { padding-block-end: max(112px, 15svh) !important; }
  #editorial-top .work-link { min-block-size: 26px; width: fit-content; }
}
@media (max-width: 760px) {
  #editorial-top .project-arrow { display: none; }
}

/* The wider touch layout reuses the section rail, inside the page's safe area.
   Narrow and split windows still get the compact menu. */
#section-nav .touch-rail-only { display: none; }
@media (min-width: 761px) and (max-width: 1180px) and (orientation: landscape) and (hover: none) and (pointer: coarse) {
  #refined-mobile, #glass-nav, #mobile-nav { display: none !important; }
  main { padding-left: 0 !important; padding-inline-end: 106px !important; }
  #section-nav {
    box-sizing: border-box; display: flex !important; flex-direction: column;
    position: fixed; z-index: 1800; inset-inline-start: auto; inset-inline-end: max(10px, env(safe-area-inset-right));
    inset-block-start: 50%; transform: translateY(-50%);
    width: 86px; min-width: 0; padding: 6px !important; gap: 2px !important;
    border: 1px solid var(--line-strong, #ddd); border-radius: 16px;
    align-items: stretch; justify-content: flex-start; overflow: auto !important;
    max-height: calc(100svh - 24px) !important; overscroll-behavior: contain;
    background: var(--glass-solid, var(--page,#fff)); color: var(--ink,#181818);
    box-shadow: none;
  }
  #section-nav a, #section-nav .vertical-theme-toggle {
    display: flex !important; align-items: center; justify-content: center; min-height: 30px;
    font-size: 10px !important; line-height: 1.15; text-decoration: none;
    text-align: center; writing-mode: horizontal-tb; text-orientation: mixed;
    padding: 3px 2px !important; color: var(--ink,#181818); border-radius: 8px;
  }
  #section-nav a.active { background: rgb(127 127 127 / 15%); }
  #section-nav a.active::before { display: none; }
}

#editorial-top #preview-video { opacity: 0; pointer-events: none; transition: opacity .22s; }
#editorial-top #preview-video.is-loaded { opacity: 1; }
#editorial-top #preview-video[hidden] { display: none !important; }
