/* refryt.top
   The app's Classic theme, drained of colour: a near-black gutter behind
   rounded cards, pill chips, Inter. The logo is the only colour on the page. */

@font-face {
  font-family: "Inter";
  src: url("assets/fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;

  --gutter:         #07080a;  /* the gap behind the cards */
  --base:           #111214;  /* the cards */
  --popup:          #1a1b1e;
  --surface:        #1c1d20;  /* chips, inputs, code */
  --surface-hover:  #25262a;
  --surface-active: #2e3034;
  --outline:        #26282c;  /* hairlines */
  --text:           #f3f4f6;
  --subtext:        #a9adb3;
  --muted:          #6d7178;
  --accent:         #f3f4f6;
  --on-accent:      #07080a;
  --accent-hover:   #ffffff;

  --radius: 12px;
  --radius-sm: 8px;
  --max: 1200px;
  --gap: 8px;
  --topbar: 56px;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --gutter:         #f4f5f6;
    --base:           #ffffff;
    --popup:          #ffffff;
    --surface:        #eeeff1;
    --surface-hover:  #e3e4e7;
    --surface-active: #d7d9dc;
    --outline:        #dfe1e4;
    --text:           #131416;
    --subtext:        #555a61;
    --muted:          #8a8e95;
    --accent:         #131416;
    --on-accent:      #ffffff;
    --accent-hover:   #000000;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--gutter);
  color: var(--text);
  font: 400 15px/1.6 "Inter", system-ui, sans-serif;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
::selection { background: var(--text); color: var(--gutter); }

/* ---------- icons: the app's Lucide SVGs, painted in currentColor ---------- */

.icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  flex: none;
  background: currentColor;
  -webkit-mask: var(--i) center / contain no-repeat;
  mask: var(--i) center / contain no-repeat;
}

/* ---------- shell ---------- */

.shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gap) var(--gap);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--gutter) 85%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.topbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  height: var(--topbar);
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.lockup {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-weight: 650;
  font-size: 19px;
  letter-spacing: -0.02em;
}
.lockup img { width: 28px; height: 28px; }

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--subtext);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
}
.nav a:hover { color: var(--text); background: var(--surface); }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-active); }
.nav .icon { width: 18px; height: 18px; }
.nav a.nav-cta { margin-left: 6px; background: var(--accent); color: var(--on-accent); font-weight: 600; }
.nav a.nav-cta:hover { background: var(--accent-hover); }

.card {
  background: var(--base);
  border-radius: var(--radius);
}

/* ---------- buttons & chips ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  border: 0;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  background: var(--surface);
  color: var(--text);
  transition: background .12s, transform .12s;
}
.btn:hover { background: var(--surface-hover); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn .icon { width: 18px; height: 18px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
a.chip:hover { background: var(--surface-hover); }
.chip-muted { color: var(--subtext); font-weight: 500; }

/* ---------- landing ---------- */

.hero {
  padding: 72px 48px 48px;
  text-align: center;
  overflow: hidden;
}

.hero-logo { width: 88px; height: 88px; margin: 0 auto 28px; }

.hero h1 {
  margin: 0 auto;
  max-width: 14ch;
  font-size: clamp(36px, 6vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.hero .lede {
  margin: 20px auto 0;
  max-width: 54ch;
  color: var(--subtext);
  font-size: 17px;
}

.hero .actions {
  margin-top: 32px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero .meta {
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
}
.hero .meta a { color: var(--subtext); }

.hero-shot {
  margin: 56px auto 0;
  max-width: 1040px;
  border-radius: var(--radius);
  border: 1px solid var(--outline);
  overflow: hidden;
  box-shadow: 0 20px 80px -20px rgba(0,0,0,.6);
}
.hero-shot img { width: 100%; height: auto; }

.section { padding: 48px; }
.section + .section { border-top: 1px solid var(--outline); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.section-head h2 { margin: 0; }
.section-head a { color: var(--subtext); font-size: 13px; font-weight: 500; text-decoration: none; }
.section-head a:hover { color: var(--text); }

h2 {
  font-size: 24px;
  letter-spacing: -0.02em;
  font-weight: 700;
  line-height: 1.25;
}

.section-intro { margin: -8px 0 24px; color: var(--subtext); max-width: 64ch; }

.stack > * + * { margin-top: var(--gap); }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 8px;
}

.feature {
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface);
}
.feature .icon { width: 22px; height: 22px; margin-bottom: 12px; }
.feature h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.feature p { margin: 0; color: var(--subtext); font-size: 14px; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.stat { padding: 22px 20px; border-radius: var(--radius); background: var(--surface); }
.stat b { display: block; font-size: 28px; letter-spacing: -0.03em; font-weight: 700; }
.stat span { color: var(--subtext); font-size: 14px; }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.shot {
  padding: 0;
  border: 1px solid var(--outline);
  background: var(--surface);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: zoom-in;
  text-align: left;
  color: inherit;
  font: inherit;
}
.shot img { aspect-ratio: 16 / 10; width: 100%; height: auto; object-fit: cover; object-position: top left; transition: transform .25s; }
.shot:hover img { transform: scale(1.02); }
.shot span { display: block; padding: 8px 12px; font-size: 12.5px; font-weight: 500; color: var(--muted); }

.split {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: center;
}
.split img { border-radius: var(--radius-sm); border: 1px solid var(--outline); }

.platforms {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.platform { display: flex; flex-direction: column; align-items: flex-start; padding: 20px; border-radius: var(--radius); background: var(--surface); }
.platform .btn { margin-top: auto; }
.platform h3 { margin: 0 0 6px; font-size: 16px; }
.platform p { margin: 0 0 14px; color: var(--subtext); font-size: 14px; }

.notice {
  padding: 20px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--outline);
  color: var(--subtext);
  font-size: 14px;
}
.notice strong { color: var(--text); }
.notice ul { margin: 10px 0 0; padding-left: 18px; }
.notice li + li { margin-top: 6px; }

/* ---------- song-row style list, as in the app ---------- */

.rows { display: grid; gap: 2px; }
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
}
.row:hover { background: var(--surface); }
.row span { color: var(--subtext); }
kbd {
  display: inline-block;
  min-width: 24px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--surface-active);
  color: var(--text);
  font: 600 12.5px/1.5 "Inter", sans-serif;
  text-align: center;
}

/* ---------- docs ---------- */

.docs {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--gap);
  align-items: start;
}

.toc {
  position: sticky;
  top: var(--topbar);
  max-height: calc(100vh - var(--topbar) - var(--gap));
  overflow-y: auto;
  padding: 16px 10px;
}
.toc h4:not(:first-child) { margin-top: 18px; }
.toc h4 {
  margin: 0 0 6px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--subtext);
}
.toc a {
  display: block;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  color: var(--subtext);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
.toc a:hover { background: var(--surface); color: var(--text); }
.toc a[aria-current="page"] { background: var(--surface-active); color: var(--text); }
.toc a.sub { padding: 5px 10px 5px 24px; font-size: 13px; color: var(--muted); }
.toc a.sub:hover { color: var(--text); }

.prose { padding: 48px 56px 56px; min-width: 0; }
.prose > :first-child { margin-top: 0; }
.prose h1 {
  font-size: 40px;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin: 0 0 12px;
}
.prose .lede { color: var(--subtext); font-size: 17px; margin: 0 0 32px; max-width: 60ch; }
.prose h2 { margin: 48px 0 12px; padding-top: 24px; border-top: 1px solid var(--outline); }
.prose h3 { margin: 32px 0 8px; font-size: 17px; letter-spacing: -0.01em; }
.prose p, .prose li { color: var(--subtext); max-width: 72ch; }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--text); text-decoration-color: var(--muted); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--text); }
.prose ul { padding-left: 20px; }
.prose li + li { margin-top: 6px; }

code {
  font: 500 0.88em/1.5 ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  background: var(--surface);
  color: var(--text);
  padding: 2px 6px;
  border-radius: 6px;
  overflow-wrap: anywhere;
}

.code {
  position: relative;
  margin: 16px 0;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--outline);
}
.code pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
}
.code code { background: none; padding: 0; font-size: 13.5px; overflow-wrap: normal; white-space: pre; }
.code .copy {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--surface-active);
  color: var(--subtext);
  font: 600 12px "Inter", sans-serif;
  cursor: pointer;
  opacity: 0;
  transition: opacity .12s;
}
.code:hover .copy, .code .copy:focus-visible { opacity: 1; }
.code .copy:hover { color: var(--text); }
.code .copy.wide { padding: 0 12px; }
@media (hover: none) { .code .copy { opacity: 1; } }

.table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--outline); border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--outline); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { color: var(--text); font-weight: 600; background: var(--surface); }
td { color: var(--subtext); }
td:first-child { white-space: nowrap; }

.callout {
  margin: 20px 0;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--subtext);
  font-size: 14px;
}
.callout p { margin: 0; }

.os-tabs { margin: 8px 0 0; }

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

.footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 24px 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}
.footer .lockup { font-size: 16px; color: var(--subtext); }
.footer .lockup img { width: 22px; height: 22px; filter: grayscale(1); opacity: .8; }
.footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-left: auto; }
.footer a { color: var(--subtext); text-decoration: none; }
.footer a:hover { color: var(--text); }
.footer .fine { flex-basis: 100%; }

/* ---------- lightbox ---------- */

.lightbox {
  padding: 0;
  border: 0;
  background: transparent;
  max-width: min(1400px, 94vw);
  max-height: 92vh;
}
.lightbox::backdrop { background: rgba(0,0,0,.85); backdrop-filter: blur(4px); }
.lightbox img { border-radius: var(--radius-sm); max-height: 86vh; width: auto; margin: 0 auto; }
.lightbox p { text-align: center; color: #c9ccd1; font-size: 14px; margin: 12px 0 0; }

/* ---------- small screens ---------- */

@media (max-width: 860px) {
  .docs { grid-template-columns: 1fr; }
  .toc { position: static; max-height: none; }
  .toc nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .toc h4 { display: none; }
  .toc a.sub { display: none; }
  .split, .split-flip { grid-template-columns: 1fr; gap: 24px; }
  .split-flip > :first-child { order: 0; }
  .doc-cards { grid-template-columns: 1fr; }
  .platforms, .stats { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .topbar-inner { padding: 10px 16px; gap: 8px; }
  .nav { gap: 0; }
  .nav a { padding: 7px 10px; }
  .hero { padding: 48px 16px 16px; }
  .hero .lede { font-size: 16px; }
  .hero-shot { margin-top: 40px; }
  .section { padding: 32px 16px; }
  .prose { padding: 32px 16px 40px; }
  .prose h1 { font-size: 32px; }
  .shell { padding: 0 8px 8px; }
}

/* ---------- features & docs hub ---------- */

.page-head h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 48px);
  letter-spacing: -0.035em;
  line-height: 1.05;
}
.page-head .lede { margin: 0 0 24px; color: var(--subtext); font-size: 17px; max-width: 64ch; }

.split h2 { margin-top: 0; }
.split-flip { grid-template-columns: 1.2fr 1fr; }
.split-flip > :first-child { order: 2; }

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checks li {
  position: relative;
  padding-left: 26px;
  color: var(--subtext);
  font-size: 14.5px;
}
.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 16px;
  height: 16px;
  background: var(--text);
  -webkit-mask: url(assets/icons/check.svg) center / contain no-repeat;
  mask: url(assets/icons/check.svg) center / contain no-repeat;
}
.checks strong { color: var(--text); font-weight: 600; }
.checks a, .feature a, .section-intro a { color: var(--text); text-underline-offset: 3px; text-decoration-color: var(--muted); }

.cta { text-align: center; }
.cta h2 { margin: 0 0 12px; }
.cta .section-intro { margin: 0 auto 24px; }
.cta .actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.doc-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.doc-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 14px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  transition: background .12s;
}
.prose .doc-card { text-decoration: none; }
.doc-card:hover { background: var(--surface-hover); }
.doc-card .icon { grid-row: span 2; margin-top: 2px; }
.doc-card b { color: var(--text); font-weight: 600; }
.doc-card span:last-child { color: var(--subtext); font-size: 14px; }

@media (max-width: 860px) {
  .split-flip { grid-template-columns: 1fr; }
  .split-flip > :first-child { order: 0; }
  .doc-cards { grid-template-columns: 1fr; }
}


@media (max-width: 440px) {
  .nav a.nav-cta { display: none; }
}

/* ---------- a section kept but not recommended ---------- */

.outdated { opacity: .45; }
.outdated:hover, .outdated:focus-within { opacity: .7; }
.outdated { transition: opacity .15s; }
.badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--outline);
  color: var(--subtext);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0;
  vertical-align: middle;
}
