/* CMylestone landing page. Night desk palette, same as the app. */
:root {
  --ground: #12233B;
  --ground-deep: #0D1A2D;
  --line: #2A3F5E;
  --ink: #E9EDF2;
  --ink-soft: #9AA9BC;
  --gold: #D4AF63;
  --gold-ink: #12233B;
  --warn: #E8A25A;
  --measure: 34rem;
  color-scheme: dark;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 1.0625rem/1.6 "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.bar, main, .foot {
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

/* Top bar */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.25rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.125rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand svg { width: 1.75rem; height: 1.75rem; }
.brand path { fill: none; stroke: var(--gold); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.brand circle { fill: var(--gold); }

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.7rem 1.25rem;
  background: var(--gold);
  color: var(--gold-ink);
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 120ms;
}
.btn:hover { background: #E0C07E; }
.btn-quiet {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
  padding-block: 0.5rem;
}
.btn-quiet:hover { background: var(--ground-deep); }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 27rem);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  padding-block: clamp(3rem, 9vw, 7rem) clamp(3rem, 8vw, 6rem);
}
h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.25rem, 5.2vw, 3.75rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.025em;
  max-width: 14ch;
}
.lede {
  margin: 0 0 2rem;
  max-width: var(--measure);
  color: var(--ink-soft);
  font-size: 1.1875rem;
}

/* The figure sheet: the one bold element on the page. */
.sheet {
  margin: 0;
  background: var(--ground-deep);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  padding: 1.25rem 1.5rem 1.5rem;
  font-variant-numeric: normal; /* Schibsted tabular digits widen commas */
}
.sheet figcaption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}
.sheet-title { font-weight: 600; }
.sheet-note { color: var(--ink-soft); font-size: 0.8125rem; }
.sheet table { width: 100%; border-collapse: collapse; }
.sheet th, .sheet td { padding: 0.6rem 0; vertical-align: top; }
.sheet th { text-align: left; font-weight: 500; padding-right: 1rem; }
.sheet td { text-align: right; white-space: nowrap; }
.sheet .src {
  display: block;
  font-weight: 400;
  font-size: 0.8125rem;
  color: var(--ink-soft);
  margin-top: 0.1rem;
}
.sheet .neg { color: var(--warn); }
.sheet .sub th, .sheet .sub td { border-top: 1px solid var(--line); font-weight: 600; }
.sheet .total th, .sheet .total td { border-top: 1px solid var(--ink-soft); border-bottom: 3px double var(--ink-soft); font-weight: 700; }
.sheet .result th, .sheet .result td { padding-top: 1rem; }
.sheet .result td { color: var(--gold); font-size: 1.625rem; font-weight: 700; line-height: 1.1; }

/* What it does */
.work {
  border-top: 1px solid var(--line);
  padding-block: clamp(3rem, 7vw, 5rem);
}
h2 {
  margin: 0 0 2.5rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.015em;
  max-width: 22ch;
}
.work dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem clamp(2rem, 5vw, 4rem);
}
.work dt { font-weight: 600; font-size: 1.1875rem; margin-bottom: 0.4rem; }
.work dd { margin: 0; color: var(--ink-soft); max-width: var(--measure); }

/* Closing sign-in */
.close {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  border-top: 1px solid var(--line);
  padding-block: 2.5rem;
}
.close p { margin: 0; font-size: 1.25rem; font-weight: 600; }

.foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  padding-block: 1.5rem 2.5rem;
  color: var(--ink-soft);
  font-size: 0.875rem;
}
.foot p { margin: 0; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; }

@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .work dl { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 420px) {
  .sheet { padding-inline: 1rem; }
  .sheet .result td { font-size: 1.375rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
