/* Bowler. Colors and type come from brand/brand-guide.md. */
:root {
  --cream: #F4F0E4;
  --ink: #0B1730;
  --blue: #0E2244;
  --brass: #C19A3F;
  --mist: #D5DCE8;
  --slate: #36415E;
  --white: #FFFFFF;
  --paper: #FFFDF8;
  --pad: clamp(72px, 11vw, 148px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font-family: "Hanken Grotesk", -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 18px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
img, svg, canvas { display: block; max-width: 100%; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
section { padding: var(--pad) 0; scroll-margin-top: 64px; }

h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(38px, 5.2vw, 56px); line-height: 1.04; letter-spacing: -0.04em; font-weight: 700; text-wrap: balance; }
h2 { font-size: clamp(34px, 5vw, 60px); line-height: 1.02; letter-spacing: -0.03em; font-weight: 700; text-wrap: balance; }
h3 { font-size: 22px; line-height: 1.2; letter-spacing: -0.01em; font-weight: 700; }
p { max-width: 58ch; }

.skip { position: absolute; left: 12px; top: -60px; background: var(--blue); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 20; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; border-radius: 6px; }

/* buttons and links */
.btn {
  display: inline-block; border: 0; cursor: pointer; font: inherit; font-weight: 700; text-decoration: none;
  background: var(--blue); color: #fff; padding: 15px 28px; border-radius: 999px;
  transition: transform .18s ease, background-color .18s ease;
}
.btn:hover { background: var(--ink); transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn.small { padding: 10px 20px; font-size: 16px; }
.btn.brass { background: var(--brass); color: var(--ink); }
.btn.brass:hover { background: #D2AC53; }
.text-link { color: var(--blue); font-weight: 500; text-underline-offset: 5px; text-decoration-thickness: 2px; text-decoration-color: var(--brass); }
.text-link:hover { text-decoration-color: var(--blue); }

/* top menu */
.nav { position: sticky; top: 0; z-index: 10; background: rgba(244, 240, 228, .86); backdrop-filter: saturate(1.4) blur(10px); transition: box-shadow .2s ease; }
.nav.scrolled { box-shadow: 0 1px 0 var(--mist); }
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 64px; }
.brand img { width: 118px; height: auto; }
.nav nav { display: none; gap: 30px; }
.nav nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 16px; }
.nav nav a:hover { color: var(--blue); text-decoration: underline; text-decoration-color: var(--brass); text-underline-offset: 6px; text-decoration-thickness: 2px; }

/* top of the page */
.hero { padding-top: clamp(28px, 5vw, 64px); padding-bottom: clamp(64px, 9vw, 120px); overflow: hidden; }
.hero-grid { display: grid; gap: 44px; align-items: center; }
.hero h1 { max-width: 16ch; }
.lede { font-size: clamp(18px, 1.6vw, 20px); line-height: 1.5; color: var(--slate); margin-top: 22px; max-width: 46ch; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 26px; margin-top: 30px; }
.aside { font-size: 16px; color: var(--slate); margin-top: 34px; max-width: 40ch; }

/* the sample dashboard */
.dash { background: var(--white); border: 1px solid var(--mist); border-radius: 16px; padding: clamp(16px, 2.4vw, 24px); box-shadow: 0 24px 48px -20px rgba(14, 34, 68, .28), 0 2px 6px rgba(14, 34, 68, .06); font-size: 15px; line-height: 1.35; }
.dash p { max-width: none; }
.dash-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 20px; padding-bottom: 14px; border-bottom: 1px solid var(--mist); }
.dash-title { font-weight: 700; font-size: 17px; }
.dash-sub { color: var(--slate); font-size: 14px; }
.seg { display: inline-flex; background: var(--cream); border-radius: 10px; padding: 3px; }
.seg button { font: inherit; font-size: 14px; font-weight: 500; border: 0; background: none; color: var(--slate); padding: 7px 12px; border-radius: 8px; cursor: pointer; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--white); color: var(--ink); font-weight: 700; box-shadow: 0 1px 3px rgba(14, 34, 68, .16); }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; margin: 16px 0; }
.kpis dt { color: var(--slate); font-size: 13px; }
.kpis dd { margin: 2px 0 0; font-size: clamp(22px, 2.4vw, 27px); font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi-note { color: var(--slate); font-size: 12px; }
.dash-body { display: grid; gap: 18px; border-top: 1px solid var(--mist); padding-top: 14px; }
.chart { margin: 0; }
.chart figcaption, .board-title { font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.cols-chart { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; height: 150px; }
.day { position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; outline-offset: 2px; }
.day .bar { display: block; background: var(--blue); border-radius: 4px 4px 0 0; min-height: 4px; transition: background-color .15s ease; }
.day:hover .bar, .day:focus-visible .bar { background: var(--brass); }
.day .lbl { text-align: center; font-size: 12px; color: var(--slate); padding-top: 6px; border-top: 1px solid var(--mist); }
.bar-none { flex: 1; display: grid; place-items: end center; padding-bottom: 6px; font-size: 11px; color: var(--slate); }
.tip { position: absolute; left: 50%; bottom: calc(100% + 4px); transform: translate(-50%, 4px); background: var(--ink); color: var(--white); font-size: 12px; font-weight: 500; white-space: nowrap; padding: 4px 8px; border-radius: 6px; opacity: 0; pointer-events: none; transition: opacity .15s ease, transform .15s ease; font-variant-numeric: tabular-nums; z-index: 2; }
.day:hover .tip, .day:focus-visible .tip { opacity: 1; transform: translate(-50%, 0); }
.board table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.board th { text-align: left; font-weight: 500; font-size: 12px; color: var(--slate); padding: 0 0 6px; }
.board td { padding: 7px 0; border-top: 1px solid var(--mist); }
.board th:not(:first-child), .board td:not(:first-child) { text-align: right; }
.dash-note { margin-top: 14px; font-size: 12px; color: var(--slate); }

/* the receipt */
.slip { background: var(--blue); color: var(--cream); overflow: hidden; }
.slip-grid { display: grid; gap: 48px; align-items: start; }
.slip-copy p { color: #C9D2E4; font-size: 20px; margin: 20px 0 28px; max-width: 34ch; }
.printer-stage { width: min(100%, 360px); margin: 0 auto; perspective: 1100px; }
.printer { position: relative; z-index: 2; background: linear-gradient(#17294F, #0B1730); border-radius: 18px 18px 10px 10px; padding: 16px 18px 20px; box-shadow: 0 18px 30px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .12); }
.printer-top { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: #C9D2E4; }
.lamp { width: 9px; height: 9px; border-radius: 50%; background: #5B6988; transition: background-color .2s, box-shadow .2s; }
.lamp.on { background: var(--brass); box-shadow: 0 0 0 4px rgba(193, 154, 63, .25); }
.slot { height: 10px; margin-top: 16px; border-radius: 6px; background: #050B18; box-shadow: inset 0 2px 3px rgba(0, 0, 0, .8); }
.paper-clip { position: relative; z-index: 1; overflow: hidden; margin: -15px 22px 0; padding-bottom: 26px; }
.paper {
  --zig: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 16px 100%;
  background: var(--paper); color: var(--ink); padding: 26px 20px 30px; text-align: center;
  font-family: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", monospace; font-size: 14px; line-height: 1.4;
  -webkit-mask: var(--zig); mask: var(--zig);
  transform: translateY(-80%); will-change: transform;
}
.paper.printed { transform: translateY(0); }
.paper img { width: 50px; height: 50px; margin: 0 auto 2px; }
.paper-title { font-weight: 700; letter-spacing: .32em; text-transform: uppercase; margin-right: -.32em; }
.paper-sub, .paper-sample { max-width: none; }
.paper-sample { color: #6A6250; border-bottom: 1px dashed #B9B19C; padding-bottom: 14px; margin-bottom: 12px; }
.paper dl { margin: 0; text-align: left; }
.paper dl div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; }
.paper dt { color: #4B4638; }
.paper dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.paper-foot { border-top: 1px dashed #B9B19C; margin-top: 12px; padding-top: 14px; max-width: none; }
.bars { height: 34px; margin: 14px auto 0; width: 70%; background: repeating-linear-gradient(90deg, var(--ink) 0 2px, #0000 2px 4px, var(--ink) 4px 5px, #0000 5px 9px, var(--ink) 9px 12px, #0000 12px 14px); }

/* what I build */
.what-grid { display: grid; gap: 28px; }
.list > div { display: grid; gap: 6px 40px; padding: 22px 0; border-top: 1px solid var(--mist); }
.list > div:last-child { border-bottom: 1px solid var(--mist); }
.list p, .steps p { color: var(--slate); }
.steps p { margin-top: 10px; }

/* the dashboard video */
.tour { background: var(--blue); color: var(--cream); }
.tour-copy { display: grid; gap: 16px 64px; margin-bottom: clamp(28px, 4vw, 48px); }
.tour-copy p { color: #C9D2E4; font-size: 20px; }
.tour-video { width: 100%; height: auto; border-radius: 14px; background: var(--ink); box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .6); }
@media (min-width: 900px) { .tour-copy { grid-template-columns: .9fr 1.1fr; align-items: end; } }

/* tools */
.tools { background: var(--white); }
.tools-grid { display: grid; gap: 36px; align-items: center; }
.tools p { color: var(--slate); font-size: 20px; margin-top: 20px; max-width: 40ch; }
.hat-art { position: relative; width: min(78vw, 340px); aspect-ratio: 1; margin: 0 auto; }
.hat-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .6s ease; }
.hat-fallback { position: absolute; inset: 9%; width: 82%; height: 82%; transition: opacity .4s ease; }
.hat-art.ready canvas { opacity: 1; }
.hat-art.ready .hat-fallback { opacity: 0; }

/* how it works */
.steps { list-style: none; margin: clamp(36px, 5vw, 64px) 0 0; padding: 0; display: grid; gap: 34px; counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: block; font-size: 64px; line-height: 1; font-weight: 700; letter-spacing: -0.04em; color: var(--blue); margin-bottom: 14px; font-variant-numeric: tabular-nums; }

/* about */
.about { background: var(--white); overflow: hidden; }
.about-grid { display: grid; gap: 30px; align-items: center; }
.about p { color: var(--slate); font-size: 20px; margin-top: 20px; max-width: 40ch; }
.mister { position: relative; width: min(82vw, 400px); aspect-ratio: 787 / 760; margin: 0 auto; }
.mister img { position: absolute; inset: 0; width: 100%; height: 100%; will-change: transform; }

/* price */
.price-grid { display: grid; gap: 20px; }
.price p { color: var(--slate); font-size: 20px; }

/* bottom */
.final { background: var(--blue); color: var(--cream); text-align: center; }
.final h2 { max-width: 15ch; margin: 0 auto 34px; }
.reach { margin: 22px auto 0; color: #C9D2E4; }
.reach a { color: var(--cream); font-weight: 500; }

footer { padding: 44px 0 56px; font-size: 16px; color: var(--slate); }
.foot-row { display: grid; gap: 18px; align-items: start; }
.foot-row img { width: 96px; height: auto; }

/* wider screens */
@media (min-width: 720px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .dash-body { grid-template-columns: 1.15fr 1fr; gap: 22px; }
  .list > div { grid-template-columns: 180px 1fr; align-items: baseline; }
  .foot-row { grid-template-columns: 1fr auto auto; gap: 56px; }
}
@media (min-width: 900px) {
  .wrap { padding: 0 32px; }
  .nav nav { display: flex; }
  .hero-grid { grid-template-columns: .85fr 1.15fr; gap: 56px; }
  .what-grid { grid-template-columns: .7fr 1.3fr; gap: 64px; align-items: start; }
  .hat-art { width: 100%; max-width: 460px; }
  .slip-grid { grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
  .tools-grid { grid-template-columns: .9fr 1.1fr; gap: 64px; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .about-grid { grid-template-columns: .9fr 1.1fr; gap: 64px; }
  .mister { width: 100%; max-width: 460px; }
  .price-grid { grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: start; }
}

/* people who turn motion off get a still page */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .nav, .hat-fallback, .hat-art canvas, .tip, .day .bar { transition: none; }
  .paper { transform: none; }
}
