/* base.css — reset, tokens, baseline typography. Light-theme strict. */

:root {
  color-scheme: light;

  --c-bg:           #F4EFE2;
  --c-surface:      #EBE4D2;
  --c-surface2:     #E0D7C0;
  --c-border:       #C9BFA5;
  --c-border-hi:    #9C8C6E;
  --c-text:         #1F1A14;
  --c-text-dim:     #6B5F4D;
  --c-accent:       #1F4F92;
  --c-accent-hover: #2C5FA5;
  --c-accent-sec:   #B8722C;
  --c-special:      #DBD0B6;
  --c-ink:          #1F1A14;
  --c-error:        #B8362F;
  --c-success:      #4F7A3D;

  --f-heading: 'Cardo', 'EB Garamond', 'Garamond', Georgia, serif;
  --f-body:    'Lexend', 'Atkinson Hyperlegible', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --f-mono:    'Fira Mono', 'Consolas', 'Courier New', monospace;

  --s-4: 0.25rem;
  --s-8: 0.5rem;
  --s-12: 0.75rem;
  --s-16: 1rem;
  --s-24: 1.5rem;
  --s-32: 2rem;
  --s-40: 2.5rem;
  --s-48: 3rem;
  --s-64: 4rem;
  --s-80: 5rem;
  --s-96: 6rem;
  --s-120: 7.5rem;

  --r-sm: 0px;
  --r-md: 2px;
  --r-lg: 4px;

  --ease: cubic-bezier(0.25, 0.1, 0.25, 1.0);
  --dur: 240ms;

  --max-w: 1140px;
  --header-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + var(--s-16));
}

/* Anchored sections compensate for the sticky header so content doesn't hide behind it */
[id] {
  scroll-margin-top: calc(var(--header-h) + var(--s-16));
}

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-body);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--f-heading);
  color: var(--c-text);
  margin: 0 0 var(--s-16);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.005em;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); line-height: 1.15; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); line-height: 1.2; }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.625rem); line-height: 1.3; }
h4 { font-size: 1.1875rem; font-weight: 400; line-height: 1.35; }

p {
  margin: 0 0 var(--s-16);
}

a {
  color: var(--c-accent);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color var(--dur) var(--ease);
}

a:hover {
  color: var(--c-accent-hover);
}

img, svg, picture, video {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  margin: 0 0 var(--s-16);
  padding-left: var(--s-24);
}

strong, b { font-weight: 600; }

hr {
  border: none;
  border-top: 1px solid var(--c-border);
  margin: var(--s-48) 0;
}

input, textarea, select, button {
  font-family: inherit;
  font-size: 1rem;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

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

::selection {
  background: var(--c-accent);
  color: var(--c-bg);
}

.screen-reader-text,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: var(--s-16);
  background: var(--c-accent);
  color: var(--c-bg);
  padding: var(--s-8) var(--s-12);
  text-decoration: none;
  z-index: 1000;
}
.skip-link:focus {
  top: var(--s-8);
  color: var(--c-bg);
}

html[data-lock-scroll="1"],
html[data-lock-scroll="1"] body {
  overflow: hidden;
}
