/* ---------------------------------------------------------------------------
   RangeMenu marketing site.

   Reference: native desktop menu chrome. The product is a context menu, so
   the site borrows the feel of precision desktop software: warm paper
   surfaces, graphite ink, a single copper accent (menu-highlight warmth, and
   deliberately distinct from the sibling RangeSearch green). Layout keeps the
   family rhythm: wide airy container, alternating bands, one soft shadow
   reserved for genuinely elevated surfaces (the demo window, the plan card).
   Type: Schibsted Grotesk alone, hierarchy carried by weight and size.
--------------------------------------------------------------------------- */

:root {
  --paper: #faf8f4;
  --band: #f1ede6;
  --ink: #23211e;
  --body-c: #57534c;
  --muted: #8a847a;

  --copper: #a4502a;
  --copper-bright: #c76a3f;
  --copper-dark: #7e3c1e;
  --copper-tint: #f4e5db;
  --line: #e2dcd2;

  --lift: 0 10px 60px rgba(58, 42, 27, 0.12);

  --r-card: 12px;
  --r-btn: 8px;

  --gut: clamp(1.25rem, 4vw, 2rem);
  --pad-y: clamp(4rem, 8vw, 6.5rem);
  --wrap: 1140px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--body-c);
  font-family: "Schibsted Grotesk", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.12;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.3rem, 4.8vw, 3.6rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.12rem; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--copper); }

code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.86em;
  background: var(--copper-tint);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  color: var(--copper-dark);
}

pre {
  position: relative;
  background: var(--ink);
  color: #ece8e1;
  border-radius: var(--r-card);
  padding: 2.7rem 1.4rem 1.3rem;
  overflow-x: auto;
  font-size: 0.86rem;
  line-height: 1.6;
  margin: 0 0 1.6rem;
}

pre::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1.9rem;
  background: #322f2a;
  border-radius: var(--r-card) var(--r-card) 0 0;
}

pre::after {
  content: "";
  position: absolute;
  top: 0.72rem;
  left: 1.1rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #57534c;
  box-shadow: 16px 0 0 #57534c, 32px 0 0 #57534c;
}

pre code { background: none; padding: 0; color: inherit; font-size: inherit; }

.c-kw { color: #e8a87c; }
.c-str { color: #b8cf8e; }
.c-com { color: #8a847a; }
.c-tag { color: #d3a4e0; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--gut);
  padding-right: var(--gut);
}

.wrap-narrow { max-width: 780px; }

section { padding: var(--pad-y) 0; }

.band { background: var(--band); }

.section-lead { color: var(--muted); margin-top: -0.6rem; margin-bottom: 2rem; }

/* Masthead */

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink);
}

.masthead .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.6rem;
}

.wordmark {
  font-weight: 800;
  font-size: 1.2rem;
  color: #faf8f4;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.wordmark span { color: var(--copper-bright); }

.masthead nav { display: flex; align-items: center; gap: 1.4rem; }

.masthead nav a:not(.btn) {
  color: #cfc9bf;
  text-decoration: none;
  font-size: 0.95rem;
}

.masthead nav a:not(.btn):hover { color: #fff; }

/* Buttons */

.btn {
  display: inline-block;
  border-radius: var(--r-btn);
  padding: 0.72rem 1.35rem;
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
  border: 1px solid transparent;
}

.btn-sm { padding: 0.45rem 0.95rem; font-size: 0.9rem; }

.btn-primary { background: var(--copper); color: #fff; }
.btn-primary:hover { background: var(--copper-dark); }

.btn-outline { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-outline:hover { border-color: var(--copper); color: var(--copper); }

.btn-wide { display: block; text-align: center; }

.btn[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }

/* Hero */

.hero {
  background: var(--ink);
  border-bottom: 3px solid var(--copper);
}

.hero h1 { color: #faf8f4; }

.hero-lead { color: #b5aea3; }

.hero .btn-outline {
  background: transparent;
  border-color: #46423c;
  color: #faf8f4;
}

.hero .btn-outline:hover { border-color: var(--copper-bright); color: var(--copper-bright); }

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero-lead { font-size: 1.1rem; }

.hero-actions { display: flex; gap: 0.8rem; margin: 1.6rem 0 1rem; flex-wrap: wrap; }

.hero-fact { color: #8a847a; font-size: 0.92rem; }

/* Demo window */

.demo-frame {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--lift);
}

.demo-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--line);
  background: var(--band);
  border-radius: var(--r-card) var(--r-card) 0 0;
}

.demo-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }

.demo-title { margin-left: 0.6rem; font-size: 0.8rem; color: var(--muted); }

.demo-stage { position: relative; padding: 1.4rem 1.6rem 1.6rem; }

.demo-instruction {
  color: var(--copper);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
}

.demo-doc { color: var(--body-c); font-size: 0.95rem; user-select: none; cursor: context-menu; }

.demo-doc h3 { margin-bottom: 0.4em; }

.demo-doc table {
  border-collapse: collapse;
  margin-top: 0.6rem;
  width: 100%;
}

.demo-doc th, .demo-doc td {
  border: 1px solid var(--line);
  padding: 0.4rem 0.7rem;
  text-align: left;
  font-size: 0.9rem;
}

.demo-doc th { background: var(--band); color: var(--ink); }

.demo-status { min-height: 1.4em; margin-top: 0.9rem; font-size: 0.88rem; color: var(--copper-dark); }

/* Features */

.feature-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.2rem 3rem;
  margin-top: 2.2rem;
}

.feature h3 { margin-bottom: 0.35em; }
.feature p { font-size: 0.97rem; }

/* Code labels */

.code-label {
  margin: 1.8rem 0 0.6rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
}

/* Pricing */

.plan {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--copper);
  border-radius: var(--r-card);
  box-shadow: var(--lift);
  padding: 2.2rem 2.4rem;
  max-width: 460px;
  margin: 0 auto;
}

.plan-price { font-size: 2.6rem; font-weight: 800; color: var(--ink); margin-bottom: 1rem; }
.plan-price span { font-size: 1rem; font-weight: 600; color: var(--muted); }

.plan-list { list-style: none; margin: 0 0 1.6rem; padding: 0; }
.plan-list li { padding: 0.4rem 0 0.4rem 1.5rem; position: relative; }
.plan-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 0.85rem;
  height: 0.45rem;
  border-left: 2px solid var(--copper);
  border-bottom: 2px solid var(--copper);
  transform: rotate(-50deg);
}

.plan-note { margin-top: 1.1rem; font-size: 0.88rem; color: var(--muted); }

#pricing .wrap { text-align: center; }
#pricing .plan { text-align: left; }

/* FAQ */

.faq dt { font-weight: 700; color: var(--ink); margin-top: 1.4rem; }
.faq dd { margin: 0.35rem 0 0; }

/* Docs */

.docs { padding: clamp(2.5rem, 5vw, 4rem) 0 var(--pad-y); }

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

.docs-toc {
  position: sticky;
  top: 5rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.92rem;
}

.docs-toc-title {
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.docs-toc a {
  color: var(--body-c);
  text-decoration: none;
  padding: 0.22rem 0;
}

.docs-toc a:hover { color: var(--copper); }

.docs-body { max-width: 720px; }

.docs-body h1 { font-size: clamp(1.9rem, 3.4vw, 2.5rem); }

.docs-body h2 {
  font-size: 1.4rem;
  margin-top: 2.6em;
  padding-top: 1.2em;
  border-top: 1px solid var(--line);
}

.docs-body h3 { margin-top: 1.8em; }

.docs-body h2:target,
.docs-body h3:target { scroll-margin-top: 5rem; }

.docs-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 1rem 0 1.6rem;
}

.docs-body th, .docs-body td {
  text-align: left;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--line);
  vertical-align: top;
}

.docs-body th { background: var(--band); color: var(--ink); }

.docs-body ul, .docs-body ol { padding-left: 1.3rem; }
.docs-body li { margin-bottom: 0.5rem; }

@media (max-width: 880px) {
  .docs-grid { grid-template-columns: 1fr; }
  .docs-toc { position: static; flex-direction: row; flex-wrap: wrap; gap: 0.3rem 1rem; }
  .docs-toc-title { width: 100%; margin-bottom: 0.2rem; }
}

/* Footer */

footer {
  background: var(--ink);
  padding: 2.4rem 0 3rem;
  font-size: 0.88rem;
  color: #8a847a;
}

footer a { color: #cfc9bf; }

@media (max-width: 880px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .masthead nav a:not(.btn) { display: none; }
}
