/* =============================================================
   SORVATIS — DESIGN TOKENS
   Layer 2 design system. Authored under the Visual Identity Brief
   (Locked 7 May 2026). Governs every visual surface.

   This file is the source of truth. It is not derived from app.html.
   Surface implementations consume these tokens; they do not redefine them.

   Base rules at the bottom of this file are included for future
   adoption and must not be linked into production until the
   migration pass begins.

   Editing rule: tokens change only when the Visual Identity Brief
   changes. The brief changes only when the constitutional position
   beneath it changes. That should be rare.
   ============================================================= */

:root {

  /* COLOR — warm light register, canonical */
  --paper:           #F2ECE2;
  --paper-deep:      #ECE5D9;
  --paper-edge:      #E4DCCE;

  --ink:             #2B2620;
  --ink-soft:        #5C534A;
  --ink-faint:       #8A8174;

  --gold:            #8A6E3C;
  --gold-deep:       #6B5530;

  /* DARK REGISTER — conditional, not canonical */
  --dark:            #1F1B17;
  --dark-paper:      #2A2520;
  --dark-ink:        #E8DFD0;
  --dark-ink-soft:   #B3A992;
  --dark-gold:       #C9A867;
  --dark-gold-bright: #E8CF8B;
  --dark-ink-faint:  #9A8E78;

  /* TYPOGRAPHY */
  --font-serif:      'Spectral', 'Iowan Old Style', Georgia, serif;
  --font-sans:       'Inter', system-ui, -apple-system, sans-serif;

  --text-xs:         12px;
  --text-sm:         14px;
  --text-base:       16px;
  --text-lg:         18px;
  --text-xl:         22px;
  --text-2xl:        26px;
  --text-3xl:        32px;

  --leading-tight:   1.3;
  --leading-base:    1.55;
  --leading-loose:   1.7;

  --tracking-tight:  -0.01em;
  --tracking-base:   0;
  --tracking-wide:   0.04em;

  --weight-regular:  400;
  --weight-medium:   500;

  /* SPACING — density gradient */
  --space-1:         4px;
  --space-2:         8px;
  --space-3:         12px;
  --space-4:         16px;
  --space-5:         24px;
  --space-6:         32px;
  --space-8:         48px;
  --space-10:        64px;
  --space-12:        96px;
  --space-16:        144px;

  --page-padding-outward:    var(--space-4);
  --page-padding-threshold:  var(--space-5);
  --page-padding-encounter:  var(--space-5);
  --page-padding-dream:      var(--space-6);

  --gutter-outward:          var(--space-3);
  --gutter-threshold:        var(--space-4);
  --gutter-encounter:        var(--space-5);
  --gutter-dream:            var(--space-6);

  /* MOTION — never impatient */
  --ease-quiet:      cubic-bezier(0.4, 0.0, 0.2, 1);
  --ease-return:     cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-settle:     cubic-bezier(0.0, 0.0, 0.2, 1);

  --duration-instant: 120ms;
  --duration-quick:   240ms;
  --duration-base:    400ms;
  --duration-slow:    720ms;
  --duration-settle:  1200ms;

  /* ILLUMINATION */
  --glow-none:        none;
  --glow-soft:        0 1px 2px rgba(43, 38, 32, 0.06);
  --glow-attention:   0 2px 6px rgba(43, 38, 32, 0.08);
  --glow-elevation:   0 4px 12px rgba(43, 38, 32, 0.10);

  --gold-glow-soft:   0 0 12px rgba(138, 110, 60, 0.15);

  /* RADIUS — harsh, deliberate */
  --radius-none:      0;
  --radius-soft:      0;
  --radius-base:      2px;
  --radius-pill:      999px;

  /* HIERARCHY — three voices, no more */
  --level-primary-color:    var(--ink);
  --level-primary-size:     var(--text-lg);
  --level-primary-weight:   var(--weight-regular);

  --level-secondary-color:  var(--ink-soft);
  --level-secondary-size:   var(--text-base);
  --level-secondary-weight: var(--weight-regular);

  --level-tertiary-color:   var(--ink-faint);
  --level-tertiary-size:    var(--text-sm);
  --level-tertiary-weight:  var(--weight-regular);

  /* BORDERS */
  --border-hairline:        0.5px solid var(--paper-edge);
  --border-base:            1px solid var(--paper-edge);
  --border-attention:       1px solid var(--ink-faint);

}

/* BASE RULES — commented out until final migration step
   These activate the canonical register globally. Each surface
   must be migrated individually first. Re-enable only after
   all surfaces are explicitly migrated.

html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: var(--text-base);
  line-height: var(--leading-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--gold);
  color: var(--paper);
}
*/
