/* aifredas.lt static site: shared look for every page.
   The site has its own colours and fonts; it does not use the application's
   kit tokens. Page stylesheets (home.css, pages.css, workflow.css) build on this. */

/* Headline serif: a Latin subset of Charis SIL (see fonts/NOTICE.txt). */
@font-face {
  font-family: "Aifredas Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/aifredas-serif-regular.woff2?v=ledger-20261113") format("woff2");
}

:root {
  color-scheme: light;
  --sans: "Helvetica Neue", Helvetica, Arial, system-ui, "Segoe UI", sans-serif;
  --display: "Aifredas Serif", Charter, "Bitstream Charter", Georgia, serif;
  --h-track: -0.022em;
  --h-lead: 1.08;

  --navy: oklch(0.255 0.062 255);
  --navy-line: oklch(0.42 0.06 255);
  --on-navy: oklch(0.965 0.008 255);
  --on-navy-soft: oklch(0.84 0.028 255);
  --on-navy-faint: oklch(0.68 0.045 255);
  --signal: oklch(0.8 0.1 245);

  --paper: oklch(0.988 0.003 255);
  --ink: oklch(0.21 0.035 260);
  --ink-soft: oklch(0.36 0.03 260);
  --rule: oklch(0.87 0.012 255);
  --blue: oklch(0.5 0.2 262);

  --edge: clamp(1.5rem, 7vw, 6.25rem);
  --gutter: min(2rem, calc(var(--edge) - 0.75rem));
  --bar-height: 4.5rem;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* A zone is a full-width band of one ground colour. Everything inside reads
   its colours from these roles, so a component looks right on either ground. */
[data-zone="paper"], [data-theme="paper"] {
  --bg: var(--paper); --fg: var(--ink); --fg-soft: var(--ink-soft); --fg-faint: var(--ink-soft);
  --line: var(--rule); --tick: oklch(0.7 0.02 255); --accent: var(--blue);
}
[data-zone="navy"], [data-theme="navy"] {
  --bg: var(--navy); --fg: var(--on-navy); --fg-soft: var(--on-navy-soft); --fg-faint: var(--on-navy-faint);
  --line: var(--navy-line); --tick: var(--on-navy-faint); --accent: var(--signal);
}
[data-zone] { background: var(--bg); color: var(--fg); }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; -webkit-text-size-adjust: 100%; }
body { font-family: var(--sans); background: var(--paper); color: var(--ink); line-height: 1.55; }
a { color: inherit; }
ul, ol { list-style: none; }
::selection { background: oklch(0.8 0.1 245 / 0.4); }
[id] { scroll-margin-top: var(--bar-height); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

h1, h2, .mark, .rows dt {
  font-family: var(--display); font-weight: 400; font-synthesis: none;
}
h1 { font-size: clamp(2.5rem, 4.2vw, 3.75rem); line-height: var(--h-lead); letter-spacing: var(--h-track); text-wrap: balance; }
h2 { font-size: clamp(1.875rem, 2.7vw, 2.5rem); line-height: 1.12; letter-spacing: var(--h-track); text-wrap: balance; }

.lede { margin-top: 1.75rem; max-width: 30em; font-size: 1.1875rem; line-height: 1.6; color: var(--fg-soft); text-wrap: pretty; }

.skip { position: absolute; left: -999rem; top: 0; z-index: 10; padding: 0.75rem 1rem; background: var(--paper); color: var(--ink); }
.skip:focus { left: 0; }

.wrap { max-width: 82rem; margin: 0 auto; padding: 0 var(--edge); position: relative; }

/* Ledger margin: one hairline in the gutter, a tick at each heading. Text keeps a single left edge. */
.ledger { position: absolute; left: calc(var(--edge) - var(--gutter)); top: 0; bottom: 0; width: 1px; background: var(--line); }
.tick { position: relative; }
.tick::before {
  content: ""; position: absolute; left: calc(var(--gutter) * -1); top: 0.62em;
  width: calc(var(--gutter) * 0.44); height: 1px; background: var(--tick);
  transition: width 500ms var(--ease-out), background-color 300ms ease;
}
.tick.is-current::before { width: calc(var(--gutter) * 0.69); background: var(--accent); }

/* One label style and one link style. */
.label { font-size: 0.875rem; font-weight: 500; color: var(--accent); }
.link {
  font-size: 0.9375rem; font-weight: 500; text-decoration: underline;
  text-decoration-thickness: 1px; text-underline-offset: 0.4em; white-space: nowrap;
}
:where(a, button):focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

/* ---------- Sticky bar: takes the colour of the zone beneath it ---------- */
.site-bar { position: sticky; top: 0; z-index: 5; background: var(--bg); color: var(--fg); transition: background-color 320ms ease, color 320ms ease; }
.site-bar .ledger { transition: background-color 320ms ease; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1.375rem 0 1.25rem; border-bottom: 1px solid var(--line); transition: border-color 320ms ease; }
.mark { display: inline-flex; align-items: center; gap: 0.4em; font-size: 1.625rem; letter-spacing: -0.005em; text-decoration: none; line-height: 1; }
/* The mark: the ledger margin line with one tick, the same sign that sits beside every heading. */
.glyph { width: 0.7em; height: 1.05em; flex: none; overflow: visible; }
.glyph line { stroke: currentColor; stroke-width: 1.5; }
.glyph .g-tick { stroke: var(--accent); transition: stroke 320ms ease; }
.nav a { position: relative; font-size: 0.9375rem; text-decoration: none; color: var(--fg-soft); transition: color 200ms ease; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -0.45em; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 260ms var(--ease-out); }
.nav a:hover { color: var(--fg); }
.nav a:hover::after { transform: scaleX(1); }

/* A button that reads as a link (the copy-address control). */
button.link { padding: 0; border: 0; background: none; color: inherit; font-family: inherit; line-height: inherit; cursor: pointer; }

/* ---------- Heading beside a ruled list ---------- */
.section > .wrap { padding-top: 7rem; padding-bottom: 7rem; }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(3rem, 7vw, 7rem); row-gap: 3rem; align-items: stretch; }
.split-head { display: flex; flex-direction: column; align-items: flex-start; }
.split-head p { margin-top: 1.5rem; max-width: 26em; font-size: 1.0625rem; line-height: 1.65; color: var(--fg-soft); text-wrap: pretty; }
.split-head .link { display: inline-block; margin-top: auto; padding-top: 2.5rem; padding-bottom: 1.35rem; }
.rows { border-top: 1px solid var(--line); }
.rows > div { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 1.5rem; padding: 1.35rem 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.rows dt { font-size: 1.25rem; line-height: 1.3; letter-spacing: -0.01em; }
.rows dd { font-size: 1rem; line-height: 1.6; color: var(--fg-soft); }

/* The contact address, on the home contact block and the inner-page closing notes. */
.email { display: inline-block; font-family: var(--display); font-weight: 400; font-synthesis: none; font-size: clamp(1.625rem, 2.5vw, 2.125rem); line-height: 1.2; letter-spacing: var(--h-track); color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.email:hover, .email:focus-visible { color: var(--blue); }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--rule); }
.foot .wrap { padding-top: 3.5rem; padding-bottom: 6rem; }
.foot-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2.5rem 4rem; }
.foot .mark { margin-bottom: 1.5rem; }
.colophon { font-size: 0.875rem; line-height: 1.9; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.colophon > span { display: inline-block; }
.colophon > span:not(:last-child) { margin-right: 1.5em; }
.colophon a { color: var(--blue); text-decoration: none; }
.colophon a:hover { text-decoration: underline; text-underline-offset: 0.3em; }
.foot-links { display: grid; grid-template-columns: repeat(2, auto); gap: 0.875rem 4rem; align-content: start; font-size: 0.875rem; }
.foot-links a { color: var(--ink-soft); text-decoration: none; }
.foot-links a:hover { color: var(--ink); }

@media (max-width: 60rem) {
  .section > .wrap { padding-top: 5rem; padding-bottom: 5rem; }
  .split { grid-template-columns: 1fr; }
  .split-head .link { margin-top: 0; padding-bottom: 0; }
  .rows > div { grid-template-columns: 1fr; gap: 0.25rem; }
}
@media (max-width: 30rem) {
  .foot-links { grid-template-columns: 1fr; }
}
