/* Reset + base typography */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  scroll-behavior: smooth;
  /* keeps anchored sections (#dates, #stay-close…) clear of the sticky header */
  scroll-padding-top: var(--space-6);
}

::selection {
  background-color: var(--color-clay);
  color: var(--color-cream);
}

/* Brand-colored focus ring for keyboard navigation. Only :focus-visible,
   so mouse clicks stay clean. Form fields keep their own focus styling. */
:focus-visible {
  outline: 2px solid var(--color-clay);
  outline-offset: 3px;
}

input:focus-visible,
textarea:focus-visible {
  outline: none;
}

/* Keyboard-accessible "skip to content" link: visually hidden until focused. */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-2);
  z-index: 300;
  padding: 0.6em 1.2em;
  background-color: var(--color-ink);
  color: var(--color-cream);
  border-radius: 4px;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

/* Soft crossfade between pages in browsers that support cross-document
   view transitions; older browsers simply navigate as usual. */
@media not (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: auto;
  }
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: 300;
  line-height: var(--lh-body);
  color: var(--color-ink);
  background-color: var(--color-cream);
  -webkit-font-smoothing: antialiased;
}

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

/* Two type registers: Cormorant Garamond for page and section titles,
   Montserrat for the smaller card headings so they stay easy to read. */
h1,
h2,
h3,
h4 {
  line-height: var(--lh-heading);
  color: var(--color-ink);
  text-wrap: balance;
}

h1,
h2 {
  font-family: var(--font-display);
  font-variant-numeric: lining-nums;
}

h1 {
  font-size: var(--fs-h1);
  font-weight: 600;
  line-height: var(--lh-tight);
}

h2 {
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: var(--lh-display);
}

h3,
h4 {
  font-family: var(--font-sans);
  font-weight: 500;
}

h3 {
  font-size: var(--fs-h3);
}

h4 {
  font-size: var(--fs-h4);
}

/* Subtle emphasis inside running text. */
strong,
b {
  font-weight: 600;
}

em,
i {
  font-style: italic;
}

/* Serif italic highlight for a short phrase inside body copy. */
.hand {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.4em;
  line-height: 1.15;
  color: var(--color-clay-deep);
}

/* Hidden visually, still read by screen readers (e.g. a field label when
   the placeholder and button already make the purpose clear on screen). */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

p {
  max-width: 62ch;
}

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

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

ul,
ol {
  list-style: none;
  padding: 0;
}

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

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