/* uSuite landing page. Colours are the family's icon hues from scommon/brand. */

:root {
  --blue: #1e5eff;
  --amber: #ff9f1a;
  --green: #1fbf75;
  --violet: #8b5cf6;
  --grape: #9b59b6;
  --slate: #64748b;

  --bg: #fbfbfc;
  --bg-alt: #f2f3f5;
  --surface: #ffffff;
  --text: #1b1e23;
  --muted: #5b6370;
  --line: #e1e4e8;
  --hero-1: #2b2f36;
  --hero-2: #1b1e23;
  --hero-text: #ffffff;
  --hero-muted: #b8bfc9;
  --link: #1740b8;
  --shadow: 0 1px 2px rgb(0 0 0 / .06), 0 8px 24px rgb(0 0 0 / .06);

  --radius: 14px;
  --wrap: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171b;
    --bg-alt: #1b1e23;
    --surface: #22262c;
    --text: #e9ecf0;
    --muted: #a3abb6;
    --line: #2f343b;
    --hero-1: #23272e;
    --hero-2: #121418;
    --link: #7ea2ff;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 8px 24px rgb(0 0 0 / .3);
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--link); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); }
h3 { font-size: 1.15rem; }
code, kbd { font-family: var(--mono); font-size: .86em; }
code { background: var(--bg-alt); border: 1px solid var(--line); border-radius: 5px; padding: .05em .35em; }
kbd {
  display: inline-block; min-width: 1.6em; text-align: center;
  background: var(--surface); border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 5px; padding: 0 .35em; margin: 0 .08em;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; z-index: 10; background: var(--surface); padding: 8px 12px; border-radius: 8px; }

/* Navigation */
.nav {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--hero-2) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid rgb(255 255 255 / .06);
}
.nav-row { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.brand img { border-radius: 8px; }
.nav nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav nav a { color: var(--hero-muted); text-decoration: none; font-size: .92rem; padding: 6px 10px; border-radius: 8px; white-space: nowrap; }
.nav nav a:hover { color: #fff; background: rgb(255 255 255 / .08); }
.nav nav a.nav-gh { color: #fff; border: 1px solid rgb(255 255 255 / .18); }
@media (max-width: 640px) { .nav nav a:not(.nav-gh):not([href="#tools"]):not([href="#support"]) { display: none; } }

/* Hero */
.hero {
  background: linear-gradient(180deg, var(--hero-1), var(--hero-2));
  color: var(--hero-text);
  padding: 72px 0 56px;
}
.eyebrow { display: flex; align-items: center; gap: 6px; color: var(--hero-muted); font-size: .9rem; margin: 0 0 16px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot.b { background: var(--blue); } .dot.a { background: var(--amber); } .dot.g { background: var(--green); margin-right: 6px; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.8rem); max-width: 15ch; margin-bottom: .4em; letter-spacing: -.02em; }
.lede { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--hero-muted); max-width: 46rem; margin: 0 0 28px; }
.lede strong { color: #fff; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .btn:not(.primary) { color: #fff; border-color: rgb(255 255 255 / .25); background: transparent; }

.family { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; max-width: 720px; }
.family a { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--hero-muted); text-decoration: none; font-size: .85rem; }
.family img { width: 88px; transition: transform .15s ease; }
.family a:hover img { transform: translateY(-3px); }
.family a:hover { color: #fff; }
@media (max-width: 560px) { .family { grid-template-columns: repeat(3, 1fr); } .family img { width: 72px; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 18px; border-radius: 10px; font-weight: 600; font-size: .95rem;
  text-decoration: none; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); cursor: pointer;
}
.btn.primary { background: var(--c, var(--blue)); border-color: transparent; color: #fff; }
.btn:hover { filter: brightness(1.08); }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

/* Sections */
.section { padding: 80px 0; }
.section.alt { background: var(--bg-alt); }
.intro { color: var(--muted); max-width: 48rem; margin: 0 0 32px; font-size: 1.05rem; }
h2.sub { margin-top: 72px; font-size: 1.4rem; }

/* The chain */
.chain { list-style: none; padding: 0; margin: 0 0 56px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; counter-reset: step; }
.chain li {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--c);
  border-radius: var(--radius); padding: 18px 8px 14px; box-shadow: var(--shadow);
}
.chain li span { color: var(--muted); font-size: .85rem; }
.chain li:not(:last-child)::after {
  content: ""; position: absolute; right: -11px; top: 50%; width: 10px; height: 10px;
  border-top: 2px solid var(--muted); border-right: 2px solid var(--muted); transform: translateY(-50%) rotate(45deg);
}
@media (max-width: 560px) {
  .chain { grid-template-columns: repeat(2, 1fr); }
  .chain li:nth-child(2)::after { display: none; }
}

/* Tool showcases */
.tool {
  display: grid; grid-template-columns: 1fr 1.15fr; gap: 40px; align-items: center;
  padding: 40px 0; border-top: 1px solid var(--line);
}
.tool > * { min-width: 0; }
.tool.flip .tool-text { order: 2; }
.tool header, .card header { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.tool header h3 { font-size: 1.6rem; margin: 0; }
.card header h3 { margin: 0; }
.job { font-size: 1.12rem; margin: 0 0 12px; }
.tool ul { padding-left: 1.1em; margin: 0; color: var(--muted); }
.tool li { margin: 6px 0; }
.tool li::marker { color: var(--c); }
.badge {
  display: inline-block; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; margin-top: 4px;
}
.badge.ok { color: var(--c); border-color: color-mix(in srgb, var(--c) 45%, transparent); }
.shots { margin: 0; }
.shots > img, .thumbs img { border-radius: 10px; border: 1px solid var(--line); box-shadow: var(--shadow); display: block; background: var(--surface); }
.thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.thumbs.one { grid-template-columns: 1fr; }
@media (max-width: 860px) {
  .tool { grid-template-columns: 1fr; gap: 24px; }
  .tool.flip .tool-text { order: 0; }
}

/* sPaste panel sketch */
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
  font-family: var(--mono); font-size: .88rem; overflow: hidden; max-width: 520px; margin: 0 auto;
}
.panel-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); font-family: var(--font); font-weight: 600; }
.panel-bar code { font-weight: 400; color: var(--grape); }
.panel ol { list-style: none; margin: 0; padding: 6px; }
.panel li { padding: 7px 10px; border-radius: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel li kbd { margin-right: 8px; color: var(--muted); }
.panel li.sel { background: color-mix(in srgb, var(--grape) 18%, transparent); }
.panel-foot { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 9px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding-top: 40px; border-top: 1px solid var(--line); }
.cards.two { grid-template-columns: repeat(2, 1fr); border-top: 0; padding-top: 0; }
@media (max-width: 860px) { .cards, .cards.two { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.card p { color: var(--muted); margin: 0 0 14px; flex: 1; }
.card > a { font-weight: 600; text-decoration: none; }
.privacy .card ul { padding-left: 1.1em; margin: 0 0 14px; color: var(--muted); flex: 1; }
.privacy .card li { margin: 6px 0; overflow-wrap: anywhere; }
.privacy .card li::marker { color: var(--c); }
.privacy .card header img { border-radius: 9px; }
.card.give { text-decoration: none; color: var(--text); border-top: 3px solid var(--c, var(--grape)); }
.card.give:hover { transform: translateY(-2px); transition: transform .15s ease; }
.card.give .btn { align-self: flex-start; }
.card.give:first-child { --c: #2b2f36; }
.card.give:last-child { --c: #ff5e5b; }
@media (prefers-color-scheme: dark) { .card.give:first-child { --c: #4b5563; } }
.free { color: var(--muted); margin: 24px 0 0; }

/* Install note */
.install { margin-top: 48px; background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 20px; }
.install summary { cursor: pointer; font-weight: 600; }
.install p, .install ul { color: var(--muted); }

/* Rules */
.rules { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.rules > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.rules p { margin: 0; color: var(--muted); }

/* Voices */
.voices { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.voice { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 0; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.voice blockquote { margin: 0; font-size: 1.02rem; }
.voice figcaption { color: var(--muted); font-size: .9rem; display: flex; justify-content: space-between; gap: 8px; }
.voice figcaption a { text-decoration: none; }
.empty { color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 20px; margin: 0; }

.share, .discuss { margin-top: 48px; }
.share-row { display: flex; flex-wrap: wrap; gap: 8px; }
.share-row a, .share-row button {
  font: inherit; font-size: .92rem; font-weight: 600; color: var(--text); text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 7px 16px; cursor: pointer;
}
.share-row a:hover, .share-row button:hover { border-color: var(--muted); }
.discuss > p { color: var(--muted); max-width: 48rem; }

/* About and contribute */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; gap: 40px; } }
.two-col p { color: var(--muted); }
.steps { list-style: none; padding: 0; margin: 0; }
.steps li { padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.steps b { color: var(--text); }

/* Footer */
.foot { background: var(--hero-2); color: var(--hero-muted); font-size: .9rem; padding: 28px 0; }
.foot a { color: #fff; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
