/* ============================================================
   SlabSnap — Step by step component
   Self-contained styles: design tokens, the handful of shared helpers
   the block relies on, and the component itself. Dark theme is the
   default (set data-theme="dark" on <html>); the light tokens are in
   :root so the block also works on a light page.
   ============================================================ */

:root {
  --brand: #FFAF1F;
  --brand-hover: #E69919;
  --brand-soft: #FFF4E0;
  --ink: #242A30;
  --sub: #414141;
  --muted: #808080;
  --line: #EEEEEE;
  --line-strong: #D8D8D8;
  --page: #FAFAFA;
  --subtle: #F5F5F5;
  --surface: #FFFFFF;
  --surface-2: #F5F5F5;
  --success-bg: #E1F8EC;
  --success-tx: #267C48;
  --danger: #FF5B57;
  --focus-ring: 0 0 0 4px rgba(255, 175, 31, 0.25);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  font-family: "Open Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--page);
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}

img, svg { display: block; }

a { text-decoration: none; color: inherit; }

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.container {
  max-width: 72rem; /* 1152px, matches max-w-6xl */
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section { padding: 4rem 0; }

.section-white { background: #fff; }

.section-title {
  font-size: 1.875rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-align: center;
}

.section-subtitle {
  text-align: center;
  color: var(--muted);
  margin-top: 0.5rem;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

:root[data-theme="dark"] {
  /* Black Friday palette (from slabware-core.css --sw-*) */
  --brand: #FFAF1F;                       /* --sw-amber */
  --brand-hover: #FFCB4B;                 /* --sw-amber-hover */
  --brand-soft: rgba(255, 175, 31, 0.12);
  --ink: #F5F5F5;                         /* --sw-light */
  --sub: #D8D8D8;                         /* --sw-gray-400 */
  --muted: #ADB5BD;                       /* --sw-gray-500 */
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.16);
  --page: #000000;                        /* --sw-black */
  --subtle: rgba(255, 255, 255, 0.05);
  --surface: #141518;                     /* BF charcoal card (.sw-card) */
  --surface-2: #0C0D0F;                   /* BF secondary panel */
  --success-bg: rgba(52, 192, 101, 0.18);
  --success-tx: #34C065;                  /* --sw-success */
  --danger: #FF5B57;                      /* --sw-danger */
  --focus-ring: 0 0 0 4px rgba(255, 175, 31, 0.28);
}

:root[data-theme="dark"] .social-proof,
:root[data-theme="dark"] .section-white { background: var(--surface-2); }

.eyebrow-line {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--brand-hover);
  margin: 0 0 0.5rem;
}

section[id] { scroll-margin-top: 5rem; }

.compare-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }

.compare-before { z-index: 2; will-change: clip-path; }

.compare-handle {
  position: absolute; top: 0; bottom: 0; left: 50%; z-index: 3;
  width: 2px; margin-left: -1px; background: #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.25); pointer-events: none;
}

.compare-grip {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  display: flex; gap: 3px; align-items: center;
  width: 44px; height: 44px; border-radius: 12px;
  background: #101216; box-shadow: 0 6px 18px rgba(0,0,0,.45);
  justify-content: center;
}

.compare-grip i {
  width: 4px; height: 4px; border-radius: 50%; background: #fff;
  box-shadow: 0 6px 0 #fff, 0 -6px 0 #fff;
}

.tut-tag {
    display: inline-flex; align-items: center; gap: 0.5rem;
    font-size: 0.7rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--brand-hover);
    background: rgba(255, 175, 31, 0.12);
    border: 1px solid rgba(255, 175, 31, 0.35);
    padding: 0.35rem 0.85rem; border-radius: 999px;
    margin: 0 0 1rem;
  }

.tut-head { max-width: 44rem; margin: 0 auto 2.5rem; text-align: center; }

.tut-head .section-title { font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 700; }

.tut-head .section-subtitle { margin-top: 0.75rem; }

.tut-video-cta {
    display: inline-flex; align-items: center; gap: 0.5rem;
    margin-top: 1.25rem; padding: 0.65rem 1.25rem;
    border-radius: 999px; font-size: 0.875rem; font-weight: 700;
    background: var(--brand); color: #111;
    box-shadow: 0 10px 24px rgba(255, 175, 31, 0.22);
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  }

.tut-video-cta .material-symbols-outlined { font-size: 1.3rem; }

.tut-video-cta:hover { transform: translateY(-2px); background: var(--brand-hover); box-shadow: 0 14px 30px rgba(255, 175, 31, 0.28); }

.tut-video-cta:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.3, 0, 0.2, 1); }

.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

.tut-switch {
    display: grid; gap: 0.6rem; grid-template-columns: 1fr;
    max-width: 40rem; margin: 0 auto;
  }

@media (min-width: 640px) {
  .tut-switch { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
}

.tut-switch-btn {
    display: flex; align-items: center; gap: 0.9rem; text-align: left;
    padding: 1rem 1.15rem; border-radius: 1rem;
    border: 1px solid var(--line-strong); background: var(--surface);
    box-shadow: 0 2px 10px rgba(36, 42, 48, 0.06);
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  }

.tut-switch-btn:hover { border-color: rgba(255, 175, 31, 0.5); transform: translateY(-2px); }

.tut-switch-ico {
    width: 2.5rem; height: 2.5rem; border-radius: 0.8rem; flex: 0 0 auto;
    display: grid; place-items: center;
    background: rgba(255, 175, 31, 0.12); color: var(--brand);
    border: 1px solid rgba(255, 175, 31, 0.28);
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  }

.tut-switch-txt { min-width: 0; }

.tut-switch-txt b { display: block; font-size: 0.9375rem; font-weight: 700; color: var(--ink); }

.tut-switch-txt span { display: block; font-size: 0.8125rem; color: var(--muted); margin-top: 0.1rem; }

.tut-switch-btn[aria-selected="true"] {
    background: var(--brand); border-color: var(--brand);
    box-shadow: 0 10px 30px rgba(255, 175, 31, 0.18);
  }

.tut-switch-btn[aria-selected="true"] .tut-switch-ico { background: rgba(0, 0, 0, 0.14); color: #111; border-color: rgba(0, 0, 0, 0.18); }

.tut-switch-btn[aria-selected="true"] .tut-switch-txt b { color: #111; }

.tut-switch-btn[aria-selected="true"] .tut-switch-txt span { color: rgba(0, 0, 0, 0.62); }

.tut-switch-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.tut-video-modal {
    position: fixed; inset: 0; z-index: 1000;
    display: grid; place-items: center; padding: 1.25rem;
  }

.tut-video-modal[hidden] { display: none; }

.tut-video-modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.72); }

.tut-video-modal-box { position: relative; width: 100%; max-width: 56rem; }

.tut-video-modal-close {
    position: absolute; top: -2.75rem; right: 0; z-index: 1;
    width: 2.35rem; height: 2.35rem; border-radius: 999px;
    display: grid; place-items: center;
    background: rgba(255, 255, 255, 0.14); color: #fff;
    transition: background-color 0.2s ease;
  }

.tut-video-modal-close:hover { background: rgba(255, 255, 255, 0.24); }

.tut-video-modal-close:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.tut-video-frame {
    position: relative; width: 100%; aspect-ratio: 16 / 9;
    border-radius: 1rem; overflow: hidden;
    background: #000; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  }

.tut-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.tut-panel[hidden] { display: none; }

.tut-panel { animation: tut-fade 0.45s cubic-bezier(0.3, 0, 0.2, 1) both; }

@keyframes tut-fade { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .tut-panel { animation: none; }
}

.tut-steps { display: flex; flex-direction: column; gap: 1rem; margin-top: 2.25rem; }

.tut-step {
    display: grid; gap: 1.25rem;
    grid-template-columns: auto 1fr;
    align-items: start;
    border: 1px solid var(--line); border-radius: 1.15rem;
    background: var(--surface); padding: 1.6rem;
    box-shadow: 0 2px 10px rgba(36, 42, 48, 0.06);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
  }

.tut-step:hover { border-color: rgba(255, 175, 31, 0.35); }

@media (min-width: 900px) {
  .tut-step { grid-template-columns: 2.6rem minmax(0, 1fr) minmax(0, 0.85fr); gap: 1.75rem; align-items: center; padding: 1.85rem 2rem; }
  .tut-step.no-media { grid-template-columns: 2.6rem minmax(0, 1fr); }
}

.tut-step-num {
    width: 2.6rem; height: 2.6rem; border-radius: 999px; flex: 0 0 auto;
    display: grid; place-items: center;
    font-weight: 800; font-size: 1rem; color: var(--brand-hover);
    background: rgba(255, 175, 31, 0.14);
    border: 1px solid rgba(255, 175, 31, 0.42);
  }

.tut-step-body { min-width: 0; }

.tut-step-body h3 { margin: 0 0 0.5rem; font-size: 1.1875rem; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }

.tut-step-body p { margin: 0; font-size: 0.9375rem; line-height: 1.65; color: var(--sub); }

.tut-step-body p b { color: var(--ink); font-weight: 700; }

.tut-step-body .tut-note {
    display: flex; align-items: flex-start; gap: 0.5rem;
    margin-top: 0.9rem; font-size: 0.8125rem; line-height: 1.5;
    color: var(--brand-hover);
  }

.tut-note .material-symbols-outlined { font-size: 1.05rem; flex: 0 0 auto; margin-top: 1px; color: var(--brand); }

.tut-media {
    grid-column: 1 / -1;
    position: relative; aspect-ratio: 4 / 3;
    border-radius: 0.9rem; overflow: hidden;
    border: 1px solid var(--line-strong); background: #0b0c0e;
  }

@media (min-width: 900px) {
  .tut-media { grid-column: auto; }
}

.tut-media > img { width: 100%; height: 100%; object-fit: cover; display: block; }

.tut-media.is-placeholder {
    border-style: dashed; border-color: rgba(255, 175, 31, 0.35);
    background: radial-gradient(120% 90% at 50% 0%, rgba(255, 175, 31, 0.1), rgba(255, 255, 255, 0.02) 70%);
  }

.tut-media-ph {
    height: 100%; padding: 1.25rem;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.75rem;
    text-align: center; color: var(--muted);
  }

.tut-media-ph .material-symbols-outlined { font-size: 2.25rem; color: rgba(255, 175, 31, 0.7); }
.tut-media-ph p { margin: 0; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.02em; }

.tut-compare { user-select: none; touch-action: pan-y; cursor: ew-resize; }

.tut-compare .compare-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }

.tut-compare-label {
    position: absolute; bottom: 0.6rem; z-index: 4;
    font-size: 0.65rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
    background: rgba(0, 0, 0, 0.6); color: #fff; padding: 0.25rem 0.5rem; border-radius: 0.4rem;
  }

.tut-compare-label.before { left: 0.6rem; }

.tut-compare-label.after { right: 0.6rem; }

.tut-protip {
    margin-top: 2.5rem; border-radius: 1rem;
    border: 1px solid rgba(255, 175, 31, 0.3);
    background: #180f02;
    background-image: linear-gradient(90deg, rgba(255, 175, 31, 0.16) 0%, rgba(255, 175, 31, 0.05) 45%, rgba(255, 175, 31, 0.01) 100%);
    padding: 1.5rem 1.75rem;
  }

.tut-protip .k { margin: 0 0 0.5rem; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brand-hover); }

.tut-protip p { margin: 0; font-size: 1rem; line-height: 1.6; color: #fff; font-weight: 600; }

.tut-protip p span { color: var(--brand); }
