/*
 * Second Shed — base styles
 * Modern reset (Josh Comeau flavor) + element defaults + @font-face.
 */

/* ---------- @font-face ---------- */
/* Cormorant Garamond — variable serif, 300–700. Self-hosted (SIL OFL). */
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/cormorant-garamond/CormorantGaramond-Variable.woff2")
    format("woff2-variations");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/cormorant-garamond/CormorantGaramond-Italic.woff2")
    format("woff2-variations");
}

/* Inter — variable sans, 100–900. Self-hosted (SIL OFL). */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter/Inter-Variable.woff2")
    format("woff2-variations");
}

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  min-height: 100dvh;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

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

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

p,
li,
dd,
blockquote {
  text-wrap: pretty;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
  overflow-wrap: break-word;
}

#root,
#__next {
  isolation: isolate;
}

/* ---------- typography defaults ---------- */
h1,
.h1,
h2,
.h2,
h3,
.h3,
h4,
.h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-display);
  color: var(--color-text);
}

h1,
.h1 {
  font-size: var(--fs-h1);
}
h2,
.h2 {
  font-size: var(--fs-h2);
  margin-block-start: 0;
}
h3,
.h3 {
  font-size: var(--fs-h3);
}
h4,
.h4 {
  font-size: var(--fs-h4);
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0;
}

.display {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: var(--fs-display);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-display);
}

.lead {
  font-size: var(--fs-lead);
  line-height: var(--lh-snug);
  color: var(--color-text);
  font-weight: 400;
}

small,
.small {
  font-size: var(--fs-small);
}
.xs {
  font-size: var(--fs-xs);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--color-moss-text);
}

p {
  max-width: 70ch;
}

p + p {
  margin-top: var(--space-4);
}

a {
  color: var(--color-link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color var(--motion-fast) var(--ease-out);
}

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

ul,
ol {
  padding-inline-start: 1.25em;
}

li + li {
  margin-top: var(--space-2);
}

hr {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin-block: var(--space-8);
}

/* ---------- focus ---------- */
:focus {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--color-focus-ring);
  outline-offset: 2px;
  border-radius: var(--r-1);
}

/* ---------- selection ---------- */
::selection {
  background: var(--color-moss);
  color: var(--color-stone);
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- visually hidden (a11y) ---------- */
.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 ---------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  background: var(--color-text);
  color: var(--color-stone);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--r-2);
  z-index: 1000;
  text-decoration: none;
}

.skip-link:focus {
  top: var(--space-4);
}
