/*
 * summcr.com. The palette is summ's own UI palette, so the site and the product
 * are recognisably one thing; nothing below the tokens names a literal colour,
 * so the dark theme is the palette and nothing else. No framework, no CDN, no
 * webfont - the same rule the registry's UI keeps, for the same reason.
 */

:root {
  --bg:            #ffffff;
  --bg-subtle:     #f6f8fa;
  --bg-raised:     #ffffff;
  --bg-hover:      #f6f8fa;
  --border:        #d8dee4;
  --border-subtle: #e6ebf0;
  --text:          #1f2328;
  --text-muted:    #656d76;
  --text-faint:    #8c959f;
  --accent:        #0b7285;
  --accent-hover:  #095c6b;
  --accent-soft:   #e5f2f5;
  --on-accent:     #ffffff;
  --term-bg:       #10161c;
  --term-text:     #cdd9e5;
  --term-muted:    #7d8b9a;
  --term-accent:   #56c8dd;
  --shadow:        0 1px 2px rgba(31, 35, 40, .06);
  --shadow-lg:     0 12px 32px rgba(31, 35, 40, .10);
  --radius:        10px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:            #0d1117;
    --bg-subtle:     #131920;
    --bg-raised:     #161b22;
    --bg-hover:      #1c232c;
    --border:        #2a313c;
    --border-subtle: #21262d;
    --text:          #e6edf3;
    --text-muted:    #9198a1;
    --text-faint:    #6e7681;
    --accent:        #56c8dd;
    --accent-hover:  #7ad6e7;
    --accent-soft:   #12303a;
    --on-accent:     #0d1117;
    --term-bg:       #0a0f14;
    --shadow:        0 1px 2px rgba(0, 0, 0, .4);
    --shadow-lg:     0 12px 32px rgba(0, 0, 0, .45);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: var(--mono);
  font-size: .9em;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: .08em .34em;
}

.shell { max-width: 1060px; margin: 0 auto; padding: 0 24px; }

.skip {
  position: absolute; left: -9999px;
  background: var(--bg-raised); color: var(--text);
  padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius);
}
.skip:focus { left: 12px; top: 12px; z-index: 10; }

/* ---- top bar ---------------------------------------------------------- */

.topbar {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}
.topbar-inner { display: flex; align-items: center; gap: 24px; height: 60px; }

.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-name { font-size: 18px; font-weight: 640; letter-spacing: -.01em; }
.tile  { fill: var(--accent); }
.glyph { stroke: var(--on-accent); }

.topbar-nav { margin-left: auto; display: flex; gap: 22px; font-size: 14.5px; }
.topbar-nav a { color: var(--text-muted); }
.topbar-nav a:hover { color: var(--text); text-decoration: none; }

@media (max-width: 720px) {
  .topbar-nav { gap: 14px; font-size: 13.5px; }
  .topbar-nav a:nth-child(4) { display: none; }
}

/* ---- hero ------------------------------------------------------------- */

.hero {
  background:
    radial-gradient(1100px 380px at 50% -120px,
      color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%);
  border-bottom: 1px solid var(--border-subtle);
}
.hero-inner { padding: 76px 24px 64px; text-align: center; }
.hero-mark { display: block; margin: 0 auto 26px; }

h1 {
  margin: 0;
  font-size: clamp(38px, 6.2vw, 58px);
  line-height: 1.08;
  letter-spacing: -.028em;
  font-weight: 700;
}

.lede {
  max-width: 620px;
  margin: 20px auto 0;
  font-size: clamp(16.5px, 2.1vw, 19px);
  color: var(--text-muted);
}

.hero-actions { margin: 26px 0 0; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-raised);
  color: var(--text);
  font-size: 15px; font-weight: 560;
  box-shadow: var(--shadow);
}
.btn:hover { background: var(--bg-hover); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

/* ---- command block ---------------------------------------------------- */

.cmd {
  display: flex; align-items: center; gap: 12px;
  /* A grid item's implicit `min-width: auto` is the whole width of its
     unwrapped content, so a long command widens its column and takes the page
     with it. The scroll belongs to the <code>, not to the document. */
  min-width: 0;
  max-width: 760px; margin: 30px auto 0;
  padding: 11px 11px 11px 16px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: left;
}
.cmd code {
  flex: 1; min-width: 0;
  background: none; border: 0; padding: 0;
  font-size: 13.5px; color: var(--text);
  overflow-x: auto; white-space: pre;
}
.cmd .copy {
  flex: none;
  font: inherit; font-size: 12.5px; font-weight: 560;
  padding: 5px 12px;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
}
.cmd .copy:hover { color: var(--text); background: var(--bg-hover); }

/* ---- demo ------------------------------------------------------------- */

.demo-wrap { padding-top: 48px; padding-bottom: 8px; }

.term {
  margin: 0;
  background: var(--term-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.term-bar {
  display: flex; gap: 8px; align-items: center;
  padding: 12px 14px;
  background: color-mix(in srgb, var(--term-bg) 82%, #ffffff);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.term-bar span { width: 11px; height: 11px; border-radius: 50%; background: rgba(255, 255, 255, .18); }
.term-body {
  margin: 0; padding: 22px 24px 24px;
  font-family: var(--mono); font-size: 13px; line-height: 1.62;
  color: var(--term-text);
  overflow-x: auto;
}
.term-body .p { color: var(--term-muted); }
.term-body .c { color: var(--term-accent); }
.term-body .m { color: var(--term-muted); }
.term img { display: block; width: 100%; height: auto; }
.term figcaption {
  padding: 12px 16px;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 13.5px;
  text-align: center;
}

/* ---- cards ------------------------------------------------------------ */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding-top: 56px;
}
.card {
  display: block;
  padding: 22px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--text);
}
.card:hover { border-color: var(--accent); text-decoration: none; }
.card { min-width: 0; }
.card h2 { margin: 0 0 8px; font-size: 17px; letter-spacing: -.01em; }
.card p { margin: 0; font-size: 14.5px; color: var(--text-muted); }
.card .more { display: inline-block; margin-top: 12px; font-size: 14px; color: var(--accent); font-weight: 560; }

/* ---- features --------------------------------------------------------- */

.section-title {
  margin: 0 0 28px;
  font-size: clamp(24px, 3.4vw, 30px);
  letter-spacing: -.022em;
}

.features, .install { padding-top: 72px; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px 34px; }
.feature { min-width: 0; }
.feature h3 { margin: 0 0 6px; font-size: 16.5px; letter-spacing: -.01em; }
.feature p { margin: 0; font-size: 14.8px; color: var(--text-muted); }

.badge-line {
  margin: 36px 0 0;
  padding: 16px 20px;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: var(--radius);
  font-size: 14.8px;
  color: var(--text);
}
.badge-line code { background: color-mix(in srgb, var(--bg) 55%, transparent); }

/* ---- install ---------------------------------------------------------- */

.install-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; }
.install-col { min-width: 0; }
.install-col h3 { margin: 0 0 4px; font-size: 16.5px; }
.install-col p { font-size: 14.8px; color: var(--text-muted); }
.install .cmd { margin: 14px 0 0; max-width: none; }
.platforms { margin-top: 34px; font-size: 14.5px; color: var(--text-muted); }

@media (max-width: 860px) {
  .cards, .feature-grid, .install-grid { grid-template-columns: 1fr; }
  .feature-grid { gap: 24px; }
}

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

.foot {
  margin-top: 84px;
  padding: 26px 0;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  font-size: 14px;
  color: var(--text-muted);
}
.foot-inner { display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: center; }
.foot-nav { margin-left: auto; display: flex; gap: 18px; }
