/* Loxworth Data Room: design tokens and base styles.
   Every value here is a decision. Change it here, not in a page. */

@font-face { font-family: "Sofia Pro"; src: url("/public/fonts/sofia-pro-300.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Sofia Pro"; src: url("/public/fonts/sofia-pro-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Sofia Pro"; src: url("/public/fonts/sofia-pro-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("/public/fonts/fraunces-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

/* theme:light */
:root {
  color-scheme: light;
  /* Surfaces: paper, not white. */
  --paper: #fbfaf5;
  --paper-2: #f5f1e6;      /* side panel, table header, hover */
  --paper-3: #ece7d8;      /* pressed, selected row edge */
  --line: #e2dccb;         /* hairlines */
  --line-strong: #cfc7b1;
  --field: #ffffff;        /* inside a text box */
  --raised: #ffffff;       /* a card that sits on the paper */

  /* Ink: forest, never pure black. */
  --ink: #15281d;
  --ink-2: #3d4d43;        /* secondary text */
  --ink-3: #5a665e;        /* captions, column headers */

  /* One accent, used for the thing to do next. */
  --forest: #1d4a33;
  --forest-press: #143524;
  --on-accent: #ffffff;    /* text on the accent */
  --gold: #c9a24e;         /* brand mark and rare emphasis only */
  --gold-ink: #7a5c1a;

  /* Meaning. Muted on purpose; state is carried by words as well as colour. */
  --ok: #2a6240;
  --ok-bg: #e9efe2;
  --warn: #7d500c;
  --warn-bg: #f6ecd2;
  --stop: #963021;
  --stop-bg: #f5e2dc;
  --select: #d9e6cf;       /* selected text */
  --stage: #101a14;        /* behind a file being looked at */
  --shade: rgba(21, 40, 29, 0.16);
  --veil: rgba(21, 40, 29, 0.3);

  /* File kinds: one small coloured part per icon, so a list can be scanned by kind. */
  --k-pdf: #a8392b;
  --k-doc: #2d5d9a;
  --k-sheet: #2a6f45;
  --k-slides: #a85a14;
  --k-image: #73479a;
  --k-video: #9a3d6a;
  --k-sound: #1f7281;
  --k-archive: #6d6245;
  --k-mail: #2d5d9a;
  --k-code: #4f5a8c;
  --k-drawing: #94631a;
  --k-font: #5a665e;
}
/* theme:end */

/* The dark theme, built from the brand: deep forest, paper text, gold for the thing to do next.
   It follows the computer's setting unless the person chose a theme in Settings. The two blocks
   below must stay the same; a test compares them. */
/* theme:dark */
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #111c16;
  --paper-2: #18261e;
  --paper-3: #213428;
  --line: #2a3f32;
  --line-strong: #3d5747;
  --field: #0c1510;
  --raised: #16231b;
  --ink: #f3efe2;
  --ink-2: #c9d0c3;
  --ink-3: #9aa69c;
  --forest: #d3b266;
  --forest-press: #e2c887;
  --on-accent: #15281d;
  --gold: #d3b266;
  --gold-ink: #e0c684;
  --ok: #93d3ab;
  --ok-bg: #1b3526;
  --warn: #e9c67c;
  --warn-bg: #3a2f14;
  --stop: #f2a898;
  --stop-bg: #43201a;
  --select: #2f4f3d;
  --stage: #0a110d;
  --shade: rgba(0, 0, 0, 0.45);
  --veil: rgba(0, 0, 0, 0.55);
  --k-pdf: #f0907f;
  --k-doc: #8db7ee;
  --k-sheet: #86cfa1;
  --k-slides: #eba968;
  --k-image: #c5a1e6;
  --k-video: #ea9cc2;
  --k-sound: #7ccbd8;
  --k-archive: #cdbf93;
  --k-mail: #8db7ee;
  --k-code: #aab3e6;
  --k-drawing: #e3b565;
  --k-font: #9aa69c;
}
/* theme:end */
@media (prefers-color-scheme: dark) {
  /* theme:dark-auto */
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #111c16;
    --paper-2: #18261e;
    --paper-3: #213428;
    --line: #2a3f32;
    --line-strong: #3d5747;
    --field: #0c1510;
    --raised: #16231b;
    --ink: #f3efe2;
    --ink-2: #c9d0c3;
    --ink-3: #9aa69c;
    --forest: #d3b266;
    --forest-press: #e2c887;
    --on-accent: #15281d;
    --gold: #d3b266;
    --gold-ink: #e0c684;
    --ok: #93d3ab;
    --ok-bg: #1b3526;
    --warn: #e9c67c;
    --warn-bg: #3a2f14;
    --stop: #f2a898;
    --stop-bg: #43201a;
    --select: #2f4f3d;
    --stage: #0a110d;
    --shade: rgba(0, 0, 0, 0.45);
    --veil: rgba(0, 0, 0, 0.55);
    --k-pdf: #f0907f;
    --k-doc: #8db7ee;
    --k-sheet: #86cfa1;
    --k-slides: #eba968;
    --k-image: #c5a1e6;
    --k-video: #ea9cc2;
    --k-sound: #7ccbd8;
    --k-archive: #cdbf93;
    --k-mail: #8db7ee;
    --k-code: #aab3e6;
    --k-drawing: #e3b565;
    --k-font: #9aa69c;
  }
  /* theme:end */
}

:root {
  --font: "Sofia Pro", "Segoe UI", system-ui, -apple-system, sans-serif;
  --serif: "Fraunces", Georgia, serif;

  /* Type scale: five sizes, no more. */
  --t-xs: 0.75rem;         /* 12 column headers, captions */
  --t-sm: 0.8125rem;       /* 13 secondary */
  --t-md: 0.9375rem;       /* 15 body and rows */
  --t-lg: 1.125rem;        /* 18 section titles */
  --t-xl: 1.5rem;          /* 24 page title */

  /* Spacing: multiples of 4. */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;

  /* Radius by role: controls 6, panels 10. Nothing rounder. */
  --r-control: 6px;
  --r-panel: 10px;

  /* The page frame: content uses the full width up to --frame, then centres, with --gut at each side. */
  --frame: 1680px;
  --gut: 24px;
  --edge: max(var(--gut), calc((100% - var(--frame)) / 2));
  --row: 44px;             /* list row height on a computer */
  --row-touch: 56px;       /* on a phone */
  --tr: 44px;              /* a line in a table of people, links, sign-ins */

  /* Motion: three durations and two curves. Quick for a press, the middle one for things that
     arrive or leave, the long one for a sheet or a tick drawing itself. The second curve settles
     like something with a little weight; it never passes its target by more than two in a hundred. */
  --m1: 120ms;
  --m2: 200ms;
  --m3: 320ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --spring: cubic-bezier(0.3, 1.06, 0.5, 1);
  --quick: var(--m1);      /* the names the first screens used */
  --calm: var(--m2);
}
/* Compact: more rows on the screen for people who live in long lists. */
:root[data-density="compact"] { --row: 36px; --tr: 36px; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--t-md)/1.45 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: var(--t-xl); font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
h2 { font-size: var(--t-lg); font-weight: 600; line-height: 1.3; }
a { color: var(--forest); text-underline-offset: 2px; }
a:hover { color: var(--forest-press); }
:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; border-radius: 3px; }
::selection { background: var(--select); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  height: 36px; padding: 0 var(--s4);
  border: 1px solid var(--line-strong); border-radius: var(--r-control);
  background: var(--paper); color: var(--ink);
  font: 600 var(--t-sm)/1 var(--font); text-decoration: none; cursor: pointer;
  transition: background var(--m1) var(--ease), border-color var(--m1) var(--ease), transform var(--m1) var(--ease);
}
.btn:hover { background: var(--paper-2); color: var(--ink); }
.btn:active { background: var(--paper-3); transform: scale(0.97); }
.btn-primary { background: var(--forest); border-color: var(--forest); color: var(--on-accent); }
.btn-primary:hover { background: var(--forest-press); border-color: var(--forest-press); color: var(--on-accent); }
.btn-primary:active { background: var(--forest-press); }

.field {
  width: 100%; height: 40px; padding: 0 var(--s3);
  border: 1px solid var(--line-strong); border-radius: var(--r-control);
  background: var(--field); color: var(--ink); font: 400 1rem/1 var(--font); /* 16px stops phones zooming in */
  transition: border-color var(--m1) var(--ease), box-shadow var(--m1) var(--ease);
}
.field:focus-visible { outline-offset: 0; border-color: var(--forest); }

/* The Loxworth lockup as drawn (emblem and name), then the product name in the same typeface.
   The lockup comes in two inks; the page shows the one that reads on its background. */
.wordmark { display: inline-flex; align-items: center; gap: var(--s3); color: var(--ink); text-decoration: none; white-space: nowrap; }
.wordmark img { height: 26px; width: auto; flex: none; }
.wordmark i { padding-left: var(--s3); border-left: 1px solid var(--line-strong); color: var(--ink-2); font: normal 300 1.0625rem/26px var(--font); letter-spacing: 0.01em; }
.on-dark { display: none; }
:root[data-theme="dark"] .on-dark { display: inline; }
:root[data-theme="dark"] .on-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .on-dark { display: inline; }
  :root:not([data-theme="light"]) .on-light { display: none; }
}

.note { padding: var(--s3) var(--s4); border-radius: var(--r-control); font-size: var(--t-sm); }
.note-stop { background: var(--stop-bg); color: var(--stop); }
.note-warn { background: var(--warn-bg); color: var(--warn); }
[hidden] { display: none !important; }

/* Motion is off when the computer asks for less of it, or when the person said so in Settings. */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
:root[data-motion="off"] *, :root[data-motion="off"] *::before, :root[data-motion="off"] *::after { transition: none !important; animation: none !important; }
