:root {
  --ink: #15171a;
  --ink-2: #24272c;
  --steel: #5b6068;
  --line: #d9d8d2;
  --paper: #ffffff;
  --tint: #f3f2ed;
  --yellow: #f7b500;
  --yellow-deep: #d99e00;
  --display: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --body: "Barlow", Arial, Helvetica, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.55 var(--body); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.05; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid #1a5fd0; outline-offset: 2px; }
.band-ink :focus-visible, .hero :focus-visible, .head :focus-visible, .foot :focus-visible { outline-color: #fff; }

.wrap { width: min(1200px, 100%); margin-inline: auto; padding-inline: 24px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; z-index: 50; background: #fff; padding: 8px 12px; }

/* Header */
.head { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 20; }
.head-row { display: flex; align-items: center; gap: 24px; min-height: 68px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 500 22px/1 var(--display); text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; }
.brand b { font-weight: 700; }
.mark { width: 34px; height: 34px; flex: none; }
.nav { display: flex; gap: 16px; margin-right: auto; }
.nav .nav-contact { display: none; }
.nav a { text-decoration: none; font-weight: 500; font-size: 15px; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current] { border-color: var(--yellow); }
.head-phone { font: 600 20px/1 var(--display); text-decoration: none; white-space: nowrap; }
.menu-btn { display: none; margin-left: auto; background: none; color: #fff; border: 1px solid #fff; border-radius: 3px; padding: 7px 14px; font: 500 15px var(--body); cursor: pointer; }

/* Buttons */
.btn { display: inline-block; border: 2px solid transparent; border-radius: 3px; padding: 11px 20px; font: 700 18px/1.1 var(--display); letter-spacing: .03em; text-transform: uppercase; text-decoration: none; cursor: pointer; text-align: center; transition: background-color .15s, color .15s; }
.btn-yellow { background: var(--yellow); color: var(--ink); }
.btn-yellow:hover { background: #ffc61f; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #33373d; }
.btn-line { border-color: var(--ink); color: var(--ink); }
.btn-line:hover { background: var(--ink); color: #fff; }
.btn-line-light { border-color: #fff; color: #fff; }
.btn-line-light:hover { background: #fff; color: var(--ink); }
.btn-line-dark { border-color: var(--ink); color: var(--ink); }
.btn-line-dark:hover { background: var(--ink); color: var(--yellow); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.head-cta { padding: 9px 16px; font-size: 17px; }
.link-btn { background: none; border: 0; padding: 6px 2px; font: 500 15px var(--body); text-decoration: underline; cursor: pointer; color: inherit; }

/* Hero */
.hero { position: relative; background: var(--ink); color: #fff; min-height: 600px; display: flex; align-items: center; overflow: hidden; }
.hero-img { position: absolute; top: 0; right: 0; width: 72%; height: 100%; object-fit: cover; object-position: 70% 55%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--ink) 28%, rgba(21,23,26,.78) 42%, rgba(21,23,26,0) 58%); }
.hero-copy { position: relative; z-index: 1; padding-block: 72px 96px; }
.hero h1 { font-size: clamp(44px, 5.4vw, 76px); font-weight: 700; text-transform: uppercase; max-width: 9.5em; margin-bottom: 18px; }
.hero .lede { max-width: 24em; color: #eceae3; }
.hero-area { margin: 18px 0 0; font-weight: 500; }
.eyebrow { font: 700 17px/1.2 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--yellow-deep); margin-bottom: 10px; }
.hero .eyebrow, .band-ink .eyebrow { color: var(--yellow); }
.lede { font-size: 20px; line-height: 1.45; }

/* Finder */
.finder-wrap { position: relative; z-index: 2; margin-top: -52px; }
.finder { background: var(--yellow); padding: 20px 24px; display: grid; grid-template-columns: auto 1fr 1fr auto; gap: 20px; align-items: end; border-radius: 3px; }
.finder h2 { font-size: 30px; text-transform: uppercase; align-self: center; }
.finder label, .filters label { display: block; font-weight: 600; font-size: 15px; }
select, input, textarea { display: block; width: 100%; margin-top: 4px; font: 400 16px var(--body); color: var(--ink); background: #fff; border: 1px solid #8a8d92; border-radius: 3px; padding: 10px 12px; min-height: 44px; }
.finder select { border-color: var(--ink); }

/* Sections */
.band { padding-block: 64px; }
.band-ink { background: var(--ink); color: #fff; }
.band-tint { background: var(--tint); }
.h2 { font-size: clamp(34px, 4vw, 48px); font-weight: 700; text-transform: uppercase; margin-bottom: 24px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split-img { width: 100%; border-radius: 3px; aspect-ratio: 4 / 3; object-fit: cover; }
.split-img-white { background: #fff; object-fit: contain; }
.ticks { list-style: none; padding: 0; margin: 0 0 24px; }
.ticks li { padding: 8px 0 8px 26px; border-top: 1px solid #3a3e45; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 17px; width: 12px; height: 6px; border-left: 3px solid var(--yellow); border-bottom: 3px solid var(--yellow); transform: rotate(-45deg); }

/* Category tiles */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tile { position: relative; display: block; border: 1px solid var(--line); border-radius: 3px; text-decoration: none; overflow: hidden; background: #fff; transition: border-color .15s; }
.tile:hover { border-color: var(--ink); }
.tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; padding: 12px; transition: transform .25s; }
.tile:hover img { transform: scale(1.03); }
.tile-text { display: block; padding: 14px 18px 18px; border-top: 3px solid var(--yellow); }
.tile-text b { display: block; font: 700 26px/1.1 var(--display); text-transform: uppercase; }
.tile-text span { color: var(--steel); font-size: 15px; }

/* Uses */
.uses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.uses > div { border-top: 3px solid var(--ink); padding-top: 14px; }
.uses h3 { font-size: 28px; font-weight: 700; text-transform: uppercase; margin-bottom: 8px; }
.uses a { font-weight: 600; }
.castle-logo { width: 190px; height: auto; margin-bottom: 18px; }
.castle-logo-foot { width: 150px; margin: 4px 0 0; }

/* Photo mosaic */
.mosaic { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.shot { position: relative; display: block; overflow: hidden; border-radius: 3px; text-decoration: none; background: var(--ink); }
.shot img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .25s; }
.shot:hover img { transform: scale(1.03); }
.shot span { display: block; padding: 8px 12px; background: var(--ink); color: #fff; font-size: 15px; }
.shot b { font: 700 20px/1 var(--display); color: var(--yellow); margin-right: 4px; }

/* Lithium banner */
.banner { padding-bottom: 56px; }
.banner img { width: 100%; border: 1px solid var(--line); border-radius: 3px; }

/* More models */
.more { margin-top: 56px; }
.more .h2 { margin-bottom: 6px; }
.more-note { color: var(--steel); margin-bottom: 20px; }
.card-kind { color: var(--ink); font-weight: 600; }
.callout-line { padding: 8px 12px; background: var(--tint); border-left: 4px solid var(--yellow); font-weight: 500; }
.gal-note { margin: 8px 0 0; font-size: 14px; color: var(--steel); }

/* Page head */
.page-head { background: var(--tint); padding-block: 44px 40px; }
.page-head h1 { font-size: clamp(42px, 5.4vw, 66px); font-weight: 700; text-transform: uppercase; margin-bottom: 12px; }
.page-head .lede { max-width: 44em; margin-bottom: 0; }
.page-head-split .wrap { display: grid; grid-template-columns: 3fr 2fr; gap: 40px; align-items: center; }
.head-photo { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 3px; }
.crumbs { font-size: 14px; color: var(--steel); margin-bottom: 14px; }
.crumbs span { margin-inline: 4px; }

/* Filters and cards */
.filters { display: flex; flex-wrap: wrap; gap: 16px; align-items: end; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.filters label { flex: 1 1 180px; max-width: 260px; }
.filter-count { margin: 0 0 10px auto; font-weight: 600; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 3px; background: #fff; transition: border-color .15s; }
.card:hover { border-color: var(--ink); }
.card[hidden] { display: none; }
.card-photo img { width: 100%; aspect-ratio: 1; object-fit: contain; padding: 10px; }
.card-body { padding: 0 18px 16px; display: flex; flex-direction: column; flex: 1; }
.card-cat { font-size: 13px; font-weight: 600; color: var(--steel); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px; }
.card h3 { font-size: 30px; font-weight: 700; margin-bottom: 8px; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.plate { display: flex; align-items: baseline; gap: 6px; background: var(--ink); color: var(--yellow); padding: 6px 10px; margin-bottom: 10px; border-radius: 2px; }
.plate-num { font: 700 28px/1 var(--display); font-variant-numeric: tabular-nums; }
.plate-unit { font-size: 13px; font-weight: 500; color: #fff; }
.plate-lg { display: inline-flex; padding: 10px 16px; }
.plate-lg .plate-num { font-size: 46px; }
.plate-lg .plate-unit { font-size: 15px; }
.card-power { margin: 0; font-size: 15px; color: var(--steel); line-height: 1.4; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; padding-top: 14px; }
.card-quote { font-weight: 600; font-size: 15px; margin-left: auto; }
.cmp { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; cursor: pointer; min-height: 32px; }
.cmp input { width: 18px; height: 18px; min-height: 0; margin: 0; accent-color: var(--ink); }
.empty { padding: 24px; background: var(--tint); }
.callout { margin-top: 28px; padding: 18px 22px; background: var(--tint); border-left: 5px solid var(--yellow); }
.callout h2 { font-size: 26px; font-weight: 700; text-transform: uppercase; margin-bottom: 4px; }
.callout p { margin: 0; }

/* Compare */
.cmp-bar { position: sticky; bottom: 0; z-index: 15; background: var(--ink); color: #fff; padding-block: 10px; }
.cmp-bar[hidden] { display: none; }
.cmp-bar-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.cmp-bar .link-btn { margin-right: 10px; }
.cmp-dialog { width: min(980px, calc(100vw - 24px)); max-height: 88vh; border: 0; border-radius: 4px; padding: 20px; }
.cmp-dialog::backdrop { background: rgba(0,0,0,.6); }
.cmp-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.cmp-head h2 { font-size: 32px; font-weight: 700; text-transform: uppercase; }
.table-scroll { overflow-x: auto; }
.cmp-table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 15px; }
.cmp-table th, .cmp-table td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.cmp-table thead img { width: 130px; }
.cmp-table thead a { font: 700 22px var(--display); }
.cmp-table tbody th { font-weight: 600; color: var(--steel); width: 170px; }

/* Model page */
.model { padding-block: 32px 64px; }
.model-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.model-photo { position: sticky; top: 84px; }
.gal-main { border: 1px solid var(--line); border-radius: 3px; background: #fff; }
.gal-main img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.gal-main.is-photo { background: var(--ink); }
.gal-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; margin-top: 8px; }
.gal-thumb { padding: 0; background: #fff; border: 2px solid var(--line); border-radius: 3px; cursor: pointer; overflow: hidden; }
.gal-thumb:hover { border-color: var(--steel); }
.gal-thumb[aria-pressed="true"] { border-color: var(--yellow-deep); }
.gal-thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.model h1 { font-size: clamp(48px, 6vw, 72px); font-weight: 700; margin-bottom: 14px; }
.specs { width: 100%; border-collapse: collapse; margin-top: 28px; }
.specs caption { position: absolute; left: -9999px; }
.specs th, .specs td { text-align: left; vertical-align: top; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.specs th { font-weight: 500; color: var(--steel); width: 45%; padding-right: 12px; }
.specs td { font-weight: 600; }
.note { font-size: 14px; color: var(--steel); margin-top: 14px; }

/* Heavy-duty */
.hdl { display: grid; grid-template-columns: 2fr 3fr; gap: 48px; align-items: center; }
.tiers { width: 100%; border-collapse: collapse; min-width: 480px; }
.tiers th, .tiers td { text-align: left; padding: 12px 10px; border-bottom: 1px solid #3a3e45; }
.tiers thead th { color: var(--yellow); font: 700 17px var(--display); text-transform: uppercase; letter-spacing: .05em; }

/* CTA */
.cta { background: var(--yellow); padding-block: 40px; }
.cta-row { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.cta h2 { font-size: clamp(34px, 4vw, 46px); font-weight: 700; text-transform: uppercase; margin-bottom: 6px; }
.cta p { margin: 0; max-width: 38em; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 56px; align-items: start; }
.quote { display: grid; gap: 16px; }
.quote label { display: block; font-weight: 600; font-size: 15px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hp { position: absolute; left: -9999px; }
.quote .btn { justify-self: start; }
.form-status { margin: 0; font-weight: 600; min-height: 1.5em; }
.form-status.err { color: #a81616; }
.field-err { border-color: #a81616; border-width: 2px; }
.call-box { padding: 28px; background: var(--tint); border-left: 5px solid var(--yellow); }
.call-box h2 { font-size: 34px; font-weight: 700; text-transform: uppercase; margin-bottom: 10px; }
#callModel { font-weight: 600; margin-bottom: 6px; }
#callModel:empty { display: none; }
.contact-side h3 { font-size: 22px; font-weight: 700; text-transform: uppercase; margin-bottom: 2px; }
.contact-side .castle-logo { margin: 8px 0 6px; }

/* Footer */
.foot { background: var(--ink); color: #dcdad3; padding-top: 48px; font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.brand-foot { color: #fff; margin-bottom: 12px; }
.foot h2 { font-size: 20px; font-weight: 700; text-transform: uppercase; color: #fff; margin-bottom: 10px; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { padding: 3px 0; }
.foot-small { margin-top: 36px; padding-block: 18px; border-top: 1px solid #3a3e45; font-size: 13px; color: #b5b3ad; }
.foot-small p { margin-bottom: 6px; }

@media (max-width: 1100px) {
  .nav { gap: 14px; }
  .head-phone { display: none; }
}
@media (max-width: 1180px) {
  .menu-btn { display: block; }
  .head-cta { order: 3; display: none; }
  .nav { display: none; order: 4; width: 100%; flex-direction: column; gap: 0; padding-bottom: 12px; }
  .nav.open { display: flex; }
  .nav .nav-contact { display: block; }
  .nav a { padding: 11px 0; border-bottom: 1px solid #3a3e45; }
}
@media (max-width: 960px) {
  .finder { grid-template-columns: 1fr 1fr; }
  .finder h2 { grid-column: 1 / -1; }
  .finder button { grid-column: 1 / -1; }
  .split, .hdl, .model-grid, .contact-grid, .page-head-split .wrap { grid-template-columns: 1fr; gap: 28px; }
  .mosaic { grid-template-columns: 1fr 1fr; }
  .model-photo { position: static; max-width: 520px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .uses { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding-inline: 16px; }
  .head-row { min-height: 60px; gap: 12px; }
  .brand { font-size: 19px; }
  .mark { width: 30px; height: 30px; }
  .hero { min-height: 0; display: block; padding-top: 58vw; }
  .hero-img { width: 100%; height: 66vw; object-position: 60% 60%; }
  .hero::after { background: linear-gradient(180deg, rgba(21,23,26,0) 0, rgba(21,23,26,0) 42vw, var(--ink) 66vw); }
  .hero-copy { padding-block: 8px 76px; }
  .lede { font-size: 18px; }
  .band { padding-block: 44px; }
  .finder, .two { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tile-text { padding: 10px 12px 12px; }
  .tile-text b { font-size: 21px; }
  .tile-text span { font-size: 14px; display: block; line-height: 1.3; }
  .grid, .grid-3 { grid-template-columns: 1fr; }
  .mosaic { grid-template-columns: 1fr; }
  .banner { padding-bottom: 40px; }
  .filters label { flex: 1 1 100%; max-width: none; }
  .filter-count { margin: 0; }
  .cmp-dialog { padding: 14px; }
  .cmp-table { min-width: 460px; font-size: 14px; }
  .cmp-table th, .cmp-table td { padding: 8px 6px; }
  .cmp-table tbody th { width: 104px; }
  .cmp-table thead img { width: 100px; }
  .btn-row .btn { flex: 1 1 100%; }
  .cta-row .btn-row { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
