/* Kestrel Supply Co. — demo theme (off-black, concrete, signal orange) */
@font-face { font-family: "Unbounded"; font-weight: 200 900; font-display: swap; src: url("../fonts/unbounded.woff2") format("woff2-variations"), url("../fonts/unbounded.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 200 800; font-display: swap; src: url("../fonts/manrope.woff2") format("woff2-variations"), url("../fonts/manrope.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --black: #111111;
  --ink: #161616;
  --concrete: #ececea;
  --stone: #f6f6f4;
  --white: #ffffff;
  --muted: #6b6b68;
  --line: #e1e1dd;
  --accent: #ff5a36;
  --accent-2: #ff7556;
  --accent-fill: #d23f1c;  /* accent behind white text */
  --accent-ink: #c23516;   /* accent as text on light */
  --green: #15803d;
  --display: "Unbounded", "Arial Black", Arial, sans-serif;
  --body: "Manrope", "Segoe UI", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--white); color: var(--ink); font: 500 16px/1.55 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; overflow-x: clip; }
h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.02; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1200px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 32px); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border: 1.5px solid transparent; border-radius: 0; font-family: var(--display); font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
.btn-accent { background: var(--accent-fill); color: #fff; }
.btn-accent:hover { background: #b83214; }
.btn-dark { background: var(--black); color: #fff; }
.btn-dark:hover { background: #333; }
.btn-line { border-color: var(--black); color: var(--black); background: transparent; }
.btn-line:hover { background: var(--black); color: #fff; }
.btn-block { width: 100%; }
.grow { flex: 1; }
.link { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: .85rem; margin-left: 10px; font-weight: 600; }

.promo { background: var(--black); color: #d4d4d0; text-align: center; font-size: .82rem; padding: 8px 16px; }
.promo b { color: var(--accent); }

/* Header */
.top { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; gap: 16px; height: 68px; }
.logo { font-family: var(--display); font-weight: 900; font-size: 1.3rem; letter-spacing: -0.03em; color: var(--black); text-decoration: none; line-height: .9; display: grid; }
.logo span { font-family: var(--body); font-size: .62rem; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.search { position: relative; flex: 1; max-width: 440px; margin-left: auto; }
.search svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); }
.search input { width: 100%; min-height: 44px; padding: 8px 14px 8px 42px; border: 1.5px solid var(--line); background: var(--stone); font: inherit; color: var(--ink); }
.search input:focus { outline: none; border-color: var(--black); background: #fff; }
.icon-btn { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: transparent; color: var(--black); cursor: pointer; }
.icon-btn svg { width: 24px; height: 24px; }
.count { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 4px; display: grid; place-items: center; border-radius: 9px; background: var(--accent-fill); color: #fff; font-size: .7rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.count:empty, .count[data-zero="true"] { display: none; }
.bag.bump .count { animation: bump .35s ease; }
@keyframes bump { 50% { transform: scale(1.35); } }
@media (max-width: 640px) {
  .top-inner { flex-wrap: wrap; height: auto; padding-block: 10px; gap: 8px 10px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .logo { margin-right: auto; }
}

/* Hero */
.hero { background: var(--concrete); overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 24px; min-height: 380px; padding-block: 40px; }
.tag-line { font-size: .78rem; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 14px; }
.hero h1 { font-size: clamp(2.4rem, 1.4rem + 4.4vw, 4.8rem); font-weight: 900; margin-bottom: 18px; }
.lede { color: var(--muted); max-width: 42ch; margin-bottom: 24px; font-size: 1.05rem; }
.hero-art { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
.hero-art svg { width: 100%; height: auto; filter: drop-shadow(0 20px 22px rgba(0,0,0,.18)); }
.hero-art svg:first-child { transform: rotate(-6deg) translateY(10px); }
.hero-art svg:last-child { transform: rotate(5deg); }
@media (max-width: 760px) { .hero-inner { grid-template-columns: 1fr; min-height: 0; } .hero-art { max-width: 340px; } }

/* Shop */
.shop { padding-block: 48px 72px; }
.shop-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.shop-head h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); font-weight: 800; }
.results { color: var(--muted); font-size: .92rem; }
.filters { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 14px; margin-bottom: 22px; border-block: 1px solid var(--line); position: sticky; top: 68px; z-index: 20; background: #fff; }
.cats { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.cats::-webkit-scrollbar { display: none; }
.cats button { flex: none; min-height: 40px; padding: 6px 16px; border: 1.5px solid var(--line); background: #fff; font-weight: 700; cursor: pointer; transition: all .15s ease; }
.cats button:hover { border-color: var(--black); }
.cats button[aria-pressed="true"] { background: var(--black); border-color: var(--black); color: #fff; }
.f-right { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.colour-filter { display: flex; gap: 6px; }
.sel select { min-height: 40px; padding: 6px 34px 6px 12px; border: 1.5px solid var(--line); background: #fff; font: inherit; font-weight: 600; color: var(--ink); appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; cursor: pointer; }
.sel select:focus { outline: none; border-color: var(--black); }
@media (max-width: 640px) { .filters { position: static; } }

.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.sw { width: 22px; height: 22px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); position: relative; }
.sw[aria-pressed="true"]::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--black); }
.swatches.lg .sw { width: 34px; height: 34px; }
.colour-filter .sw { width: 26px; height: 26px; }

.grid { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 18px; }
.card { display: grid; gap: 8px; align-content: start; animation: in .3s ease both; }
@keyframes in { from { opacity: 0; transform: translateY(8px); } }
.art { position: relative; aspect-ratio: 4 / 5; max-width: 100%; background: var(--stone); display: grid; place-items: center; overflow: hidden; cursor: pointer; border: 0; padding: 0; }
.art svg { width: 76%; height: auto; transition: transform .35s ease; filter: drop-shadow(0 14px 14px rgba(0,0,0,.14)); }
.card:hover .art svg { transform: scale(1.05) rotate(-2deg); }
.badge { position: absolute; top: 10px; left: 10px; padding: 4px 8px; background: var(--black); color: #fff; font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.badge.sale { background: var(--accent-fill); }
.heart { position: absolute; top: 6px; right: 6px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255,255,255,.85); display: grid; place-items: center; cursor: pointer; color: var(--black); z-index: 2; }
.heart svg { width: 20px; height: 20px; }
.heart[aria-pressed="true"] svg { fill: var(--accent); stroke: var(--accent); animation: bump .3s ease; }
.quick { position: absolute; left: 10px; right: 10px; bottom: 10px; min-height: 42px; border: 0; background: var(--black); color: #fff; font-family: var(--display); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; transform: translateY(130%); transition: transform .2s ease; }
.card:hover .quick, .quick:focus-visible { transform: none; }
@media (hover: none) { .quick { transform: none; position: static; margin-top: 0; } }
.c-name { font-weight: 700; display: flex; justify-content: space-between; gap: 10px; }
.c-price { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.c-price s { color: var(--muted); font-weight: 500; margin-right: 6px; }
.c-price .now { color: var(--accent-ink); }
.c-meta { color: var(--muted); font-size: .85rem; }
.empty-state { display: grid; justify-items: center; gap: 14px; padding: 48px 0; color: var(--muted); }
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; } }

.usp { background: var(--black); color: #d4d4d0; padding-block: 34px; }
.usp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.usp b { display: block; font-family: var(--display); font-size: .9rem; color: #fff; margin-bottom: 4px; }
.usp span { font-size: .92rem; }
@media (max-width: 720px) { .usp-grid { grid-template-columns: 1fr; } }
.foot { border-top: 1px solid #2a2a2a; background: var(--black); color: #a3a3a0; padding-block: 24px; padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); font-size: .9rem; }
.foot-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.foot a { color: var(--accent); font-weight: 700; }

/* Modals */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.55); animation: fade .2s ease both; }
@keyframes fade { from { opacity: 0; } }
.x { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border: 0; background: transparent; font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--ink); z-index: 3; }
.qv-card { position: relative; width: min(920px, 100%); max-height: 92vh; overflow-y: auto; background: #fff; display: grid; grid-template-columns: 1fr 1fr; animation: up .25s ease both; }
@keyframes up { from { transform: translateY(16px); opacity: 0; } }
.qv-art { background: var(--stone); display: grid; place-items: center; min-height: 360px; }
.qv-art svg { width: 70%; height: auto; filter: drop-shadow(0 20px 20px rgba(0,0,0,.16)); }
.qv-info { padding: 32px 28px; display: grid; gap: 14px; align-content: start; }
.qv-badge { font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-ink); min-height: 1em; }
.qv-info h2 { font-size: 1.6rem; font-weight: 800; padding-right: 30px; }
.qv-price { font-size: 1.3rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.qv-price s { color: var(--muted); font-weight: 500; margin-right: 8px; font-size: 1rem; }
.qv-desc { color: var(--muted); }
.qv-field legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.qv-field legend b { font-weight: 500; color: var(--muted); }
.sizes { display: flex; flex-wrap: wrap; gap: 6px; }
.sizes button { min-width: 50px; min-height: 44px; border: 1.5px solid var(--line); background: #fff; font-weight: 700; cursor: pointer; }
.sizes button:hover:not(:disabled) { border-color: var(--black); }
.sizes button[aria-pressed="true"] { background: var(--black); border-color: var(--black); color: #fff; }
.sizes button:disabled { color: #b5b5b0; text-decoration: line-through; cursor: not-allowed; }
.size-guide { margin-top: 12px; width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
.size-guide th, .size-guide td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.err { color: #c2410c; font-size: .86rem; font-weight: 700; margin-top: 6px; }
.qv-buy { display: flex; gap: 10px; margin-top: 4px; }
.stepper { display: flex; align-items: center; border: 1.5px solid var(--line); }
.stepper button { width: 40px; height: 44px; border: 0; background: #fff; font-size: 1.2rem; cursor: pointer; }
.stepper output { min-width: 28px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  .modal { padding: 0; align-items: end; }
  .qv-card { grid-template-columns: 1fr; max-height: 94vh; }
  .qv-art { min-height: 240px; }
  .qv-info { padding: 22px 18px calc(22px + env(safe-area-inset-bottom, 0px)); }
}

/* Drawer */
.scrim { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.45); animation: fade .2s ease both; }
.drawer { position: fixed; z-index: 90; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: #fff; display: flex; flex-direction: column; animation: slide .28s cubic-bezier(.2,.7,.2,1) both; padding-top: env(safe-area-inset-top, 0px); }
@keyframes slide { from { transform: translateX(100%); } }
.dr-head { position: relative; display: flex; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.dr-head h2 { font-size: 1.3rem; font-weight: 800; }
.ship { padding: 14px 20px; background: var(--stone); font-size: .9rem; font-weight: 600; display: grid; gap: 8px; }
.ship-bar { height: 6px; background: var(--line); overflow: hidden; }
.ship-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .4s ease; }
.ship.done .ship-bar i { background: var(--green); }
.lines { list-style: none; flex: 1; overflow-y: auto; padding: 4px 20px; }
.line { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); animation: in .25s ease both; }
.l-art { width: 72px; height: 88px; background: var(--stone); display: grid; place-items: center; }
.l-art svg { width: 80%; height: auto; }
.l-info { display: grid; gap: 4px; }
.l-info b { font-weight: 700; }
.l-info small { color: var(--muted); }
.l-qty { display: flex; align-items: center; gap: 4px; }
.l-qty button { width: 30px; height: 30px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.l-qty output { min-width: 22px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.l-right { display: grid; justify-items: end; gap: 6px; }
.l-right b { font-variant-numeric: tabular-nums; }
.l-remove { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: .82rem; }
.bag-empty { padding: 40px 20px; color: var(--muted); text-align: center; flex: 1; }
.dr-foot { padding: 16px 20px calc(18px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); display: grid; gap: 10px; }
.code { display: flex; gap: 8px; }
.code input { flex: 1; min-height: 44px; padding: 8px 12px; border: 1.5px solid var(--line); font: inherit; text-transform: uppercase; }
.code input:focus { outline: none; border-color: var(--black); }
.code .btn { min-height: 44px; padding: 8px 14px; }
.code-msg { font-size: .85rem; font-weight: 700; min-height: 1.2em; }
.code-msg.ok { color: var(--green); } .code-msg.bad { color: #c2410c; }
.totals { margin: 0; display: grid; gap: 6px; font-variant-numeric: tabular-nums; }
.totals div { display: flex; justify-content: space-between; gap: 12px; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; font-weight: 700; }
.totals .grand { padding-top: 8px; border-top: 1px solid var(--line); }
.totals .grand dt { color: var(--ink); font-weight: 800; }
.totals .grand dd { font-family: var(--display); font-size: 1.2rem; }

/* Checkout */
.co-card { position: relative; width: min(560px, 100%); max-height: 92vh; overflow-y: auto; background: #fff; padding: 28px; display: grid; gap: 18px; animation: up .25s ease both; }
.co-card h2 { font-size: 1.5rem; font-weight: 800; }
.co-steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; counter-reset: s; }
.co-steps li { counter-increment: s; padding-top: 8px; border-top: 3px solid var(--line); font-size: .82rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.co-steps li::before { content: counter(s) ". "; }
.co-steps li.on { border-color: var(--accent); color: var(--ink); }
.co-panel { display: grid; gap: 14px; animation: in .25s ease both; }
.cf-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; }
.cf { display: grid; gap: 6px; }
.cf label { font-weight: 700; font-size: .9rem; }
.cf input { min-height: 48px; padding: 10px 12px; border: 1.5px solid var(--line); font: inherit; color: var(--ink); }
.cf input:focus { outline: none; border-color: var(--black); }
.cf input[aria-invalid="true"] { border-color: #c2410c; }
.ship-opt { position: relative; display: block; cursor: pointer; }
.ship-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ship-opt span { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 14px 16px; border: 1.5px solid var(--line); transition: border-color .15s ease, background-color .15s ease; }
.ship-opt b { font-weight: 800; }
.ship-opt small { color: var(--muted); grid-column: 1; }
.ship-opt em { font-style: normal; font-weight: 800; grid-row: 1 / span 2; grid-column: 2; align-self: center; font-variant-numeric: tabular-nums; }
.ship-opt input:checked + span { border-color: var(--black); background: var(--stone); box-shadow: inset 0 0 0 1px var(--black); }
.ship-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.review { list-style: none; display: grid; gap: 8px; font-size: .95rem; }
.review li { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.review li span:first-child { color: var(--muted); }
.demo-note { font-size: .84rem; color: var(--muted); }
.co-nav { display: flex; justify-content: space-between; gap: 10px; }
.co-nav #co-next, .co-nav #co-place { margin-left: auto; }
.co-done { display: grid; gap: 12px; justify-items: start; }
.co-done:focus { outline: none; }
.tick { width: 52px; height: 52px; display: grid; place-items: center; background: var(--accent-fill); color: #fff; font-size: 1.6rem; font-weight: 800; }
.co-done h3 { font-size: 1.6rem; font-weight: 800; }
.co-done p { color: var(--muted); }
@media (max-width: 520px) { .cf-row { grid-template-columns: 1fr; } .co-card { padding: 22px 18px calc(22px + env(safe-area-inset-bottom, 0px)); max-height: 94vh; } }

.toast { position: fixed; z-index: 120; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--black); color: #fff; padding: 12px 18px; font-weight: 700; font-size: .92rem; transition: opacity .2s ease, transform .2s ease; white-space: nowrap; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
section[id] { scroll-margin-top: 80px; }

@media (pointer: coarse) { .colour-filter .sw, .swatches .sw { width: 32px; height: 32px; } .swatches.lg .sw { width: 40px; height: 40px; } }
