/* ==========================================================================
   NourishHaus — Global Styles
   Design tokens, reset, typography and layout primitives. Component-level
   styles (nav, footer, cards, buttons, forms) live in components.css.
   ========================================================================== */

:root {
  /* Brand colour palette — flat colour only, no gradients. */
  --color-green: #3D6B45;
  --color-green-dark: #2B4D31;
  --color-green-tint: rgba(61, 107, 69, 0.08);
  --color-amber: #C9843A;
  --color-amber-dark: #A66A2D;
  --color-amber-tint: rgba(201, 132, 58, 0.1);
  --color-brown: #2B2B2B;
  --color-cream: #F2F2F2;
  --color-white: #FFFFFF;
  --color-border: rgba(43, 43, 43, 0.12);

  /* Typography */
  --font-heading: "Raleway", Georgia, serif;
  --font-body: "Montserrat", -apple-system, BlinkMacSystemFont, sans-serif;

  /* 8px spacing grid */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;
  --space-7: 64px;
  --space-8: 80px;
  --space-9: 96px;

  --radius-sm: 4px;
  --radius-md: 8px;
  --shadow-card: 0 2px 10px rgba(43, 43, 43, 0.08);
  --transition: 0.2s ease;
  --container-width: 1200px;
}

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

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

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

body,
h1, h2, h3, h4, h5, h6,
p, ul, ol, figure, blockquote {
  margin: 0;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

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

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

/* ----- Base ------------------------------------------------------------ */

body {
  background-color: var(--color-white);
  color: var(--color-brown);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

main {
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.18;
  color: var(--color-brown);
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.15rem; }

p {
  max-width: 65ch;
}

.lead {
  font-size: 1.15rem;
}

a.text-link {
  color: var(--color-brown);
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), color var(--transition);
}

a.text-link:hover,
a.text-link:focus-visible {
  border-bottom-color: currentColor;
}

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

/* ----- Layout primitives ------------------------------------------------ */

.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

.section {
  padding-block: var(--space-7);
}

.section--tight {
  padding-block: var(--space-5);
}

.section-head {
  max-width: 640px;
  margin-bottom: var(--space-5);
}

.section-head.text-center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(43, 43, 43, 0.65);
  margin-bottom: var(--space-1);
}

.text-center { text-align: center; }

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

.bg-green {
  background-color: var(--color-brown);
  color: var(--color-white);
}

.bg-green h1, .bg-green h2, .bg-green h3 { color: var(--color-white); }

.bg-white { background-color: var(--color-white); }

.grid {
  display: grid;
  gap: var(--space-4);
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1023px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  .section { padding-block: var(--space-5); }
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }
}
