/* ==========================================================================
   bobbykirby.com
   Hand-built. No frameworks, no build step. Edit freely.

   The idea: the site presents Bobby the way a good product listing presents
   a product. Breadcrumb, gallery, item bullets, buy box, item specifics,
   numbered catalog sections. Used with restraint so it still reads as
   credible to a hiring manager.

   Colors and fonts live in :root below; change them there and the whole
   site follows.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */

:root {
  --paper:      #f4f5f2;
  --paper-2:    #e9ece6;
  --surface:    #ffffff;
  --ink:        #141716;
  --ink-soft:   #3f4542;
  --muted:      #6b736f;
  --line:       #d2d8d2;
  --accent:     #1b5c4a;
  --accent-ink: #f4f5f2;
  --accent-dim: #dcebe4;
  --tag:        #5e4a00;
  --tag-dim:    #fbe98a;
  --mark:       #fbe98a;
  --ok:         #2c8a5c;

  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-sans:    "Instrument Sans", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --wrap: 72rem;
  --radius: 4px;
  --shadow-hard: 3px 3px 0 var(--ink);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:      #111413;
    --paper-2:    #171b19;
    --surface:    #1c211f;
    --ink:        #e9ece8;
    --ink-soft:   #c3c9c4;
    --muted:      #8f9793;
    --line:       #2c3330;
    --accent:     #7fd2b7;
    --accent-ink: #0f2620;
    --accent-dim: #1b2e28;
    --tag:        #f4de6a;
    --tag-dim:    #3a3208;
    --mark:       #5c5010;
    --ok:         #5fcf93;
  }
}

/* ---------- 2. Reset and base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Paper grain. Fixed overlay, no pointer events, very low opacity. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: .045;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
@media (prefers-color-scheme: dark) {
  body::after { mix-blend-mode: screen; opacity: .06; }
}

h1, h2, h3, h4 { margin: 0; line-height: 1.2; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }
a:hover { color: var(--accent); }

img { max-width: 100%; height: auto; display: block; }

::selection { background: var(--mark); color: var(--ink); }

mark {
  background: var(--mark);
  color: inherit;
  padding: 0 .12em;
  border-radius: 2px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: .7rem 1.1rem;
  z-index: 1000;
}
.skip:focus { left: 0; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 2.5rem);
}

/* Small utilities */
.mono {
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.label {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 .65rem;
}
.rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1.25rem 0;
}
.fine {
  font-size: .8125rem;
  color: var(--muted);
  line-height: 1.5;
}
.display {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  line-height: 1.12;
  letter-spacing: -.012em;
  text-wrap: balance;
  margin: 0 0 1rem;
  font-variation-settings: "opsz" 144;
}

/* ---------- 3. Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
@supports not (backdrop-filter: blur(1px)) {
  .site-header { background: var(--paper); }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 4rem;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -.01em;
  text-decoration: none;
  white-space: nowrap;
  font-variation-settings: "opsz" 48;
}
.wordmark:hover { color: var(--ink); }

.header-meta { display: none; margin-right: auto; }
@media (min-width: 64em) { .header-meta { display: inline; } }

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(.9rem, 2.5vw, 1.75rem);
  font-size: .9rem;
  font-weight: 500;
}
.site-header nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding-block: .35rem;
  border-bottom: 1.5px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.site-header nav a:hover { color: var(--ink); border-bottom-color: var(--ink); }

@media (max-width: 36em) {
  .header-inner { flex-wrap: wrap; gap: .5rem .9rem; padding-block: .65rem; }
  .site-header nav { width: 100%; gap: .35rem 1rem; font-size: .8125rem; }
}

/* ---------- 4. The listing (hero) ---------- */

.listing { padding-block: clamp(1.5rem, 4vw, 2.75rem) clamp(3rem, 8vw, 5.5rem); }

.crumbs { margin: 0 0 1.5rem; }
.crumbs span { color: var(--ink); }

.listing-grid {
  display: grid;
  gap: 2rem;
  align-items: start;
}
/* Tablet: photo and buy box stacked on the left, the listing body on the right */
@media (min-width: 52em) and (max-width: 69.99em) {
  .listing-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .gallery { grid-column: 1; grid-row: 1; }
  .buybox { grid-column: 1; grid-row: 2; }
  .listing-body { grid-column: 2; grid-row: 1 / span 2; }
}
/* Desktop: gallery, body, buy box in three columns */
@media (min-width: 70em) {
  .listing-grid {
    grid-template-columns: minmax(0, 4fr) minmax(0, 6.5fr) minmax(0, 3.4fr);
    gap: 2.5rem;
  }
}

/* Gallery */
.gallery-main {
  margin: 0;
  border: 1.5px solid var(--ink);
  background: var(--surface);
  padding: .6rem;
}
.gallery-main img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.gallery-thumbs {
  list-style: none;
  margin: .75rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
}
.gallery-thumbs li {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: .7rem .5rem .6rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: .1rem;
}
.gallery-thumbs strong {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  line-height: 1;
  font-variation-settings: "opsz" 96;
}
.gallery-thumbs span {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
/* Phones: photo on the left, the three numbers stacked beside it */
@media (max-width: 51.99em) {
  .gallery {
    display: grid;
    grid-template-columns: minmax(0, 11.5rem) minmax(0, 1fr);
    gap: .75rem;
    align-items: stretch;
  }
  .gallery-main { padding: .45rem; }
  .gallery-thumbs { margin: 0; grid-template-columns: 1fr; gap: .5rem; }
  .gallery-thumbs li { justify-content: center; padding: .4rem .5rem; }
}

/* Title and bullets */
.listing-body h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.45rem, 2.4vw + .4rem, 2.15rem);
  line-height: 1.22;
  letter-spacing: -.01em;
  text-wrap: pretty;
  font-variation-settings: "opsz" 96;
}
.listing-body h1 .sep {
  color: var(--muted);
  font-weight: 300;
  padding-inline: .3em;
}

.seller, .reviews { margin: .85rem 0 0; text-transform: none; letter-spacing: .01em; font-size: .8125rem; }
.seller a { color: var(--accent); }
.reviews .stars { letter-spacing: .12em; color: var(--muted); margin-right: .4rem; }

.bullets {
  margin: 0;
  padding-left: 1.15rem;
  list-style: square;
}
.bullets li { margin: .6rem 0; color: var(--ink-soft); font-size: 1rem; }
.bullets li::marker { color: var(--accent); }
.bullets strong { color: var(--ink); font-weight: 600; }

/* Buy box */
.buybox {
  border: 1.5px solid var(--ink);
  background: var(--surface);
  padding: 1.25rem;
  border-radius: 6px;
}
.stock {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  font-size: .95rem;
  margin: 0 0 1.1rem;
}
.stock .dot {
  flex: 0 0 auto;
  width: .6rem;
  height: .6rem;
  margin-top: .45rem;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent);
}
.buybox .btn { width: 100%; }
.buybox .btn + .btn { margin-top: .55rem; }
.buybox .fine { margin-top: .9rem; }

.specs {
  margin: 1.25rem 0 0;
  border-top: 1px solid var(--line);
}
.specs div {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: .75rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--line);
  font-size: .875rem;
}
.specs dt {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: .15rem;
}
.specs dd { margin: 0; color: var(--ink-soft); }
.specs dd a { color: var(--accent); }

/* ---------- 5. Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .8rem 1.25rem;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { color: var(--ink); transform: translate(-1px, -1px); box-shadow: var(--shadow-hard); }
.btn:active { transform: translate(0, 0); box-shadow: none; }

.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { color: var(--paper); box-shadow: 3px 3px 0 var(--accent); }

/* Buttons inside prose must not inherit the prose link color */
.prose .btn { color: var(--ink); }
.prose .btn-primary,
.prose .btn-primary:hover { color: var(--paper); }

.actions { display: flex; flex-wrap: wrap; gap: .65rem; }

/* ---------- 6. Catalog sections ---------- */

.sec {
  padding-block: clamp(3.25rem, 8vw, 5.75rem);
  border-top: 1px solid var(--line);
}
.sec-alt { background: var(--paper-2); }

.sec-grid {
  display: grid;
  gap: 1.5rem clamp(2rem, 6vw, 4.5rem);
  align-items: start;
}
@media (min-width: 52em) {
  .sec-grid { grid-template-columns: minmax(0, 10rem) minmax(0, 1fr); }
  .sec-grid > .sec-head { position: sticky; top: 5.25rem; }
}
.sec-head.solo { margin-bottom: 1.75rem; }

.sec-note { margin-top: 1.5rem; max-width: 60ch; }
.sec-actions { margin-top: 1.25rem; }
.product-lede { max-width: 60ch; color: var(--ink-soft); }
.after-actions { margin-top: 1rem; max-width: 52ch; }

.sec-head h2 {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  font-weight: 400;
}
.sec-head .num {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1;
  font-variation-settings: "opsz" 144;
}
.sec-head .name {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.prose { max-width: 62ch; color: var(--ink-soft); }
.prose p { font-size: 1.0625rem; }
.prose a { color: var(--accent); }
.prose .display { color: var(--ink); }

/* Services list */
.services {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--ink);
}
.services li {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  gap: .4rem 1rem;
  padding: 1.3rem 0;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 44em) {
  .services li { grid-template-columns: 3rem minmax(0, 15rem) minmax(0, 1fr); gap: 1.25rem; }
}
.services .num { padding-top: .25rem; }
.services h3 {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
}
.services p { margin: 0; color: var(--ink-soft); font-size: 1rem; }
@media (max-width: 43.99em) {
  .services p { grid-column: 2; }
}

/* Channels: variation picker plus notes */
.variants {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: .25rem 0 1.75rem;
  padding: 0;
  list-style: none;
}
.variants li {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: .42rem .8rem;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 500;
}
.variants li.is-selected {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.channel-notes { margin: 0; border-top: 1px solid var(--ink); }
.channel-notes div {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: .75rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--line);
  font-size: .95rem;
}
.channel-notes dt { font-weight: 600; }
.channel-notes dd { margin: 0; color: var(--ink-soft); }

/* ---------- 7. Product: the Playbook ---------- */

.product-grid {
  display: grid;
  gap: 2.25rem;
  align-items: start;
}
@media (min-width: 52em) {
  .product-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 4.5rem); }
}

.cover {
  aspect-ratio: 3 / 4;
  width: min(100%, 20rem);
  border: 1.5px solid var(--ink);
  background: var(--surface);
  padding: 1rem;
  display: flex;
  border-radius: 3px;
  box-shadow: var(--shadow-hard);
  transform: rotate(-1.5deg);
  margin: .5rem auto 0;
}
@media (min-width: 52em) { .cover { margin-left: 0; } }
.cover-inner {
  flex: 1;
  border: 1px solid var(--line);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}
.cover-inner .mono { color: var(--tag); }
.cover-inner strong {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  line-height: 1.08;
  letter-spacing: -.01em;
  font-variation-settings: "opsz" 144;
}
.cover-inner .cover-sub { font-size: .9rem; color: var(--ink-soft); }
.cover-inner .cover-foot {
  border-top: 1px solid var(--line);
  padding-top: .75rem;
  display: flex;
  justify-content: space-between;
  gap: .5rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--tag);
  background: var(--tag-dim);
  padding: .4rem .65rem;
  border-radius: 3px;
  margin-bottom: 1rem;
}

.checks {
  list-style: none;
  margin: 1.25rem 0 1.75rem;
  padding: 0;
  display: grid;
  gap: .55rem;
  max-width: 60ch;
}
.checks li { position: relative; padding-left: 1.6rem; color: var(--ink-soft); }
.checks li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-weight: 700;
}
.checks strong { color: var(--ink); font-weight: 600; }

/* Chapter list on the Playbook page */
.chapters {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--ink);
  counter-reset: chapter;
}
.chapters li {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  gap: .25rem 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.chapters li::before {
  counter-increment: chapter;
  content: counter(chapter, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .06em;
  color: var(--muted);
  padding-top: .3rem;
}
.chapters h3 { font-family: var(--font-sans); font-size: 1.0625rem; font-weight: 600; }
.chapters p { grid-column: 2; margin: 0; color: var(--ink-soft); font-size: .95rem; }

/* ---------- 8. Newsletter ---------- */

.signup {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  max-width: 34rem;
  margin-top: 1.25rem;
}
.signup input[type="email"] {
  flex: 1 1 14rem;
  min-width: 0;
  padding: .78rem .9rem;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: .9375rem;
}
.signup input[type="email"]::placeholder { color: var(--muted); }

/* ---------- 9. Contact ---------- */

.big-link {
  margin: 1.25rem 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.4vw, 2.25rem);
  font-weight: 500;
  letter-spacing: -.01em;
  font-variation-settings: "opsz" 96;
}
.big-link a {
  color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: .18em;
}
.big-link a:hover { text-decoration-color: var(--ink); }

/* ---------- 10. Secondary page pieces ---------- */

.page-intro { padding-block: clamp(3rem, 9vw, 6rem) clamp(2.5rem, 7vw, 4.5rem); }
.page-intro h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.25rem, 6.5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -.02em;
  margin: .75rem 0 1rem;
  text-wrap: balance;
  font-variation-settings: "opsz" 144;
}
.lede {
  font-size: clamp(1.0625rem, 2.2vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 52ch;
}

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
@media (min-width: 40em) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 1.35rem 1.35rem 1.45rem;
  border-radius: var(--radius);
}
.card-meta {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 .55rem;
}
.card h3 { font-family: var(--font-sans); font-size: 1.0625rem; font-weight: 600; margin-bottom: .55rem; }
.card p { color: var(--ink-soft); font-size: .95rem; }

.facts {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.facts li {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--line);
  font-size: .95rem;
}
.facts span {
  flex: 0 0 7.5rem;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: .2rem;
}

.note { color: var(--muted); font-size: .9375rem; }

.center-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-block: 4rem;
}
.center-page h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 6vw, 3.25rem);
  margin-bottom: .75rem;
  font-variation-settings: "opsz" 144;
}
.center-page p:not(.actions) { max-width: 40ch; color: var(--ink-soft); }
.center-page .actions { justify-content: center; margin-top: 1.25rem; }

/* ---------- 11. Footer ---------- */

.site-footer {
  border-top: 1.5px solid var(--ink);
  padding-block: 2.5rem 3rem;
  font-size: .875rem;
  color: var(--muted);
}
.footer-inner {
  display: grid;
  gap: 1.25rem 2rem;
}
@media (min-width: 44em) {
  .footer-inner { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.25rem;
}
.footer-nav a { text-decoration: none; color: var(--ink-soft); }
.footer-nav a:hover { color: var(--accent); }
.footer-brand .wordmark { display: inline-block; margin-bottom: .35rem; }
.site-footer p { margin: 0; }
