/*
  Load order (from templates, once the build exists):
  1. base.css      — tokens, reset, element defaults
  2. layout.css    — containers, sections, grid
  3. components.css — header, nav, footer, button, hero, content, CTA

  Rebrand a client by changing the :root custom properties below.
  Do not fork these files for colour/spacing tweaks.
*/

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/cormorant-garamond-latin-ext-600.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/cormorant-garamond-latin-600.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: "Cormorant Garamond";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/cormorant-garamond-latin-ext-700.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/cormorant-garamond-latin-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: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/source-sans-3-latin-ext-400.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/source-sans-3-latin-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: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/source-sans-3-latin-ext-600.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/source-sans-3-latin-600.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;
}

:root {
  --font-body: "Source Sans 3", Tahoma, sans-serif;
  --font-heading: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-family: var(--font-body);
  --font-weight-normal: 400;
  --font-weight-medium: 600;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-size-sm: 0.875rem;
  --font-size-base: 1.0625rem;
  --font-size-lg: 1.1875rem;
  --font-size-xl: 1.75rem;
  --font-size-2xl: 2.5rem;
  --line-height-tight: 1.2;
  --line-height-body: 1.65;
  --measure: 40rem;

  /*
    Tailwind default screens (min-width). Custom properties cannot be used in
    @media — copy the rem value. Nav uses --screen-lg (see --bp-nav).
  */
  --screen-sm: 40rem;
  --screen-md: 48rem;
  --screen-lg: 64rem;
  --screen-xl: 80rem;
  --screen-2xl: 96rem;

  --container-padding: 1.25rem;
  --container-narrow: 42rem;

  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3.5rem;
  --space-2xl: 5rem;

  --radius-sm: 0.125rem;
  --radius-md: 0.25rem;

  --color-brand-primary: #071d34;
  --color-brand-secondary: #233447;
  --color-brand-accent: #b39661;
  --color-bg: #ffffff;
  --color-bg-subtle: #faf9f6;
  --color-text: #233447;
  --color-text-heading: #071d34;
  --color-text-muted: #233447;
  --color-border: #d5d0c8;
  --color-link: #071d34;
  --color-link-hover: #b39661;
  --color-accent: var(--color-brand-accent);
  --color-accent-contrast: #071d34;
  --color-on-secondary: #ffffff;
  --color-on-dark: #faf9f6;
  --color-focus: #b39661;
  --color-star: #b39661;

  --transition-fast: 150ms ease;

  /*
    --bp-nav is Tailwind lg (--screen-lg). CSS cannot use custom properties in
    @media, so nav queries MUST use min-width: 64rem (desktop) and
    max-width: 63.999rem (menu / contact bar). See docs/components.md.
  */
  --bp-nav: 64rem;
  --touch-min: 2.75rem;
  --scroll-pad: 5.75rem;
}

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

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--scroll-pad);
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-body);
  color: var(--color-text);
  background-color: var(--color-bg);
}

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

h1,
h2,
h3,
h4,
h5,
h6,
#main-content,
:target {
  scroll-margin-top: var(--scroll-pad);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-heading);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-text-heading);
}

h1 {
  font-size: clamp(2rem, 4vw + 1rem, var(--font-size-2xl));
}

h2 {
  font-size: clamp(1.5rem, 2vw + 1rem, var(--font-size-xl));
}

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

p {
  margin: 0 0 var(--space-sm);
}

a {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  transition: color var(--transition-fast);
}

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

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

img {
  height: auto;
}

ul,
ol {
  margin: 0 0 var(--space-sm);
  padding-left: var(--space-md);
}

li {
  margin-bottom: var(--space-2xs);
}

blockquote {
  margin: 0 0 var(--space-sm);
  padding-left: var(--space-sm);
  border-left: 4px solid var(--color-border);
  color: var(--color-text-muted);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 var(--space-md);
}

caption {
  text-align: left;
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-xs);
}

th,
td {
  padding: var(--space-xs) var(--space-sm);
  border: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
}

th {
  background-color: var(--color-bg-subtle);
  font-weight: var(--font-weight-semibold);
}

label {
  display: block;
  margin-bottom: var(--space-2xs);
  font-weight: var(--font-weight-semibold);
}

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

input,
select,
textarea {
  width: 100%;
  max-width: 32rem;
  padding: var(--space-xs) var(--space-sm);
  color: var(--color-text);
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

textarea {
  min-height: 8rem;
  resize: vertical;
}

button {
  cursor: pointer;
}

fieldset {
  margin: 0 0 var(--space-md);
  padding: var(--space-sm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

legend {
  padding: 0 var(--space-2xs);
  font-weight: var(--font-weight-semibold);
}

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

code {
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", Consolas, monospace;
  font-size: 0.9em;
}

pre {
  margin: 0 0 var(--space-md);
  padding: var(--space-sm);
  overflow-x: auto;
  background-color: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

pre code {
  font-size: var(--font-size-sm);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
