* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 20rem; background: var(--bh-color-canvas); color: var(--bh-color-text); font: var(--bh-text-base)/1.6 var(--bh-font-ui); }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--bh-color-heading); font-family: var(--bh-font-display); font-weight: 500; }
:focus-visible { outline: 3px solid var(--bh-color-focus); outline-offset: 3px; }
.skip-link { position: fixed; top: var(--bh-space-3); left: var(--bh-space-3); z-index: 2000; padding: var(--bh-space-2) var(--bh-space-4); border-radius: var(--bh-radius-sm); background: var(--bh-color-heading); color: #fff; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

main, .site-footer { width: min(var(--bh-content-width), calc(100% - 3rem)); margin-inline: auto; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  width: 100%;
  min-height: 4.75rem;
  align-items: center;
  justify-content: space-between;
  gap: var(--bh-space-5);
  padding-inline: max(1.5rem, calc((100% - var(--bh-content-width)) / 2));
  border-bottom: 1px solid color-mix(in srgb, var(--bh-color-border) 88%, transparent);
  background: color-mix(in srgb, var(--bh-color-canvas) 94%, transparent);
  box-shadow: 0 6px 24px rgb(15 43 70 / .05);
  backdrop-filter: blur(16px);
}
.brand { display: inline-flex; min-width: 0; align-items: center; gap: .7rem; text-decoration: none; }
.brand-mark { display: inline-grid; width: 2.3rem; height: 2.3rem; flex: 0 0 auto; place-items: center; border-radius: .65rem; background: var(--bh-color-heading); color: #fff; font-size: .72rem; font-weight: 900; letter-spacing: .04em; }
.brand-copy { display: grid; min-width: 0; gap: .12rem; line-height: 1; }
.brand-name { color: var(--bh-color-heading); font: 600 1.12rem/1.1 var(--bh-font-display); }
.brand-tagline { overflow: hidden; color: var(--bh-color-muted); font-size: .68rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.primary-nav, .site-footer nav { display: flex; align-items: center; gap: .2rem; }
.primary-nav a, .site-footer a { display: inline-flex; min-height: 2.45rem; align-items: center; padding: 0 .8rem; border-radius: var(--bh-radius-sm); color: var(--bh-color-muted); font-size: .82rem; font-weight: 750; text-decoration: none; }
.primary-nav a:hover, .site-footer a:hover { background: var(--bh-color-selection); color: var(--bh-color-heading); }

.hero { position: relative; min-height: clamp(34rem, 66vw, 45rem); overflow: hidden; border-radius: 0 0 1.35rem 1.35rem; background: #dce7f0; isolation: isolate; }
.hero-image { position: absolute; inset: 0; z-index: -3; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-shade { position: absolute; inset: 0; z-index: -2; background: linear-gradient(90deg, rgb(246 244 239 / .99) 0%, rgb(238 242 245 / .97) 30%, rgb(220 230 237 / .9) 52%, rgb(210 222 230 / .5) 67%, rgb(20 34 45 / .03) 84%); }
.hero::after { position: absolute; right: 1.5rem; bottom: 1.25rem; z-index: -1; width: 8.25rem; height: 1px; background: rgb(255 255 255 / .62); content: ""; }
.hero-copy { display: grid; width: min(58rem, 70%); min-height: inherit; align-content: center; padding: clamp(4rem, 8vw, 7.5rem) clamp(1.5rem, 5vw, 5rem); }
.eyebrow, .card-kicker { margin-bottom: var(--bh-space-3); color: var(--bh-color-primary); font-size: var(--bh-text-xs); font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
.hero h1 { margin-bottom: var(--bh-space-5); font-size: clamp(3rem, 5.2vw, 5.5rem); letter-spacing: -.045em; line-height: .92; text-wrap: balance; }
.hero h1 em { color: var(--bh-color-primary); font-weight: 400; }
.hero-lede { max-width: 39rem; margin-bottom: var(--bh-space-6); color: #405365; font-size: clamp(1.05rem, 1.6vw, 1.28rem); line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--bh-space-3); }
.byline { margin: var(--bh-space-4) 0 0; color: #5d6d7b; font-size: var(--bh-text-xs); }

.button { display: inline-flex; min-height: 3rem; align-items: center; justify-content: center; gap: var(--bh-space-3); padding: 0 var(--bh-space-5); border: 1px solid transparent; border-radius: var(--bh-radius-md); font-weight: 800; text-decoration: none; transition: background var(--bh-transition), border-color var(--bh-transition), transform var(--bh-transition); }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--bh-color-primary); color: var(--bh-color-on-primary); box-shadow: var(--bh-shadow-1); }
.button-primary:hover { background: var(--bh-color-primary-hover); }
.button-primary:active { background: var(--bh-color-primary-active); transform: translateY(0); }
.button-secondary, .button-quiet { border-color: var(--bh-color-border-strong); background: rgb(255 255 255 / .72); color: var(--bh-color-heading); }
.button-secondary:hover, .button-quiet:hover { border-color: var(--bh-color-primary); background: #fff; }

.flagships, .secondary-tools { padding: clamp(4.5rem, 8vw, 7rem) 0; }
.section-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(18rem, 30rem); gap: var(--bh-space-8); align-items: end; margin-bottom: var(--bh-space-7); }
.section-intro h2, .project-note h2, .page-section h2 { margin-bottom: 0; font-size: clamp(2.25rem, 4.4vw, 4.1rem); letter-spacing: -.025em; line-height: .98; text-wrap: balance; }
.section-intro > p { margin: 0; color: var(--bh-color-muted); }
.section-intro-compact h2 { font-size: clamp(2rem, 3.7vw, 3.3rem); }
.flagship-grid { display: grid; gap: var(--bh-space-5); }
.experience-card { position: relative; display: grid; grid-template-columns: minmax(17rem, .72fr) minmax(0, 1.45fr); min-height: 27rem; overflow: hidden; border: 1px solid var(--bh-color-border); border-radius: var(--bh-radius-lg); background: var(--bh-color-panel); box-shadow: var(--bh-shadow-1); }
.experience-card:nth-child(even) { grid-template-columns: minmax(0, 1.45fr) minmax(17rem, .72fr); }
.experience-card:nth-child(even) .experience-copy { order: 2; }
.experience-card:nth-child(even) .screenshot-frame { border-right: 1px solid var(--bh-color-border); border-left: 0; }
.experience-copy { display: grid; align-content: center; padding: clamp(1.75rem, 4vw, 3.5rem); }
.tool-number { position: absolute; top: 1.2rem; left: 1.3rem; color: var(--bh-color-border-strong); font-size: .7rem; font-weight: 900; letter-spacing: .12em; }
.experience-card:nth-child(even) .tool-number { right: 1.3rem; left: auto; }
.experience-copy h3, .secondary-card h3 { margin-bottom: var(--bh-space-3); font-size: clamp(2rem, 3vw, 3rem); line-height: 1; }
.release-badge { width: fit-content; margin: -.1rem 0 var(--bh-space-3); padding: .28rem .58rem; border: 1px solid #a46a29; border-radius: var(--bh-radius-round); background: #fff3de; color: #754414; font-size: .65rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.experience-copy > p:not(.card-kicker), .secondary-card > div > p:not(.card-kicker) { margin-bottom: var(--bh-space-5); color: var(--bh-color-muted); }
.text-link { width: fit-content; color: var(--bh-color-primary); font-size: var(--bh-text-sm); font-weight: 850; text-decoration-thickness: 1px; text-underline-offset: .25em; }
.text-link:hover { color: var(--bh-color-primary-hover); text-decoration-thickness: 2px; }
.screenshot-frame { display: block; min-height: 0; overflow: hidden; border-left: 1px solid var(--bh-color-border); background: var(--bh-color-panel-subtle); }
.screenshot-frame img, .secondary-shot img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--bh-transition); }
a.screenshot-frame:hover img, a.secondary-shot:hover img { transform: scale(1.012); }
.line-lab-shot img { object-position: 42% 13%; }
.scales-shot img { object-fit: contain; object-position: center; }
.ingredients-shot img { object-position: 50% 0; }

.secondary-tools { border-top: 1px solid var(--bh-color-border); }
.secondary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--bh-space-5); }
.secondary-card { display: grid; overflow: hidden; border: 1px solid var(--bh-color-border); border-radius: var(--bh-radius-lg); background: var(--bh-color-panel); box-shadow: var(--bh-shadow-1); }
.secondary-card > div { display: grid; align-content: start; padding: var(--bh-space-6); }
.secondary-shot { display: block; height: 19rem; overflow: hidden; border-bottom: 1px solid var(--bh-color-border); background: var(--bh-color-panel-subtle); }
.secondary-shot img { object-position: 50% 10%; }
.harmony-shot img { object-position: 34% 7%; }

.project-note { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: var(--bh-space-8); padding: clamp(4rem, 7vw, 6rem) 0; border-top: 1px solid var(--bh-color-border); }
.project-note p { color: var(--bh-color-muted); }
.project-links { display: flex; flex-wrap: wrap; gap: var(--bh-space-5); }
.site-footer { display: grid; grid-template-columns: 1fr auto; gap: var(--bh-space-6); align-items: center; min-height: 6rem; border-top: 1px solid var(--bh-color-border); color: var(--bh-color-muted); font-size: var(--bh-text-sm); }
.footer-copyright { color: var(--bh-color-heading); font-weight: 750; }

.page-hero, .page-section { padding: var(--bh-space-8) 0; border-bottom: 1px solid var(--bh-color-border); }
.page-hero { display: grid; gap: var(--bh-space-4); }
.page-hero h1 { max-width: 58rem; margin-bottom: 0; font-size: clamp(2.8rem, 6vw, 5.4rem); letter-spacing: -.04em; line-height: .95; text-wrap: balance; }
.page-hero .lede, .page-section > p, .page-section li { max-width: var(--bh-reading-width); color: var(--bh-color-muted); }
.page-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--bh-space-4); }
.page-card { display: grid; gap: var(--bh-space-2); padding: var(--bh-space-5); border: 1px solid var(--bh-color-border); border-radius: var(--bh-radius-md); background: var(--bh-color-panel); }
.page-card strong { color: var(--bh-color-heading); font: 500 var(--bh-text-xl)/1.2 var(--bh-font-display); }
.page-card span { color: var(--bh-color-muted); }
.page-link { width: fit-content; }
.about-legal-note { width: min(100% - 3rem, var(--bh-content-width)); margin: var(--bh-space-8) auto var(--bh-space-4); padding-top: var(--bh-space-4); border-top: 1px solid var(--bh-color-border); color: var(--bh-color-muted); font-size: var(--bh-text-xs); line-height: 1.45; }
.about-legal-note p { max-width: var(--bh-reading-width); margin: 0; }

.bh-auth-slot { position: relative; display: inline-flex; align-items: center; }
.bh-auth-link { border: 1px solid var(--bh-color-border-strong); background: var(--bh-color-panel); color: var(--bh-color-heading) !important; }
.bh-auth-menu { position: relative; }
.bh-auth-menu > summary { display: inline-flex; min-height: 2.45rem; align-items: center; gap: .5rem; padding: 0 .7rem; border: 1px solid var(--bh-color-border); border-radius: var(--bh-radius-md); background: var(--bh-color-panel); color: var(--bh-color-heading); cursor: pointer; list-style: none; }
.bh-auth-menu > summary::-webkit-details-marker { display: none; }
.bh-auth-avatar { display: inline-grid; width: 1.6rem; height: 1.6rem; place-items: center; border-radius: 50%; background: var(--bh-color-heading); color: #fff; font-size: .68rem; font-weight: 900; }
.bh-auth-chevron { color: var(--bh-color-muted); font-size: .7rem; }
.bh-auth-popover { position: absolute; top: calc(100% + .55rem); right: 0; z-index: 1200; display: grid; width: min(18rem, calc(100vw - 2rem)); gap: .55rem; padding: .8rem; border: 1px solid var(--bh-color-border); border-radius: var(--bh-radius-md); background: var(--bh-color-panel); box-shadow: var(--bh-shadow-2); }
.bh-auth-name { overflow: hidden; color: var(--bh-color-heading); font-size: .78rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.bh-auth-email { overflow: hidden; color: var(--bh-color-muted); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.bh-auth-signout { min-height: 2.25rem; border: 0; border-radius: var(--bh-radius-sm); background: var(--bh-color-selection); color: var(--bh-color-heading); font: inherit; font-size: .78rem; font-weight: 800; cursor: pointer; }
.bh-auth-signout:disabled { cursor: wait; opacity: .68; }

.auth-main { display: grid; min-height: calc(100vh - 4.75rem); place-items: center; padding-block: var(--bh-space-8); }
.auth-card { width: min(100%, 34rem); padding: var(--bh-space-7); border: 1px solid var(--bh-color-border); border-radius: var(--bh-radius-lg); background: var(--bh-color-panel); box-shadow: var(--bh-shadow-2); }
.auth-card h1 { margin-bottom: var(--bh-space-4); font-size: clamp(2.2rem, 7vw, 3.7rem); line-height: 1; }
.auth-card > p:not(.eyebrow) { color: var(--bh-color-muted); }
.auth-google-button { width: 100%; margin-top: var(--bh-space-3); border: 0; font: inherit; font-weight: 800; cursor: pointer; }
.auth-google-button:disabled, .auth-email-submit:disabled, .auth-back:disabled { cursor: wait; opacity: .68; }
.auth-google-mark { display: inline-grid; width: 1.5rem; height: 1.5rem; place-items: center; border-radius: 50%; background: #fff; color: #4285f4; font-weight: 900; }
.auth-divider { display: flex; align-items: center; gap: var(--bh-space-3); margin: var(--bh-space-4) 0; color: var(--bh-color-muted); font-size: var(--bh-text-xs); font-weight: 800; text-transform: uppercase; }
.auth-divider::before, .auth-divider::after { height: 1px; flex: 1; background: var(--bh-color-border); content: ""; }
.auth-email-form, .auth-email-form > div { display: grid; gap: var(--bh-space-2); }
.auth-email-form > [hidden] { display: none; }
.auth-email-form label { color: var(--bh-color-heading); font-size: var(--bh-text-sm); font-weight: 800; }
.auth-email-form input { width: 100%; min-height: var(--bh-control-comfortable); padding: 0 var(--bh-space-3); border: 1px solid var(--bh-color-border); border-radius: var(--bh-radius-sm); background: var(--bh-color-panel); color: var(--bh-color-text); font: inherit; }
.auth-email-form input:focus-visible { border-color: var(--bh-color-primary); outline: 2px solid color-mix(in srgb, var(--bh-color-primary) 35%, transparent); outline-offset: 1px; }
.auth-email-submit { width: 100%; margin-top: var(--bh-space-3); border: 1px solid var(--bh-color-border); background: var(--bh-color-canvas-muted); color: var(--bh-color-heading); font: inherit; font-weight: 800; cursor: pointer; }
.auth-back { width: fit-content; padding: 0; border: 0; background: transparent; color: var(--bh-color-primary); font: inherit; font-size: var(--bh-text-xs); font-weight: 800; cursor: pointer; }
.auth-status { min-height: 1.6em; margin: var(--bh-space-3) 0 0; font-size: var(--bh-text-sm); }
.auth-note { margin: var(--bh-space-5) 0 0; padding-top: var(--bh-space-4); border-top: 1px solid var(--bh-color-border); font-size: var(--bh-text-xs); }
.privacy-copy { display: grid; gap: var(--bh-space-3); }
.privacy-copy h2 { margin-top: var(--bh-space-4); }
.privacy-copy p { margin-bottom: 0; }

@media (max-width: 62rem) {
  .hero-copy { width: 74%; }
  .secondary-grid, .page-grid { grid-template-columns: 1fr; }
  .secondary-card { grid-template-columns: minmax(0, 1.2fr) minmax(17rem, .8fr); }
  .secondary-shot { height: auto; min-height: 20rem; border-right: 1px solid var(--bh-color-border); border-bottom: 0; }
  .site-footer { grid-template-columns: 1fr; padding: var(--bh-space-6) 0; }
  .site-footer nav { justify-content: flex-start; }
}

@media (max-width: 46rem) {
  main, .site-footer { width: min(100% - 2rem, var(--bh-content-width)); }
  .site-header { min-height: 4.2rem; gap: .65rem; padding-inline: 1rem; }
  .brand-tagline, .primary-nav .nav-secondary { display: none; }
  .primary-nav { margin-left: auto; }
  .primary-nav a { padding-inline: .55rem; white-space: nowrap; }
  .hero { min-height: 40rem; margin-inline: -1rem; border-radius: 0 0 1rem 1rem; }
  .hero-image { object-position: 61% center; }
  .hero-shade { background: linear-gradient(180deg, rgb(239 243 246 / .96) 0%, rgb(226 235 241 / .9) 46%, rgb(16 29 40 / .42) 100%); }
  .hero-copy { width: 100%; min-height: inherit; align-content: start; padding: 4.5rem 1.5rem 3rem; }
  .hero h1 { font-size: clamp(2.65rem, 12vw, 4rem); line-height: .94; }
  .hero-lede { max-width: 31rem; font-size: 1rem; }
  .button-quiet { background: rgb(255 255 255 / .82); }
  .hero .byline { width: fit-content; padding: .2rem .4rem; border-radius: .3rem; background: rgb(247 249 250 / .68); color: #344b5e; }
  .section-intro, .project-note { grid-template-columns: 1fr; gap: var(--bh-space-4); }
  .flagships, .secondary-tools { padding: var(--bh-space-8) 0; }
  .experience-card, .experience-card:nth-child(even) { grid-template-columns: 1fr; min-height: 0; }
  .experience-card:nth-child(even) .experience-copy { order: 0; }
  .experience-copy { padding: 2.1rem 1.35rem 1.5rem; }
  .tool-number, .experience-card:nth-child(even) .tool-number { top: 1rem; right: 1rem; left: auto; }
  .screenshot-frame, .experience-card:nth-child(even) .screenshot-frame { height: 15rem; border-top: 1px solid var(--bh-color-border); border-right: 0; border-left: 0; }
  .secondary-card { grid-template-columns: 1fr; }
  .secondary-shot { min-height: 15rem; border-right: 0; border-bottom: 1px solid var(--bh-color-border); }
  .project-note { padding: var(--bh-space-8) 0; }
  .project-links { gap: var(--bh-space-4); }
  .bh-auth-menu .bh-auth-summary-label { display: none; }
}

@media (max-width: 27rem) {
  .brand-name { font-size: 1rem; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .hero-actions .button { width: 100%; }
}

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