/* Tuna website. One family, one ground, one ink, one accent.
   Surfaces are separated by tone steps, not lines or shadows. */
:root {
  color-scheme: dark;
  --bg: #0a0a0b;
  --s1: #111113;
  --s2: #18181b;
  --s3: #212125;
  --ink: #ededef;
  --ink-2: #a0a0a8;
  --accent: #5eb4d2;
  --sans: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --gutter: clamp(20px, 4vw, 56px);
  --max: 1240px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* announcement */
#tuna-announcement { display: none; padding: 10px var(--gutter); background: var(--s3); font-size: 15px; position: relative; text-align: center; }
#tuna-announcement.level-warning { background: #3a2f12; }
#tuna-announcement.level-critical { background: #3d1717; }
#tuna-announcement-close { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: inherit; font-size: 20px; cursor: pointer; opacity: .7; }
#tuna-announcement-close:hover { opacity: 1; }

/* nav: wordmark, a few links, one action */
nav.top { position: sticky; top: 0; z-index: 20; background: var(--bg); }
nav.top .wrap { display: flex; align-items: center; gap: 36px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 19px; letter-spacing: -0.02em; text-decoration: none; }
.brand img { width: 26px; height: 26px; }
.links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; font-size: 15px; }
.links a { text-decoration: none; color: var(--ink-2); }
.links a:hover, .links a[aria-current] { color: var(--ink); }
.nav-end { margin-left: auto; display: flex; align-items: center; gap: 24px; font-size: 15px; }
.nav-end > a:not(.btn) { color: var(--ink-2); text-decoration: none; }
.nav-end > a:not(.btn):hover { color: var(--ink); }

/* buttons: flat, one fill, near-square */
.btn { display: inline-block; white-space: nowrap; background: var(--ink); color: #0a0a0b; font-weight: 600; font-size: 15px; padding: 11px 20px; border-radius: 5px; text-decoration: none; border: 0; cursor: pointer; font-family: inherit; }
.btn:hover { background: #fff; }
.btn-lg { font-size: 16px; padding: 15px 26px; }
.btn-quiet { background: var(--s2); color: var(--ink); }
.btn-quiet:hover { background: var(--s3); }
.textlink { color: var(--ink); text-underline-offset: 5px; text-decoration-thickness: 1px; }
.textlink:hover { color: var(--accent); }

/* type: a big size, a body size, a small size */
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; }
h1.display { font-size: clamp(40px, 5.4vw, 80px); max-width: 16ch; }
h2.title { font-size: clamp(32px, 4.6vw, 60px); max-width: 17ch; }
h3 { font-size: 22px; letter-spacing: -0.015em; line-height: 1.2; }
p { margin: 0 0 1em; }
.lede { font-size: clamp(18px, 1.7vw, 21px); line-height: 1.5; max-width: 40em; color: var(--ink); }
.small { font-size: 14px; color: var(--ink-2); }
code, pre { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .88em; }
code { background: var(--s2); padding: 2px 7px; border-radius: 4px; }
pre { background: var(--s1); padding: 20px 24px; border-radius: 8px; overflow-x: auto; line-height: 1.7; margin: 0 0 1.4em; }

/* sections */
section { padding: clamp(80px, 12vw, 180px) 0 0; }
.hero { padding-top: clamp(56px, 9vw, 130px); }
.hero .actions { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; margin-top: 40px; }
.hero .lede { margin-top: 32px; }

/* hero: headline left, a real reply right on wide screens */
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 80px); align-items: end; }
.hero-grid .ui { margin-top: 0; }

/* real interface fragment: what a Tuna reply looks like in Discord */
.ui { margin-top: clamp(48px, 6vw, 80px); background: #313338; border-radius: 10px; padding: clamp(20px, 3vw, 36px); font-size: 15px; line-height: 1.45; max-width: 560px; }
.ui .msg { display: flex; gap: 14px; margin-bottom: 18px; }
.ui .msg:last-child { margin-bottom: 0; }
.ui .av { width: 40px; height: 40px; border-radius: 50%; flex: none; background: #4e5058; }
.ui .av.bot { background: var(--s3) url("../logo.png") center/70% no-repeat; }
.ui .who { font-weight: 600; color: #f2f3f5; }
.ui .tag { background: #5865f2; color: #fff; font-size: 11px; font-weight: 600; padding: 1px 5px; border-radius: 3px; margin-left: 6px; vertical-align: 1px; }
.ui .txt { color: #dbdee1; }
.ui .txt code { background: #1e1f22; color: #dbdee1; }
.ui .embed { margin-top: 6px; background: #2b2d31; border-left: 4px solid #3ba55d; border-radius: 4px; padding: 10px 14px; color: #dbdee1; max-width: 460px; }
.ui .embed.bad { border-color: #ed4245; }
.ui .embed.neutral { border-color: #4e5058; }

/* two-column composition used for feature sections */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 7vw, 120px); align-items: start; }
.split .title { margin-bottom: 28px; }
.split.flip { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }

/* rows: name left, description right. Separated by a tone step. */
.rows { margin-top: 56px; }
.row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; padding: 30px var(--gutter); margin: 0 calc(var(--gutter) * -1); }
.row:nth-child(odd) { background: var(--s1); }
.row h3 { font-size: clamp(22px, 2.4vw, 30px); }
.row p { margin: 0; color: var(--ink); max-width: 38em; }

/* plain definition list for commands/features */
.defs { list-style: none; padding: 0; margin: 0; }
.defs li { padding: 14px 0; }
.defs b { font-weight: 600; }
.defs span { color: var(--ink-2); }

/* close */
.closer { padding-top: clamp(100px, 14vw, 220px); }
.wordmark { font-size: clamp(90px, 22vw, 330px); font-weight: 700; letter-spacing: -0.06em; line-height: .85; margin: 60px 0 0; color: var(--s3); user-select: none; }
.cta-block { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }

footer { background: var(--s1); margin-top: clamp(60px, 8vw, 100px); padding: 56px 0 64px; font-size: 15px; }
footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
footer h4 { margin: 0 0 14px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
footer ul { list-style: none; margin: 0; padding: 0; }
footer li { margin-bottom: 10px; }
footer a { text-decoration: none; color: var(--ink); }
footer a:hover { color: var(--accent); }
footer .legal { margin-top: 48px; color: var(--ink-2); font-size: 14px; }

/* inner pages */
.page { padding-top: clamp(56px, 8vw, 110px); }
.page h1 { font-size: clamp(38px, 5.6vw, 72px); max-width: 16ch; margin-bottom: 24px; }
.page .lede { margin-bottom: 0; }

/* docs */
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); margin-top: 64px; }
.docs aside { position: sticky; top: 92px; align-self: start; font-size: 15px; }
.docs aside h4 { margin: 28px 0 10px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.docs aside h4:first-child { margin-top: 0; }
.docs aside a { display: block; padding: 5px 0; color: var(--ink); text-decoration: none; }
.docs aside a:hover { color: var(--accent); }
.prose { max-width: 700px; }
.prose h2 { font-size: clamp(26px, 3vw, 36px); margin: 72px 0 18px; scroll-margin-top: 90px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--ink); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 8px; }

/* commands */
.cmd-tools { margin: 40px 0 8px; }
.cmd-tools input { width: 100%; max-width: 460px; background: var(--s2); border: 0; color: var(--ink); font: inherit; font-size: 16px; padding: 14px 18px; border-radius: 6px; }
.cmd-tools input::placeholder { color: var(--ink-2); }
.cmd-h2 { font-size: clamp(24px, 2.6vw, 32px); margin: 72px 0 14px; scroll-margin-top: 90px; }
.cmd-row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 28px; padding: 13px 18px; margin: 0 -18px; border-radius: 6px; }
.cmd-row:hover { background: var(--s1); }
.cmd-row code { display: inline-block; margin: 2px 4px 2px 0; }
.cmd-desc { color: var(--ink-2); }
.note { margin-top: 64px; background: var(--s1); padding: 22px 26px; border-radius: 8px; color: var(--ink-2); max-width: 700px; }
.cmd-toc { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 28px; font-size: 15px; }
.cmd-toc a { color: var(--ink-2); text-decoration: none; }
.cmd-toc a:hover { color: var(--ink); }

/* legal documents */
.doc { max-width: 720px; padding-top: clamp(56px, 8vw, 110px); }
.doc h1 { font-size: clamp(36px, 5vw, 60px); margin-bottom: 14px; }
.doc .updated { color: var(--ink-2); font-size: 15px; margin-bottom: 40px; }
.doc h2 { font-size: 24px; margin: 52px 0 14px; letter-spacing: -0.02em; scroll-margin-top: 90px; }
.doc p, .doc li { color: var(--ink); }
.doc li { margin-bottom: 8px; }
.legal-toc { background: var(--s1); padding: 22px 26px; border-radius: 8px; margin: 0 0 12px; font-size: 15px; }
.legal-toc a { display: block; padding: 4px 0; color: var(--ink); text-decoration: none; }
.legal-toc a:hover { color: var(--accent); }

/* donate */
.amounts { list-style: none; padding: 0; margin: 48px 0 0; max-width: 560px; }
.amounts li { display: flex; justify-content: space-between; gap: 24px; padding: 22px 26px; }
.amounts li:nth-child(odd) { background: var(--s1); }
.amounts b { font-size: 24px; letter-spacing: -0.02em; }
.amounts span { color: var(--ink-2); text-align: right; }

@media (max-width: 860px) {
  .links { display: none; }
  .split, .split.flip, .row, .cmd-row { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .docs { grid-template-columns: minmax(0, 1fr); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .cmd-row { margin: 0; padding: 13px 0; }
  .docs aside { position: static; }
  footer .cols { grid-template-columns: 1fr 1fr; }
  .nav-end { gap: 16px; }
}
@media (max-width: 520px) { .nav-end > a:not(.btn) { display: none; } nav.top .wrap { gap: 16px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
