/*
 * Base layer: reset, document defaults and accessibility helpers.
 * Loaded before style.css so the original cascade order is preserved.
 *
 * Fonts: the design uses "Inter" (body) and "Cormorant Garamond" (headings).
 * No web-font files are requested from external servers. If the families are
 * installed on the visitor's device they are used; otherwise the fallback
 * stacks defined in style.css apply. To self-host the original fonts, place
 * the .woff2 files in /fonts and declare them here with @font-face.
 */

html {
  line-height: 1.15;
  font-family: var(--font-family-body);
  font-size: 1rem;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.01em;
  line-height: 1.6;
  color: var(--color-on-surface);
  background: var(--color-surface);
  fill: var(--color-on-surface);
}

* {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  -webkit-font-smoothing: antialiased;
}

p,
li,
ul,
ol,
pre,
div,
h1,
h2,
h3,
h4,
h5,
h6,
figure,
blockquote,
figcaption {
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
h4 {
  overflow-wrap: break-word;
}

address {
  font-style: normal;
}

button {
  background-color: transparent;
}

button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: 1.15;
  margin: 0;
}

button,
select {
  text-transform: none;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
  -webkit-appearance: button;
  appearance: button;
  color: inherit;
}

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
  border-style: none;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: inherit;
}

pre {
  white-space: normal;
}

input {
  padding: 2px 4px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

details {
  display: block;
  margin: 0;
  padding: 0;
}

summary {
  cursor: pointer;
}

summary::-webkit-details-marker {
  display: none;
}

/* Links whose visual box is drawn by the inner element */
.link-contents {
  display: contents;
}

/* Keyboard focus */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-primary, #70735e);
  outline-offset: 2px;
}

.link-contents:focus-visible > * {
  outline: 2px solid var(--color-primary, #70735e);
  outline-offset: 4px;
}

[tabindex="-1"]:focus-visible {
  outline: none;
}

/* Skip link */
.skip-link {
  position: fixed;
  top: -100px;
  left: 8px;
  z-index: 100000;
  padding: 10px 16px;
  border-radius: 0 0 6px 6px;
  background: var(--color-primary, #70735e);
  color: var(--color-on-primary, #ffffff);
  font: 600 14px/1.2 system-ui, -apple-system, "Segoe UI", sans-serif;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
