/* Drop the licensed Mango Grotesque files into assets/fonts/ with these names */
@font-face {
  font-family: "Mango Grotesque";
  src: url("../fonts/MangoGrotesque-BoldItalic.woff2") format("woff2"),
       url("../fonts/MangoGrotesque-BoldItalic.woff") format("woff");
  font-weight: 700; font-style: italic; font-display: swap;
}

:root {
  --black: #000;
  --white: #fff;
  --red: #ff1400;
  --grey-1: #f3f3f3;
  --grey-2: #e2e2e2;
  --grey-3: #9a9a9a;
  --grey-4: #555;
  --display: "Mango Grotesque", "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --side: 300px;
  --ease: cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--body); color: var(--black); background: var(--white); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }

.display, h1, h2, h3, .btn, .menu-item, .card-title, .step-num {
  font-family: var(--display); font-style: italic; font-weight: 700; text-transform: uppercase; letter-spacing: .01em;
}

/* ---------- Layout ---------- */
.app { min-height: 100vh; min-height: 100dvh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--side);
  background: var(--black); color: var(--white);
  display: flex; flex-direction: column; padding: 28px 24px; overflow-y: auto; z-index: 20;
}
.main { margin-left: var(--side); min-height: 100vh; min-height: 100dvh; outline: none; }
.stage { max-width: 1080px; margin: 0 auto; padding: 56px 48px 80px; }

/* ---------- Sidebar ---------- */
.logo { display: block; width: 96px; aspect-ratio: 1; margin-bottom: 36px; }
.logo img { width: 100%; height: 100%; object-fit: cover; }
.menu { display: flex; flex-direction: column; flex: 1; }
.menu-item {
  display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--white); text-decoration: none; font-size: 30px; line-height: 1; text-align: left;
}
.menu-item.is-active::before { content: ""; width: 10px; height: 10px; background: var(--red); flex: none; }
.menu-item:disabled { color: #444; cursor: default; }
.menu-results { margin-top: 28px; }
.menu-results.is-active { color: var(--white); }

.steps { list-style: none; margin: 18px 0 0; padding: 0 0 0 20px; border-left: 1px solid #222; counter-reset: s; }
.steps li { counter-increment: s; }
.steps button {
  display: flex; gap: 12px; align-items: baseline; width: 100%; padding: 7px 0; background: none; border: 0;
  color: #4a4a4a; text-align: left; font-size: 14px; cursor: default; transition: color .2s;
}
.steps button::before { content: counter(s, decimal-leading-zero); font-family: var(--display); font-style: italic; font-weight: 700; font-size: 16px; width: 22px; flex: none; }
.steps button .ans { display: block; color: var(--grey-3); font-size: 12px; margin-top: 2px; }
.steps li.done button { color: var(--white); cursor: pointer; }
.steps li.done button:hover { color: var(--red); }
.steps li.current button { color: var(--white); }
.steps li.current button::before { color: var(--red); }
.side-foot { font-size: 11px; color: #555; margin-top: 24px; }

.mobile-bar { display: none; }

/* ---------- Question header ---------- */
.q-head { margin-bottom: 36px; }
.step-num { font-size: 22px; color: var(--red); margin: 0 0 6px; }
.q-title { font-size: clamp(44px, 6vw, 76px); line-height: .9; margin: 0; }
.q-sub { color: var(--grey-4); margin: 14px 0 0; font-size: 16px; max-width: 560px; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.grid.g2 { grid-template-columns: repeat(2, minmax(0, 260px)); }
.grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.list { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.card {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end;
  min-height: 92px; padding: 18px 20px; background: var(--white); border: 2px solid var(--black);
  cursor: pointer; text-align: left; transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.card:hover { transform: translateY(-2px); }
.card:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.card.is-selected { background: var(--black); color: var(--white); }
.card.is-selected::after {
  content: ""; position: absolute; top: 12px; right: 12px; width: 12px; height: 12px; background: var(--red);
}
.card-title { font-size: 30px; line-height: .95; }
.card-sub { font-size: 13px; color: var(--grey-4); margin-top: 6px; }
.card.is-selected .card-sub { color: var(--grey-3); }

/* image cards (club types) */
.card-img { padding: 0; min-height: 0; justify-content: flex-start; overflow: hidden; }
.card-img .ph { width: 100%; aspect-ratio: 4/3; background: var(--grey-1); display: grid; place-items: center; transition: background .2s; }
.card-img .ph img { width: 62%; height: 80%; object-fit: contain; transition: transform .35s var(--ease); }
.card-img:hover .ph img { transform: scale(1.06) rotate(-3deg); }
.card-img .card-body { padding: 14px 18px 16px; }
.card-img.is-selected .ph { background: #161616; }
.card-img.is-selected .ph img { filter: invert(1); }

/* hand cards */
.card-hand { align-items: center; justify-content: center; min-height: 240px; gap: 18px; }
.card-hand svg { width: 96px; height: 120px; fill: currentColor; transition: transform .3s var(--ease); }
.card-hand:hover svg { transform: rotate(-6deg); }
.card-hand.left svg { transform: scaleX(-1); }
.card-hand.left:hover svg { transform: scaleX(-1) rotate(-6deg); }

/* animated line graphics: shot shape + flight */
.card-gfx { padding: 0; min-height: 0; justify-content: flex-start; }
.card-gfx .gfx { width: 100%; aspect-ratio: 1; background: var(--grey-1); display: grid; place-items: center; transition: background .2s; }
.card-gfx.flight .gfx { aspect-ratio: 16/10; }
.card-gfx .gfx svg { width: 78%; height: 86%; overflow: visible; }
.card-gfx .card-body { padding: 14px 18px 16px; }
.gfx .target { stroke: var(--grey-3); stroke-width: 1.5; stroke-dasharray: 4 5; fill: none; }
.gfx .ground { stroke: var(--grey-2); stroke-width: 2; }
.gfx .flag { fill: var(--red); }
.gfx .pole { stroke: var(--black); stroke-width: 2; }
.gfx .ball { fill: var(--white); stroke: var(--black); stroke-width: 2; }
.gfx .shot {
  fill: none; stroke: var(--black); stroke-width: 3.5; stroke-linecap: butt;
  stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .9s var(--ease);
}
.gfx .ghost { fill: none; stroke: #d6d6d6; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 2 6; }
.gfx .land { fill: var(--red); opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(0); transition: opacity .2s .75s, transform .3s .75s var(--ease); }
.card-gfx:hover .shot, .card-gfx:focus-visible .shot, .card-gfx.is-selected .shot { stroke-dashoffset: 0; stroke-linecap: round; }
.card-gfx:hover .land, .card-gfx:focus-visible .land, .card-gfx.is-selected .land { opacity: 1; transform: scale(1); }
.card-gfx.is-selected .gfx { background: #161616; }
.card-gfx.is-selected .shot { stroke: var(--white); }
.card-gfx.is-selected .ghost { stroke: #333; }
.card-gfx.is-selected .ball { fill: #161616; stroke: var(--white); }
.card-gfx.is-selected .pole { stroke: var(--white); }
.card-gfx.is-selected .ground { stroke: #333; }
.mirror .gfx svg { transform: scaleX(-1); }
@media (hover: none) { .card-gfx .shot { stroke-dashoffset: 0; } .card-gfx .land { opacity: 1; transform: scale(1); } }

/* brand cards */
.card-brand { align-items: center; justify-content: center; min-height: 110px; }
.card-brand img { max-height: 46px; max-width: 80%; filter: grayscale(1) brightness(0); transition: filter .25s; }
.card-brand:hover img { filter: none; }
.card-brand.is-selected img { filter: grayscale(1) brightness(0) invert(1); }
.card-brand.is-selected:hover img { filter: none; }
.card-brand .brand-word { font-family: var(--display); font-style: italic; font-weight: 700; font-size: 32px; text-transform: uppercase; transition: color .25s; }
.card-brand:hover .brand-word { color: var(--bc, var(--black)); }
.card-brand.is-selected:hover .brand-word { color: var(--bc, var(--white)); }
.card-brand.none .brand-word { font-size: 24px; }

/* ---------- Buttons / nav ---------- */
.q-foot { display: flex; align-items: center; gap: 16px; margin-top: 40px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 28px; border: 2px solid var(--black); background: var(--black); color: var(--white);
  font-size: 24px; text-decoration: none; cursor: pointer; transition: background .2s, border-color .2s, color .2s;
}
.btn:hover { background: var(--red); border-color: var(--red); }
.btn:disabled { background: var(--grey-2); border-color: var(--grey-2); color: var(--grey-3); cursor: not-allowed; }
.btn-ghost { background: none; color: var(--black); }
.btn-ghost:hover { background: var(--black); color: var(--white); border-color: var(--black); }
.btn-sm { height: 40px; padding: 0 18px; font-size: 19px; }
.hint { color: var(--grey-4); font-size: 14px; }

/* ---------- Loading ---------- */
.loading { display: grid; place-items: center; min-height: 60vh; text-align: center; }
.loading .ballroll { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--black); margin: 0 auto 22px; animation: roll 1s var(--ease) infinite alternate; }
@keyframes roll { from { transform: translateX(-60px); } to { transform: translateX(60px); background: var(--red); border-color: var(--red); } }

/* ---------- Results ---------- */
.res-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip { border: 1px solid var(--black); padding: 5px 10px; font-size: 13px; }
.disclosure { font-size: 13px; color: var(--grey-4); margin: 16px 0 0; }

.pick { border: 2px solid var(--black); background: var(--white); display: grid; }
.pick-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); border: 3px solid var(--red); margin-bottom: 20px; }
.pick-img { background: var(--grey-1); display: grid; place-items: center; padding: 28px; position: relative; aspect-ratio: 1; }
.pick-img img { max-height: 100%; width: 80%; object-fit: contain; }
.pick-top .pick-img { aspect-ratio: auto; min-height: 380px; }
.pick-tag { position: absolute; top: 0; left: 0; background: var(--red); color: var(--white); padding: 8px 14px; font-family: var(--display); font-style: italic; font-weight: 700; font-size: 22px; text-transform: uppercase; }
.pick-tag.alt { background: var(--black); }
.pick-body { padding: 26px 28px 28px; display: flex; flex-direction: column; }
.pick-brand { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--grey-4); }
.pick-name { font-size: 44px; line-height: .92; margin: 6px 0 10px; }
.pick:not(.pick-top) .pick-name { font-size: 34px; }
.pick-from { font-size: 15px; margin-bottom: 14px; }
.pick-from b { font-size: 18px; }
.pick-why { font-size: 15px; line-height: 1.55; margin: 0 0 14px; border-left: 3px solid var(--red); padding-left: 12px; }
.reasons { list-style: none; padding: 0; margin: 0 0 18px; font-size: 14px; }
.reasons li { display: flex; gap: 10px; padding: 4px 0; }
.reasons li::before { content: ""; flex: none; width: 14px; height: 8px; border-left: 2px solid var(--red); border-bottom: 2px solid var(--red); transform: rotate(-45deg) translate(2px, 2px); margin-top: 3px; }
.offers { margin-top: auto; border-top: 2px solid var(--black); }
.offer { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--grey-2); }
.offer-name { font-weight: 600; font-size: 14px; }
.offer-name .best { display: inline-block; margin-left: 6px; background: var(--red); color: var(--white); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; padding: 3px 6px; vertical-align: 1px; }
.offer-price { font-family: var(--display); font-style: italic; font-weight: 700; font-size: 24px; }
.offer-price.muted { font-family: var(--body); font-style: normal; font-weight: 400; font-size: 13px; color: var(--grey-4); }
.offer.oos { opacity: .55; }
.no-offers { font-size: 14px; color: var(--grey-4); padding: 12px 0; }

.picks-alt { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.picks-alt .pick { grid-template-rows: auto 1fr; }

.section-title { font-size: 52px; line-height: .9; margin: 64px 0 8px; }
.section-sub { color: var(--grey-4); margin: 0 0 24px; }

.acc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.acc { border: 2px solid var(--black); display: flex; flex-direction: column; }
.acc .pick-img { aspect-ratio: 1; padding: 22px; }
.acc .pick-tag { font-size: 17px; padding: 6px 10px; }
.acc-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.acc-name { font-family: var(--display); font-style: italic; font-weight: 700; text-transform: uppercase; font-size: 24px; line-height: .95; margin: 4px 0 8px; }
.acc .offer { grid-template-columns: 1fr auto; gap: 8px; padding: 8px 0; }
.acc .offer .btn { grid-column: 1 / -1; width: 100%; }
.acc .offer-price { font-size: 20px; }

/* save panel */
.save { margin-top: 64px; background: var(--black); color: var(--white); padding: 40px; display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: start; }
.save h2 { font-size: 56px; line-height: .9; margin: 0 0 12px; }
.save h2 span { color: var(--red); }
.save p { color: #bbb; margin: 0; line-height: 1.5; }
.form { display: grid; gap: 12px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #aaa; }
.field input { height: 52px; padding: 0 16px; border: 2px solid #333; background: #111; color: var(--white); font: 16px var(--body); border-radius: 0; }
.field input:focus { outline: none; border-color: var(--red); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: #bbb; cursor: pointer; }
.check input { margin-top: 2px; accent-color: var(--red); width: 16px; height: 16px; flex: none; }
.save .btn { background: var(--red); border-color: var(--red); width: 100%; }
.save .btn:hover { background: var(--white); border-color: var(--white); color: var(--black); }
.form-msg { font-size: 14px; min-height: 20px; }
.form-msg.err { color: #ff8a80; }
.form-msg.ok { color: var(--white); }
.hp { position: absolute; left: -9999px; }
.res-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.empty { border: 2px dashed var(--grey-2); padding: 32px; color: var(--grey-4); }

/* step transition */
.anim-in { animation: in .45s var(--ease) both; }
@keyframes in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .gfx .shot { stroke-dashoffset: 0; } .gfx .land { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .acc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pick-top { grid-template-columns: 1fr; }
  .pick-top .pick-img { min-height: 0; aspect-ratio: 16/10; }
  .save { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  :root { --side: 0px; }
  .sidebar { display: none; }
  .mobile-bar {
    display: flex; align-items: center; gap: 14px; position: sticky; top: 0; z-index: 20;
    background: var(--black); color: var(--white); padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  }
  .logo-sm { width: 40px; height: 40px; flex: none; }
  .logo-sm img { width: 100%; height: 100%; object-fit: cover; }
  .mobile-progress { flex: 1; height: 4px; background: #333; }
  .mobile-progress span { display: block; height: 100%; width: 0; background: var(--red); transition: width .3s var(--ease); }
  .mobile-count { font-family: var(--display); font-style: italic; font-weight: 700; font-size: 20px; min-width: 44px; text-align: right; }
  .stage { padding: 28px 16px 48px; }
  .q-head { margin-bottom: 24px; }
  .grid, .grid.g2, .grid.g3, .grid.g4, .grid.list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card { padding: 14px; min-height: 76px; }
  .card-img, .card-gfx { padding: 0; }
  .card-title { font-size: 24px; }
  .card-hand { min-height: 180px; }
  .card-hand svg { width: 70px; height: 90px; }
  .card-img .card-body, .card-gfx .card-body { padding: 10px 12px 12px; }
  .picks-alt { grid-template-columns: 1fr; }
  .pick-name { font-size: 36px; }
  .pick-body { padding: 20px; }
  .section-title { font-size: 40px; margin-top: 48px; }
  .save { padding: 28px 20px; margin-left: -16px; margin-right: -16px; }
  .save h2 { font-size: 44px; }
  .q-foot { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--white) 30%); padding: 20px 0 12px; margin-top: 20px; }
  .q-foot .btn { flex: 1; }
}
@media (max-width: 420px) {
  .grid.list { grid-template-columns: 1fr; }
  .acc-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .acc-name { font-size: 20px; }
  .offer { gap: 8px; }
}

/* accessory + mobile tidy-ups */
.acc .offer-price.muted { font-size: 12px; }
.acc .btn-sm { font-size: 17px; white-space: nowrap; }
@media (max-width: 860px) {
  .picks-alt .pick-img { aspect-ratio: 16/10; }
  .acc .offer-name { font-size: 12px; }
}
