/* =============================================================================
   Nithidesk — marketing site
   =============================================================================

   No webfont, by design. The page copy states that it loads nothing from
   anyone else's server, and a Google Fonts <link> would make that false — it
   discloses the visitor's IP and User-Agent to a third party on every view,
   which is exactly the claim being made about the products.

   So: system faces only. A serif for display, the platform UI sans for text,
   and a mono for the small data-ish labels.
   ========================================================================== */

:root {
  /* Ground and surfaces. The neutral is warmed very slightly toward the gold
     rather than a flat grey, so white panels read as paper on it. */
  --ground: #f3f2f2;
  --surface: #ffffff;
  --surface-2: #ebe9e6;

  /* Ink. Headings take the navy from the mark; body text is softer so a long
     privacy policy is not shouted. */
  --ink: #16233f;
  --body: #33383d;
  --muted: #6a7078;

  --rule: #dcd9d4;
  --rule-strong: #c4c0b8;

  --accent: #a97d1c;        /* gold, darkened for text contrast on paper */
  --accent-mark: #c8992f;   /* gold as it appears in the mark */
  --accent-soft: #f6efdd;

  --shadow: 0 1px 2px rgba(22, 35, 63, 0.05), 0 12px 28px -18px rgba(22, 35, 63, 0.18);

  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Code", "Cascadia Mono", ui-monospace, "SF Mono", Consolas, "Liberation Mono", monospace;

  --measure: 68ch;
  --gutter: clamp(1.15rem, 4vw, 2.5rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #10151f;
    --surface: #161d2b;
    --surface-2: #1e2736;

    --ink: #e8ecf3;
    --body: #c3cad6;
    --muted: #8b95a5;

    --rule: #26303f;
    --rule-strong: #37445a;

    /* Lightened for contrast on the dark ground; the mark keeps its own gold. */
    --accent: #dfb455;
    --accent-mark: #c8992f;
    --accent-soft: #1d2434;

    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 28px -18px rgba(0, 0, 0, 0.7);
  }
}

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  /* Explicit, not inherited. A transparent body borrows whatever ground the
     browser or an embedding view paints. */
  background: var(--ground);
  color: var(--body);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── Skip link ─────────────────────────────────────────────────────────── */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--surface);
  padding: 0.75rem 1.1rem;
  border-radius: 0 0 4px 0;
  font-size: 0.9rem;
}
.skip:focus { left: 0; }

/* ── Layout ────────────────────────────────────────────────────────────── */
.wrap {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(3.25rem, 7vw, 5.5rem);
  border-top: 1px solid var(--rule);
}
.section--tight { padding-block: clamp(2rem, 4vw, 3rem); border-top: 0; }

.section__head { max-width: var(--measure); }
.section__head h2 { margin: 0.35rem 0 0.75rem; }
.section__head p { margin: 0; color: var(--muted); }

.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.85rem; }
.mt-5 { margin-top: 2rem; }

/* ── Type ──────────────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.2;
  text-wrap: balance;
  margin: 0;
}
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); letter-spacing: -0.012em; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }

.display {
  font-size: clamp(2.1rem, 5.4vw, 3.5rem);
  letter-spacing: -0.021em;
  line-height: 1.08;
}

.lede {
  font-size: clamp(1.04rem, 1.9vw, 1.2rem);
  color: var(--body);
  max-width: var(--measure);
  margin: 1.15rem 0 0;
}

/* Uppercase eyebrow. Letter-spacing is doing the work here — uppercase without
   it reads as shouting rather than as a label. */
.kicker {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.kicker--accent { color: var(--accent); }

.micro { font-size: 0.82rem; color: var(--muted); }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--surface-2);
  padding: 0.1em 0.34em;
  border-radius: 3px;
}

/* ── Masthead ──────────────────────────────────────────────────────────── */
.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--rule);
}
@supports not (backdrop-filter: blur(1px)) {
  .masthead { background: var(--ground); }
}

.masthead__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 62px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--serif);
  font-size: 1.16rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark__mark { width: 26px; height: 26px; display: block; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.7rem, 2.2vw, 1.5rem);
  font-size: 0.92rem;
}
.nav a { color: var(--body); text-decoration: none; }
.nav a:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 560px) {
  .nav__hide-sm { display: none; }
}

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero { padding-block: clamp(3rem, 8vw, 6rem) clamp(1.5rem, 4vw, 2.5rem); }
.hero__rule {
  width: 62px;
  height: 3px;
  background: var(--accent-mark);
  border-radius: 2px;
  margin-bottom: 1.6rem;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 2rem;
}

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.62rem 1.15rem;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--ink);
  color: var(--ground);
  font-family: var(--sans);
  font-size: 0.93rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: transparent; color: var(--ink); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-strong);
}
.btn--ghost:hover { border-color: var(--ink); background: var(--surface); color: var(--ink); }

/* ── Panels ────────────────────────────────────────────────────────────── */
.panel {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 5px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel__head {
  padding: 1.15rem 1.35rem;
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
}
.panel__head--split {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.panel__body { padding: 0 1.35rem 1.35rem; }
.panel__body p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* ── Products ──────────────────────────────────────────────────────────── */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.15rem;
}

.product { display: flex; flex-direction: column; }
.product__title { font-size: 1.42rem; margin-top: 0.2rem; letter-spacing: -0.012em; }
.product__body { display: flex; flex-direction: column; flex: 1; }

/* The one-sentence claim. Set larger than the supporting copy and against a
   tinted ground so the two are not read as one paragraph. */
.product__claim {
  margin: 0;
  padding: 1.15rem 1.35rem;
  font-family: var(--serif);
  font-size: 1.06rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--accent-soft);
  border-bottom: 1px solid var(--rule);
}

.product__meta { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; }

.product__actions {
  margin-top: auto;
  padding: 1.15rem 1.35rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  background: var(--surface);
}

/* ── Badges ────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.28em 0.6em;
  border-radius: 3px;
  background: var(--surface-2);
  color: var(--body);
  white-space: nowrap;
}
/* Status, not decoration: gold marks a stage the product is in. */
.badge--inert {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  font-weight: 600;
}

/* ── Feature rows ──────────────────────────────────────────────────────── */
/* Hairline-separated rows rather than a grid of cards: the entries are prose of
   uneven length, and a card grid would leave ragged whitespace under the short
   ones. */
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li {
  padding: 1.15rem 1.35rem;
  border-top: 1px solid var(--rule);
}
.rows > li:first-child { border-top: 0; }
.rows h4 { margin: 0 0 0.3rem; }
.rows p { margin: 0; font-size: 0.95rem; max-width: 72ch; }

/* A left rule, not a coloured background: the row is emphasis, not a warning,
   and a tinted block would read as an error state. */
.rows > li.is-urgent {
  border-left: 3px solid var(--accent-mark);
  background: color-mix(in srgb, var(--accent-soft) 55%, transparent);
}

/* ── Notices ───────────────────────────────────────────────────────────── */
.notice {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent-mark);
  border-radius: 4px;
  background: var(--surface);
  padding: 1.1rem 1.3rem;
  max-width: var(--measure);
}
.notice p { margin: 0.4rem 0 0; font-size: 0.95rem; }
.notice p:first-child { margin-top: 0; }
.notice--inert { background: var(--surface); }

/* ── Prose (privacy policy) ────────────────────────────────────────────── */
.prose { max-width: var(--measure); }
.prose h2 {
  margin-top: 2.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
  scroll-margin-top: 84px;
}
.prose h3 { margin-top: 1.7rem; scroll-margin-top: 84px; }
.prose p, .prose ul, .prose ol { margin: 0.8rem 0 0; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-top: 0.35rem; }
.prose li > strong { color: var(--ink); }

/* Definition-style list for the data tables in the policy. */
.deflist { margin: 1rem 0 0; }
.deflist > div {
  display: grid;
  grid-template-columns: minmax(9rem, 15rem) 1fr;
  gap: 0.4rem 1.4rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--rule);
}
.deflist dt { font-weight: 600; color: var(--ink); font-size: 0.95rem; }
.deflist dd { margin: 0; font-size: 0.95rem; color: var(--body); }
@media (max-width: 620px) {
  .deflist > div { grid-template-columns: 1fr; gap: 0.2rem; }
}

/* Table of contents. */
.toc {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 1.1rem 1.35rem;
  margin-top: 1.75rem;
  box-shadow: var(--shadow);
}
.toc ol {
  margin: 0.6rem 0 0;
  padding-left: 1.2rem;
  columns: 2;
  column-gap: 2rem;
  font-size: 0.93rem;
}
@media (max-width: 620px) { .toc ol { columns: 1; } }
.toc li { margin-top: 0.25rem; break-inside: avoid; }

/* Wide content must scroll inside its own box, never the page body. */
.scroll-x { overflow-x: auto; }

/* ── Footer ────────────────────────────────────────────────────────────── */
.foot {
  border-top: 1px solid var(--rule-strong);
  background: var(--surface);
  padding-block: clamp(2.25rem, 5vw, 3.25rem) 1.5rem;
  margin-top: clamp(2rem, 5vw, 4rem);
}
.foot__grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 1.75rem;
}
@media (max-width: 780px) {
  .foot__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 460px) {
  .foot__grid { grid-template-columns: 1fr; }
}
.foot h4 {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.6rem;
}
.foot ul { list-style: none; margin: 0; padding: 0; font-size: 0.92rem; }
.foot li { margin-top: 0.35rem; }
.foot a { color: var(--body); text-decoration: none; }
.foot a:hover { color: var(--accent); text-decoration: underline; }

.foot__brand { font-size: 1.08rem; }
.foot__tagline { margin: 0.6rem 0 0; max-width: 26ch; }

.foot__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 2.25rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--rule);
}

/* ── Print ─────────────────────────────────────────────────────────────── */
/* A privacy policy gets printed and filed. */
@media print {
  .masthead, .skip, .toc, .hero__actions, .btn { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .panel, .notice, .foot { box-shadow: none; border-color: #999; }
  a { color: #000; text-decoration: underline; }
  .prose h2, .prose h3 { break-after: avoid; }
  .rows > li, .deflist > div { break-inside: avoid; }
}
