/* ==========================================================================
   Havilah Cottage — base: fonts, reset, element defaults, focus, motion
   ========================================================================== */

/* --- Self-hosted fonts (CLAUDE.md §4: no Google Fonts request) ----------- */

@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 600 700;                      /* one variable file covers both */
  font-display: swap;
  src: url("/assets/fonts/playfair-display-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/lato-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/lato-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Lato";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/lato-400-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

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

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Sticky header must not cover a focused/linked target (SKILL.md §8.1). */
  scroll-padding-top: 6rem;
}

/* From 64em the stuck header carries the larger logo and is about 105px tall,
   which 6rem would not clear: an anchored section or a tall focused element
   would slide 9px under it. */
@media (min-width: 64em) {
  html { scroll-padding-top: 7.5rem; }
}

body {
  margin: 0;
  background: var(--c-ivory);
  color: var(--c-charcoal);
  font-family: var(--ff-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, figure, blockquote, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }

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

/* --- Headings ----------------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--ff-head);
  font-weight: var(--fw-head);
  line-height: var(--lh-head);
  color: var(--c-purple-dark);
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); letter-spacing: var(--tracking-head); }
h2 { font-size: var(--fs-h2); letter-spacing: var(--tracking-head); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

p { text-wrap: pretty; }

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

/* Body copy stays readable; SKILL.md §2.2 caps the measure. */
p, li { max-width: var(--measure); }

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

a {
  color: var(--c-purple-medium);
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
}

a:hover { color: var(--c-purple-dark); }

/* --- Focus (SKILL.md §3) ------------------------------------------------ */

:focus-visible {
  outline: var(--focus-w) solid var(--focus-color);
  outline-offset: var(--focus-offset);
  border-radius: var(--r-sm);
}

/* On dark surfaces the deep gold disappears; use the bright gold. */
.on-dark :focus-visible,
.site-footer :focus-visible,
.utility-bar :focus-visible,
.cta-band :focus-visible,
.hero :focus-visible,
.page-hero :focus-visible,
.section--dark :focus-visible,
.skip-link:focus-visible {
  outline-color: var(--focus-color-on-dark);
}

/* --- Selection ---------------------------------------------------------- */

::selection {
  background: var(--c-purple-dark);
  color: var(--c-ivory);
}

/* --- Forms inherit type ------------------------------------------------- */

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

/* --- Tables ------------------------------------------------------------- */

table { border-collapse: collapse; width: 100%; }

/* --- Utilities ---------------------------------------------------------- */

/* The inline icon sprite: <symbol> definitions only, never rendered itself. */
.sprite { display: none; }

.visually-hidden:not(:focus):not(:active) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Marks a fact that administration has not approved yet (CLAUDE.md §2 rule 3).
   Deliberately loud: it must be impossible to miss in review, and zero may
   remain at launch. */
.verify {
  display: inline;
  padding: 0 .25em;
  background: var(--c-gold-light-a40);
  color: var(--c-purple-dark);
  font-family: var(--ff-body);
  font-size: .9em;
  font-style: italic;
  border-bottom: 2px dotted var(--c-gold-dark);
}

/* Plum on translucent gold is unreadable over aubergine. */
.utility-bar .verify,
.site-footer .verify,
.cta-band .verify,
.section--dark .verify,
.hero .verify {
  background: var(--c-gold-light-a20);
  color: var(--c-ivory);
  border-bottom-color: var(--c-gold-light);
}

/* --- Reduced motion (SKILL.md §2.5) ------------------------------------- */

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

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
