/* Support rules for the hand-built pages (designed.css is the live site's own stylesheet, ported). Everything is scoped under .nx. */

/* Base text size of the designed pages is the browser's own (the live site's body text is 16px) */
.nx { font-size: 1rem; }

/* The header floats over the page, as on the live site: a designed page starts at the very top (its first section leaves room for the header);
   any other page (the page builder's) is pushed down by the header's height instead */
.site-main { padding-top: 74px; }
.site-main:has(> .nx:first-child) { padding-top: 0; }
@media (max-width: 860px) { .site-main { padding-top: 66px; } }
@media (max-width: 600px) { .site-main { padding-top: 62px; } }

/* The search box and the header's small details */
.nx .modal-overlay[hidden] { display: none; }
.nx .search-results a svg { color: var(--gold); }
.nx .search-button { text-decoration: none; }

/* Without the script the menu button does nothing, so the links stay in view instead: the row wraps under the logo */
html:not(.js) .nx .menu-button { display: none; }
@media (max-width: 1100px) {
    html:not(.js) .nx .header-inner { height: auto; min-height: 62px; flex-wrap: wrap; padding-block: 8px; gap: 8px 14px; }
    html:not(.js) .nx .desktop-nav { display: flex; flex-wrap: wrap; width: 100%; order: 3; margin-left: 0; gap: 4px 16px; }
    html:not(.js) .nx .header-apply { display: inline-flex; }
}

/* Images that fill their parent (the live site's "fill" images) */
.nx .fill-img { position: absolute; inset: 0; width: 100%; height: 100%; color: transparent; }

/* Hero entrance: each piece rises in on load, one after another. Only when the script is running (so nothing is ever hidden without it). */
@keyframes nx-hero-in {
    from { opacity: 0; transform: translateY(34px); filter: blur(10px); }
    to { opacity: 1; transform: none; filter: blur(0); }
}
.js .nx .hero-step { animation: nx-hero-in .9s cubic-bezier(.16, 1, .3, 1) both; }
.js .nx .hero-step[data-step="1"] { animation-delay: .1s; }
.js .nx .hero-step[data-step="2"] { animation-delay: .2s; }
.js .nx .hero-step[data-step="3"] { animation-delay: .3s; }
.js .nx .hero-step[data-step="4"] { animation-delay: .4s; }
.js .nx .hero-step[data-step="5"] { animation-delay: .5s; }
.js .nx .hero-step[data-step="6"] { animation-delay: .6s; }
.reduced-motion .nx .hero-step { animation: none; }

/* The hive mark turns slowly */
@keyframes nx-orbit { to { transform: rotate(360deg); } }
.nx .orbit { animation: nx-orbit 32s linear infinite; }
.reduced-motion .nx .orbit { animation: none; }

/* The film link covers the whole frame */
.nx .video-play { position: absolute; inset: 0; z-index: 3; display: block; }
.nx .video-play:focus-visible { outline: 2px solid var(--gold); outline-offset: -4px; }

/* Once play is pressed the player fills the frame and the decoration steps aside */
.nx .video-player { position: absolute; inset: 0; z-index: 4; width: 100%; height: 100%; border: 0; background: #000; }
.nx .video-frame.is-playing .play-button, .nx .video-frame.is-playing .video-glow { display: none; }

/* Four ways to belong: with the script, one panel at a time; without it, all four are listed and the tab row is hidden */
html:not(.js) .nx .pathway-tabs { display: none; }
.js .nx .pathway-panel:not(.is-active) { display: none; }
html:not(.js) .nx .pathway-panel + .pathway-panel { margin-top: 16px; }
.nx .pathway-tab { cursor: pointer; }

/* Section guide only where there is room */
@media (max-width: 1180px) { .nx .experience-rail { display: none; } }

/* The slim page scrollbar of the live site (all pages) */
body::-webkit-scrollbar { width: 8px; }
body::-webkit-scrollbar-track { background: var(--ink, #0a0a14); }
body::-webkit-scrollbar-thumb { border-radius: 99px; background: #241a56; }
body::-webkit-scrollbar-thumb:hover { background: #a8862c; }

/* Pictures and icons are block-level, centred on their line (the live site's base rule) */
.nx img, .nx svg { display: block; vertical-align: middle; }

/* The footer: undo the earlier plain footer's list and spacing rules so the live footer's own rules (designed.css) decide */
.nx .site-footer { font-size: 1rem; }
.nx .site-footer__brand { margin: 0; }
.nx .site-footer__links { margin-bottom: 0; }
.nx .site-footer__links a { display: inline; padding: 0; min-height: 0; }
.nx .site-footer__powered { min-height: 0; }

/* Accordion and gallery dots (the script switches them; without it every claim is open and the dots are hidden) */
html:not(.js) .nx .claim > p { display: block; }
html:not(.js) .nx .pathway-carousel-dots { display: none; }
.js .nx .claim:not(.is-open) > p { display: none; }
.nx .site-footer__links a { font: inherit; letter-spacing: normal; text-transform: none; color: rgba(255, 255, 255, .74); }
.nx .site-footer__links a:hover, .nx .site-footer__legal a.site-footer__seat { color: var(--gold-light); }

/* Paragraphs carry no outside margin unless a designed rule gives one (the live site's text blocks) */
.nx p { margin-bottom: 0; }

/* "If Other, tell us who" appears once "Other" is picked (without the script it is always shown) */
.js .nx [data-other-target]:not(.is-shown) { display: none; }

/* The planet's arrival (only when the script is running; without it the planet rests where it comes to rest) */
@keyframes nxJupiterEnter { from { transform: translate(-142%, -50%) scale(1.06); opacity: 0; } to { transform: translate(-16%, -50%) scale(1); opacity: 1; } }
@keyframes nxSpaceArrive { from { opacity: 0; scale: 1.14; } to { opacity: 1; scale: 1; } }
.js .nx .jupiter-field[data-jupiter="hero"] .jupiter-body { animation: nxJupiterEnter 2.4s cubic-bezier(.16, .84, .3, 1) backwards; }
.js .nx .hero-space .jupiter-body { animation: nxSpaceArrive 3.4s cubic-bezier(.16, .84, .24, 1) backwards; }
.js .nx .jupiter-track { will-change: transform, opacity; }
.reduced-motion .nx .jupiter-body { animation: none !important; }

.nx .insights-pagination a { min-width: 42px; padding: 8px 12px; border: 1px solid rgba(215, 184, 89, .45); border-radius: 6px; color: rgba(239, 236, 223, .7); font-family: var(--font-sans), sans-serif; font-size: var(--text-4xs); letter-spacing: .08em; }
.nx .insights-pagination a:hover, .nx .insights-pagination a.is-active { border-color: var(--gold); background: rgba(215, 184, 89, .12); color: var(--gold-light); }

/* The ringed planet wears its picture everywhere the stylesheet names it */
.nx .jupiter.is-ringed { --disc: 42%; }
.nx .jupiter.is-ringed .jupiter-disc { background-image: url('/img/site/jupiter-ringed.webp'); }
.nx .hero-space .body-scale-082 { --body-scale: .82; }

/* The Insights filters and page numbers are plain links here (the live site's are buttons): they take the buttons' look */
.nx .filter-row a { flex: none; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; text-decoration: none; cursor: pointer; transition: color .2s ease, border-color .2s ease, background .2s ease; }
.nx .insights-filters a { min-width: 120px; padding: .6rem 1.4rem; border: 1px solid rgba(215, 184, 89, .5); border-radius: 8px; background: rgba(8, 8, 22, .5); color: var(--ivory); font-family: var(--font-body), sans-serif; font-size: var(--text-sm); font-weight: 400; letter-spacing: 0; text-transform: none; }
.nx .insights-filters a:hover { border-color: var(--gold); color: var(--gold-light); }
.nx .insights-filters a.is-active { border-color: var(--gold); background: rgba(8, 8, 22, .7); color: var(--gold-light); }
@media (max-width: 720px) { .nx .insights-filters a { min-width: 0; } }
.nx .insights-pagination a { min-width: 42px; display: inline-flex; align-items: center; justify-content: center; padding: 8px 12px; border: 1px solid rgba(215, 184, 89, .45); border-radius: 6px; background: transparent; color: rgba(239, 236, 223, .7); font-family: var(--font-sans), sans-serif; font-size: var(--text-4xs); letter-spacing: .08em; text-decoration: none; transition: color .2s ease, border-color .2s ease, background .2s ease; }
.nx .insights-pagination a:hover, .nx .insights-pagination a.is-active { border-color: var(--gold); background: rgba(215, 184, 89, .12); color: var(--gold-light); }
@media (max-width: 767px) { .nx .filter-row > a { scroll-snap-align: start; } }
@media (max-width: 860px) { .nx .insights-filters a { min-width: 0; } .nx .insights-hero .insights-filters { justify-content: flex-start; } }
.nx .search-results a[hidden], .nx .search-results p[hidden] { display: none; }
.nx .search-overlay { overflow-y: auto; align-items: start; }
.nx .prose p, .nx .prose ul, .nx .prose ol, .nx .prose blockquote { max-width: none; }
/* The live site sets the opening line of an article in the browser's own serif (its font name there does not resolve); the same here */
.nx .article-lede { font-family: serif; }

/* The invitation form: the multi-line box takes the page's line height like the other fields; the progress line under the intro */
.nx .form-grid textarea { font-family: inherit; line-height: 1.7; }
.nx .form-progress { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; }
.nx .form-progress-track { flex: 1; height: 3px; overflow: hidden; border-radius: 99px; background: rgba(232, 201, 79, .16); }
.nx .form-progress-track span { display: block; width: 0; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--gold-deep), var(--gold-light)); transition: width .25s ease; }
.nx .form-progress small { font-family: var(--font-sans), sans-serif; font-size: var(--text-3xs); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; color: rgba(241, 238, 231, .5); }
@media (max-width: 600px) { .nx .form-progress small { font-size: var(--text-4xs); } }
html:not(.js) .nx .form-progress { display: none; }
/* The form wrapper is itself an .nx (so the form looks right wherever it is placed); inside the designed card it must not paint its own dark panel */
.nx .apply-form-scope { background: transparent; min-width: 0; overflow: visible; }

/* A picture block inside an article body sits in the middle of the column (normal), a little broader (wide) or the full column (full) */
.nx .article-body .figure { margin: 32px auto; max-width: 720px; }
.nx .article-body .figure--wide { max-width: 860px; }
.nx .article-body .figure--full { max-width: none; }
.nx .article-body .figure figcaption { text-align: center; }

/* Insight cards: the author line sits directly above "Read more" whatever the length of the description; spare space goes above it */
.nx .insights-section .insight-card .card-byline { margin-top: auto; }
.nx .insights-section .insight-card .related-more { margin-top: 0; }
