/* Reset and typography. Mobile first; breakpoints at 768px and 1024px. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: "Jost", "Jost Fallback", system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
}

h1, h2, h3, h4, .type-h1, .type-h2, .type-h3 {
  font-family: "Cormorant Garamond", "Cormorant Fallback", Georgia, serif;
  font-weight: 300;
  line-height: 1.2;
  color: var(--plum);
  overflow-wrap: break-word;
}

h1, .type-h1 { font-size: clamp(2.2rem, 3.8vw, 3.5rem); margin-bottom: 1.5rem; }
h2, .type-h2 { font-size: clamp(1.8rem, 3.2vw, 2.8rem); margin: 2.5rem 0 1rem; }
h3, .type-h3 { font-size: 1.5rem; font-weight: 400; margin-bottom: 0.75rem; }
.type-accent { font-family: "Cormorant Garamond", "Cormorant Fallback", Georgia, serif; font-size: 1.8rem; font-weight: 300; }

p { font-weight: 300; margin-bottom: 1rem; }
strong { font-weight: 600; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
ul[class] { list-style: none; }
main ul:not([class]) { padding-left: 1.25rem; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding-left: max(1.25rem, env(safe-area-inset-left));
  padding-right: max(1.25rem, env(safe-area-inset-right));
}

@media (min-width: 768px) {
  .container {
    padding-left: max(2.5rem, env(safe-area-inset-left));
    padding-right: max(2.5rem, env(safe-area-inset-right));
  }
}

/* Visible focus everywhere; the colour changes on dark backgrounds. */
:focus-visible { outline: 3px solid var(--plum); outline-offset: 2px; }
.site-header :focus-visible,
.site-footer :focus-visible,
.section--dark :focus-visible { outline-color: var(--gold-light); }
main:focus-visible { outline-offset: -3px; }

.nowrap { white-space: nowrap; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 300;
  padding: 0.75rem 1rem;
  background: var(--white);
  color: var(--plum);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
