/* Verida Law — Base styles
 * Reset, typography, link/image defaults, skip-link, focus rings.
 * Component-specific styles live in components.css; page tweaks in pages.css.
 */

/* ---------- Self-hosted fonts ----------
 * Drop Cormorant Garamond (300, 400, 500, 600 + italic 300/400/500)
 * and DM Sans (300, 400, 500, 600) WOFF2 files into src/assets/fonts/.
 * File names below match a flat fonts/ directory.
 */

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/assets/fonts/CormorantGaramond-Light.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/CormorantGaramond-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/CormorantGaramond-Medium.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/CormorantGaramond-SemiBold.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url("/assets/fonts/CormorantGaramond-LightItalic.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/CormorantGaramond-Italic.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/CormorantGaramond-MediumItalic.woff2") format("woff2");
}

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/assets/fonts/DMSans-Light.woff2") format("woff2");
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/DMSans-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/DMSans-Medium.woff2") format("woff2");
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/DMSans-SemiBold.woff2") format("woff2");
}

/* ---------- Reset ---------- */

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

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ---------- Typography ---------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink);
  text-wrap: balance;
}

h1 { font-size: var(--fs-4xl); font-weight: 400; letter-spacing: -0.01em; }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }

p {
  text-wrap: pretty;
  max-width: 70ch;
}

/* ---------- Links ---------- */

a {
  color: var(--green-dark);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  transition: color 120ms ease;
}

a:hover { color: var(--green); }

a:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ---------- Media ---------- */

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

/* ---------- Forms ---------- */

input,
textarea,
select,
button {
  font: inherit;
  color: inherit;
}

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

/* ---------- Lists ---------- */

ul, ol { padding-left: 1.25em; }
li + li { margin-top: 0.35em; }

/* ---------- Skip link ---------- */

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  padding: var(--s-3) var(--s-4);
  background: var(--green);
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  z-index: 9999;
  transform: translateY(-200%);
  transition: transform 150ms ease;
}

.skip-link:focus {
  transform: translateY(0);
  color: var(--white);
}

/* ---------- Focus default (keyboard only) ---------- */

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

/* Remove focus ring for mouse users without breaking accessibility */
:focus:not(:focus-visible) { outline: none; }

/* ---------- Layout primitives ---------- */

.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--s-6);
}

@media (min-width: 860px) {
  .container { padding-inline: var(--s-12); }
}

.section {
  padding: var(--s-16) var(--s-6);
}

@media (min-width: 860px) {
  .section { padding: var(--s-24) var(--s-12); }
}

/* Visually hidden but accessible to screen readers */
.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;
}
