/* Ullr Precision Ltd shared theme.
   Single source: /theme. Run `npm run sync-theme` to copy into site/theme.
   Fonts are self-hosted (SIL OFL 1.1, licences in ./fonts). No third-party requests. */

@font-face { font-family: "Cormorant Garamond"; src: url("fonts/CormorantGaramond-Latin.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("fonts/CormorantGaramond-Italic-Latin.woff2") format("woff2"); font-weight: 300 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-Latin.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/IBMPlexMono-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/IBMPlexMono-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  /* Brand palette. */
  --up-sage: #8B9678;        /* primary: surfaces and bands, never small text on cream (2.3:1) */
  --up-cream: #E5DBC7;       /* page background */
  --up-cream-light: #EAE0CB; /* cards */
  --up-olive-black: #2D2E27; /* body text: 10.0:1 on cream */
  --up-sage-muted: #AAAB93;  /* borders and rules */
  --up-wood: #C6AE93;        /* wood tan: secondary surfaces; links on iron (8.2:1) */
  --up-iron: #1A1A19;        /* footer, dark bands */
  --up-amber: #A87838;       /* accent: rules, focus rings, highlights on dark. NOT text on cream (2.8:1) */

  /* Derived for accessible text (WCAG AA, measured). */
  --up-amber-ink: #7A5626;   /* links/buttons on cream: 4.8:1; cream on it 4.8:1 */
  --up-sage-ink: #4F5644;    /* secondary text on cream: 5.6:1 */

  --up-font-display: "Cormorant Garamond", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --up-font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --up-font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --up-radius: 4px;
  --up-wrap: 1040px;
  --up-rule: 1px solid var(--up-sage-muted);
  --up-ease: cubic-bezier(.2, .7, .2, 1);
}

/* Base */
.up { margin: 0; background: var(--up-cream); color: var(--up-olive-black); font-family: var(--up-font-body); line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.up *, .up *::before, .up *::after { box-sizing: border-box; }
.up h1, .up h2, .up h3, .up .up-display { font-family: var(--up-font-display); font-weight: 600; line-height: 1.1; letter-spacing: .005em; }
.up a { color: var(--up-amber-ink); text-underline-offset: .18em; text-decoration-thickness: 1px; }
.up a:hover { text-decoration-thickness: 2px; }
.up :focus-visible { outline: 2px solid var(--up-amber); outline-offset: 3px; border-radius: 2px; }
.up .up-mono { font-family: var(--up-font-mono); letter-spacing: .04em; }
.up .up-eyebrow { font-family: var(--up-font-mono); font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; color: var(--up-sage-ink); }
.up .up-wrap { max-width: var(--up-wrap); margin: 0 auto; padding: 0 24px; }
.up .up-skip { position: absolute; left: -999px; top: 8px; background: var(--up-iron); color: var(--up-cream); padding: 8px 12px; z-index: 20; }
.up .up-skip:focus { left: 8px; }

/* Header (shared) */
.up-header { background: var(--up-cream); border-bottom: var(--up-rule); }
.up-header .up-wrap { display: flex; align-items: center; gap: 14px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.up-header .up-logo { width: 34px; height: auto; display: block; }
.up-header .up-brand { display: flex; flex-direction: column; text-decoration: none; color: var(--up-olive-black); line-height: 1.15; }
.up-header .up-brand strong { font-family: var(--up-font-display); font-size: 1.4rem; font-weight: 600; letter-spacing: .02em; }
.up-header .up-brand em { font-family: var(--up-font-display); font-style: italic; font-size: .95rem; color: var(--up-sage-ink); }
.up-header nav { margin-left: auto; display: flex; gap: 22px; flex-wrap: wrap; }
.up-header nav a { color: var(--up-olive-black); text-decoration: none; font-size: .92rem; letter-spacing: .03em; padding: 4px 0; border-bottom: 1px solid transparent; }
.up-header nav a:hover { border-bottom-color: var(--up-amber); }

/* Footer (shared) */
.up-footer { background: var(--up-iron); color: var(--up-cream); padding: 36px 0 30px; font-size: .9rem; }
.up-footer a { color: var(--up-wood); }
.up-footer .up-footer-name { font-family: var(--up-font-display); font-size: 1.25rem; font-weight: 600; margin: 0 0 6px; }
.up-footer .up-footer-legal { color: var(--up-sage-muted); }
.up-footer .up-notice-18 { display: inline-block; border: 1px solid var(--up-amber); color: var(--up-cream); padding: 4px 10px; border-radius: var(--up-radius); font-family: var(--up-font-mono); font-size: .78rem; letter-spacing: .06em; }

/* Buttons (shared) */
.up .up-btn { background: var(--up-amber-ink); color: var(--up-cream); border: 1px solid var(--up-amber-ink); border-radius: var(--up-radius); padding: 11px 20px; font: inherit; font-weight: 500; letter-spacing: .03em; cursor: pointer; text-decoration: none; display: inline-block; transition: background .2s var(--up-ease); }
.up .up-btn:hover { background: var(--up-olive-black); border-color: var(--up-olive-black); }
.up .up-btn.up-btn-ghost { background: transparent; color: var(--up-amber-ink); }

@media (prefers-reduced-motion: reduce) {
  .up *, .up *::before, .up *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.up-footer em { font-family: var(--up-font-display); font-size: 1.05em; }
