/* Birkly — section systems, syntax kicker, scribble annotations.
   Loaded after home.css and overrides where the two overlap. */

/* --- Syntax kicker + scribble ------------------------------------------
   Visibility of a stroke is owned by stroke-dashoffset in JS, never by
   opacity here, so a finished pass cannot blink out while the next draws. */
.bk-syntax {
  display: inline-block; font-family: var(--bk-mono);
  font-size: clamp(12.5px, .8vw, 15px); font-weight: 500;
  letter-spacing: 0; text-transform: none; color: var(--bk-muted);
  margin: 0 0 30px; max-width: 100%;
}
.bk-syntax > span::before, .bk-syntax > span::after { color: var(--bk-mint-deep); font-weight: 500; }
.bk-syntax > span::before { content: "{"; margin-right: .16em; }
.bk-syntax > span::after  { content: "}"; margin-left: .16em; }
.bk-syntax--light { color: #9AA0B0; }
.bk-syntax--light > span::before, .bk-syntax--light > span::after { color: var(--bk-mint); }
.bk-syntax:empty { display: none; }

.bk-scr { position: relative; display: inline-block; white-space: nowrap; color: var(--bk-ink); }
.bk-syntax--light .bk-scr { color: #F8F9F7; }
.bk-scr-svg {
  position: absolute;
  left: calc(var(--scr-x) * -1); right: calc(var(--scr-x) * -1);
  top: calc(var(--scr-y) * -1);  bottom: calc(var(--scr-y) * -1);
  width: auto; height: auto; overflow: visible; pointer-events: none; z-index: 1;
}
.bk-scr-path { stroke: var(--bk-mint-deep); }
.bk-syntax--light .bk-scr-path { stroke: var(--bk-mint); }
/* Marker: wide translucent passes that darken where they overlap. */
.bk-scr-svg--marker { z-index: -1; mix-blend-mode: multiply; }
.bk-scr-svg--marker .bk-scr-path { stroke: var(--bk-mint); opacity: .38; }
.bk-syntax--light .bk-scr-svg--marker { mix-blend-mode: screen; }
.bk-syntax--light .bk-scr-svg--marker .bk-scr-path { stroke: var(--bk-mint); opacity: .3; }
.bk-scr[data-scr-type="marker"] { z-index: 1; }

/* --- Section heads ------------------------------------------------------ */
.bk-sec-head { display: flex; flex-direction: column; align-items: flex-start; max-width: 820px; margin: 0 0 clamp(40px, 4vw, 64px); }
.bk-sec-head--light { max-width: 900px; }
.bk-sec-head--rail { max-width: none; margin-bottom: clamp(28px, 3vw, 44px); }
.bk-sec-sub { font-size: clamp(16px, .95vw, 22px); color: #4A4F5E; margin: 18px 0 0; max-width: 560px; text-wrap: pretty; }
.bk-sec-sub--onink { color: #B4B9C6; }
.bk-h2--onink { color: #F8F9F7; }
.bk-h2--rail { font-size: clamp(28px, 2.6vw, 48px); max-width: 15ch; }
.bk-sec-head--split { flex-direction: row; justify-content: space-between; align-items: flex-end; gap: 28px; flex-wrap: wrap; max-width: none; }
.bk-sec-head--split > div { max-width: 720px; }
.bk-sec-head--split .bk-cta-dark {
  background: var(--bk-ink); color: var(--bk-paper); text-decoration: none;
  font-size: clamp(14.5px,.82vw,19px); font-weight: 600;
  padding: 16px 28px; border-radius: 99px; display: inline-block; flex-shrink: 0;
}

/* --- Hero --------------------------------------------------------------- */
.bk-hero {
  min-height: 88svh; display: flex; flex-direction: column; justify-content: flex-end;
  padding: clamp(150px, 20svh, 230px) 0 clamp(56px, 7vh, 96px);
  box-sizing: border-box; position: relative; overflow: hidden;
}
.bk-hero-inner { position: relative; max-width: var(--bk-wrap); width: 100%; margin: 0 auto; padding: 0 var(--bk-pad); box-sizing: border-box; }
.bk-hero-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; flex-wrap: wrap; margin-top: clamp(40px, 5vh, 76px); }
.bk-hero-sub { font-size: clamp(16px, 1.1vw, 24px); color: #4A4F5E; max-width: 760px; margin: 0; text-wrap: pretty; }
.bk-hero-cta { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.bk-hero-buttons { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.bk-hero-buttons .bk-cta-mint { background: var(--bk-mint); color: var(--bk-ink); text-decoration: none; font-size: clamp(14.5px,.82vw,19px); font-weight: 600; padding: 16px 32px; border-radius: 99px; display: inline-block; }
.bk-hero-buttons .bk-cta-ghost { color: var(--bk-ink); text-decoration: none; font-size: clamp(14.5px,.82vw,19px); font-weight: 600; padding: 16px 26px; border-radius: 99px; border: 1px solid #C9CDC4; display: inline-block; background: rgba(255,255,255,.4); }
.bk-hero-note { margin: 0; font-family: var(--bk-mono); font-size: 12px; color: var(--bk-muted); display: inline-flex; align-items: center; gap: 9px; }
.bk-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--bk-mint); display: inline-block; flex-shrink: 0; animation: birkly-pulse 2.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .bk-live-dot { animation: none; } }

/* --- Features as a collection browser: headline + rail left, stage right */
.bk-brw-sec { padding: clamp(96px, 10vw, 190px) 0; box-sizing: border-box; background: var(--bk-paper); }
.bk-brw { display: grid; grid-template-columns: minmax(280px, .85fr) minmax(0, 1.9fr); gap: clamp(28px, 4vw, 72px); align-items: start; }
.bk-brw-rail { position: sticky; top: clamp(100px, 14vh, 150px); }
.bk-brw-nav { display: flex; flex-direction: column; border-top: 1px solid #DDE1DA; }
.bk-brw-rail-label { font-family: var(--bk-mono); font-size: 12px; color: var(--bk-muted-soft); margin: 16px 0 10px; }
.bk-brw-item {
  display: grid; grid-template-columns: 14px 1fr auto; align-items: center; gap: 12px;
  background: none; border: none; border-bottom: 1px solid #E7EAE4;
  padding: 15px 6px; text-align: left; cursor: pointer;
  font-family: var(--bk-sans); font-size: clamp(14px, .84vw, 17px); font-weight: 550;
  color: var(--bk-muted); width: 100%;
  transition: color .28s ease, background .28s ease, padding-left .28s ease;
}
.bk-brw-item:hover { color: var(--bk-ink); padding-left: 12px; }
.bk-brw-item[data-active="true"] { color: var(--bk-ink); background: #FFFFFF; padding-left: 12px; }
.bk-brw-tick { width: 8px; height: 8px; border-radius: 50%; background: #D5D9D2; transition: background .28s ease, transform .28s ease; }
.bk-brw-item[data-active="true"] .bk-brw-tick { background: var(--bk-mint-deep); transform: scale(1.35); }
.bk-brw-stat { font-family: var(--bk-mono); font-size: 12px; color: var(--bk-mint-deep); }
.bk-brw-stat:empty { display: none; }

.bk-brw-stage { position: relative; }
.bk-brw-panel { display: none; }
.bk-brw-panel[data-active="true"] { display: block; animation: bk-brw-in .45s cubic-bezier(.22,.61,.36,1) both; }
@keyframes bk-brw-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .bk-brw-panel[data-active="true"] { animation: none; } }

/* Screenshot placeholder — drop a real <img> into .bk-shot-canvas later. */
.bk-shot { margin: 0 0 26px; border-radius: 18px; overflow: hidden; border: 1px solid var(--bk-line); background: #FFFFFF; box-shadow: 0 20px 50px rgba(30,31,42,.07); }
.bk-shot-bar { display: flex; align-items: center; gap: 7px; padding: 13px 16px; border-bottom: 1px solid var(--bk-line); background: #FBFCFA; }
.bk-shot-bar i { width: 9px; height: 9px; border-radius: 50%; background: #DDE1DA; display: block; }
.bk-shot-bar i:last-child { background: var(--bk-mint); }
.bk-shot-canvas { position: relative; display: block; aspect-ratio: 16 / 9; min-height: 240px; background: linear-gradient(150deg, #EFF1E9 0%, #E6EFEC 55%, #DCEFEC 100%); }
.bk-shot-canvas svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.bk-shot-canvas img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bk-shot-skel { position: absolute; left: 8%; top: 22%; right: 34%; display: flex; flex-direction: column; gap: 13px; }
.bk-shot-skel b { display: block; height: 11px; border-radius: 99px; background: rgba(30,31,42,.10); }
.bk-shot-skel b:first-child { height: 17px; background: rgba(30,31,42,.16); }
.bk-shot-cap { font-family: var(--bk-mono); font-size: 11.5px; color: var(--bk-muted-soft); padding: 11px 16px; border-top: 1px solid var(--bk-line); }
.bk-brw-h { font-family: var(--bk-serif); font-weight: 500; font-size: clamp(24px, 2.4vw, 42px); line-height: 1.14; letter-spacing: -0.018em; margin: 0 0 12px; }
.bk-brw-p { font-size: clamp(15px, .9vw, 19px); color: var(--bk-muted); margin: 0; max-width: 56ch; text-wrap: pretty; }
@media (max-width: 900px) {
  .bk-brw { grid-template-columns: 1fr; }
  .bk-brw-rail { position: static; }
  .bk-brw-nav { display: none; }
  .bk-brw-panel, .bk-brw-panel[data-active="true"] { display: block; animation: none; margin-bottom: 44px; }
}

/* --- Templating diptych: you write → visitors get ----------------------- */
.bk-dip-sec { background: var(--bk-ink); color: #E7EAE4; padding: clamp(96px, 10vw, 200px) 0; box-sizing: border-box; }
.bk-dip-list { display: flex; flex-direction: column; gap: clamp(64px, 8vw, 130px); }
.bk-dip-copy { max-width: 62ch; margin: 0 0 30px; }
.bk-dip-no { font-family: var(--bk-mono); font-size: 12px; color: var(--bk-mint); display: block; margin-bottom: 12px; }
.bk-dip-h { font-family: var(--bk-serif); font-weight: 500; font-size: clamp(24px, 2.5vw, 44px); line-height: 1.14; letter-spacing: -0.018em; margin: 0 0 12px; color: #F8F9F7; text-wrap: balance; }
.bk-dip-p { font-size: clamp(15px, .88vw, 19px); color: #B4B9C6; margin: 0; text-wrap: pretty; }
.bk-dip-p code { font-family: var(--bk-mono); font-size: .88em; background: #262836; padding: 2px 7px; border-radius: 6px; color: var(--bk-mint); }
.bk-dip-pair { display: grid; grid-template-columns: minmax(0,1fr) 84px minmax(0,1fr); align-items: stretch; }
.bk-dip-side { min-width: 0; display: flex; flex-direction: column; }
.bk-dip-tag { display: block; font-family: var(--bk-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #6E7484; margin: 0 0 12px; }
.bk-dip-side .bk-code { margin: 0; flex: 1; background: #15161E; border: 1px solid #2C2E3D; border-radius: 16px; padding: 22px 24px; box-sizing: border-box; }
.bk-code { color: #E7EAE4; font-family: var(--bk-mono); font-size: clamp(12px,.78vw,14.5px); line-height: 1.8; overflow-x: auto; white-space: pre; tab-size: 2; }
.bk-code code { font-family: inherit; background: none; padding: 0; color: inherit; }
.bk-code-dim { color: #6E7484; }
.bk-code::-webkit-scrollbar { height: 6px; }
.bk-code::-webkit-scrollbar-thumb { background: #3A3D4E; border-radius: 99px; }
.bk-dip-arrow { display: flex; align-items: center; padding: 24px 12px 0; }
.bk-dip-arrow svg { width: 100%; height: 40px; overflow: visible; }
.bk-dip-arrow path { stroke: var(--bk-mint); }
.bk-dip-out { display: flex; flex-direction: column; flex: 1; border: 1px solid #2C2E3D; border-radius: 16px; overflow: hidden; background: #F8F9F7; }
.bk-dip-win { display: flex; align-items: center; gap: 6px; padding: 12px 14px; border-bottom: 1px solid #E7EAE4; background: #FFFFFF; }
.bk-dip-win i { width: 8px; height: 8px; border-radius: 50%; background: #DDE1DA; display: block; flex-shrink: 0; }
.bk-dip-win i:nth-child(3) { background: var(--bk-mint); }
.bk-dip-url { font-family: var(--bk-mono); font-size: 11px; color: var(--bk-muted-soft); margin-left: 10px; }
.bk-dip-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; color: var(--bk-ink); }
.bk-dip-ok { margin: 0; font-size: 14px; color: var(--bk-ink); display: flex; align-items: center; gap: 10px; }
.bk-dip-check { color: var(--bk-mint-deep); font-weight: 700; }
.bk-dip-post { margin: 0; }
.bk-dip-post h4 { font-family: var(--bk-serif); font-weight: 500; font-size: clamp(16px, 1.1vw, 21px); line-height: 1.2; margin: 0 0 4px; color: var(--bk-ink); }
.bk-dip-post p { margin: 0; font-size: 13.5px; color: var(--bk-muted); }
.bk-dip-route { margin: 0; font-family: var(--bk-mono); font-size: 13px; color: var(--bk-ink); }
.bk-dip-route span { border-bottom: 2px solid var(--bk-mint); padding-bottom: 2px; }
.bk-dip-routenote { margin: 4px 0 0; font-size: 13px; color: var(--bk-muted-soft); font-style: italic; }
@media (max-width: 900px) {
  .bk-dip-pair { grid-template-columns: 1fr; gap: 18px; }
  .bk-dip-arrow { transform: rotate(90deg); width: 84px; margin: 0 auto; padding: 0; }
}

/* --- Hub: generative wave panels instead of stock photography ----------- */
.bk-hub-wave { position: relative; border-radius: 20px; overflow: hidden; min-height: 220px; background: linear-gradient(150deg, #262836 0%, #1E1F2A 60%, #23303A 100%); }
.bk-hub-wave svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.bk-hub-wave::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 15% 10%, rgba(124,227,222,.16), transparent 60%); pointer-events: none; }
.bk-hub-wave--tall { grid-row: span 2; }
.bk-hub-wave:not(.bk-dark-waves) { background: linear-gradient(150deg, #EFF1E9 0%, #E3E7E0 55%, #DCEFEC 100%); }
.bk-hub-wave:not(.bk-dark-waves)::after { background: radial-gradient(120% 90% at 80% 15%, rgba(124,227,222,.30), transparent 62%); }
@media (max-width: 900px) { .bk-hub-wave--tall { grid-row: span 1; } }

.bk-hub-avail { font-family: var(--bk-mono); font-size: 11px; letter-spacing: .04em; margin: 16px 0 0; color: var(--bk-mint-deep); }
.bk-hub-card[data-theme="dark"] .bk-hub-avail { color: var(--bk-mint); }
.bk-hub-card[data-theme="mint"] .bk-hub-avail { color: #1F857F; }
.bk-hub-avail--soon { color: var(--bk-muted-soft) !important; }

@media (max-width: 760px) {
  .bk-hero { min-height: auto; padding-top: clamp(130px, 18svh, 170px); }
  .bk-hero-foot { margin-top: 40px; }
  .bk-sec-head { margin-bottom: 36px; }
  .bk-shot-canvas { min-height: 180px; }
}

/* --- Product proof shots: browser-chrome frame, tilted --------------------
   Used for the small screenshot pairing that used to live in its own
   section; kept as a reusable utility. */
.bk-proof-shot { transition: transform .35s cubic-bezier(.22,.61,.36,1), box-shadow .35s ease; will-change: transform; }
.bk-proof-shot:hover { transform: rotate(0deg) translateY(-6px) !important; box-shadow: 0 26px 60px rgba(30,31,42,.14); z-index: 2; }
.bk-proof-shot--a { transform: rotate(-2.4deg); }
.bk-proof-shot--b { transform: rotate(2.1deg); }
@media (max-width: 760px) {
  .bk-proof-shot--a, .bk-proof-shot--b { transform: none; }
}

/* --- How it works: define / fill / pull sticky card stack ----------------
   Three cards scroll-stack via position:sticky with staggered `top`
   offsets — no JS needed. As the user scrolls, each card pins in place
   while the next slides up and settles slightly lower, so a strip of
   every earlier card stays visible peeking out above the one on top of
   it. Each card pairs a short explanation with either a real product
   screenshot (define/fill) or a template code snippet (pull), so the
   section carries visual proof instead of a plain text list. All cards
   live inside the section's normal .bk-wrap, so they stay within the
   page's usual content width like every other section. */
.bk-hiw-intro { margin-bottom: clamp(48px, 6vw, 92px); }
.bk-hiw-stack { display: flex; flex-direction: column; padding-bottom: clamp(70px, 9vw, 150px); }
.bk-hiw-card {
  position: sticky;
  border-radius: 28px;
  box-shadow: 0 30px 70px rgba(30,31,42,.12);
  padding: clamp(30px, 3.4vw, 52px) 0;
  box-sizing: border-box;
  margin-bottom: 26px;
}
.bk-hiw-card:nth-of-type(1) { top: 96px; z-index: 1; background: #F8F9F7; border: 1px solid #E7EAE4; }
.bk-hiw-card:nth-of-type(2) { top: 132px; z-index: 2; background: #FFFFFF; border: 1px solid #E7EAE4; }
.bk-hiw-card:nth-of-type(3) { top: 168px; z-index: 3; background: var(--bk-ink); border: 1px solid #343648; color: #E7EAE4; margin-bottom: 0; }
.bk-hiw-inner { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: clamp(30px, 4.5vw, 64px); align-items: center; padding: 0 clamp(28px, 3.4vw, 52px); box-sizing: border-box; }
.bk-hiw-step {
  font-family: var(--bk-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--bk-mint-deep); margin: 0 0 16px; display: flex; align-items: center; gap: 10px;
}
.bk-hiw-step b { font-size: 15px; color: var(--bk-ink); font-weight: 700; }
.bk-hiw-card:nth-of-type(3) .bk-hiw-step { color: var(--bk-mint); }
.bk-hiw-card:nth-of-type(3) .bk-hiw-step b { color: #F8F9F7; }
.bk-hiw-h { font-family: var(--bk-serif); font-weight: 500; font-size: clamp(26px, 2.6vw, 46px); line-height: 1.14; letter-spacing: -0.015em; margin: 0 0 14px; text-wrap: balance; }
.bk-hiw-p { font-size: clamp(15px, .88vw, 19px); color: var(--bk-muted); margin: 0; max-width: 46ch; text-wrap: pretty; }
.bk-hiw-card:nth-of-type(3) .bk-hiw-p { color: #B4B9C6; }
.bk-hiw-shot { margin: 0; }
.bk-hiw-code-wrap { border: 1px solid #2C2E3D; border-radius: 16px; overflow: hidden; background: #15161E; }
.bk-hiw-code-wrap .bk-shot-bar { background: #1B1C26; border-bottom-color: #2C2E3D; }
.bk-hiw-code-wrap .bk-code { padding: 22px 24px; }
@media (max-width: 860px) {
  .bk-hiw-inner { grid-template-columns: 1fr; }
  .bk-hiw-card:nth-of-type(1) { top: 88px; }
  .bk-hiw-card:nth-of-type(2) { top: 112px; }
  .bk-hiw-card:nth-of-type(3) { top: 136px; }
}
@media (prefers-reduced-motion: reduce) {
  .bk-hiw-card { position: relative; top: auto !important; }
}
