/* ClipBasin site. The home page keeps a live ClipBasin dock on the right edge of the window,
   the way the app sits on a screen edge; the page keeps that strip clear. */

:root {
  --blue: #1f6feb;            /* the logo tile */
  --blue-press: #1858c4;
  --card: #dbe8ff;            /* the logo's front card */
  --paper: #f4f7fc;
  --surface: #ffffff;
  --ink: #141a26;
  --muted: #566074;
  --line: #d6deeb;
  --link: #1858c4;
  --ok: #1f8a5b;

  /* The dock always uses the app's default Charcoal theme. */
  --dock-bg: #12141a;
  --dock-row-hover: #262a35;
  --dock-fg: #eceef2;
  --dock-muted: #8b91a3;
  --dock-line: #2c303c;
  --dock-ok: #6dbf9c;
  --dock-w: 17rem;

  --measure: 40rem;
  --gutter: clamp(1rem, 5vw, 4.5rem);
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --card: #1d3561;
    --paper: #0e1420;
    --surface: #151c2b;
    --ink: #e8edf7;
    --muted: #9aa6bd;
    --line: #26304a;
    --link: #8fb6ff;
    --ok: #6dbf9c;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

.skip {
  position: absolute; left: 1rem; top: -3rem;
  background: var(--blue); color: #fff; padding: 0.5rem 0.9rem; border-radius: 6px; z-index: 10;
}
.skip:focus { top: 1rem; }

/* ---- page frame -------------------------------------------------------------------------- */

.frame { padding: 0 var(--gutter); }

.site-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.25rem 0; max-width: 60rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  color: var(--ink); text-decoration: none;
  font: 600 1.2rem/1 var(--font-display); letter-spacing: -0.01em;
}
.brand img { width: 2rem; height: 2rem; }
.site-nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site-nav a { color: var(--ink); text-decoration: none; font-size: 0.975rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--link); text-decoration: underline; }

main { max-width: var(--measure); padding: 1.5rem 0 4rem; }
main > section + section { margin-top: 4.5rem; }

h1, h2, h3 { font-family: var(--font-display); color: var(--ink); }
h1 { font-weight: 600; font-size: clamp(2.3rem, 5.2vw, 3.5rem); line-height: 1.05; letter-spacing: -0.025em; margin: 0 0 1.25rem; max-width: 14ch; }
h2 { font-weight: 600; font-size: 1.75rem; line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 1rem; }
h3 { font-weight: 600; font-size: 1.125rem; line-height: 1.3; margin: 2rem 0 0.4rem; }
p { margin: 0 0 1rem; }
.lede { font-size: 1.25rem; line-height: 1.5; color: var(--ink); max-width: 34rem; }
.quiet { color: var(--muted); }

.site-foot {
  border-top: 1px solid var(--line); padding: 1.75rem 0 2.5rem; max-width: 60rem;
  color: var(--muted); font-size: 0.9rem;
}
.site-foot nav { display: flex; gap: 1.25rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.site-foot p { margin: 0 0 0.35rem; }

/* ---- home: get it ---------------------------------------------------------------------- */

.get { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin: 1.75rem 0 0; }
.store {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.7rem 1.1rem; border-radius: 8px;
  border: 1.5px solid var(--ink); color: var(--ink); background: transparent;
  font: 600 0.975rem/1.2 var(--font); text-decoration: none;
}
.get .quiet { margin: 0; }

/* ---- home: try it ---------------------------------------------------------------------- */

.try { margin-top: 2.75rem; }
.try label { display: block; font-weight: 600; margin-bottom: 0.5rem; }
.paste {
  width: 100%; min-height: 6.5rem; resize: vertical;
  padding: 0.85rem 1rem; border-radius: 10px;
  border: 2px dashed var(--blue); background: var(--surface); color: var(--ink);
  font: 400 1rem/1.5 var(--font);
}
.paste::placeholder { color: var(--muted); }
.try .quiet { font-size: 0.95rem; margin-top: 0.5rem; }
.hint-side { display: none; }

/* ---- home: steps and features ---------------------------------------------------------- */

.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 1.1rem; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.4rem 1fr; gap: 0.9rem; align-items: baseline; }
.steps li::before {
  content: counter(step);
  font: 600 1.6rem/1 var(--font-display); color: var(--blue);
}

.features { margin: 0; display: grid; gap: 1.5rem; }
.features div { padding-left: 1rem; border-left: 4px solid var(--stripe, var(--blue)); }
.features dt { font-weight: 600; margin-bottom: 0.2rem; }
.features dd { margin: 0; color: var(--muted); }

/* Section colors from the app's "Color and icons" item style. */
.c-blue   { --stripe: #5b8def; }
.c-amber  { --stripe: #e0a23a; }
.c-teal   { --stripe: #2bb3a3; }
.c-green  { --stripe: #4caf6a; }
.c-purple { --stripe: #a879e8; }
.c-pink   { --stripe: #d9579b; }
.c-gray   { --stripe: #9aa1b2; }

.price { font: 600 2.75rem/1 var(--font-display); letter-spacing: -0.02em; margin: 0 0 0.75rem; }

/* ---- the dock ---------------------------------------------------------------------------- */

.dock {
  background: var(--dock-bg); color: var(--dock-fg);
  font: 400 0.95rem/1.35 "Segoe UI", system-ui, sans-serif;
  display: flex; flex-direction: column;
  border-radius: 12px; border: 1px solid var(--dock-line);
  margin: 2.5rem 0 0; max-width: 21rem;
  box-shadow: 0 18px 40px -24px rgba(10, 20, 40, 0.55);
}
.dock-bar {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 0.8rem; border-bottom: 1px solid var(--dock-line);
}
.dock-bar img { width: 1.35rem; height: 1.35rem; }
.dock-bar b { font-weight: 600; flex: 1; }
.dock-bar span { color: var(--dock-muted); letter-spacing: 0.1em; }
.dock-body { padding: 0.35rem 0 0.5rem; }
.dock h2 {
  margin: 0.65rem 0 0.2rem; padding: 0 0.8rem;
  font: 600 0.75rem/1.4 "Segoe UI", system-ui, sans-serif; letter-spacing: 0.05em;
  color: var(--stripe); display: flex; gap: 0.45rem;
}
.dock h2 small { color: var(--dock-muted); font-size: inherit; font-weight: 400; }
.dock ul { list-style: none; margin: 0; padding: 0; }
.snip {
  width: 100%; border: 0; margin: 0; cursor: pointer; text-align: left;
  display: grid; grid-template-columns: 3px 1.15rem 1fr; align-items: center; gap: 0.55rem;
  padding: 0.4rem 0.8rem 0.4rem 0; background: transparent; color: inherit; font: inherit;
}
.snip::before { content: ""; align-self: stretch; background: var(--stripe); border-radius: 0 2px 2px 0; }
.snip svg { width: 1.15rem; height: 1.15rem; color: var(--stripe); }
.snip:hover { background: var(--dock-row-hover); }
.snip:focus-visible { outline: 2px solid var(--dock-fg); outline-offset: -2px; border-radius: 0; }
.snip.copied { color: var(--dock-ok); }
.snip.copied svg { color: var(--dock-ok); }
.snip.failed { color: #e38b8b; }
.dock-add {
  margin: 0.25rem 0.8rem 0; padding-top: 0.5rem; border-top: 1px solid var(--dock-line);
  color: var(--dock-muted); font-size: 1.25rem; line-height: 1; text-align: center;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* Wide windows: the dock docks to the right edge and the page keeps its strip clear. */
@media (min-width: 64rem) {
  .has-dock .frame { padding-right: calc(var(--dock-w) + var(--gutter)); }
  .has-dock .dock {
    position: fixed; top: 0; right: 0; bottom: 0; width: var(--dock-w);
    margin: 0; max-width: none; border-radius: 0; border-width: 0 0 0 1px; box-shadow: none;
    overflow-y: auto;
  }
  .hint-side { display: inline; }
  .hint-below { display: none; }
}

/* ---- documents (privacy, terms, support) ---------------------------------------------- */

.doc h1 { font-size: clamp(2rem, 4vw, 2.75rem); max-width: none; }
.doc h2 { font-size: 1.35rem; margin: 2.5rem 0 0.6rem; }
.doc ul { padding-left: 1.25rem; margin: 0 0 1rem; }
.doc li { margin-bottom: 0.4rem; }
.doc .updated { color: var(--muted); font-size: 0.95rem; }
.doc code { font-size: 0.92em; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 0.05em 0.3em; }

.contact { display: grid; gap: 0.25rem 1.5rem; grid-template-columns: max-content 1fr; margin: 0 0 1rem; }
.contact dt { color: var(--muted); }
.contact dd { margin: 0; font-weight: 600; }

details { border-top: 1px solid var(--line); padding: 0.85rem 0; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; }
details p { margin: 0.6rem 0 0; color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  .snip { transition: background-color 120ms ease, color 120ms ease; }
}
