/* Braventon - reset, base type, page frame, header, drawer, footer. */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }
  html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }
  img, svg, picture { display: block; max-width: 100%; }
  img { height: auto; }
  button, input, select, textarea { font: inherit; color: inherit; }
  button { cursor: pointer; background: none; border: 0; padding: 0; }
  ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
  a { color: inherit; }
  [hidden] { display: none !important; }
  [x-cloak] { display: none !important; }
}

@layer base {
  body {
    background-color: var(--color-bone);
    background-image:
      linear-gradient(var(--grid-line) 1px, transparent 1px),
      linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 48px 48px;
    background-attachment: fixed;
    color: var(--color-ink);
    font-family: var(--font-text);
    font-size: var(--fs-0);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    text-rendering: optimizeLegibility;
  }
  main { flex: 1 0 auto; outline: none; }
  html.is-locked { overflow: hidden; }

  h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 800;
    line-height: .98;
    letter-spacing: .01em;
    text-transform: uppercase;
    text-wrap: balance;
  }
  h1 { font-size: var(--fs-4); }
  h2 { font-size: var(--fs-4); }
  h3 { font-size: var(--fs-2); }
  p { text-wrap: pretty; }
  p + p { margin-top: .9em; }
  a { text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
  a:hover { color: var(--color-cone-deep); }
  :focus-visible { outline: 3px solid var(--color-cone); outline-offset: 3px; }
  ::selection { background: var(--color-tape); color: var(--color-ink); }

  .bv-mono { font-family: var(--font-mono); font-size: .875em; letter-spacing: -.01em; }
  .bv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .bv-skip {
    position: absolute; left: 1rem; top: -4rem; z-index: 200;
    background: var(--color-ink); color: var(--color-bone); padding: .7rem 1rem; transition: top .15s;
  }
  .bv-skip:focus { top: 1rem; }
  .bv-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
}

@layer layout {
  .bv-frame { width: var(--frame); margin-inline: auto; }
  .bv-section { padding-block: var(--section); position: relative; }
  .bv-section--tight { padding-block: clamp(2rem, 4vw, 3.5rem); }
  .bv-section--concrete { background: var(--color-concrete); }
  .bv-section--paper { background: var(--color-paper); border-block: var(--bw) solid var(--color-ink); }
  .bv-section--rebar { background: var(--color-rebar); color: var(--color-on-rebar); }
  .bv-section--rebar a:hover { color: var(--color-cone-bright); }

  /* section header: mono number + title + dimension line */
  .bv-shead { display: grid; gap: .6rem; margin-bottom: clamp(1.75rem, 4vw, 3rem); max-width: 60rem; }
  .bv-shead__no {
    display: flex; align-items: center; gap: .75rem;
    font-family: var(--font-mono); font-size: var(--fs--1); font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
    color: var(--color-cone-deep);
  }
  .bv-shead__no::after {
    content: ""; flex: 0 1 9rem; height: 9px; border-left: 2px solid currentColor; border-right: 2px solid currentColor;
    background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat;
  }
  .bv-section--rebar .bv-shead__no { color: var(--color-cone-bright); }
  .bv-shead p { color: var(--color-steel); max-width: 46rem; }
  .bv-section--rebar .bv-shead p { color: var(--color-on-rebar-muted); }

  .bv-tape { height: 18px; background: var(--tape); border-block: var(--bw) solid var(--color-ink); }

  /* ---------- header: utility strip + main bar ---------- */
  .bv-head { position: sticky; top: 0; z-index: 60; background: var(--color-bone); border-bottom: var(--bw) solid var(--color-ink); }
  .bv-util { background: var(--color-ink); color: var(--color-on-rebar); font-size: var(--fs--1); }
  .bv-util__in { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 34px; }
  .bv-util a { text-decoration: none; }
  .bv-util a:hover { color: var(--color-cone-bright); }
  .bv-util__addr { display: inline-flex; align-items: center; gap: .45rem; color: var(--color-on-rebar-muted); }
  .bv-util__links { display: flex; gap: 1.25rem; align-items: center; }
  .bv-util__phone { font-family: var(--font-mono); font-weight: 500; }

  .bv-bar { display: flex; align-items: center; gap: 1.25rem; min-height: var(--header-h); }
  .bv-brand { display: inline-flex; align-items: center; flex: none; text-decoration: none; }
  .bv-brand img { height: 42px; width: auto; }
  .bv-nav { margin-left: auto; }
  .bv-nav ul { display: flex; list-style: none; padding: 0; gap: .25rem; }
  .bv-nav a {
    display: block; padding: .55rem 1rem; text-decoration: none;
    font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; letter-spacing: .04em; text-transform: uppercase;
    border: var(--bw) solid transparent; line-height: 1.1;
  }
  .bv-nav a:hover { border-color: var(--color-ink); color: var(--color-ink); }
  .bv-nav a[aria-current="page"] { background: var(--color-ink); color: var(--color-bone); }
  .bv-actions { display: flex; align-items: center; gap: .5rem; margin-left: .5rem; }
  .bv-iconbtn {
    display: inline-grid; place-items: center; width: 46px; height: 46px; position: relative;
    border: var(--bw) solid var(--color-ink); background: var(--color-paper); color: var(--color-ink); text-decoration: none;
    transition: background .15s, transform .15s var(--ease);
  }
  .bv-iconbtn:hover { background: var(--color-tape); color: var(--color-ink); }
  .bv-iconbtn:active { transform: translate(2px, 2px); }
  .bv-burger { display: none; }
  .bv-quote { margin-left: .5rem; }

  /* ---------- drawer menu (native dialog) ---------- */
  .bv-drawer { margin: 0 0 0 auto; padding: 0; border: 0; height: 100dvh; max-height: 100dvh; width: min(420px, 100vw); background: var(--color-bone); color: var(--color-ink); border-left: var(--bw) solid var(--color-ink); }
  .bv-drawer::backdrop { background: var(--scrim); }
  .bv-drawer__panel { display: flex; flex-direction: column; min-height: 100%; padding: 1.25rem; gap: 1.5rem; }
  .bv-drawer__top { display: flex; justify-content: space-between; align-items: center; }
  .bv-drawer__top img { height: 40px; width: auto; }
  .bv-drawer__links { list-style: none; padding: 0; display: grid; border-top: var(--bw) solid var(--color-ink); }
  .bv-drawer__links a {
    display: flex; justify-content: space-between; align-items: center; padding: 1rem .25rem; text-decoration: none;
    border-bottom: var(--bw) solid var(--color-ink);
    font-family: var(--font-display); font-weight: 800; font-size: 2rem; text-transform: uppercase; letter-spacing: .02em; line-height: 1;
  }
  .bv-drawer__links a[aria-current="page"] { color: var(--color-cone-deep); }
  .bv-drawer__links a:hover { background: var(--color-tape); }
  .bv-drawer__foot { margin-top: auto; display: grid; gap: .75rem; font-size: .9375rem; }
  .bv-drawer__foot address { font-style: normal; }

  /* ---------- footer ---------- */
  .bv-footer { background: var(--color-rebar); color: var(--color-on-rebar); margin-top: auto; position: relative; }
  .bv-footer a { text-decoration: none; }
  .bv-footer a:hover { color: var(--color-cone-bright); text-decoration: underline; }
  .bv-footer__top { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1.3fr; gap: 2.5rem; padding-block: clamp(2.5rem, 6vw, 4.5rem); }
  .bv-footer__brand img { height: 44px; width: auto; margin-bottom: 1rem; }
  .bv-footer__brand p { color: var(--color-on-rebar-muted); max-width: 22rem; font-size: .9375rem; }
  .bv-footer__h { font-size: 1.05rem; color: var(--color-cone-bright); margin-bottom: .9rem; letter-spacing: .08em; font-family: var(--font-mono); font-weight: 500; text-transform: uppercase; }
  .bv-footer ul { list-style: none; padding: 0; display: grid; gap: .5rem; font-size: .9375rem; }
  .bv-footer address { font-style: normal; font-size: .9375rem; display: grid; gap: .5rem; }
  .bv-footer__bar { border-top: 1px solid var(--line-rebar); }
  .bv-footer__bar .bv-frame { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 1.1rem; font-size: var(--fs--1); color: var(--color-on-rebar-muted); }

  @media (max-width: 1023.98px) {
    :root { --header-h: 64px; }
    .bv-nav, .bv-quote, .bv-util { display: none; }
    .bv-burger { display: inline-grid; }
    .bv-actions { margin-left: auto; }
    .bv-brand img { height: 36px; }
    .bv-footer__top { grid-template-columns: 1fr 1fr; }
  }
  @media (max-width: 599.98px) {
    .bv-footer__top { grid-template-columns: 1fr; gap: 2rem; }
  }
}
