/* FluxFrame LLC — site styles. Built with Flux. */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/SchibstedGrotesk.ttf") format("truetype");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fragment Mono";
  src: url("fonts/FragmentMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #eef0ec;
  --ink: #15171c;
  --graphite: #5a606a;
  --rule: #cfd3cc;
  --cobalt: #2a44c4;
  --cobalt-wash: #dfe4f5;
  --code-bg: #e3e6e0;

  --sans: "Schibsted Grotesk", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --mono: "Fragment Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --measure: 38rem;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #000000;
    --ink: #ecede8;
    --graphite: #a2a7ae;
    --rule: #2c2f33;
    --cobalt: #8fa1ff;
    --cobalt-wash: #161c3a;
    --code-bg: #14161a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #000000;
  --ink: #ecede8;
  --graphite: #a2a7ae;
  --rule: #2c2f33;
  --cobalt: #8fa1ff;
  --cobalt-wash: #161c3a;
  --code-bg: #14161a;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.55;
  font-feature-settings: "ss01";
  text-rendering: optimizeLegibility;
}

a { color: var(--cobalt); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--paper); padding: 8px 12px;
}
.skip:focus { left: var(--gutter); top: 8px; z-index: 10; }

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 var(--gutter); }

/* Header */
.site-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 12px 28px; padding-top: 28px; padding-bottom: 28px;
}
.mark {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em;
}
.mark svg { width: 22px; height: 22px; flex: none; transform: translateY(2px); }
.site-head nav { display: flex; gap: 22px; flex-wrap: wrap; }
.site-head nav a { color: var(--ink); text-decoration: none; font-size: 1rem; }
.site-head nav a:hover { text-decoration: underline; }
.site-head nav a[aria-current="page"] { color: var(--cobalt); }

/* Type */
h1, h2, h3 { font-weight: 650; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); line-height: 1.02; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); line-height: 1.1; }
h3 { font-size: 1.2rem; line-height: 1.3; letter-spacing: -0.01em; }
p { margin: 0; }
.lede { font-size: clamp(1.15rem, 1.8vw, 1.35rem); line-height: 1.5; color: var(--ink); max-width: var(--measure); }
.quiet { color: var(--graphite); }

/* Sections */
.section { padding-top: clamp(64px, 9vw, 120px); }
.section > .head { max-width: var(--measure); margin-bottom: 36px; }
.section > .head p { margin-top: 14px; color: var(--graphite); }
.prose { max-width: var(--measure); }
.prose p + p { margin-top: 1em; }

/* Hero */
.hero { padding-top: clamp(24px, 6vw, 72px); }
.hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1fr 1.1fr; gap: 72px; } }
.hero .lede { margin-top: 0; }
.hero h1 + .lede { margin-top: 28px; }
.hero-title { margin-bottom: clamp(28px, 4vw, 48px); }
.hero-grid > div:first-child { align-self: start; }
.actions { display: flex; flex-wrap: wrap; gap: 14px 24px; margin-top: 32px; align-items: center; }
.button {
  display: inline-block; background: var(--ink); color: var(--paper);
  padding: 13px 20px; border-radius: 3px; text-decoration: none; font-weight: 600; font-size: 1rem;
}
.button:hover { background: var(--cobalt); color: #fff; }

/* Constellation fan */
.fan { margin: 0; }
.fan svg { width: 100%; height: auto; display: block; overflow: visible; }
.fan .line { fill: none; stroke: var(--cobalt); stroke-width: 1.25; opacity: 0.55; }
.fan .line.here { opacity: 1; stroke-width: 2; }
.fan .src { fill: var(--cobalt); }
.fan .src-ring { fill: none; stroke: var(--cobalt); stroke-width: 1.25; }
.fan .dot { fill: var(--ink); }
.fan text { font-family: var(--sans); font-size: 17px; fill: var(--ink); }
.fan a text { fill: var(--ink); }
.fan a:hover text, .fan a:focus text { fill: var(--cobalt); text-decoration: underline; }
.fan .src-label { font-size: 14px; fill: var(--graphite); }
.fan text.here { font-weight: 650; }
.fan figcaption { margin-top: 18px; color: var(--graphite); font-size: 1rem; max-width: 30rem; }

@media (prefers-reduced-motion: no-preference) {
  .fan .line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 900ms cubic-bezier(.3,.6,.2,1) forwards; animation-delay: calc(250ms + var(--i) * 70ms); }
  .fan .dot, .fan .labels a { opacity: 0; animation: arrive 400ms ease-out forwards; animation-delay: calc(700ms + var(--i) * 70ms); }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes arrive { to { opacity: 1; } }

/* Hover previews of the other sites */
.fan { position: relative; }
.peek {
  position: absolute; top: 0; left: 0; z-index: 5; width: 300px; padding: 8px 8px 10px;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 4px;
  box-shadow: 0 14px 34px -14px rgba(21, 23, 28, 0.4);
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 140ms ease, visibility 140ms;
}
.peek.on { opacity: 1; visibility: visible; }
.peek img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; background: var(--code-bg); border-radius: 2px; }
.peek span { display: block; margin-top: 8px; font-size: 0.9rem; color: var(--graphite); }
@media (prefers-reduced-motion: reduce) { .peek { transition: none; } }

/* Offers and work: plain rows, no boxes */
.rows { display: grid; gap: 40px; max-width: 58rem; }
@media (min-width: 820px) { .rows.two { grid-template-columns: 1fr 1fr; column-gap: 56px; } }
.row h3 { margin-bottom: 8px; }
.row h3 a { color: var(--ink); }
.row h3 a:hover { color: var(--cobalt); }
.row p { color: var(--graphite); max-width: 34rem; }
.row .where { margin-top: 8px; font-size: 1rem; }

/* Bars */
.bars { max-width: 46rem; }
.bars + .bars { margin-top: 40px; }
.bars h3 { margin-bottom: 16px; }
.bar { display: grid; grid-template-columns: 4.5rem 1fr 6rem; gap: 14px; align-items: center; margin: 10px 0; font-size: 1rem; }
.bar .track, .bar .fill { display: block; }
.bar .track { height: 14px; }
.bar .fill { height: 100%; background: var(--graphite); opacity: 0.45; border-radius: 1px; }
.bar.flux .fill { background: var(--cobalt); opacity: 1; }
.bar.flux .name { font-weight: 650; }
.bar .val { text-align: right; font-variant-numeric: tabular-nums; }
.bars .note { margin-top: 14px; color: var(--graphite); font-size: 1rem; }

/* Method: a real sequence */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 32px; max-width: 58rem; counter-reset: step; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(4, 1fr); gap: 32px; } }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: block; font-size: 2.4rem; font-weight: 300; color: var(--cobalt); line-height: 1; margin-bottom: 14px; }
.steps h3 { margin-bottom: 8px; }
.steps p { color: var(--graphite); font-size: 1rem; }

/* Contact */
.contact .big { display: inline-block; margin-top: 24px; font-size: clamp(1.5rem, 4vw, 2.6rem); font-weight: 600; letter-spacing: -0.02em; word-break: break-word; }
.contact .also { margin-top: 18px; color: var(--graphite); font-size: 1rem; }

/* Flux page */
.equation {
  margin: 0; font-size: clamp(2rem, 6.4vw, 4.6rem); line-height: 1.04; letter-spacing: -0.035em; font-weight: 650;
}
.equation .op { color: var(--cobalt); font-weight: 400; }
.equation .result { display: block; color: var(--graphite); font-weight: 500; }
.terms { margin: 40px 0 0; display: grid; gap: 26px; max-width: 58rem; }
@media (min-width: 820px) { .terms { grid-template-columns: 11rem 1fr; gap: 22px 40px; } }
.terms dt { font-weight: 650; font-size: 1.2rem; }
.terms dd { margin: 0; color: var(--graphite); max-width: 36rem; }
@media (max-width: 819px) { .terms dd { margin-top: -18px; } }

pre {
  margin: 28px 0 0; padding: 20px 22px; background: var(--code-bg); border-radius: 3px;
  overflow-x: auto; font-family: var(--mono); font-size: 0.9rem; line-height: 1.6; max-width: 46rem;
}
code { font-family: var(--mono); font-size: 0.92em; }
pre .c { color: var(--graphite); }

.split { display: grid; gap: 28px; max-width: 64rem; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; } }
.split pre { margin-top: 0; }

.reasons { display: grid; gap: 36px; max-width: 58rem; }
@media (min-width: 820px) { .reasons { grid-template-columns: 1fr 1fr; column-gap: 56px; } }
.reasons h3 { margin-bottom: 8px; }
.reasons p { color: var(--graphite); }

.callout { max-width: var(--measure); margin-top: 36px; padding-left: 18px; border-left: 2px solid var(--cobalt); }
.callout p { color: var(--ink); }

/* Footer */
.site-foot { margin-top: clamp(80px, 11vw, 140px); padding-top: 32px; padding-bottom: 48px; border-top: 1px solid var(--rule); font-size: 0.95rem; color: var(--graphite); }
.foot-grid { display: grid; gap: 24px; }
@media (min-width: 820px) { .foot-grid { grid-template-columns: 1fr 2fr; } }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-foot a { color: var(--graphite); }
.site-foot a:hover { color: var(--cobalt); }
.site-foot .built { margin-top: 6px; }

/* Moon pages: one per site in the constellation */
.moon-back { font-size: 1rem; margin-bottom: 28px; }
.moon-back a { color: var(--graphite); }
.moon-job { margin-top: 14px; font-size: clamp(1.2rem, 2.2vw, 1.6rem); color: var(--cobalt); }
.moon-grid { display: grid; gap: 40px; margin-top: 36px; align-items: start; }
@media (min-width: 960px) { .moon-grid { grid-template-columns: 1fr 1fr; gap: 64px; } }
.moon-shot { display: block; border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; }
.moon-shot img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.moon-note { margin-top: 48px; max-width: var(--measure); color: var(--graphite); font-size: 1rem; }
