/* Equasonic. Built in the manner of the Consort page (site/public/css/site.css): two grounds that follow the device,
   a switch in the header, nothing pinned, everything on the page without scripts.
     dark   graphite ground, bone type, Equasonic's orange
     light  bone ground, graphite type, a deeper orange (the bright one is 2.3 to 1 on bone, too faint for text)
   RoomCore's section stays graphite on both grounds, because its ice blue does not show on bone. */

@font-face {
  font-family: 'Archivo';
  src: url('../fonts/archivo-var.woff2') format('woff2-variations'), url('../fonts/archivo-var.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face { font-family: 'Plex Mono'; src: url('../fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Plex Mono'; src: url('../fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }

:root {
  --ground: #0b0c0e;
  --ground-2: #111215;
  --band: rgba(11, 12, 14, 0.94);
  --ink: #f2efe8;
  --ink-2: rgba(242, 239, 232, 0.74);
  --ink-3: rgba(242, 239, 232, 0.58);   /* 6.1 to 1 on the ground: small text may use it */
  --line: rgba(242, 239, 232, 0.12);
  --line-2: rgba(242, 239, 232, 0.24);
  --faint: rgba(242, 239, 232, 0.26);
  --accent: #ff7a1a;                    /* 7.5 to 1 on the ground */
  --fill: #ff7a1a;
  --fill-hover: #ff8f3d;
  --fill-halo: rgba(255, 122, 26, 0.18);
  --fill-ink: #0b0c0e;
  --o: #ff7a1a;                         /* the core of the Equasonic o, and Cinelign's seat */
  --ice: #bfe3ff;                       /* Consort's listener in its logo; RoomCore */
  --ring: rgba(242, 239, 232, 0.5);
  --gutter: clamp(20px, 5vw, 64px);
  --max: 1240px;
  --nav: 68px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}
/* The light ground, twice: for a device set to light that has not chosen dark here, and for a visitor who chose light. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --ground: #f2efe8; --ground-2: #ebe7de; --band: rgba(242, 239, 232, 0.94);
    --ink: #0b0c0e; --ink-2: rgba(11, 12, 14, 0.76); --ink-3: rgba(11, 12, 14, 0.64);
    --line: rgba(11, 12, 14, 0.12); --line-2: rgba(11, 12, 14, 0.28); --faint: rgba(11, 12, 14, 0.22);
    --accent: #a84300; --fill: #0b0c0e; --fill-hover: #25282d; --fill-halo: rgba(11, 12, 14, 0.1); --fill-ink: #f2efe8;
    --ice: #0b0c0e; --ring: rgba(11, 12, 14, 0.42);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --ground: #f2efe8; --ground-2: #ebe7de; --band: rgba(242, 239, 232, 0.94);
  --ink: #0b0c0e; --ink-2: rgba(11, 12, 14, 0.76); --ink-3: rgba(11, 12, 14, 0.64);
  --line: rgba(11, 12, 14, 0.12); --line-2: rgba(11, 12, 14, 0.28); --faint: rgba(11, 12, 14, 0.22);
  --accent: #a84300; --fill: #0b0c0e; --fill-hover: #25282d; --fill-halo: rgba(11, 12, 14, 0.1); --fill-ink: #f2efe8;
  --ice: #0b0c0e; --ring: rgba(11, 12, 14, 0.42);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { background: var(--ground); -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav) + 12px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 400 17px/1.55 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif; font-stretch: 100%;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden;
}
img, svg { display: block; }
a { color: inherit; }
p { margin: 0; }
::selection { background: var(--accent); color: var(--ground); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -80px; z-index: 100; padding: 10px 16px; border-radius: 8px; background: var(--fill); color: var(--fill-ink); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

h1, h2 { margin: 0; font-weight: 800; font-stretch: 95%; letter-spacing: -0.035em; line-height: 0.96; text-wrap: balance; }
h1 { font-size: clamp(42px, 6vw, 92px); }
h1 span { display: block; }
h2 { font-size: clamp(34px, 4.4vw, 64px); }
section { padding: clamp(80px, 13vh, 148px) 0; }
.lead { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.55; color: var(--ink-2); max-width: 34em; text-wrap: pretty; }
.lead + .lead { margin-top: 1em; }
.fig { font-family: 'Plex Mono', ui-monospace, monospace; font-weight: 500; color: var(--accent); letter-spacing: 0; }

/* ---------------------------------------------------------------- header */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: var(--nav);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; padding: 0 var(--gutter);
  border-bottom: 1px solid transparent; transition: background 0.3s ease, border-color 0.3s ease;
}
.nav.solid { background: var(--band); border-bottom-color: var(--line); }
.nav-links { justify-self: start; display: flex; align-items: center; gap: 24px; }
/* 44 px tall, so a thumb finds them */
.nav-links a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--ink-2); font-size: 15px; transition: color 0.2s; }
.nav-links a:hover { color: var(--ink); }
.brand { grid-column: 2; display: inline-flex; align-items: center; min-height: 44px; border-radius: 6px; color: var(--ink); }
.brand .logo { height: 22px; width: auto; }
.nav-end { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 8px; }
.theme {
  appearance: none; flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 50%; background: none; color: var(--ink-2); cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: color 0.2s, background 0.2s;
}
.theme:hover { color: var(--ink); background: var(--line); }
.theme svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.theme .moon { display: none; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .theme .sun { display: none; } :root:not([data-theme="dark"]) .theme .moon { display: block; } }
:root[data-theme="light"] .theme .sun { display: none; }
:root[data-theme="light"] .theme .moon { display: block; }
html:not(.js) .theme { display: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 24px; border-radius: 999px; border: 0;
  background: var(--fill); color: var(--fill-ink);
  font: 600 15px/1 'Archivo', sans-serif; font-stretch: 100%; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s ease, background 0.2s;
}
.btn:hover { box-shadow: 0 0 0 5px var(--fill-halo); background: var(--fill-hover); }
.btn:active { transform: scale(0.97); }
.btn.small { height: 44px; padding: 0 18px; font-size: 14px; }
.btn .arrow { width: 16px; height: 16px; transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.link {
  display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-weight: 600; font-size: 16px;
  text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 6px;
  transition: text-underline-offset 0.25s var(--ease);
}
.link:hover { text-underline-offset: 9px; }

/* ---------------------------------------------------------------- first screen */
/* Short of a whole screen, so the top of the next section shows and says the page goes on. */
.hero { padding: 0; display: flex; min-height: clamp(560px, 88svh, 860px); }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); grid-template-areas: 'main rings';
  align-items: center; column-gap: clamp(24px, 4vw, 72px);
  padding-top: calc(var(--nav) + 32px); padding-bottom: clamp(40px, 8vh, 88px);
}
.hero-main { grid-area: main; }
.hero h1 { max-width: 9.2em; }
.hero-say { margin-top: clamp(24px, 4vh, 36px); max-width: 27em; font-size: clamp(18px, 1.55vw, 21px); line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.hero-say strong { color: var(--ink); font-weight: 600; }
.hero-acts { margin-top: clamp(28px, 4.5vh, 44px); display: flex; align-items: center; gap: 14px 32px; flex-wrap: wrap; }
/* The rings sit in their own cell of the grid, so on every width they stay clear of the header and the logo in it. */
.rings { grid-area: rings; justify-self: end; width: min(100%, 64vh, 560px); aspect-ratio: 1; }
.rings svg { width: 100%; height: 100%; overflow: visible; }
.ring { fill: none; stroke: var(--ring); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.core { fill: var(--o); }
/* drawn once as the page opens, then still */
@media (prefers-reduced-motion: no-preference) {
  html.js .ring { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2s var(--ease) both; animation-delay: calc(0.1s + var(--i) * 0.15s); }
  html.js .core { transform-box: fill-box; transform-origin: center; animation: grow 1s var(--ease) 0.55s both; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes grow { from { transform: scale(0); } to { transform: none; } }
}

/* ---------------------------------------------------------------- what we make */
.products { border-top: 1px solid var(--line); }
.pair { margin-top: clamp(40px, 7vh, 72px); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 96px); }
.item { border-top: 1px solid var(--line-2); padding-top: 32px; display: flex; flex-direction: column; align-items: flex-start; }
.mark { margin: 0; color: var(--ink); }
.mark .logo { height: 38px; width: auto; }
.item p { margin: 26px 0 18px; font-size: 18px; line-height: 1.6; color: var(--ink-2); max-width: 30em; text-wrap: pretty; }

/* ---------------------------------------------------------------- the room */
.room { border-top: 1px solid var(--line); background: var(--ground-2); }
.room-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(36px, 5vw, 88px); align-items: center; }
.room h2 { max-width: 9em; }
.says { list-style: none; margin: clamp(28px, 5vh, 44px) 0 0; padding: 0; display: grid; gap: 18px; }
.says li { position: relative; padding-left: 20px; font-size: 18px; line-height: 1.55; color: var(--ink-2); max-width: 26em; }
.says li::before { content: ''; position: absolute; left: 0; top: 0.72em; width: 8px; height: 1px; background: var(--ink-3); }
.says strong { color: var(--ink); font-weight: 600; }
.chart { margin: 0; }
.plot { width: 100%; height: auto; overflow: visible; }
.plot .grid { stroke: var(--line); stroke-width: 1; }
.plot .target { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 4 5; }
.plot .axis { fill: var(--ink-3); font: 400 13px 'Plex Mono', monospace; }
.plot .line { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.plot .line.before { stroke: var(--faint); }
.plot .line.after { stroke: var(--accent); stroke-width: 2.6; }
.plot .gap { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 2 3; }
.plot .dot.before { fill: var(--ground-2); stroke: var(--ink-2); stroke-width: 1.5; }
.plot .dot.after { fill: var(--accent); }
.plot .callout { fill: var(--ink-2); font: 500 14px 'Plex Mono', monospace; }
.key { margin-top: 16px; display: flex; gap: 28px; flex-wrap: wrap; font-size: 15px; color: var(--ink-2); }
.key span { display: inline-flex; align-items: center; gap: 10px; }
.key span::before { content: ''; width: 22px; height: 3px; border-radius: 2px; }
.key .before::before { background: var(--faint); }
.key .after::before { background: var(--accent); }

/* ---------------------------------------------------------------- results */
.results { border-top: 1px solid var(--line); }
.results h2 { max-width: 11em; }
.results .num { color: var(--accent); }
.rows { margin-top: clamp(40px, 7vh, 72px); max-width: 860px; }
.row { display: grid; grid-template-columns: 1fr auto; gap: 14px 24px; align-items: baseline; padding: 22px 0 20px; border-top: 1px solid var(--line); }
.row:last-child { border-bottom: 1px solid var(--line); }
.row .name { font-size: 18px; }
.row .bars { grid-row: 2; grid-column: 1 / -1; position: relative; height: 26px; }
.bars i { position: absolute; left: 0; height: 10px; border-radius: 5px; transform-origin: 0 50%; }
.bars .was { top: 0; background: var(--faint); }
.bars .now { top: 15px; background: var(--accent); }
.row .figs { grid-row: 1; grid-column: 2; font: 500 18px/1.2 'Plex Mono', monospace; text-align: right; white-space: nowrap; }
.row .figs .from { color: var(--ink-3); }
.row .figs .to { color: var(--accent); }
.basis { margin-top: clamp(28px, 5vh, 44px); max-width: 48em; font-size: 15px; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }

/* ---------------------------------------------------------------- RoomCore: graphite on both grounds */
.roomcore {
  --ground: #0b0c0e; --ink: #f2efe8; --ink-2: rgba(242, 239, 232, 0.76); --line: rgba(242, 239, 232, 0.12);
  --accent: #bfe3ff; --ice: #bfe3ff; --fill: #bfe3ff; --fill-hover: #cfeaff; --fill-halo: rgba(191, 227, 255, 0.16); --fill-ink: #0b0c0e;
  background: #0b0c0e;
  color: var(--ink); border-top: 1px solid var(--line); color-scheme: dark;
}
.rc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 96px); align-items: end; }
.rc-mark .logo { height: 34px; }
.roomcore h2 { margin-top: clamp(28px, 5vh, 48px); max-width: 9em; }
.rc-btn { margin-top: 32px; }

/* ---------------------------------------------------------------- about, contact */
.company { border-top: 1px solid var(--line); }
.company-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 88px); }
.contact { border-top: 1px solid var(--line); }
.mail {
  display: inline-block; margin-top: clamp(28px, 5vh, 44px); padding: 6px 0;
  font-size: clamp(26px, 4.2vw, 56px); font-weight: 700; letter-spacing: -0.02em; color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 10px;
  overflow-wrap: anywhere;
}

/* ---------------------------------------------------------------- footer */
footer { border-top: 1px solid var(--line); padding: 36px 0 48px; }
footer .wrap { display: flex; align-items: center; gap: 12px 36px; flex-wrap: wrap; }
footer .brand .logo { height: 20px; }
footer nav { display: flex; gap: 4px 24px; flex-wrap: wrap; margin-left: auto; }
footer nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-2); font-size: 15px; text-underline-offset: 3px; }
footer nav a:hover { color: var(--ink); }
footer small { color: var(--ink-2); font-size: 14px; }

/* ---------------------------------------------------------------- arriving as they scroll in (js/main.js marks the page `anim`) */
html.anim .rise { opacity: 0; transform: translateY(18px); transition: opacity 0.8s ease, transform 0.9s var(--ease); }
html.anim .rise.d1 { transition-delay: 0.08s; } html.anim .rise.d2 { transition-delay: 0.16s; } html.anim .rise.d3 { transition-delay: 0.24s; }
html.anim .rise.in { opacity: 1; transform: none; }
html.anim .rise .bars .now { transform: scaleX(0); transition: transform 1.2s var(--ease) 0.25s; }
html.anim .rise.in .bars .now { transform: none; }

/* ---------------------------------------------------------------- narrower */
@media (max-width: 960px) {
  .room-grid, .rc-grid, .company-grid { grid-template-columns: 1fr; }
  .rc-grid { align-items: start; }
}
@media (max-width: 900px) {
  .nav { grid-template-columns: auto 1fr; }
  .nav-links { display: none; }
  .brand { grid-column: 1; }
  .nav-end { grid-column: 2; }
  /* rings above the headline, right-aligned, small enough that the headline, the sentence and the button still fit */
  .hero { min-height: 0; }
  .hero-grid { grid-template-columns: 1fr; grid-template-areas: 'rings' 'main'; align-items: start; padding-top: calc(var(--nav) + 8px); padding-bottom: 56px; }
  .rings { width: min(58vw, 30svh, 320px); margin-right: -4px; }
  .hero-say { margin-top: 20px; }
  .hero-acts { margin-top: 26px; }
  .pair { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .row { grid-template-columns: 1fr auto; gap: 10px 16px; }
  .row .name { font-size: 16px; }
  .row .figs { font-size: 15px; }
  .mark .logo { height: 32px; }
  footer nav { margin-left: 0; width: 100%; }
}
/* the chart is drawn 800 wide and shrinks with the screen: its labels grow to stay readable */
@media (max-width: 600px) {
  .plot .axis { font-size: 24px; }
  .plot .callout { font-size: 24px; }
}
