/*
 * refract.science landing site. Same identity as the app (web/src/index.css): Inter, light theme, acc1 (slate)
 * carries all interaction, neutrals lean towards the slate. The spectrum band uses the five accents of the logo.
 */
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/inter-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC,
    U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/inter-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --ink: #1c2130;
  --ink-soft: #4d5468;
  --ink-faint: #7c8295;
  --rule: #dfe2e9;
  --rule-strong: #c6cad6;
  --acc1: #535e81;
  --acc1-hover: #444d6a;
  --acc1-tint: #cbcfdb;
  --acc1-soft: #eceef3;
  --acc2: #537782;
  --acc3: #827f53;
  --acc4: #827553;
  --acc5: #b2bda7;
  --radius: 10px;
  --gutter: clamp(16px, 4vw, 32px);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  font-feature-settings: 'cv11', 'ss01';
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    16px/1.6 'Inter Variable',
    ui-sans-serif,
    system-ui,
    sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1,
h2,
h3,
p,
ol,
ul,
dl,
dd,
figure,
blockquote {
  margin: 0;
}
img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: var(--acc1);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover {
  color: var(--acc1-hover);
}
:focus-visible {
  outline: 2px solid var(--acc1);
  outline-offset: 2px;
  border-radius: 3px;
}
code {
  font:
    0.88em/1 ui-monospace,
    'SF Mono',
    Menlo,
    Consolas,
    monospace;
  background: var(--acc1-soft);
  padding: 0.12em 0.35em;
  border-radius: 4px;
  color: var(--ink);
  white-space: nowrap;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

.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;
}
.skip {
  position: absolute;
  left: 8px;
  top: -40px;
  background: var(--surface);
  padding: 6px 10px;
  border-radius: 6px;
  z-index: 10;
}
.skip:focus {
  top: 8px;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.narrow {
  max-width: 760px;
}

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.top-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 60px;
}
.brand img {
  width: 152px;
  height: auto;
}
.top nav {
  display: flex;
  gap: 20px;
  margin-left: auto;
  font-size: 14.5px;
}
.top nav a {
  color: var(--ink-soft);
  text-decoration: none;
}
.top nav a:hover,
.top nav a[aria-current='page'] {
  color: var(--acc1);
}
@media (max-width: 720px) {
  .top nav {
    display: none;
  }
  .top .btn-small {
    margin-left: auto;
  }
  .brand img {
    width: 128px;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 8px;
  background: var(--acc1);
  color: #fff;
  font-weight: 550;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid var(--acc1);
  transition: background-color 0.15s;
}
.btn:hover {
  background: var(--acc1-hover);
  color: #fff;
}
.btn-quiet {
  background: var(--surface);
  color: var(--acc1);
  border-color: var(--rule-strong);
}
.btn-quiet:hover {
  background: var(--acc1-soft);
  color: var(--acc1-hover);
}
.btn-small {
  min-height: 36px;
  padding: 0 14px;
  font-size: 14px;
}

/* Hero */
.hero {
  position: relative;
  padding: clamp(48px, 9vw, 96px) 0 clamp(40px, 7vw, 72px);
  background:
    radial-gradient(60% 80% at 85% 0%, color-mix(in oklab, var(--acc1-soft) 90%, transparent), transparent 70%),
    var(--bg);
}
.kicker {
  color: var(--acc1);
  font-weight: 600;
  font-size: 14.5px;
  margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(32px, 5.4vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 700;
  max-width: 17ch;
  text-wrap: balance;
}
.hero-venue h1 {
  max-width: none;
}
.lead {
  margin-top: 20px;
  font-size: clamp(17px, 2vw, 19px);
  color: var(--ink-soft);
  max-width: 62ch;
  text-wrap: pretty;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.note {
  margin-top: 16px;
  font-size: 14px;
  color: var(--ink-faint);
}
.spectrum {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--acc1), var(--acc2), var(--acc5), var(--acc3), var(--acc4));
  opacity: 0.75;
}
.crumbs {
  font-size: 14px;
  color: var(--ink-faint);
  margin-bottom: 16px;
}
.crumbs a {
  color: var(--ink-soft);
  text-decoration: none;
}
.crumbs a:hover {
  color: var(--acc1);
}

/* Sections */
.section {
  padding: clamp(48px, 7vw, 80px) 0;
}
.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.section h2 {
  font-size: clamp(24px, 3vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  font-weight: 650;
}
.section-lead {
  margin-top: 12px;
  color: var(--ink-soft);
  max-width: 68ch;
}
.section-more {
  margin-top: 28px;
  color: var(--ink-soft);
}
h3.group {
  margin: 36px 0 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 16px;
}
.section-alt .features {
  margin-top: 28px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 24px;
}
.section-alt .feature {
  background: var(--bg);
}
.feature h3 {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.feature-lead {
  color: var(--acc1);
  font-weight: 550;
  margin-top: 2px;
}
.feature p:last-child {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 15px;
}
.features-3 .feature p {
  margin-top: 8px;
}

/* Steps */
.steps {
  list-style: none;
  padding: 0;
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 28px;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  border-top: 2px solid var(--acc1-tint);
  padding-top: 16px;
}
.steps li::before {
  content: counter(step);
  display: block;
  color: var(--acc1);
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 6px;
}
.steps h3 {
  font-size: 17px;
  font-weight: 650;
}
.steps p {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 15px;
}

/* Venue cards */
.venues {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 12px;
}
.section-alt .venues {
  margin-top: 24px;
}
.venues a {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.section-alt .venues a {
  background: var(--bg);
}
.venues a:hover {
  border-color: var(--acc1-tint);
  box-shadow: 0 2px 10px rgb(28 33 48 / 0.06);
  color: var(--ink);
}
.venue-short {
  font-weight: 650;
  font-size: 17px;
  color: var(--acc1);
}
.venue-full {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.4;
  margin-top: 2px;
}
.venue-meta {
  margin-top: auto;
  padding-top: 10px;
  font-size: 13px;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

/* FAQ */
details {
  border-bottom: 1px solid var(--rule);
}
details:first-of-type {
  margin-top: 20px;
  border-top: 1px solid var(--rule);
}
summary {
  cursor: pointer;
  padding: 16px 28px 16px 0;
  font-weight: 600;
  list-style: none;
  position: relative;
}
summary::-webkit-details-marker {
  display: none;
}
summary::after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 14px;
  color: var(--acc1);
  font-weight: 500;
  font-size: 20px;
}
details[open] summary::after {
  content: '–';
}
details p {
  padding: 0 0 18px;
  color: var(--ink-soft);
}

/* Closing call to action */
.cta {
  text-align: center;
}
.cta p {
  margin: 10px auto 24px;
  color: var(--ink-soft);
}

/* Venue page: facts and chart */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.facts div {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.facts dt {
  font-size: 13px;
  color: var(--ink-faint);
}
.facts dd {
  font-size: 19px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.chart {
  margin-top: 28px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 20px 20px 14px;
}
.chart svg {
  width: 100%;
  height: auto;
}
.chart rect {
  fill: var(--acc1);
}
.chart rect:hover {
  fill: var(--acc1-hover);
}
.chart .axis {
  stroke: var(--rule-strong);
}
.chart text {
  fill: var(--ink-faint);
  font:
    11px 'Inter Variable',
    sans-serif;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 640px) {
  .chart {
    padding: 14px 12px 10px;
  }
  .chart text {
    font-size: 22px; /* in the chart's coordinates: about 11px on a phone */
  }
}
.chart figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-faint);
}

/* Venue page: latest papers */
.papers {
  list-style: none;
  padding: 0;
  margin-top: 20px;
  border-top: 1px solid var(--rule);
}
.papers li {
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}
.paper-title {
  font-weight: 550;
  line-height: 1.4;
}
.paper-title a {
  color: var(--ink);
  text-decoration: none;
}
.paper-title a:hover {
  color: var(--acc1);
  text-decoration: underline;
}
.paper-meta {
  margin-top: 4px;
  font-size: 14px;
  color: var(--ink-faint);
}

/* Agents page */
.flow {
  list-style: none;
  padding: 0;
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.flow li {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 14px 18px;
}
.flow li + li::before {
  content: '→';
  position: absolute;
  left: -21px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-faint);
}
.flow strong {
  display: block;
  font-size: 15px;
}
.flow span {
  font-size: 14px;
  color: var(--ink-soft);
}
.flow .flow-tab {
  background: var(--acc1-soft);
  border-color: var(--acc1-tint);
}
.flow .flow-tab strong {
  color: var(--acc1);
}
@media (max-width: 720px) {
  .flow {
    grid-template-columns: 1fr;
  }
  .flow li + li::before {
    content: '↓';
    left: 50%;
    top: -24px;
    transform: none;
  }
}
.example {
  margin-top: 20px;
}
.example figcaption {
  font-weight: 600;
  font-size: 15px;
}
.example blockquote {
  margin-top: 8px;
  border-left: 2px solid var(--acc1-tint);
  background: var(--surface);
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
  color: var(--ink-soft);
  font-size: 15px;
}
.tools {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule);
}
.tools div {
  display: grid;
  grid-template-columns: minmax(200px, 300px) 1fr;
  gap: 4px 20px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}
.tools dd {
  color: var(--ink-soft);
  font-size: 15px;
}
@media (max-width: 640px) {
  .tools div {
    grid-template-columns: 1fr;
  }
}
.tag {
  display: inline-block;
  margin-left: 6px;
  background: var(--acc1-soft);
  color: var(--acc1);
  font-size: 12px;
  font-weight: 550;
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

/* How it works */
.explain {
  list-style: none;
  padding: 0;
  counter-reset: step;
}
.explain li {
  counter-increment: step;
  position: relative;
  padding-left: 44px;
}
.explain li + li {
  margin-top: 32px;
}
.explain li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--acc1-soft);
  color: var(--acc1);
  font-weight: 650;
  font-size: 14px;
  display: grid;
  place-items: center;
}
.explain h2 {
  font-size: 20px;
}
.explain p {
  margin-top: 8px;
  color: var(--ink-soft);
}
.checks {
  list-style: none;
  padding: 0;
  margin-top: 20px;
}
.checks li {
  position: relative;
  padding-left: 26px;
  color: var(--ink-soft);
}
.checks li + li {
  margin-top: 10px;
}
.checks li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.5em;
  width: 10px;
  height: 5px;
  border-left: 2px solid var(--acc1);
  border-bottom: 2px solid var(--acc1);
  transform: rotate(-45deg);
}

/* Footer */
.foot {
  border-top: 1px solid var(--rule);
  padding: 40px 0 48px;
  font-size: 14px;
  color: var(--ink-soft);
}
.foot-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 48px;
  justify-content: space-between;
}
.foot img {
  width: 118px;
  height: auto;
}
.foot p {
  margin-top: 10px;
  max-width: 36ch;
}
.foot nav {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 6px 32px;
  align-content: start;
}
.foot nav a {
  color: var(--ink-soft);
  text-decoration: none;
}
.foot nav a:hover {
  color: var(--acc1);
}
