/* KALM Designs Company - base.css: tokens, reset, typography, layout, header, footer */

@font-face {
  font-family: "Barlow Condensed";
  src: url("../assets/fonts/BarlowCondensed-SemiBold.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("../assets/fonts/Manrope-Variable.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
}

:root {
  --charcoal: #202321;
  --charcoal-soft: #2b2f2c;
  --warm-white: #F7F5F0;
  --white: #FFFFFF;
  --bronze: #B69A72;        /* accents and text on charcoal only */
  --bronze-dark: #7A6240;   /* bronze-coloured text on light backgrounds */
  --grey: #777A76;          /* large or decorative use only */
  --grey-text: #565955;     /* small text on light backgrounds */
  --line: #d9d5cb;
  --red: #D32027;           /* logo red: small accent only */

  --font-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --space-1: .5rem; --space-2: 1rem; --space-3: 1.5rem; --space-4: 2.5rem;
  --space-5: 4rem;  --space-6: 6rem;
  --section-y: clamp(4rem, 9vw, 8rem);
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --max: 76rem;
  --header-h: 4.5rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--warm-white); color: var(--charcoal);
  font: 400 1.0625rem/1.65 var(--font-body);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.02; letter-spacing: .005em; }
h1 { font-size: clamp(3rem, 9vw, 6.5rem); }
h2 { font-size: clamp(2.25rem, 5vw, 3.75rem); }
h3 { font-size: clamp(1.5rem, 2.5vw, 2rem); line-height: 1.1; }
p { max-width: 62ch; }

:focus-visible { outline: 3px solid var(--bronze-dark); outline-offset: 3px; }
.on-dark :focus-visible, .site-footer :focus-visible, .hero :focus-visible { outline-color: var(--bronze); }

.skip-link {
  position: absolute; left: var(--space-2); top: -4rem; z-index: 200;
  background: var(--charcoal); color: var(--warm-white); padding: .75rem 1rem;
}
.skip-link:focus { top: var(--space-2); }

.container { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.section { padding-block: var(--section-y); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.on-dark { background: var(--charcoal); color: var(--warm-white); }

/* Visible marker for facts that still need confirmation (remove when confirmed) */
.confirm { background: #fff1b8; color: #3b2f00; padding: 0 .3em; border-radius: 2px; font-weight: 600; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; height: var(--header-h);
  background: var(--warm-white); border-bottom: 1px solid var(--line);
}
.site-header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }

.brand { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; line-height: 1; }
.brand-logo { height: 2.75rem; width: auto; flex: none; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.9rem; letter-spacing: .04em; color: var(--red);}
.brand-sub { font-size: .72rem; color: var(--grey-text); letter-spacing: .12em; margin-top: .2rem; }
.brand--light .brand-name { color: var(#EF4B52); }
.brand--light .brand-sub { color: #b9b7b0; }
.brand--light .brand-logo { height: 3.25rem; }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; min-width: 2.75rem;
  background: none; border: 1px solid var(--charcoal); color: inherit; font: inherit; font-weight: 600; padding: 0 1rem; cursor: pointer;
}
.site-nav {
  position: absolute; inset: var(--header-h) 0 auto 0; background: var(--warm-white);
  border-bottom: 1px solid var(--line); padding: var(--space-2) var(--gutter) var(--space-3);
  display: none; flex-direction: column; gap: .25rem;
}
.site-nav.is-open { display: flex; }
.site-nav a { text-decoration: none; padding: .85rem 0; min-height: 2.75rem; border-bottom: 1px solid var(--line); font-weight: 500; }
.site-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--red); padding-left: .8rem; }
.site-nav .btn { margin-top: var(--space-2); border-bottom: 0; justify-content: center; }

@media (min-width: 62em) {
  .nav-toggle { display: none; }
  .site-nav { position: static; display: flex; flex-direction: row; align-items: center; gap: 1.75rem; padding: 0; border: 0; background: none; }
  .site-nav a { border: 0; padding: .5rem 0; min-height: 0; font-size: .95rem; }
  .site-nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--red); padding-left: 0; }
  .site-nav .btn { margin: 0; padding: .7rem 1.25rem; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--charcoal); color: #d8d6d0; padding-block: var(--space-5) var(--space-3); font-size: .95rem; }
.footer-grid { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
.footer-grid h2 { font-size: 1.35rem; color: var(--bronze); margin-bottom: var(--space-2); letter-spacing: .03em; }
.footer-grid li + li { margin-top: .5rem; }
.footer-grid a { text-decoration-color: #5c5f5b; text-underline-offset: 3px; }
.footer-grid a:hover { color: var(--white); text-decoration-color: var(--bronze); }
.footer-brand p { margin-top: var(--space-2); color: #b9b7b0; }
.footer-bottom { margin-top: var(--space-5); padding-top: var(--space-3); border-top: 1px solid #3a3e3b; display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: space-between; color: #a9a7a0; font-size: .85rem; }
@media (min-width: 48em) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
