/* Documentation site styles. One typeface, two palettes: the product pages carry Bottle Green,
   the company page carries ink with Oxblood for one thing at a time. No scripts anywhere. */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/assets/fonts/SchibstedGrotesk-Variable.ttf") format("truetype");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #F5F2EA;
  --surface: #FFFFFF;
  --text: #1C2420;
  --muted: #656E68;
  --rule: #DDD8CE;
  --accent: #2F7A55;
  --accent-deep: #173A29;
  --sand: #E9CF8E;
  --code-bg: #ECE8DF;
  --measure: 44rem;
  --side: 15rem;
}

body.company {
  --paper: #F6F2EC;
  --text: #1B1D21;
  --muted: #6D6562;
  --rule: #DED7D0;
  --accent: #6B2231;
  --accent-deep: #2A1B1E;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1B1D21;
    --surface: #23262B;
    --text: #F5F2EA;
    --muted: #A9B0AB;
    --rule: #3A3E43;
    --accent: #7FC19E;
    --accent-deep: #CFE8DA;
    --code-bg: #2A2E33;
  }
  body.company {
    --paper: #1B1D21;
    --text: #F6F2EC;
    --muted: #B3ABA7;
    --rule: #3A3E43;
    --accent: #D9A0A8;
    --accent-deep: #F0D7DA;
  }
}

* { box-sizing: border-box; }

html { font-size: 106.25%; }

body {
  margin: 0;
  font-family: "Schibsted Grotesk", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}

a { color: var(--accent); text-decoration: underline; text-underline-offset: 0.15em; }
a:hover { color: var(--accent-deep); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.skip {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--surface);
  padding: 0.5rem 0.75rem;
  z-index: 10;
}
.skip:focus { left: 0.5rem; }

h1, h2, h3 { line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: 2rem; margin-bottom: 1rem; }
h2 { font-size: 1.35rem; margin-top: 2.25rem; margin-bottom: 0.6rem; }
h3 { font-size: 1.1rem; margin-top: 1.6rem; margin-bottom: 0.4rem; }
p, ul, ol { margin: 0 0 1rem; }
ul, ol { padding-left: 1.4rem; }
li { margin-bottom: 0.3rem; }
code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.9em;
  background: var(--code-bg);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}
pre { background: var(--code-bg); padding: 0.9rem 1rem; overflow-x: auto; border-radius: 4px; }
pre code { background: none; padding: 0; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }
img { max-width: 100%; height: auto; }

table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.95rem;
}
th, td { text-align: left; vertical-align: top; padding: 0.45rem 0.7rem; border-bottom: 1px solid var(--rule); }
th { font-weight: 600; border-bottom: 2px solid var(--rule); }

/* Product pages */

.product-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  max-width: 80rem;
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--rule);
}
.brand { display: inline-flex; align-items: center; gap: 0.7rem; color: var(--text); text-decoration: none; }
.brand img { display: block; width: 32px; height: 32px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand-for { font-size: 0.8rem; color: var(--muted); }
.brand-docs { color: var(--muted); font-size: 0.9rem; }

.shell {
  display: grid;
  grid-template-columns: var(--side) minmax(0, 1fr);
  gap: 3rem;
  max-width: 80rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}
.side ul { list-style: none; padding: 0; margin: 0; position: sticky; top: 1.5rem; }
.side li { margin: 0; }
.side a {
  display: block;
  padding: 0.35rem 0.6rem;
  color: var(--text);
  text-decoration: none;
  border-left: 3px solid transparent;
  border-radius: 0 3px 3px 0;
}
.side a:hover { background: var(--surface); }
.side a[aria-current="page"] { border-left-color: var(--accent); font-weight: 600; color: var(--accent-deep); }

.content { max-width: var(--measure); }
.content > p:first-of-type { font-size: 1.1rem; color: var(--text); }
.content .scene { margin: 1.5rem 0 2rem; border: 1px solid var(--rule); background: #F5F2EA; }

.product-footer {
  max-width: 80rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 2.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  color: var(--muted);
}
.footer-mark { display: block; width: 44px; height: 44px; margin-bottom: 1rem; }
.endorsement { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.6rem; font-weight: 500; font-size: 0.82rem; color: var(--muted); }
.endorsement img { width: 20px; height: 20px; display: block; }
.legal { margin: 0; }
.legal a { color: var(--muted); }

@media (max-width: 56rem) {
  .shell { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 1.25rem; }
  .side ul { position: static; display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; border-bottom: 1px solid var(--rule); padding-bottom: 0.75rem; }
  .side a { border-left: 0; border-bottom: 3px solid transparent; border-radius: 3px 3px 0 0; padding: 0.3rem 0.5rem; }
  .side a[aria-current="page"] { border-bottom-color: var(--accent); }
  h1 { font-size: 1.7rem; }
}

/* Company page */

.company-header { max-width: 60rem; margin: 0 auto; padding: 1.5rem 1.5rem 0; }
.lockup img { display: block; height: 32px; width: auto; }
.company-main { max-width: 40rem; margin: 0 auto; padding: 4rem 1.5rem 3rem; }
.hero { font-size: 2.2rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.015em; margin-bottom: 1.5rem; }
.company-main p { font-size: 1.05rem; }
.products { list-style: none; padding: 0; margin: 1rem 0 0; }
.products li { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem 0; border-top: 1px solid var(--rule); }
.products picture { flex: none; width: 44px; height: 44px; }
.products img { display: block; width: 44px; height: 44px; }
.products .product-name { font-weight: 600; font-size: 1.1rem; margin: 0 0 0.2rem; }
.products p { margin: 0; font-size: 1rem; }
.company-footer {
  max-width: 60rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 2.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  color: var(--muted);
}
.company-footer img { display: block; height: 24px; width: auto; margin-bottom: 0.75rem; }
.company-footer a { color: var(--muted); }

@media (max-width: 40rem) {
  .hero { font-size: 1.7rem; }
  .company-main { padding-top: 2.5rem; }
}
