/* =========================================================
   BUFFALO TREE PRO — BASE
   Reset, local @font-face, base element typography.
   ========================================================= */

/* ---------- Local fonts (static weights) ---------- */
@font-face{
  font-family: 'Excon';
  src: url('../fonts/Excon-Regular.woff2') format('woff2'),
       url('../fonts/Excon-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: 'Excon';
  src: url('../fonts/Excon-Medium.woff2') format('woff2'),
       url('../fonts/Excon-Medium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: 'Excon';
  src: url('../fonts/Excon-Bold.woff2') format('woff2'),
       url('../fonts/Excon-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: 'Excon';
  src: url('../fonts/Excon-Black.woff2') format('woff2'),
       url('../fonts/Excon-Black.woff') format('woff');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face{
  font-family: 'Alpino';
  src: url('../fonts/Alpino-Light.woff2') format('woff2'),
       url('../fonts/Alpino-Light.woff') format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: 'Alpino';
  src: url('../fonts/Alpino-Regular.woff2') format('woff2'),
       url('../fonts/Alpino-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: 'Alpino';
  src: url('../fonts/Alpino-Medium.woff2') format('woff2'),
       url('../fonts/Alpino-Medium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: 'Alpino';
  src: url('../fonts/Alpino-Bold.woff2') format('woff2'),
       url('../fonts/Alpino-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

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

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

/* Disable browser scroll-anchoring site-wide. Scroll anchoring tries to
   keep the viewport "pinned" to a nearby element whenever content above
   it changes size (e.g. an accordion panel opening/closing). Combined
   with `scroll-behavior: smooth` above, that correction gets animated
   and shows up as a visible page jump on click. Turning it off here
   (rather than only on the FAQ accordion) removes the browser's
   auto-correction entirely, so opening/closing a panel never moves
   the scroll position. */
html, body{
  overflow-anchor: none;
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

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

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

html, body{ height: 100%; }

/* CRITICAL: guarantee the native [hidden] attribute always wins over any
   component's `display` rule, regardless of CSS source order/specificity.
   Without this, any hidden-toggled UI (lightbox, drawer, modals) can be
   forced visible by its own component CSS setting display:flex/block. */
[hidden]{ display: none !important; }

body{
  font-family: var(--font-body);
  font-weight: var(--fw-regular);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-body);
  background-color: var(--color-bg);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll{ overflow: hidden; }

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

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

button{ background: none; border: none; cursor: pointer; }

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

h1, h2, h3, h4, h5, h6{
  font-family: var(--font-heading);
  color: var(--color-heading);
  line-height: var(--lh-heading);
  letter-spacing: -0.01em;
}

h1{ font-size: var(--fs-h1); font-weight: var(--fw-bold); }
h2{ font-size: var(--fs-h2); font-weight: var(--fw-semibold); }
h3{ font-size: var(--fs-h3); font-weight: var(--fw-semibold); }
h4{ font-size: var(--fs-h4); font-weight: var(--fw-medium); }
h5{ font-size: var(--fs-h5); font-weight: var(--fw-medium); }

p{ color: var(--color-body); }

/* ---------- Focus visibility (WCAG 2.2 AA) ---------- */
:focus{ outline: none; }

:focus-visible{
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible{
  box-shadow: var(--shadow-focus);
}

/* ---------- Selection ---------- */
::selection{
  background-color: var(--color-accent);
  color: #fff;
}

/* ---------- Skip link ---------- */
.btp-skip-link{
  position: absolute;
  top: -100px;
  left: var(--space-3);
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  z-index: var(--z-modal);
  transition: top var(--dur-fast) var(--ease-out);
}

.btp-skip-link:focus{ top: var(--space-3); }

/* ---------- Screen-reader only ---------- */
.btp-visually-hidden,
.screen-reader-text{
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Container ---------- */
.btp-container{
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* ---------- Section spacing rhythm ---------- */
.btp-section{ padding-block: var(--space-9); position: relative; }
.btp-section--tight{ padding-block: var(--space-7); }
.btp-section--dark{ background-color: var(--color-primary); color: #fff; }

@media (max-width: 768px){
  .btp-section{ padding-block: var(--space-7); }
  .btp-section--tight{ padding-block: var(--space-6); }
}

/* ---------- Touch target minimum (48x48) ---------- */
a, button, input, select, textarea, summary{
  min-height: 24px;
}

.btp-tap-target{
  min-width: 48px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
