/* The NexBake Baking Tutorial (/nexbake/tutorial, staging 2026-11-08): four parts after Marmoset's Toolbag baking
   tutorial. Images sit on the page background, wide; few frames; 10px rounded buttons and chips; no glow.
   Loads after site-v2.css and footer.css. */
.nbt { --mono:'Michroma', 'Familjen Grotesk', sans-serif; --dim:#8f8b88; --panel-3:#292929; }
.nbt main { overflow-x:clip; }
.nbt button:focus-visible, .nbt a:focus-visible, .nbt input:focus-visible { outline:2px solid var(--acc); outline-offset:3px; }
.nbt h2 span, .nbt h1 span { color:var(--acc); }
.nbt code { font-family:ui-monospace, Consolas, monospace; font-size:.9em; color:var(--bone); background:var(--p2); padding:1px 6px; border-radius:6px; }
.nbt p b, .nbt li b, .nbt dd b { color:var(--bone); font-weight:600; }

/* hero */
.t-hero { padding:56px 0 48px; }
.t-hero .wrap { display:grid; grid-template-columns:minmax(0, 1fr); gap:36px; }  /* owner 2026-11-11: the words, then the YouTube tutorial */
.t-video { margin:0; max-width:960px; }
.t-video iframe { display:block; width:100%; height:auto; aspect-ratio:16 / 9; border:0; border-radius:12px; background:#111; }
.t-hero .kicker { font:400 12px/1 var(--mono); letter-spacing:.32em; text-transform:uppercase; color:var(--dust); margin:0 0 18px; }
.t-hero h1 { font-size:clamp(42px, 5.4vw, 76px); line-height:1; letter-spacing:-.035em; }
.t-hero h1 span { display:block; }
.t-hero .lead { margin:22px 0 0; font-size:19px; }
.t-facts { display:grid; grid-template-columns:repeat(3, auto); justify-content:start; margin:36px 0 0; padding:0; }
.t-facts div { padding:0 22px; border-left:1px solid var(--line-2); }
.t-facts div:first-child { padding-left:0; border-left:0; }
.t-facts dt { font:400 10px/1 var(--mono); letter-spacing:.12em; white-space:nowrap; text-transform:uppercase; color:var(--dim); margin:0 0 10px; }
.t-facts dd { margin:0; white-space:nowrap; font-size:clamp(18px, 1.7vw, 24px); font-weight:600; letter-spacing:-.02em; font-variant-numeric:tabular-nums; }
.t-facts div:first-child dd { color:var(--acc); }

/* sticky part nav: one row, no scrollbar, a progress line */
.t-nav { position:sticky; top:64px; z-index:30; background:color-mix(in srgb, var(--ink) 90%, transparent); -webkit-backdrop-filter:blur(12px); backdrop-filter:blur(12px); border-bottom:1px solid var(--line); }
.t-nav .wrap { display:flex; gap:4px; overflow-x:auto; scrollbar-width:none; }
.t-nav .wrap::-webkit-scrollbar { display:none; }
.t-nav a { flex:none; display:inline-flex; align-items:center; gap:10px; padding:18px 16px 16px; color:var(--dust); font-weight:500; font-size:15px; border-bottom:2px solid transparent; margin-bottom:-1px; transition:color .2s, border-color .2s; }
.t-nav a i { font:400 10px/1 var(--mono); font-style:normal; letter-spacing:.1em; color:var(--dim); transition:color .2s; }
.t-nav a:hover { color:var(--bone); }
.t-nav a[aria-current="true"] { color:var(--bone); border-bottom-color:var(--acc); }
.t-nav a[aria-current="true"] i { color:var(--acc); }
.t-progress { position:absolute; left:0; bottom:-1px; height:1px; width:100%; background:var(--line-2); transform-origin:0 50%; transform:scaleX(var(--pr, 0)); }

/* parts and topics */
.part { padding:96px 0 0; scroll-margin-top:116px; }
.part-head { display:grid; grid-template-columns:auto 1fr; column-gap:24px; align-items:end; padding-bottom:28px; border-bottom:1px solid var(--line); margin-bottom:8px; }
.part-no { grid-row:span 2; font:400 clamp(48px, 6vw, 88px)/.9 var(--mono); color:var(--acc); letter-spacing:-.04em; }
.part-head h2 { font-size:clamp(34px, 4.2vw, 56px); line-height:1.02; letter-spacing:-.03em; }
.part-head p { margin:10px 0 0; color:var(--dust); font-size:18px; }

.tp { padding:72px 0 0; scroll-margin-top:116px; }
.tp h3 { font-size:clamp(24px, 2.4vw, 32px); line-height:1.08; letter-spacing:-.025em; }
.tp-head { display:grid; grid-template-columns:minmax(0, 5fr) minmax(0, 7fr); gap:48px; align-items:start; margin-bottom:32px; }
.tp-txt p { color:var(--dust); font-size:17px; line-height:1.65; margin:0 0 14px; max-width:680px; }
.tp-txt p:last-child { margin-bottom:0; }
.tp.side { display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1fr); gap:56px; align-items:center; }
/* owner 2026-11-11: no page-wide screenshots; every topic is words on the left, its picture on the right at half width */
.tp:not(.side):has(> .fig) { display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1fr); gap:56px; align-items:start; }
.tp:not(.side):has(> .fig) > .tp-head { grid-template-columns:minmax(0, 1fr); gap:18px; margin-bottom:0; }
.tp:not(.side) > .t-table { grid-column:1 / -1; }
.tp.side .tp-txt h3 { margin-bottom:18px; }
.tp.side .fig { margin:0; }

/* step by step (owner 2026-11-11): one row per step, the words on the left, its real NexBake clip beside them at half width */
.st-list { counter-reset:none; }
.st { display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1fr); gap:56px; align-items:center; padding:48px 0; border-top:1px solid var(--line); scroll-margin-top:116px; }
.st:first-child { border-top:0; padding-top:56px; }
.st:last-child { padding-bottom:0; }
.st-n { display:block; font:400 clamp(30px, 3vw, 44px)/1 var(--mono); color:var(--acc); letter-spacing:-.03em; margin:0 0 18px; }
.st h3 { font-size:clamp(26px, 2.5vw, 34px); line-height:1.06; letter-spacing:-.025em; margin:0 0 14px; }
.st-txt p { color:var(--dust); font-size:17px; line-height:1.65; margin:0; max-width:560px; }
.st-fig { margin:0; }
.st-fig video { display:block; width:100%; height:auto; aspect-ratio:16 / 9; object-fit:cover; border-radius:12px; background:#111; }

/* figures: on the page, no frame; captions under every picture */
.fig { margin:0; }
.fig > img, .fig > video { display:block; width:100%; height:auto; border-radius:12px; }
.fig figcaption, .t-maps figcaption p { color:var(--dim); font-size:14px; line-height:1.5; }
.fig > figcaption { margin:14px 2px 0; }
.fig figcaption b { color:var(--dust); font-weight:600; }
.fig.ui { display:flex; flex-direction:column; align-items:center; }
.fig.ui > img { width:auto; max-width:100%; border-radius:10px; border:1px solid var(--line); }
.fig.ui > figcaption { align-self:stretch; text-align:center; }
.fig video { background:#111; aspect-ratio:16 / 9; object-fit:cover; }

/* steps and settings */
.t-steps { margin:18px 0 0; padding:0; list-style:none; counter-reset:s; display:grid; gap:10px; }
.t-steps li { position:relative; padding-left:36px; color:var(--dust); font-size:16px; line-height:1.5; }
.t-steps li::before { counter-increment:s; content:counter(s, decimal-leading-zero); position:absolute; left:0; top:0; font:400 11px/24px var(--mono); color:var(--acc); }
.t-dl { margin:20px 0 0; display:grid; }
.t-dl div { display:grid; grid-template-columns:150px minmax(0, 1fr); gap:16px; padding:12px 0; border-top:1px solid var(--line); }
.t-dl dt { font-weight:600; font-size:15px; }
.t-dl dd { margin:0; color:var(--dust); font-size:15px; }

/* image switcher: chips under one big image */
.sw-stage { display:grid; }
.sw-stage img { grid-area:1 / 1; width:100%; height:auto; opacity:0; transition:opacity .45s ease; }
.sw-stage img.on { opacity:1; }
.sw-chips { display:flex; gap:6px; margin-top:14px; overflow-x:auto; scrollbar-width:none; }
.sw-chips::-webkit-scrollbar { display:none; }
.sw-chips button { flex:none; display:inline-flex; align-items:baseline; gap:8px; font:500 13.5px/1 'Familjen Grotesk', sans-serif; color:var(--dust); background:transparent;
  border:1px solid var(--line-2); border-radius:10px; padding:9px 12px; cursor:pointer; transition:color .2s, border-color .2s, background .2s; }
.sw-chips button em { font-style:normal; color:var(--dim); font-size:12px; font-variant-numeric:tabular-nums; }
.sw-chips button:hover { color:var(--bone); border-color:#4a4a4a; }
.sw-chips button[aria-selected="true"] { color:var(--on-acc); background:var(--acc); border-color:var(--acc); }
.sw-chips button[aria-selected="true"] em { color:color-mix(in srgb, var(--on-acc) 70%, transparent); }
.sw > figcaption { margin:12px 2px 0; }
.t-hero-fig { margin:0; }
.t-hero-fig .sw-stage img { border-radius:12px; }

/* before / after drag */
.ba { position:relative; --p:50%; border-radius:12px; overflow:hidden; user-select:none; -webkit-user-select:none; touch-action:pan-y; }
.ba > img, .ba-top img { display:block; width:100%; height:auto; }
.ba-top { position:absolute; inset:0; clip-path:inset(0 calc(100% - var(--p)) 0 0); }
.ba-top img { height:100%; object-fit:cover; }
.ba.px img, .t-strip.px img { image-rendering:pixelated; }
.ba-range { position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:ew-resize; z-index:5; }
.ba-handle { position:absolute; top:0; bottom:0; left:var(--p); width:2px; margin-left:-1px; background:var(--bone); z-index:4; pointer-events:none; }
.ba-handle .i { position:absolute; top:50%; left:50%; width:40px; height:40px; padding:10px; margin:-20px 0 0 -20px; border-radius:10px; background:var(--bone); color:#0b0b0c; }
.ba-range:focus-visible ~ .ba-handle .i { outline:2px solid var(--acc); outline-offset:3px; }
.ba-tag { position:absolute; top:14px; z-index:4; pointer-events:none; font:400 10px/1 var(--mono); letter-spacing:.14em; text-transform:uppercase; color:var(--bone);
  background:rgba(10,10,10,.68); -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px); padding:8px 10px; border-radius:8px; }
.ba-tag.l { left:14px; } .ba-tag.r { right:14px; color:var(--acc); }

/* strips: several crops side by side */
.t-strip { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:10px; }
.t-strip.three { grid-template-columns:repeat(3, minmax(0, 1fr)); }
.t-strip figure { margin:0; }
.t-strip img { width:100%; height:auto; border-radius:10px; }
.t-strip span { display:block; margin:10px 2px 0; font:400 10px/1 var(--mono); letter-spacing:.14em; text-transform:uppercase; color:var(--dust); }

/* map types: two columns of large images on the page */
.t-maps { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:48px 32px; padding-top:56px; }
.t-maps figure { margin:0; }
.t-maps img { width:100%; height:auto; }
.t-maps figcaption { margin:8px 2px 0; }
.t-maps h3 { font-size:24px; letter-spacing:-.02em; margin:0 0 6px; }
.t-maps figcaption p { margin:0; font-size:15.5px; color:var(--dust); max-width:560px; }
.t-tags { display:flex; flex-wrap:wrap; gap:6px; margin-top:12px; }
.t-tags i { font:400 10px/1 var(--mono); font-style:normal; letter-spacing:.1em; text-transform:uppercase; color:var(--dim); border:1px solid var(--line); border-radius:8px; padding:7px 9px; }
.t-note { margin:48px 0 0; color:var(--dust); font-size:16px; max-width:820px; padding-left:16px; border-left:2px solid var(--acc); }

/* the timings table */
.t-table { margin-top:40px; }
.t-table table { width:100%; border-collapse:collapse; font-variant-numeric:tabular-nums; }
.t-table th, .t-table td { text-align:left; padding:13px 14px; border-bottom:1px solid var(--line); font-size:15px; }
.t-table th { font:400 10px/1.4 var(--mono); letter-spacing:.14em; text-transform:uppercase; color:var(--dim); }
.t-table td { color:var(--dust); }
.t-table th:not(:first-child), .t-table td:not(:first-child) { text-align:right; }
.t-table tr.grp td { color:var(--bone); font-weight:600; padding-top:22px; }
.t-table tr.us td { color:var(--bone); }
.t-table tr.us td:last-child { color:var(--acc); font-weight:600; }
.t-table p { margin:12px 2px 0; color:var(--dim); font-size:14px; }

/* closing call to action */
.t-cta { padding:120px 0 120px; }
.t-cta .wrap { display:flex; justify-content:space-between; align-items:flex-end; gap:32px; flex-wrap:wrap; padding-top:48px; border-top:1px solid var(--line); }
.t-cta h2 { font-size:clamp(36px, 4.6vw, 64px); line-height:1; letter-spacing:-.035em; }
.t-cta p { margin:14px 0 0; color:var(--dust); font-size:18px; }
.t-cta-btns { display:flex; gap:12px; flex-wrap:wrap; }

/* reveal on scroll (only once the script runs) */
.nbt.js-on .rv { opacity:0; transform:translateY(22px); transition:opacity .7s ease, transform .7s cubic-bezier(.22, 1, .36, 1); }
.nbt.js-on .rv.in { opacity:1; transform:none; }

@media (max-width: 900px) {
  .t-hero .wrap, .tp-head, .tp.side, .tp:not(.side):has(> .fig), .st { grid-template-columns:minmax(0, 1fr); gap:28px; }
  .st { padding:40px 0; }
  .t-facts { grid-template-columns:repeat(2, auto); row-gap:20px; }
  .t-facts div:first-child { grid-column:1 / -1; }
  .t-facts div:nth-child(2) { padding-left:0; border-left:0; }
  .t-maps { grid-template-columns:minmax(0, 1fr); }
  .t-maps { gap:48px; }
  .t-strip { grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .t-strip.three { grid-template-columns:repeat(3, minmax(0, 1fr)); }
  .t-dl div { grid-template-columns:1fr; gap:4px; }
  .part { padding-top:72px; }
  .tp { padding-top:56px; }
  .t-table { overflow-x:auto; scrollbar-width:thin; }
  .t-table table { min-width:560px; }
  .t-table::-webkit-scrollbar-button { display:none; }
}
@media (prefers-reduced-motion: reduce) {
  .nbt.js-on .rv { opacity:1; transform:none; transition:none; }
  .sw-stage img { transition:none; }
}
