/* Dark Matter Software website. Values come from the Dark Matter design system (Night theme). */
@font-face { font-family: "Cabin"; src: url("../fonts/cabin.woff2") format("woff2"); font-weight: 400 700; font-stretch: 75% 100%; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/cormorant-garamond.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Michroma"; src: url("../fonts/michroma.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  color-scheme: dark;
  --void: #050a16; --deep: #111e4c; --deep-raised: #24357a; --nebula: #334a96; --horizon: #4160ba; --beam: #83b8fc;
  --on-deep: #f4f6ff; --on-deep-muted: #b6c3ea; --on-deep-accent: #93ccff;
  --surface-raised: #1c2a63; --line: #2e3f7d; --ink-muted: #b6c3ea;
  --lens: #2f7bff; --aurora: #7fd4ff;
  --primary: #4f46e5; --primary-hover: #4338ca; --primary-pressed: #3730a3;
  --hover-tint: rgba(127, 212, 255, 0.12);
  --field-bg: #ffffff; --field-ink: #1e293b;
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "Cabin", "Gill Sans", "Segoe UI", system-ui, sans-serif;
  --font-brand: "Michroma", Eurostile, sans-serif;
  --radius-md: 8px; --radius-lg: 14px; --radius-pill: 999px;
  --gutter-l: max(20px, env(safe-area-inset-left, 0px)); --gutter-r: max(20px, env(safe-area-inset-right, 0px));
}
* { box-sizing: border-box; }
html { background: var(--void); scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--void); color: var(--on-deep); font: 400 17px/1.6 var(--font-sans); -webkit-font-smoothing: antialiased; }
a { color: var(--on-deep-accent); }
a:hover { color: var(--on-deep); }
:focus-visible { outline: 2px solid var(--aurora); outline-offset: 2px; }
.wrap { max-width: 1160px; margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--field-bg); color: var(--field-ink); padding: 8px 14px; border-radius: var(--radius-md); z-index: 10; }
.skip:focus { left: 12px; }

/* Header */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 24px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--on-deep); }
.brand img { width: 40px; height: 40px; }
.brand-name { display: flex; flex-direction: column; gap: 3px; line-height: 1; }
.brand-name b { font: 400 15px/1 var(--font-brand); letter-spacing: .12em; }
.brand-name span { font: 400 7px/1 var(--font-brand); letter-spacing: .9em; color: var(--aurora); }
.links { display: flex; gap: 4px; flex-wrap: wrap; }
.links a { color: var(--on-deep-muted); text-decoration: none; font-size: 15px; padding: 8px 12px; border-radius: var(--radius-md); transition: background-color .15s ease, color .15s ease; }
.links a:hover { background: var(--hover-tint); color: var(--on-deep); }

/* Hero */
.nav-over { position: absolute; top: 0; left: 0; right: 0; z-index: 2; }
.nav-over + main .hero-grid { padding-top: 128px; }
.hero { position: relative; isolation: isolate; overflow: hidden;
  background:
    radial-gradient(ellipse 45% 70% at 78% 45%, rgba(131, 184, 252, .5), transparent 70%),
    linear-gradient(100deg, var(--void) 0%, var(--deep) 32%, var(--nebula) 64%, var(--horizon) 100%); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: repeating-linear-gradient(90deg, transparent 0 94px, rgba(147, 204, 255, .2) 94px 96px, transparent 96px 100px);
  -webkit-mask-image: linear-gradient(90deg, transparent 45%, #000 78%); mask-image: linear-gradient(90deg, transparent 45%, #000 78%); }
#stars { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 390px); gap: 56px; align-items: center; padding-block: 56px 96px; }
.eyebrow { font: 600 12px/16px var(--font-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--aurora); margin: 0 0 16px; }
h1, h2, h3 { text-wrap: balance; }
h1 { font: 500 clamp(42px, 6vw, 72px)/1.02 var(--font-display); color: var(--on-deep-accent); margin: 0 0 22px; max-width: 13ch; }
.lead { font-size: 19px; line-height: 1.6; margin: 0 0 32px; max-width: 34em; }
.ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.btn { font: 600 15px/20px var(--font-sans); min-height: 48px; padding: 0 26px; border-radius: var(--radius-md); display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; border: 1px solid transparent; text-decoration: none; transition: background-color .15s ease, border-color .15s ease; }
.btn-primary { color: #fff; background: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-primary:active { background: var(--primary-pressed); }
.btn-ghost { color: var(--on-deep); border-color: rgba(182, 195, 234, .6); background: transparent; }
.btn-ghost:hover { background: var(--hover-tint); border-color: var(--ink-muted); color: var(--on-deep); }

.window { border-radius: var(--radius-lg); padding: 18px; display: flex; flex-direction: column; gap: 14px;
  background: linear-gradient(180deg, var(--deep-raised), var(--deep)); border: 1px solid rgba(147, 204, 255, .3);
  box-shadow: 0 24px 60px rgba(5, 10, 40, .55); transform: rotate(2deg); }
.bar { display: flex; justify-content: space-between; font-size: 13px; color: var(--on-deep-muted); }
.orb { width: 72px; height: 72px; margin: 2px auto 0; border-radius: 50%; position: relative; overflow: hidden;
  background: radial-gradient(circle at 30% 26%, rgba(131, 184, 252, .3), transparent 42%), radial-gradient(circle at 50% 50%, #1a2470 0%, var(--void) 72%);
  box-shadow: 0 0 0 2px var(--rim), 0 0 22px 3px var(--glow), inset 0 0 16px rgba(0, 0, 0, .55); }
.orb::after { content: ""; position: absolute; inset: 0; background:
  radial-gradient(1.4px 1.4px at 24% 36%, #fff, transparent), radial-gradient(1px 1px at 40% 64%, #dbe7ff, transparent), radial-gradient(1.6px 1.6px at 60% 28%, #fff, transparent),
  radial-gradient(1px 1px at 68% 56%, #c9dbff, transparent), radial-gradient(1.2px 1.2px at 48% 46%, #fff, transparent), radial-gradient(1px 1px at 34% 78%, #fff, transparent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip { font: 500 14px/18px var(--font-sans); height: 32px; padding: 0 12px; border-radius: var(--radius-pill); border: 1px solid var(--deep-raised); background: var(--void); color: var(--on-deep); display: inline-flex; align-items: center; }
.chip.on { background: var(--horizon); border-color: var(--beam); }
.help { text-align: center; margin: 4px 0 0; font-size: 16px; }
.prompt { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: var(--radius-md); background: var(--field-bg); color: var(--field-ink); font-size: 16px; line-height: 22px; box-shadow: 0 4px 14px rgba(5, 10, 40, .45); }
.prompt svg { width: 20px; height: 20px; color: var(--primary); flex: none; }

/* App showcase: one window that cycles through the apps */
.hue-comet  { --rim: #2dd4bf; --glow: rgba(45, 212, 191, .35); }
.hue-quasar { --rim: #fb923c; --glow: rgba(251, 146, 60, .35); }
.hue-nova   { --rim: #f472b6; --glow: rgba(244, 114, 182, .35); }
.hue-pulsar { --rim: #a78bfa; --glow: rgba(167, 139, 250, .35); }
.stage { display: grid; }
.slide { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 14px; opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility 0s linear .6s; }
.slide.is-on { opacity: 1; visibility: visible; transition: opacity .6s ease, visibility 0s; }
.dots { display: flex; justify-content: center; gap: 4px; margin-top: 18px; }
.dots[hidden] { display: none; }
.dot { width: 44px; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer; border-radius: var(--radius-md); display: grid; place-items: center; transition: background-color .15s ease; }
.dot::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--rim); background: transparent; transition: background-color .15s ease, transform .15s ease; }
.dot:hover { background: var(--hover-tint); }
.dot[aria-pressed="true"]::before { background: var(--rim); }
@media (prefers-reduced-motion: reduce) { .slide, .slide.is-on { transition: none; } }

/* Sections */
.section { padding-block: 96px; }
.section + .section { border-top: 1px solid rgba(46, 63, 125, .6); }
h2 { font: 500 clamp(34px, 4.4vw, 48px)/1.1 var(--font-display); color: var(--on-deep-accent); margin: 0 0 16px; }
.intro { color: var(--on-deep-muted); max-width: 40em; margin: 0 0 48px; font-size: 18px; }

.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 20px; }
.app { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.app-top { display: flex; align-items: center; gap: 14px; }
.app-top svg { width: 48px; height: 48px; flex: none; }
.app h3 { font: 600 20px/26px var(--font-sans); margin: 0; }
.app p { margin: 0; color: var(--on-deep-muted); font-size: 16px; line-height: 1.6; }
.status { align-self: flex-start; font: 600 12px/16px var(--font-sans); letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: var(--radius-pill); border: 1px solid var(--line); color: var(--on-deep-muted); margin-top: auto; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 32px; counter-reset: step; }
.steps li { counter-increment: step; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.steps li::before { content: counter(step); font: 500 40px/1 var(--font-display); color: var(--aurora); }
.steps h3 { font: 600 20px/26px var(--font-sans); margin: 0; }
.steps p { margin: 0; color: var(--on-deep-muted); }

.contact { background: linear-gradient(100deg, var(--deep) 0%, var(--nebula) 100%); border: 1px solid rgba(147, 204, 255, .25); border-radius: var(--radius-lg); padding: 48px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center; }
.contact h2 { margin-bottom: 12px; }
.contact p { margin: 0; color: var(--on-deep-muted); max-width: 36em; }
.contact-actions { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.email { font: 600 20px/28px var(--font-sans); color: var(--on-deep); user-select: all; overflow-wrap: anywhere; }
.contact-actions .row { display: flex; gap: 12px; flex-wrap: wrap; }
.copied { font-size: 14px; color: var(--on-deep); min-height: 20px; }

/* Footer */
.foot { padding-block: 40px 56px; border-top: 1px solid var(--line); color: var(--on-deep-muted); font-size: 14px; }
.foot-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: flex-start; }
.foot p { margin: 0 0 6px; max-width: 60em; }
.foot a { color: var(--on-deep-muted); }
.foot a:hover { color: var(--on-deep); }

/* Plain pages */
.page { padding-block: 32px 96px; max-width: 46em; }
.page h1 { font-size: clamp(38px, 5vw, 56px); max-width: none; }
.page h2 { font: 600 22px/30px var(--font-sans); color: var(--on-deep); margin: 40px 0 10px; }
.page p, .page li { color: var(--on-deep-muted); }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); padding-block: 32px 72px; }
  .nav-over + main .hero-grid { padding-top: 156px; }
  .window { transform: none; }
  .contact { grid-template-columns: minmax(0, 1fr); padding: 32px 24px; }
  .section { padding-block: 72px; }
}
