/* Shared by every page: fonts, colours, type, buttons, top nav, mobile bottom bar, footer.
   Design notes: docs/design-reference.md (warm paper, hairlines, one yellow, display + mono). */
@font-face { font-family: "Bricolage Grotesque"; src: url("/assets/fonts/Bricolage-Grotesque-var.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/assets/fonts/JetBrains-Mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/assets/fonts/JetBrains-Mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --bg: #F7F6F1; --cell: #FBFAF6; --white: #FFFFFF;
  --ink: #1E1216; --muted: #625C60; --faint: #9E989B; --line: #E3E0D6; --line-strong: #CFCBBF;
  --yellow: #FCE804; --yellow-soft: #FFF6B3;
  --c-green: #22B56A; --c-blue: #8EC9E6; --c-pink: #E5469A; --c-salmon: #F09C7E; --c-violet: #7C5CF2;
  --t-green: #D8F3E2; --t-blue: #DDF0F9; --t-pink: #FBDDEC; --t-salmon: #FCE5DB; --t-lav: #ECE6FD; --t-yellow: #FFF7BF;
  --grid: rgba(30, 18, 22, .04);
  /* names the store already uses */
  --accent: var(--ink); --accent-dark: #000; --tint: #EFECE3; --tint2: var(--bg);
  --green: #137A52; --green-bg: #D5F2E5; --amber: #8A5A06; --amber-bg: #FCEBCF;
  --card: var(--white); --radius: 8px;
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { font-family: var(--display); color: var(--ink); line-height: 1.5; font-size: 16px;
  background-color: var(--bg);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
::selection { background: var(--yellow); color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ------------------------------------------------------------------ type */
h1, h2, h3 { font-weight: 600; letter-spacing: -0.035em; }
h1 { font-size: clamp(38px, 5.6vw, 68px); line-height: 1; margin: 0 0 18px; }
h2 { font-size: clamp(28px, 3.4vw, 42px); line-height: 1.04; margin: 0 0 10px; }
h3 { font-size: 20px; line-height: 1.2; margin: 0 0 6px; letter-spacing: -0.02em; }
.lead { color: var(--muted); font-size: 17px; max-width: 600px; margin: 0; }
.kicker, .mono { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--muted); }
.kicker { display: block; margin-bottom: 10px; }
/* the highlighter word */
mark, .hl { background: var(--yellow); color: var(--ink); padding: 0 .12em; border-radius: 2px; font-weight: 800; letter-spacing: -0.045em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.sq { display: inline-block; width: 9px; height: 9px; border-radius: 1px; margin-right: 6px; vertical-align: 1px; flex: none; }
.sq.g { background: var(--c-green); } .sq.b { background: var(--c-blue); } .sq.p { background: var(--c-pink); } .sq.s { background: var(--c-salmon); } .sq.y { background: var(--yellow); } .sq.v { background: var(--c-violet); }

/* ------------------------------------------------------------------ buttons */
.btn { border: 0; border-radius: 999px; padding: 12px 22px; font-weight: 600; font-size: 16px; letter-spacing: -0.01em; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; transition: background .15s, transform .08s, box-shadow .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--yellow); color: var(--ink); }
.btn-primary:hover { box-shadow: inset 0 0 0 2px var(--ink); }
.btn-primary[disabled] { background: var(--tint); color: var(--faint); cursor: progress; box-shadow: none; }
.btn-dark { background: var(--ink); color: #fff; font-family: var(--mono); font-weight: 500; font-size: 13px; padding: 9px 16px; }
.btn-dark:hover { background: #000; }
/* small mono "Learn more ▸" style */
.btn-ghost, .btn-mono { background: var(--tint); color: var(--ink); font-family: var(--mono); font-weight: 500; font-size: 13px; border-radius: 4px; padding: 7px 12px; }
.btn-ghost:hover, .btn-mono:hover { background: #E4E0D4; }
.btn-plain { background: none; color: var(--muted); padding: 6px 8px; font-family: var(--mono); font-size: 13px; font-weight: 500; }
.btn-plain:hover { color: #B42318; }
.btn-lg { padding: 15px 26px; font-size: 18px; width: 100%; }
.in-cart { background: var(--green-bg); color: var(--green); }
.tri::after { content: ""; display: inline-block; border-left: 6px solid currentColor; border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent; margin-left: 2px; }
.text-link { font-family: var(--mono); font-size: 13px; font-weight: 500; text-decoration: none; color: var(--ink); }
.text-link:hover { text-decoration: underline; }

/* ------------------------------------------------------------------ boxes */
.box { border: 1px solid var(--line); background: var(--cell); position: relative; }
.ftab { position: absolute; left: -1px; top: -27px; height: 27px; display: inline-flex; align-items: center; padding: 0 14px; border: 1px solid var(--line); border-bottom: 0; background: var(--cell); font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.ftab.yellow { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.has-tab { margin-top: 27px; }

/* ------------------------------------------------------------------ top bar */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 4vw, 48px); background: rgba(247, 246, 241, .88); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 7px; background: var(--ink); color: var(--yellow); display: grid; place-items: center; font-weight: 800; font-size: 17px; letter-spacing: -0.04em; }
.brand-word { font-weight: 800; font-size: 22px; letter-spacing: -0.05em; line-height: 1; }
.nav-left { display: flex; align-items: center; gap: 18px; }
.nav-chip { display: flex; align-items: center; gap: 16px; background: var(--white); border: 1px solid var(--line); padding: 7px 12px; }
.nav-chip a { font-family: var(--mono); font-size: 13px; color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; }
.nav-chip a:hover, .nav-chip a[aria-current="page"] { color: var(--ink); }
.nav-chip a[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1.5px; }
.nav { display: flex; align-items: center; gap: 16px; }
.nav > a:not(.btn):not(.cart-btn) { font-family: var(--mono); font-size: 13px; color: var(--muted); text-decoration: none; }
.nav > a:not(.btn):not(.cart-btn):hover { color: var(--ink); }
.cart-btn { display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); color: var(--ink); font-family: var(--mono); font-size: 13px; font-weight: 500; text-decoration: none; }
.count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--ink); color: var(--yellow); font-size: 11px; display: grid; place-items: center; }
.count.bump { animation: bump .35s ease; }
@keyframes bump { 50% { transform: scale(1.35); } }
.demo-strip { background: var(--yellow-soft); color: var(--amber); text-align: center; font-family: var(--mono); font-size: 12px; padding: 6px 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

main { max-width: 1160px; margin: 0 auto; padding: 32px clamp(16px, 4vw, 48px) 64px; outline: none; }
main.wide { max-width: none; padding: 0; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }

/* mobile: links move to a bottom bar so every page is one tap away */
.dock { display: none; }
@media (max-width: 900px) {
  .nav-chip, .nav > a:not(.cart-btn):not(.btn) { display: none; }
  .nav .btn-dark { display: none; }
  body { padding-bottom: 76px; }
  .dock { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 30;
    background: var(--ink); border-radius: 16px; padding: 6px; box-shadow: 0 10px 30px rgba(30,18,22,.3); }
  .dock a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 4px; border-radius: 11px; color: #BDB3B6; text-decoration: none; font-family: var(--mono); font-size: 10.5px; font-weight: 500; }
  .dock a svg { width: 20px; height: 20px; }
  .dock a[aria-current="page"] { background: rgba(255,255,255,.1); color: #fff; }
  .dock a.dock-cta { background: var(--yellow); color: var(--ink); }
}

/* ------------------------------------------------------------------ footer */
.site-footer { padding: 72px 0 28px; }
.foot-grid { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); background: var(--cell); }
.foot-mark { position: relative; min-height: 320px; border-right: 1px solid var(--line); padding: 28px; overflow: hidden; }
.foot-mark .big-r { width: 84px; height: 84px; border-radius: 18px; background: var(--ink); color: var(--yellow); display: grid; place-items: center; font-weight: 800; font-size: 50px; letter-spacing: -0.05em; }
.foot-mark p { margin: 16px 0 0; max-width: 260px; color: var(--muted); }
.foot-right { display: grid; grid-template-columns: 1fr 1fr; }
.foot-cell { padding: 24px 28px; border-bottom: 1px solid var(--line); }
.foot-cell:nth-child(odd) { border-right: 1px solid var(--line); }
.foot-cell.full { grid-column: 1 / -1; border-right: 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.foot-cell.full strong { font-size: 18px; letter-spacing: -0.02em; }
.foot-cell h3 { margin: 0 0 12px; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.foot-cell a:not(.btn) { display: block; padding: 3px 0; font-family: var(--mono); font-size: 13px; color: var(--muted); text-decoration: none; }
.foot-cell a:not(.btn):hover { color: var(--ink); }
.foot-cell:nth-last-child(-n+2) { border-bottom: 0; }
.legal { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 4px 0; font-family: var(--mono); font-size: 12px; color: var(--faint); }
/* shapes that drop into the footer corner (assets/js/site.js) */
.drop { position: absolute; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; bottom: 18px; transform: translateY(-420px); opacity: 0; }
.drop i { display: block; width: 14px; height: 14px; }
.foot-mark.go .drop { animation: drop 1.1s cubic-bezier(.3, 0, .5, 1) forwards; }
@keyframes drop { 0% { transform: translateY(-420px) rotate(0); opacity: 1; } 60% { transform: translateY(0) rotate(160deg); } 75% { transform: translateY(-34px) rotate(190deg); } 88% { transform: translateY(0) rotate(205deg); } 94% { transform: translateY(-8px) rotate(210deg); } 100% { transform: translateY(0) rotate(212deg); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .foot-mark .drop { animation: none !important; transform: none; opacity: 1; } html { scroll-behavior: auto; } }
@media (max-width: 760px) {
  .foot-grid, .foot-right { grid-template-columns: 1fr; }
  .foot-mark { border-right: 0; border-bottom: 1px solid var(--line); min-height: 260px; }
  .foot-cell:nth-child(odd) { border-right: 0; }
  .foot-cell:nth-last-child(2) { border-bottom: 1px solid var(--line); }
}
h1 mark { white-space: nowrap; }

/* Instagram + LinkedIn logos, top-right corner of every page (stay visible on phones) */
.social { display: flex; align-items: center; gap: 8px; padding-left: 4px; }
.social a { display: block; width: 30px; height: 30px; border-radius: 7px; transition: transform .15s, box-shadow .15s; }
.social a:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(30,18,22,.18); }
.social svg { width: 100%; height: 100%; display: block; }
.brand-word { white-space: nowrap; }
@media (max-width: 420px) { .brand-word { font-size: 19px; } .cart-btn > span:not(.count) { display: none; } .topbar { gap: 10px; } }

/* ------------------------------------------------------------------ accessibility (Nov 17 review) */
.skip-link { position: absolute; left: 12px; top: -80px; z-index: 100; padding: 10px 16px; border-radius: 8px; background: var(--yellow); color: var(--on-gold, var(--ink)); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }
main:focus { outline: none; }
/* bigger tap areas without changing the look (44px target) */
.nav-chip a { padding-block: 12px; margin-block: -12px; }
.social a { position: relative; }
.social a::after { content: ""; position: absolute; inset: -7px; }
.text-link { display: inline-block; padding-block: 12px; margin-block: -12px; }
.foot-cell a:not(.btn) { padding: 6px 0; }

/* footer policy links */
.legal-links { display: inline-flex; gap: 16px; }
.legal a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; padding-block: 12px; margin-block: -12px; }
.legal a:hover { color: var(--ink); text-decoration: underline; }
