/* Aquila Building Supplies — shared site styles
   Direction: modern, clean, manufacturing-first. Light paper ground, thin 1px rules instead of boxed cards,
   Cardo (regular weight) for H1/H2, Inter for everything else, cedar accent used sparingly. */
:root {
  --ink: #161616;
  --charcoal: #4A4A4A;
  --steel: #6B6F72;
  --paper: #F6F5F2;
  --white: #FFFFFF;
  --line: #DAD8D2;
  --cedar: #B5622B;
  --cedar-soft: #F1E3D6;
  --dark: #1E1E1E;
  --dark-2: #2A2A2A;
  --font-display: Cardo, Georgia, "Times New Roman", serif;
  --font-body: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --maxw: 1180px;
  --radius: 2px;
  /* type scale */
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.375rem;
  --section-pad: clamp(3.5rem, 7vw, 6rem);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: var(--fs-base); line-height: 1.65; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
img { display: block; height: auto; }
a { color: var(--cedar); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3, h4 { font-family: var(--font-body); font-weight: 600; line-height: 1.2; margin: 0 0 0.6em; text-wrap: balance; color: var(--ink); }
h1, h2 { font-family: var(--font-display); font-weight: 400; line-height: 1.1; letter-spacing: -0.005em; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 2.7vw, 2.15rem); }
h3 { font-size: 1.0625rem; }
h4 { font-size: var(--fs-base); }
p { margin: 0 0 1em; max-width: 68ch; }
ul, ol { padding-left: 1.2em; margin: 0 0 1em; max-width: 68ch; }
li { margin-bottom: 0.3em; }
small, .small { font-size: var(--fs-sm); color: var(--steel); }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.eyebrow { font-size: var(--fs-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--steel); font-weight: 600; margin-bottom: 0.9rem; }
.eyebrow.on-dark { color: #B9B4AA; }
.lede { font-size: var(--fs-md); color: var(--charcoal); max-width: 62ch; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--ink); }
.brand img { height: 46px; width: auto; }
.brand .brand-text { line-height: 1.1; }
.brand .brand-text strong { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.brand .brand-text span { font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--steel); }
.nav { display: flex; gap: 1.4rem; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--charcoal); text-decoration: none; font-size: 0.95rem; font-weight: 500; padding: 0.25rem 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--cedar); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 0.4rem 0.6rem; font: inherit; cursor: pointer; }
@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: flex-start; gap: 0.4rem; padding-bottom: 1rem; }
  .nav.open { display: flex; }
  .site-header .container { flex-wrap: wrap; }
  .brand .brand-text span { display: none; }
}

/* hero: quiet dark band, muted photo */
.hero { position: relative; background: var(--dark); color: var(--white); overflow: hidden; }
.hero .hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.35; filter: grayscale(20%); }
.hero .container { position: relative; padding-block: clamp(4rem, 9vw, 7rem); }
.hero h1 { color: var(--white); max-width: 20ch; }
.hero p { color: rgba(255,255,255,0.84); font-size: var(--fs-md); max-width: 60ch; }
.hero .eyebrow { color: #C9C3B7; }
.hero-compact .container { padding-block: clamp(3rem, 6vw, 4.5rem); }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.5rem 0 0; padding: 0; list-style: none; max-width: none; }
.chips li { border: 1px solid var(--line); background: transparent; border-radius: var(--radius); padding: 0.3rem 0.75rem; font-size: var(--fs-sm); color: var(--charcoal); margin: 0; }
.hero .chips li { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.25); color: #EDEAE4; }

/* buttons */
.btn { display: inline-block; background: var(--ink); color: var(--white); border-radius: var(--radius); padding: 0.7rem 1.3rem; text-decoration: none; font-weight: 600; font-size: 0.95rem; border: 1px solid var(--ink); }
.btn:hover { background: var(--cedar); border-color: var(--cedar); color: var(--white); }
.btn-outline { background: transparent; color: var(--ink); }
.hero .btn { background: var(--white); color: var(--ink); border-color: var(--white); }
.hero .btn:hover { background: var(--cedar); border-color: var(--cedar); color: var(--white); }
.hero .btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.6); }
.hero .btn-outline:hover { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

/* sections */
.section { padding-block: var(--section-pad); }
.section-dark { background: var(--dark); color: #EDEAE4; }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark p { color: #D5D0C7; }
.section-white { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-tint { background: var(--cedar-soft); }
.section-head { margin-bottom: 2.5rem; }
.section-head p { max-width: 62ch; color: var(--charcoal); }
.section-head p:last-child { margin-bottom: 0; }
.sub { margin-top: 3.5rem; padding-top: 2.25rem; border-top: 1px solid var(--line); }

/* grids */
.grid { display: grid; gap: 2rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.grid > * { min-width: 0; }
.grid h3 { margin-bottom: 0.4rem; }
.grid p { font-size: 0.95rem; color: var(--charcoal); }

/* cards: bordered, flat, used sparingly */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; display: flex; flex-direction: column; gap: 0.4rem; }
.card h3 { margin: 0; }
.card p { margin: 0; font-size: 0.95rem; color: var(--charcoal); }
.card a.more { margin-top: auto; font-weight: 600; text-decoration: none; }
.section-dark .card { background: var(--dark-2); border-color: #3A3A3A; }
.section-dark .card p { color: #CFC9BE; }

/* split layout and photos (photos are small, never in card grids) */
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 4rem; align-items: start; }
.split > * { min-width: 0; }
.split.aside { grid-template-columns: minmax(0, 1fr) minmax(0, 320px); }
.split.center { align-items: center; }
@media (max-width: 800px) { .split, .split.aside { grid-template-columns: 1fr; gap: 2rem; } }
figure { margin: 0; }
figure img, .split > img { width: 100%; border-radius: var(--radius); aspect-ratio: 4 / 3; object-fit: cover; }
figcaption { font-size: var(--fs-sm); color: var(--steel); margin-top: 0.6rem; }
/* image captions: 2-5 words, small uppercase eyebrow */
.cap, figcaption.cap { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--steel); font-weight: 600; line-height: 1.4; margin: 0.7rem 0 0; }
.photo-sm { max-width: 320px; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; max-width: 600px; }
@media (max-width: 500px) { .pair { grid-template-columns: 1fr; } }

/* capability tiles: bordered cells with a cedar index number */
.tile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); counter-reset: tile; border-top: 1px solid var(--line); border-left: 1px solid var(--line); background: var(--white); }
.tile { counter-increment: tile; padding: 2rem 1.75rem 2.25rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.tile::before { content: counter(tile, decimal-leading-zero); display: block; font-size: var(--fs-sm); font-weight: 600; letter-spacing: 0.08em; color: var(--cedar); margin-bottom: 1.25rem; font-variant-numeric: tabular-nums; }
.tile h3 { margin-bottom: 0.6rem; font-size: 1.125rem; }
.tile p { margin: 0 0 0.75rem; font-size: 0.95rem; color: var(--charcoal); }
.tile p:last-child { margin-bottom: 0; }
.tile .ref { font-size: var(--fs-sm); color: var(--steel); border-top: 1px solid var(--line); padding-top: 0.75rem; margin-top: 1rem; }
.tile a { font-weight: 600; font-size: 0.95rem; }
@media (max-width: 900px) { .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .tile-grid { grid-template-columns: 1fr; } .tile { padding: 1.5rem 1.25rem 1.75rem; } }

/* facts / definition lists: thin rules, no boxes */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 2.5rem; margin: 0; }
.facts div { border-top: 1px solid var(--line); padding: 1rem 0 1.15rem; }
.facts dt { font-size: var(--fs-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--steel); font-weight: 600; }
.facts dd { margin: 0.3rem 0 0; font-weight: 500; font-size: 0.95rem; }
.facts.rows { grid-template-columns: 1fr; gap: 0; }
.facts.rows div { display: grid; grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr); gap: 1.5rem; padding: 0.9rem 0; }
.facts.rows div:last-child { border-bottom: 1px solid var(--line); }
.facts.rows dt { padding-top: 0.2rem; }
.facts.rows dd { margin: 0; }
.facts.rows dd ul { margin: 0; padding-left: 1.1em; }
.facts.rows dd li { margin-bottom: 0.15em; }
@media (max-width: 700px) { .facts.rows div { grid-template-columns: 1fr; gap: 0.15rem; } }
.section-dark .facts div { border-color: #3A3A3A; }
.section-dark .facts dd { color: var(--white); }

/* spec tables */
.table-wrap { overflow-x: auto; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); background: transparent; }
table.spec { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 640px; font-variant-numeric: tabular-nums; }
table.spec th, table.spec td { text-align: left; padding: 1rem 1.25rem 1rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.spec th:last-child, table.spec td:last-child { padding-right: 0; }
table.spec thead th { font-size: var(--fs-xs); letter-spacing: 0.1em; text-transform: uppercase; color: var(--steel); font-weight: 600; white-space: nowrap; }
table.spec tbody tr:last-child td { border-bottom: 0; }
table.spec td:first-child { font-weight: 600; }
table.spec a { font-weight: 600; }
.table-note { font-size: var(--fs-sm); color: var(--steel); margin-top: 0.75rem; }

/* notices */
.notice { border-left: 3px solid var(--cedar); background: var(--white); padding: 1rem 1.25rem; border-radius: 0; }
.notice p { margin: 0; }

/* steps: numbered, single horizontal row on desktop */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; max-width: none; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0 2rem; }
.steps li { counter-increment: step; border-top: 1px solid var(--ink); padding-top: 1rem; margin: 0; min-width: 0; }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; font-size: var(--fs-sm); font-weight: 600; letter-spacing: 0.08em; color: var(--cedar); margin-bottom: 0.75rem; font-variant-numeric: tabular-nums; }
.steps h3 { font-size: var(--fs-base); margin-bottom: 0.35rem; }
.steps p { margin: 0; font-size: var(--fs-sm); color: var(--charcoal); }
.section-dark .steps li { border-top-color: #6B6F72; }
@media (max-width: 1000px) { .steps { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; } }
@media (max-width: 700px) { .steps { grid-template-columns: 1fr; gap: 1.5rem; } }

/* diagram frame */
.diagram { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }

/* anchor row on product pages */
.jump { display: flex; flex-wrap: wrap; gap: 0.25rem 1.75rem; padding: 0; margin: 0; list-style: none; max-width: none; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); }
.jump li { margin: 0; }
.jump a { display: block; padding: 0.9rem 0; font-size: 0.92rem; font-weight: 500; color: var(--charcoal); text-decoration: none; }
.jump a:hover { color: var(--cedar); }
.jump-wrap { background: var(--white); border-bottom: 1px solid var(--line); }
.jump-wrap .jump { border: 0; }

/* group / family strip */
.family { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 2.5rem; }
@media (max-width: 760px) { .family { grid-template-columns: 1fr; } }
.family a { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.family a:hover { color: var(--cedar); }
.family img { height: 34px; width: 90px; flex: none; object-fit: contain; object-position: left; }
.family .t { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.family strong { font-weight: 600; font-size: 0.95rem; }
.family .role { font-size: var(--fs-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--steel); font-weight: 600; }
.family a.current { border-top-color: var(--ink); }

/* footer */
.site-footer { background: var(--dark); color: #CFC9BE; font-size: 0.9rem; }
.site-footer .container { padding-block: 3rem 2rem; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
@media (max-width: 800px) { .site-footer .container { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .site-footer .container { grid-template-columns: 1fr; } }
.site-footer h4 { color: var(--white); margin-bottom: 0.6rem; }
.site-footer a { color: #EDEAE4; text-decoration: none; }
.site-footer a:hover { color: var(--cedar); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.35rem; }
.site-footer img { height: 44px; width: auto; margin-bottom: 0.8rem; }
.footer-bottom { border-top: 1px solid #3A3A3A; }
.footer-bottom .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; padding-block: 1rem; font-size: 0.8rem; color: #9C968C; }

/* contact block */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 2.5rem; }
.contact-grid > div { border-top: 1px solid var(--line); padding: 1.25rem 0; }
.contact-grid strong { display: block; font-weight: 600; font-size: var(--fs-md); }
.contact-grid .role { font-size: var(--fs-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--steel); font-weight: 600; margin-bottom: 0.6rem; }
.contact-grid p { font-size: 0.95rem; overflow-wrap: anywhere; }
.contact-grid > div { min-width: 0; }

/* utility */
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; } .mb-0 { margin-bottom: 0; }
.center { text-align: center; }
:focus-visible { outline: 2px solid var(--cedar); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

/* tabs: text tabs, 2px cedar underline on the active tab, panels present in HTML and shown one at a time */
[hidden] { display: none !important; }
.tabs { scroll-margin-top: 96px; }
.tablist { display: flex; gap: 0 1.75rem; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
[role="tab"] { appearance: none; background: none; border: 0; border-bottom: 2px solid transparent; margin: 0 0 -1px; padding: 0.9rem 0; font: inherit; font-size: 0.95rem; font-weight: 500; color: var(--charcoal); cursor: pointer; white-space: nowrap; border-radius: 0; }
[role="tab"]:hover { color: var(--ink); }
[role="tab"][aria-selected="true"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--cedar); }
.tabpanel { padding-top: 2.5rem; scroll-margin-top: 96px; }
.tabpanel:not([hidden]) { animation: tabfade 0.2s ease; }
@keyframes tabfade { from { opacity: 0; } to { opacity: 1; } }
.tabpanel > h2 { margin-bottom: 0.5em; }
.tabpanel > .eyebrow { margin-bottom: 0.75rem; }
@media (min-width: 861px) {
  .tabs-rail { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 4rem; align-items: start; }
  .tabs-rail .tablist { flex-direction: column; border-bottom: 0; border-left: 1px solid var(--line); gap: 0; overflow: visible; position: sticky; top: 96px; }
  .tabs-rail [role="tab"] { text-align: left; padding: 0.65rem 0 0.65rem 1.1rem; border-bottom: 0; border-left: 2px solid transparent; margin: 0 0 0 -1px; white-space: normal; }
  .tabs-rail [role="tab"][aria-selected="true"] { border-left-color: var(--cedar); }
  .tabs-rail .tabpanel { padding-top: 0; }
}

/* linked capability tiles, compact tables, stacked family, two-up block */
a.tile { display: block; color: inherit; text-decoration: none; }
a.tile:hover { background: var(--paper); }
a.tile:hover h3 { color: var(--cedar); }
.tile .go { display: block; margin-top: 0.9rem; font-size: var(--fs-sm); font-weight: 600; color: var(--cedar); }
.section-tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
table.spec.compact th, table.spec.compact td { padding-top: 0.6rem; padding-bottom: 0.6rem; }
.family.stack { grid-template-columns: 1fr; gap: 0; }
.duo { display: grid; grid-template-columns: 1fr 1.4fr; gap: 4rem; align-items: start; }
.duo > * { min-width: 0; }
@media (max-width: 800px) { .duo { grid-template-columns: 1fr; gap: 2.5rem; } }
.contact-grid.tight { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 1.75rem; }
.tabpanel .btn { margin-top: 0.5rem; }
.tabpanel h3.sub-h { margin-top: 2rem; }
.tabpanel .split.aside { margin-bottom: 1.5rem; }

/* copy deterrent, matching stwood.ca */
body{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
input,textarea{-webkit-user-select:text;user-select:text}
img{-webkit-user-drag:none;user-drag:none;pointer-events:none}
a img{pointer-events:none}
.tablist .tab-link{display:block;padding:.55rem .75rem;margin-top:.5rem;border-top:1px solid var(--line);color:var(--charcoal);text-decoration:none;font-size:.95rem}
.tablist .tab-link:hover{color:var(--cedar)}
