:root {
  --blue: #143495;
  --blue-deep: #0a1a55;
  --blue-bright: #2a56e0;
  --blue-soft: #e8edfc;
  --ink: #0f1218;
  --ink-2: #3a4150;
  --muted: #6b7385;
  --line: #e3e6ee;
  --bg: #f3f5fa;
  --surface: #ffffff;
  --accent: var(--blue);          /* blue used as text (prices, links, labels) */
  --line-strong: #c9cfdc;
  --art-a: #f1f4fe;
  --art-b: #e2e9fd;
  --art-ink: var(--ink);
  --hub: #d9e3fd;
  --radius: 22px;
  --shadow: 0 2px 4px rgba(10, 26, 85, .05), 0 18px 40px -12px rgba(10, 26, 85, .22);
  --head: "Saira", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, sans-serif;
  color-scheme: light dark;
}

/* Dark mode follows the system setting */
@media (prefers-color-scheme: dark) {
  :root {
    --blue: #2448c4;
    --blue-deep: #071340;
    --blue-bright: #3a62e8;
    --blue-soft: #1b2650;
    --accent: #8fa9ff;
    --ink: #eef1f8;
    --ink-2: #b6bdd0;
    --muted: #8a93a9;
    --line: #283049;
    --line-strong: #39425e;
    --bg: #0a0e19;
    --surface: #141a2b;
    --art-a: #18203a;
    --art-b: #1d2850;
    --art-ink: #e8ecf7;
    --hub: #1d2850;
    --shadow: 0 2px 4px rgba(0, 0, 0, .3), 0 18px 40px -12px rgba(0, 0, 0, .6);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font-family: var(--body); color: var(--ink); line-height: 1.6; background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2 { font-family: var(--head); line-height: 1.02; margin: 0; }
.wrap { width: min(1080px, 100% - 40px); margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 15px/1 var(--body); text-decoration: none; white-space: nowrap; cursor: pointer;
  padding: 13px 20px; border-radius: 999px; border: 2px solid transparent;
  transition: transform .15s ease, background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn:active { transform: scale(.97); }
.btn .ico { width: 16px; height: 16px; fill: currentColor; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 20px -6px rgba(20, 52, 149, .55); }
.btn-primary:hover { background: var(--blue-bright); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-outline-light { border-color: rgba(255,255,255,.45); color: #fff; background: rgba(255,255,255,.06); }
.btn-outline-light:hover { background: #fff; color: #143495; border-color: #fff; }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-lg { padding: 17px 28px; font-size: 16px; }
.btn-block { width: 100%; }

/* ---------- Blue band ---------- */
.band {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, var(--blue-deep) 0%, var(--blue) 60%, #1d44c0 100%);
  padding-bottom: 150px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 70px), 0 100%);
}
body[data-route="detail"] .band { padding-bottom: 110px; }

.header-inner { position: relative; display: flex; align-items: center; justify-content: space-between; height: 84px; }
.brand img { height: 52px; width: auto; }

.band-head { position: relative; padding-top: 36px; }
.head-home { text-align: center; }
.title {
  font-size: clamp(38px, 6.4vw, 72px); font-weight: 800; font-style: italic;
  text-transform: uppercase; letter-spacing: -.005em;
  text-shadow: 0 4px 30px rgba(5, 15, 50, .35);
}
.sub { margin: 16px auto 0; max-width: 560px; color: rgba(255,255,255,.82); font-size: 18px; }
.head:not(.head-home) { max-width: 680px; margin-inline: auto; }
.head:not(.head-home) .sub { margin-left: 0; }
.head:not(.head-home) .title { font-size: clamp(36px, 5.4vw, 60px); }
.back {
  display: inline-flex; margin-bottom: 18px; text-decoration: none;
  font-weight: 600; font-size: 14.5px; color: #dbe4ff;
  padding: 7px 14px; border-radius: 999px; background: rgba(255,255,255,.1);
}
.back:hover { background: rgba(255,255,255,.2); color: #fff; }

/* ---------- Main (overlaps band) ---------- */
/* main's padding gives the tiles' shadows room */
main.wrap { flex: 1; position: relative; width: min(1160px, 100%); padding: 32px 40px 72px; margin-top: -142px; }
body[data-route="detail"] main.wrap { margin-top: -102px; }
.view { animation: enter .4s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes enter { from { opacity: 0; transform: translateY(14px); } }

/* ---------- Tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.tile {
  display: flex; flex-direction: column; text-decoration: none;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .25s cubic-bezier(.2, .7, .2, 1), box-shadow .25s ease;
}
.tile:hover { transform: translateY(-6px); box-shadow: 0 2px 4px rgba(10,26,85,.05), 0 30px 60px -16px rgba(20,52,149,.42); }
.tile:focus-visible { outline: 3px solid var(--blue-bright); outline-offset: 3px; }

.tile-art {
  position: relative; display: grid; place-items: center; height: 200px; overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;  /* tile itself doesn't clip, so the morphing title isn't cut off */
  background:
    linear-gradient(160deg, var(--art-a) 0%, var(--art-b) 100%);
}
.tile-art svg {
  position: relative; width: 128px; height: 128px; z-index: 1;
  filter: drop-shadow(0 10px 14px rgba(20, 52, 149, .22));
  transition: transform .35s cubic-bezier(.2, .7, .2, 1);
}
.tile:hover .tile-art svg { transform: scale(1.06) rotate(-2deg); }

/* illustration parts */
.ink { fill: var(--art-ink); }
.blue { fill: var(--blue); }
.hub { fill: var(--hub); }
.spray { fill: none; stroke: var(--blue-bright); stroke-width: 2.6; stroke-linecap: round; }
.drop { fill: var(--blue-bright); }
.rib { fill: none; stroke: rgba(255,255,255,.5); stroke-width: 2.4; stroke-linecap: round; }
.post { fill: none; stroke: var(--art-ink); stroke-width: 3; stroke-linecap: round; }
.spark { fill: none; stroke: var(--blue-bright); stroke-width: 2.4; stroke-linecap: round; }

.tile-body { display: flex; flex-direction: column; gap: 18px; padding: 24px 24px 22px; }
.tile-name { font: 800 italic 27px/1.02 var(--head); text-transform: uppercase; color: var(--ink); }
.tile-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pill { font: 700 14px/1 var(--body); color: var(--accent); background: var(--blue-soft); padding: 8px 12px; border-radius: 999px; }
.tile-arrow {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; flex: none;
  background: var(--blue); color: #fff; font-size: 16px; transition: transform .2s ease, background-color .2s ease;
}
.tile:hover .tile-arrow { transform: translateX(3px); background: var(--blue-bright); }

.home-note { text-align: center; color: var(--muted); font-size: 15px; margin: 40px 0 0; }
.home-note a { white-space: nowrap; color: var(--accent); font-weight: 600; text-decoration: none; }

/* ---------- Detail views ---------- */
.detail { max-width: 680px; margin-inline: auto; }
.label { font: 700 12.5px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 36px 0 14px; }
.panel { background: var(--surface); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.big-price { font: 800 italic 44px/1 var(--head); color: var(--accent); text-transform: uppercase; margin: 0 0 12px; }
.panel-text { color: var(--ink-2); margin: 0 0 22px; }
.mini-steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; }
.mini-steps li { counter-increment: s; display: flex; align-items: center; gap: 10px; font-weight: 600; }
.mini-steps li::before {
  content: counter(s); width: 30px; height: 30px; border-radius: 9px; flex: none; transform: skewX(-8deg);
  display: grid; place-items: center; background: var(--blue); color: #fff; font: 800 italic 15px/1 var(--head);
}

.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; color: var(--ink-2); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .38em; width: 17px; height: 17px; border-radius: 50%;
  background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.3 2.3 4.7-4.8' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat;
}
.actions { display: flex; gap: 12px; margin-top: 36px; }
.actions .btn-primary { flex: 1; }

/* Trash bin pricing */
.price-rows { list-style: none; padding: 0; margin: 0 0 18px; }
.price-rows li { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.price-rows li:first-child { padding-top: 0; }
.price-rows span { color: var(--ink-2); }
.price-rows strong { font: 800 30px/1 var(--head); color: var(--accent); }
.calc { background: var(--blue-soft); border-radius: 14px; padding: 16px 18px; display: grid; grid-template-columns: 1fr auto; gap: 12px 8px; align-items: center; }
.calc-label { font-weight: 600; }
.stepper { display: flex; align-items: center; gap: 4px; background: var(--surface); border-radius: 999px; padding: 4px; }
.stepper button { width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer; background: var(--blue); color: #fff; font-size: 20px; line-height: 1; }
.stepper button:hover { background: var(--blue-bright); }
.stepper output { min-width: 30px; text-align: center; font-weight: 700; font-size: 17px; }
.calc-total { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; }
.calc-total strong { font: 800 36px/1 var(--head); color: var(--accent); }

/* Golf cart tiers */
.tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.tier { display: flex; flex-direction: column; gap: 20px; background: var(--surface); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.tier .ticks { margin-bottom: auto; }
.tier-featured { outline: 2px solid var(--blue); outline-offset: -2px; background: linear-gradient(180deg, var(--blue-soft), var(--surface) 55%); }
.tier-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tier-top span { font: 800 italic 22px/1 var(--head); text-transform: uppercase; }
.tier-top em {
  display: inline-block; font: 700 10px/1 var(--body); font-style: normal; letter-spacing: .08em; text-transform: uppercase;
  color: #fff; background: var(--blue); padding: 4px 8px; border-radius: 999px; margin-left: 4px; vertical-align: middle;
}
.tier-top strong { font: 800 36px/1 var(--head); color: var(--accent); }

/* Footer */
.site-footer { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 0 36px; color: var(--muted); font-size: 14px; }
.footer-logo { height: 36px; width: auto; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--accent); font-weight: 600; text-decoration: none; }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .tiles { grid-template-columns: 1fr; max-width: 540px; margin-inline: auto; gap: 16px; }
  .tile { flex-direction: row; align-items: stretch; }
  .tile-art { width: 112px; height: auto; flex: none; border-radius: var(--radius) 0 0 var(--radius); }
  .tile-art svg { width: 72px; height: 72px; }
  .tile-body { flex: 1; gap: 12px; padding: 20px 18px; justify-content: center; }
  .tile-name { font-size: 22px; }
}
@media (max-width: 600px) {
  .wrap { width: calc(100% - 32px); }
  .header-inner { height: 70px; }
  .brand img { height: 42px; }
  .band { padding-bottom: 120px; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 40px), 0 100%); }
  body[data-route="detail"] .band { padding-bottom: 96px; }
  .band-head { padding-top: 20px; }
    .sub { font-size: 16.5px; }
  main.wrap { width: 100%; padding: 32px 16px 56px; margin-top: -120px; }
  body[data-route="detail"] main.wrap { margin-top: -94px; }
  .panel, .tier { padding: 22px; }
  .tiers { grid-template-columns: 1fr; }
  .actions { flex-direction: column; }
  .btn-sm span { display: none; }
  .btn-sm { padding: 10px; }
}

@media (max-width: 380px) {
  .title { font-size: 34px; }
  .title br { display: none; }
  .tile-art { width: 86px; }
  .tile-art svg { width: 58px; height: 58px; }
  .tile-body { padding: 16px 14px; }
  .tile-name { font-size: 19px; }
  .pill { font-size: 13px; padding: 7px 10px; }
}
.pill { white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

html.ready .view { animation: none; }
