/*
  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: Montserrat;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/montserrat-latin-400.woff2") format("woff2");
}

@font-face {
  font-family: Montserrat;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/montserrat-latin-600.woff2") format("woff2");
}

:root {
  --font-body: Montserrat, Tahoma, sans-serif;
  --font-heading: var(--font-body);
  --font-family: var(--font-body);
  --font-weight-normal: 400;
  --font-weight-medium: 600;
  --font-weight-semibold: 600;
  --font-weight-bold: 600;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: 2rem;
  --line-height-tight: 1.25;
  --line-height-body: 1.6;

  /*
    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: 1rem;
  --container-narrow: 42rem;

  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4.5rem;

  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;

  /* Example Bakery demo — cocoa / deep green / apricot (distinct from plumbing slate/gold). */
  --color-brand-primary: #3c2f2f;
  --color-brand-secondary: #2f5d50;
  --color-brand-accent: #e8a838;
  --color-bg: #ffffff;
  --color-bg-subtle: #f7f3ee;
  --color-text: #1f2937;
  --color-text-heading: #2a211f;
  --color-text-muted: var(--color-brand-primary);
  --color-border: #d4c8b8;
  --color-link: var(--color-brand-secondary);
  --color-link-hover: #234639;
  --color-accent: var(--color-brand-accent);
  --color-accent-contrast: var(--color-text);
  --color-on-secondary: #ffffff;
  --color-on-dark: #ffffff;
  --color-focus: var(--color-brand-primary);
  --color-star: #e3b419;

  --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);
}

.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;
}

: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);
  line-height: var(--line-height-tight);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-heading);
}

h1 {
  font-size: var(--font-size-2xl);
}

h2 {
  font-size: 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;
  }
}
