/* =====================================================================
   nousspace — below-the-hero sections
   Ready styles adapted from external/asme-—-know-it-all:
   liquid-glass surfaces, display headings with serif-italic accents,
   rounded video frames/cards, eyebrow labels, one-shot reveals.
   ===================================================================== */

.ns-section {
  position: relative;
  /* Transparent: the page background shows through. */
  background: transparent;
  color: var(--ink, #fff);
  padding: 8rem 1.5rem;
  overflow: hidden;
}



@media (min-width: 768px) {
  .ns-section { padding: 10rem 2.5rem; }
}

.ns-shell {
  position: relative;
  z-index: 1;
  max-width: 76rem;
  margin: 0 auto;
}

.ns-radial {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at top, rgba(var(--fg-rgb, 255, 255, 255), .03) 0%, transparent 70%);
}

.ns-radial--center {
  background: radial-gradient(ellipse at center, rgba(var(--fg-rgb, 255, 255, 255), .02) 0%, transparent 60%);
}

/* ---------- corners: Apple-style continuous curvature, concentric radii ----------
   Blocks use --r-block; panels set inside a block use --r-inset (outer radius minus the
   inset, kept to a sensible minimum). Where the browser supports corner-shape, corners use
   a squircle (curvature eases into the straight edge, as on Apple platforms), which needs a
   larger radius to read as the same roundness. */
:root { --r-block: 28px; --r-inset: 16px; }
@supports (corner-shape: squircle) {
  :root { --r-block: 42px; --r-inset: 24px; }
  .ns-video-frame, .ns-card, .ns-featured-panel, .mf-banner, .liquid-glass::before {
    corner-shape: squircle;
  }
}

/* ---------- liquid glass (ported verbatim from the template) ---------- */

.liquid-glass {
  position: relative;
  overflow: hidden;
  background: rgba(var(--fg-rgb, 255, 255, 255), .01);
  background-blend-mode: luminosity;
  border: none;
  box-shadow: inset 0 1px 1px rgba(var(--fg-rgb, 255, 255, 255), .1);
}

.liquid-glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.4px;
  background: linear-gradient(180deg,
    rgba(var(--fg-rgb, 255, 255, 255), .45) 0%,
    rgba(var(--fg-rgb, 255, 255, 255), .15) 20%,
    rgba(var(--fg-rgb, 255, 255, 255), 0) 40%,
    rgba(var(--fg-rgb, 255, 255, 255), 0) 60%,
    rgba(var(--fg-rgb, 255, 255, 255), .15) 80%,
    rgba(var(--fg-rgb, 255, 255, 255), .45) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ---------- typography ---------- */

.ns-eyebrow {
  margin: 0 0 1.25rem;
  color: rgba(var(--fg-rgb, 255, 255, 255), .4);
  font: 500 12px/1.6 "Space Mono", ui-monospace, monospace;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.ns-display {
  margin: 0;
  color: var(--ink, #fff);
  font-family: "Schibsted Grotesk", system-ui, sans-serif;
  font-weight: 430;
  font-size: clamp(29px, 3.9vw, 54px);
  line-height: 1.14;
  letter-spacing: -.04em;
  max-width: 24ch;
}

.ns-display--lg {
  font-size: clamp(33px, 4.5vw, 64px);
  max-width: none;
}

.ns-display--sm { font-size: clamp(22px, 2.6vw, 38px); }

.ns-serif {
  font-family: "Newsreader", Georgia, serif;
  font-style: italic;
  font-weight: 380;
  color: rgba(var(--fg-rgb, 255, 255, 255), .55);
}

.ns-body {
  margin: 0;
  color: rgba(var(--fg-rgb, 255, 255, 255), .7);
  font-size: clamp(15px, 1.15vw, 18px);
  line-height: 1.7;
}

/* ---------- video frames & cards ---------- */

.ns-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.ns-media--43 { aspect-ratio: 4 / 3; }

.ns-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ns-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, .8), rgba(0, 0, 0, .2) 30%, transparent);
}

.ns-shade--soft { display: none; } /* no darkening over the video where no text sits on it */

.ns-video-frame {
  position: relative;
  border-radius: var(--r-block);
  overflow: hidden;
  border: 1px solid rgba(var(--fg-rgb, 255, 255, 255), .1);
}

.ns-featured-bar {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem;
}

@media (min-width: 768px) {
  .ns-featured-bar { padding: 2.5rem; }
}

@media (max-width: 767px) {
  .ns-featured-bar { flex-direction: column; align-items: stretch; }
}

.ns-featured-panel {
  flex: 0 1 auto;
  max-width: 28rem;
  border-radius: var(--r-inset);
  padding: 1.5rem 1.75rem;
}

@media (min-width: 768px) {
  .ns-featured-panel { padding: 2rem 2.25rem; }
}

.ns-panel-text {
  margin: 0;
  color: var(--ink, #fff);
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.65;
}

.ns-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: .8rem 2rem;
  color: var(--ink, #fff);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .02em;
  cursor: pointer;
  transition: background .3s ease, transform .2s ease;
}

.ns-pill:hover { background: rgba(var(--fg-rgb, 255, 255, 255), .1); }
.ns-pill:active { transform: scale(.96); }

/* ---------- section heads ---------- */

.ns-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(var(--fg-rgb, 255, 255, 255), .1);
  padding-bottom: 2rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .ns-section-head { margin-bottom: 4rem; }
}

/* ---------- below-the-hero: about statement centered like the hero ---------- */

#about-block .ns-eyebrow { text-align: center; }

#about-block .ns-display {
  text-align: center;
  margin-inline: auto;
}

/* ---------- two-column layout ---------- */

.ns-two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  margin-top: 4rem;
}

.ns-vision-text { display: flex; flex-direction: column; }

.ns-rule {
  width: 100%;
  height: 1px;
  background: rgba(var(--fg-rgb, 255, 255, 255), .1);
  margin: 2.25rem 0;
}

@media (min-width: 900px) {
  .ns-two-col { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .ns-vision-text { padding: 0 1rem; }
}

/* ---------- cards grid ---------- */

.ns-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .ns-grid-2 { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

.ns-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-block);
  cursor: pointer;
}

.ns-card .ns-card-media video { transition: transform .7s cubic-bezier(.16, 1, .3, 1); }
.ns-card:hover .ns-card-media video { transform: scale(1.05); }

.ns-card-body { padding: 1.75rem 1.5rem 2rem; }

@media (min-width: 768px) {
  .ns-card-body { padding: 2rem 2.25rem 2.25rem; }
}

.ns-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.ns-card-top .ns-eyebrow { margin: 0; }

.ns-chip {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: rgba(var(--fg-rgb, 255, 255, 255), .8);
  transition: background .3s ease, color .3s ease;
}

.ns-card:hover .ns-chip { background: rgba(var(--fg-rgb, 255, 255, 255), .1); color: var(--ink, #fff); }

.ns-chip svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .3s ease;
}

.ns-card:hover .ns-chip svg { transform: translate(1px, -1px); }

.ns-card h3 {
  margin: 0 0 .75rem;
  color: var(--ink, #fff);
  font-weight: 500;
  font-size: clamp(20px, 1.7vw, 26px);
  letter-spacing: -.02em;
}

.ns-card-text {
  margin: 0;
  color: rgba(var(--fg-rgb, 255, 255, 255), .5);
  font-size: 14px;
  line-height: 1.65;
}

/* ---------- footer ---------- */

.ns-footer {
  position: relative;
  background: transparent;
  border-top: 1px solid rgba(var(--fg-rgb, 255, 255, 255), .1);
  padding: 4rem 1.5rem;
}

.ns-footer-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

@media (min-width: 768px) {
  .ns-footer-grid { flex-direction: row; }
}

.ns-brand { display: flex; align-items: baseline; gap: .6rem; }

.ns-brand-word {
  color: var(--ink, #fff);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -.02em;
}

.ns-brand-tag { color: rgba(var(--fg-rgb, 255, 255, 255), .3); font-size: 13px; }

.ns-footer-links { display: flex; align-items: center; gap: 2rem; }

.ns-footer-links a {
  color: rgba(var(--fg-rgb, 255, 255, 255), .6);
  font-size: 14px;
  text-decoration: none;
  transition: color .2s ease;
}

.ns-footer-links a:hover, .ns-footer-links a:focus-visible { color: var(--ink, #fff); }

.ns-footer-meta { display: flex; align-items: center; gap: 1rem; }

.ns-footer-meta span { color: rgba(var(--fg-rgb, 255, 255, 255), .3); font-size: 12px; }

.ns-top {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: rgba(var(--fg-rgb, 255, 255, 255), .7);
  cursor: pointer;
  transition: background .3s ease, color .3s ease;
}

.ns-top:hover { background: rgba(var(--fg-rgb, 255, 255, 255), .1); color: var(--ink, #fff); }

.ns-top svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- one-shot reveals (template's useInView once) ---------- */

.reveal-enabled [data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity .8s cubic-bezier(.16, 1, .3, 1) var(--rd, 0s),
    transform .8s cubic-bezier(.16, 1, .3, 1) var(--rd, 0s);
}

.reveal-enabled [data-reveal="left"] { transform: translateX(-40px); }
.reveal-enabled [data-reveal="right"] { transform: translateX(40px); }

.reveal-enabled [data-reveal].revealed {
  opacity: 1;
  transform: none;
}

.ns-section a:focus-visible,
.ns-section button:focus-visible,
.ns-footer a:focus-visible,
.ns-footer button:focus-visible,
.mf-footer a:focus-visible,
.mf-footer button:focus-visible {
  outline: 2px solid var(--ink, #fff);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- screen-reader helper ---------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =====================================================================
   Interactive footer, adapted from external/mainframe-—-interactive-hero
   (template was light-on-white; inverted here so it sits on our black
   base with the dark video as its backdrop)
   ===================================================================== */

.mf-footer {
  position: relative;
  overflow: hidden;
  background: transparent;
  color: var(--ink, #fff);
  container-type: inline-size;
}

/* Footer layout: the contact text and topic picker side by side on plain warm white,
   then the links row. */
.mf-grid {
  display: grid;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: end;
}
@media (min-width: 960px) {
  .mf-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .mf-grid .mf-sub { margin-bottom: 0; }
}

.mf-inner {
  position: relative;
  z-index: 2;
  max-width: 76rem;
  margin: 0 auto;
  padding: 7rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .mf-inner { padding: 9rem 2.5rem 2.5rem; }
}

.mf-headline {
  margin: 0 0 1.75rem;
  font-family: "Schibsted Grotesk", system-ui, sans-serif;
  font-weight: 430;
  font-size: clamp(30px, 5.2vw, 72px);
  line-height: 1.18;
  letter-spacing: -.04em;
  white-space: pre-line;
  min-height: 2.2em;
  cursor: default;
  user-select: none;
}

.mf-caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: middle;
  background: var(--ink, #fff);
}

.mf-caret.typing {
  animation: mf-blink 1s step-end infinite;
}

.mf-caret[data-done="true"] { display: none; }

@keyframes mf-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.mf-sub {
  margin: 0 0 4rem;
  max-width: 40rem;
  color: rgba(var(--fg-rgb, 255, 255, 255), .62);
  font-size: clamp(15px, 1.2vw, 19px);
  line-height: 1.65;
}

.mf-question {
  margin: 0 0 .4rem;
  color: var(--ink, #fff);
  font-weight: 500;
  font-size: clamp(18px, 1.6vw, 23px);
  letter-spacing: -.02em;
}

.mf-hint {
  margin: 0 0 1.4rem;
  color: rgba(var(--fg-rgb, 255, 255, 255), .5);
  font-size: 14px;
}

.mf-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .8rem 1rem;
  margin-bottom: 1.6rem;
}

.mf-pill {
  padding: .85rem 1.6rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--fg-rgb, 255, 255, 255), .16);
  background: rgba(var(--fg-rgb, 255, 255, 255), .04);
  color: rgba(var(--fg-rgb, 255, 255, 255), .88);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .01em;
  cursor: pointer;
  user-select: none;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .15s ease;
}

.mf-pill:hover { background: rgba(var(--fg-rgb, 255, 255, 255), .09); border-color: rgba(var(--fg-rgb, 255, 255, 255), .28); }
.mf-pill:active { transform: scale(.97); }
.mf-pill:focus-visible { outline: 2px solid var(--ink, #fff); outline-offset: 3px; }

@container (min-width: 480px) {
  .mf-pill { font-size: 17px; padding: .95rem 1.8rem; }
}

.mf-pill[aria-pressed="true"] {
  background: var(--ink, #fff);
  border-color: var(--ink, #fff);
  color: var(--on-ink, #0b0d0f);
}

.mf-banner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  border: 1px solid rgba(var(--fg-rgb, 255, 255, 255), .12);
  border-radius: var(--r-inset);
  background: rgba(var(--fg-rgb, 255, 255, 255), .045);
}

@media (min-width: 640px) {
  .mf-banner { flex-direction: row; align-items: center; justify-content: space-between; }
}

.mf-banner p {
  margin: 0;
  color: rgba(var(--fg-rgb, 255, 255, 255), .75);
  font-size: 15px;
}

.mf-banner strong { color: var(--ink, #fff); font-weight: 600; }

.mf-send {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  align-self: flex-start;
  color: var(--pollen, #ece6d6);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color .2s ease;
}

.mf-send:hover { color: var(--ink, #fff); }

.mf-send svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .25s ease;
}

.mf-send:hover svg { transform: translateX(3px); }

.mf-note {
  margin: 0;
  color: rgba(var(--fg-rgb, 255, 255, 255), .38);
  font-style: italic;
  font-size: 12.5px;
}

.mf-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1.6rem;
  margin-top: 5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(var(--fg-rgb, 255, 255, 255), .1);
}

@media (min-width: 768px) {
  .mf-meta { flex-direction: row; }
}


/* Reflow the copy when decorative video is disabled. */
.compact-media .ns-media, .compact-media #vision .ns-video-frame { display: none; }
.compact-media .ns-featured-bar { position: relative; align-items: center; }
.compact-media #vision .ns-two-col { grid-template-columns: 1fr; }

.media-unavailable .ns-media, #vision .media-unavailable, .ns-card-media.media-unavailable { display: none; }
.media-unavailable .ns-featured-bar { position: relative; }


/* =====================================================================
   Light mode: everything after the nebula dive (wrapped in .light-zone in index.html).
   The section styles above take their tints from --fg-rgb / --ink, so this flips them.
   ===================================================================== */
.light-zone {
  --ink: #14130F;            /* near-black text */
  --fg-rgb: 20, 19, 15;      /* tints, borders and glass use this instead of white */
  --pollen: #5B6614;         /* the yellow accent, darkened so it reads on light */
  --on-ink: #FFF9F1;         /* text on dark filled controls (e.g. a selected pill) */
  position: relative;
  z-index: 1;                /* covers the site starfield */
  background: #FFF9F1;       /* the same warm white the dive brightens into */
  color: var(--ink);
}
