/* Markscope landing page. No web fonts, no scripts. Tokens live in tokens.css. */

/* Base */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: var(--text-base) / 1.6 var(--font-body);
  overflow-x: clip;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: color-mix(in oklch, var(--accent) 40%, transparent);
  transition: text-decoration-color var(--duration-fast);
}

a:hover {
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

code,
kbd,
pre {
  font-family: var(--font-mono);
  font-size: 0.88em;
}

:not(pre) > code {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.05em 0.35em;
}

kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0 0.35em;
  border: 1px solid var(--rule);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--paper);
  text-align: center;
  line-height: 1.5;
}

kbd + kbd {
  margin-inline-start: 0.2em;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  padding: 0.5rem 0.9rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius-sm);
  z-index: 10;
}

.skip-link:focus {
  top: 1rem;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in oklch, var(--paper) 85%, transparent);
  backdrop-filter: blur(12px) saturate(1.4);
  border-bottom: 1px solid color-mix(in oklch, var(--rule) 70%, transparent);
}

.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.75rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font: 600 1.15rem / 1 var(--font-display);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: clamp(0.75rem, 2vw, 1.75rem);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-sm);
}

.nav-links a {
  color: var(--ink-2);
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-links .nav-gh {
  color: var(--ink);
  font-weight: 600;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition:
    transform var(--duration-fast) var(--ease-out-expo),
    background-color var(--duration-fast),
    box-shadow var(--duration-fast);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 6px 18px -8px color-mix(in oklch, var(--accent) 80%, transparent);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-ghost {
  color: var(--ink);
  border-color: var(--rule);
  background: var(--paper);
}

.btn-ghost:hover {
  border-color: var(--ink-3);
}

/* Sections */

.section-head {
  max-width: 44rem;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.section-num {
  margin: 0 0 0.75rem;
  font: 600 0.8rem / 1 var(--font-mono);
  color: var(--amber-ink);
}

.section-num::after {
  content: "";
  display: inline-block;
  width: 2.5rem;
  height: 1px;
  margin-inline-start: 0.6rem;
  vertical-align: middle;
  background: currentColor;
}

.section-head h2 {
  margin: 0;
  font: 500 var(--text-h2) / 1.08 var(--font-display);
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.section-head > p:not(.section-num) {
  margin: 1rem 0 0;
  font-size: var(--text-lg);
  color: var(--ink-2);
  text-wrap: pretty;
}

.screens,
.index,
.security,
.install {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) var(--space-section);
}

/* Screens bento */

.bento {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}

.shot {
  margin: 0;
}

.shot-lead {
  grid-column: 1 / -1;
}

.shot a {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
  transition:
    transform var(--duration-fast) var(--ease-out-expo),
    box-shadow var(--duration-fast);
}

.shot a:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.shot figcaption {
  margin-top: 0.85rem;
  font-size: var(--text-sm);
  color: var(--ink-2);
  max-width: 40rem;
}

.shot figcaption b {
  color: var(--ink);
}

/* Feature index */

.index-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 2px solid var(--ink);
}

.index-grid > section {
  padding: 1.25rem 1.25rem 0.5rem 0;
}

.index-grid > section + section {
  padding-inline-start: 1.25rem;
  border-inline-start: 1px solid var(--rule);
}

.index-grid h3 {
  margin: 0 0 0.9rem;
  font: 600 0.75rem / 1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.index-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-sm);
  color: var(--ink-2);
}

.index-grid li {
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--rule);
}

.index-grid li:last-child {
  border-bottom: 0;
}

/* Security pipeline */

.pipeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.pipeline li {
  position: relative;
  padding: 0 1.25rem 0 0;
  counter-increment: step;
}

.pipeline li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 0.9rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--rule);
  font: 500 2rem / 1 var(--font-display);
  color: var(--ink-3);
}

.pipeline li::after {
  content: "→";
  position: absolute;
  right: 0.6rem;
  top: 0.3rem;
  color: var(--ink-3);
}

.pipeline li:last-child::after {
  content: none;
}

.pipeline li:last-child::before {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.step-tag {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  font: 600 0.75rem / 1.4 var(--font-mono);
}

.step-tag.is-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.pipeline p {
  margin: 0.75rem 0 0;
  font-size: var(--text-sm);
  color: var(--ink-2);
}

/* Privacy statement */

.privacy {
  background: var(--code-bg);
  color: var(--code-ink);
  padding: var(--space-section) var(--gutter);
  margin-bottom: var(--space-section);
}

.privacy h2,
.privacy p {
  max-width: var(--max);
  margin-inline: auto;
}

.privacy h2 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  font: 500 clamp(2rem, 1rem + 4vw, 4rem) / 1.05 var(--font-display);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.privacy h2 span {
  display: block;
  font-style: italic;
  color: var(--amber);
}

.privacy p {
  font-size: var(--text-lg);
  color: oklch(78% 0.015 265);
}

/* Install */

.install-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: install;
}

.steps li {
  position: relative;
  padding: 0 0 1.25rem 3rem;
  counter-increment: install;
}

.steps li::before {
  content: counter(install);
  position: absolute;
  left: 0;
  top: -0.1rem;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font: 600 0.9rem / 1 var(--font-mono);
}

.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 1rem;
  top: 2.1rem;
  bottom: 0.2rem;
  width: 1px;
  background: var(--rule);
}

.build {
  border-radius: var(--radius);
  background: var(--code-bg);
  color: var(--code-ink);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.build-label {
  display: flex;
  justify-content: space-between;
  margin: 0 0 0.9rem;
  font: 600 0.75rem / 1.4 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.build-label span {
  color: oklch(70% 0.015 265);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.build pre {
  margin: 0;
  overflow-x: auto;
  line-height: 1.7;
}

.build .tk-meta {
  color: oklch(64% 0.015 265);
}

.build-note {
  margin: 1rem 0 0;
  font-size: var(--text-sm);
  color: oklch(74% 0.015 265);
}

.build-note code {
  background: oklch(28% 0.02 265);
  border-color: oklch(34% 0.02 265);
}

/* Footer */

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem var(--gutter) 3rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--rule);
  font-size: var(--text-sm);
  color: var(--ink-3);
}

.site-footer p {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: var(--ink-2);
}

/* Responsive */

@media (max-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .index-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .index-grid > section:nth-child(3) {
    padding-inline-start: 0;
    border-inline-start: 0;
  }

  .pipeline {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
  }

  .pipeline li {
    display: grid;
    grid-template-columns: 3.5rem minmax(0, 1fr);
    padding: 0;
  }

  .pipeline li::before {
    grid-row: span 2;
    border-bottom: 0;
    margin: 0;
    padding: 0;
    font-size: 1.6rem;
  }

  .pipeline li::after {
    content: none;
  }

  .pipeline p {
    margin-top: 0.4rem;
  }

  .install-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .nav-links li:not(:last-child) {
    display: none;
  }

  .index-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .index-grid > section + section {
    padding-inline-start: 0;
    border-inline-start: 0;
    border-top: 1px solid var(--rule);
  }

  .shot {
    grid-column: 1 / -1;
  }

  .pane-raw,
  .pane-doc {
    width: 88%;
  }

  .pane-raw pre {
    font-size: 0.7rem;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------------------------------------------------------------------------
   Store channels (install section) and prose pages (privacy policy).
   Added when merging the two site designs.
   ------------------------------------------------------------------------ */
.stores {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 36px;
}
.store {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper-2);
  color: inherit;
  text-decoration: none;
  transition:
    transform var(--duration-fast) var(--ease-out-expo),
    border-color var(--duration-fast);
}
a.store:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}
.store-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font: 700 15px/1 var(--font-mono);
}
.store-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.store-text b {
  font-size: var(--text-base);
}
.store-text span {
  color: var(--ink-3);
  font-size: var(--text-sm);
}
.store-status {
  margin-left: auto;
  padding: 3px 9px;
  border-radius: 999px;
  font: 600 11px/1.4 var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.store-status.is-pending {
  background: color-mix(in oklch, var(--amber, var(--accent)) 18%, transparent);
  color: var(--amber-ink, var(--ink-2));
}
.store-status.is-live {
  background: color-mix(in oklch, var(--done, var(--accent)) 18%, transparent);
  color: var(--done, var(--accent));
}
.prose {
  max-width: 72ch;
  margin: 0 auto;
  padding: clamp(40px, 8vw, 80px) var(--gutter) 24px;
}
.prose h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
}
.prose h2 {
  margin-top: 2em;
  font-family: var(--font-display);
}
.prose p,
.prose li {
  color: var(--ink-2);
}
@media (max-width: 720px) {
  .stores {
    grid-template-columns: 1fr;
  }
}
