/* Whiteboard landing page (/whiteboard).
 *
 * Built on theme-dark.css and auth.css (aurora backdrop, gold button, ghost
 * buttons, --auth-* tokens), like /short-link and /mqllock. This file adds the
 * hero with its decorative mock board, and the feature, step, privacy, use
 * case, FAQ and call-to-action sections.
 *
 * Motion (nothing under prefers-reduced-motion): the mock board's strokes draw
 * themselves in a loop with stroke-dashoffset (a small decorative SVG); every
 * other animation uses transform or opacity only. The scroll reveal applies
 * its start state only after white-board-landing.js marks <html> with
 * `wb-reveal`. The heading and the intro never animate in.
 */

.wb-body {
  --wb-max: clamp(64rem, 50rem + 24vw, 84rem);
  --wb-surface: rgba(17, 18, 24, 0.82);
  --wb-raised: rgba(255, 255, 255, 0.035);
  --wb-loop: 9s;
}

html:has(.wb-body) {
  scroll-padding-top: calc(var(--site-header-height) + 1rem);
}

@media (prefers-reduced-motion: no-preference) {
  html:has(.wb-body) {
    scroll-behavior: smooth;
  }
}

.wb-main {
  display: block;
  padding-bottom: clamp(3rem, 2rem + 4vw, 6rem);
  overflow-x: clip;
}

.wb-container {
  width: 100%;
  max-width: calc(var(--wb-max) + 2 * var(--site-header-gutter));
  margin-inline: auto;
  padding-inline: var(--site-header-gutter);
}

/* ----------------------------------------------------------------- Hero */

.wb-hero {
  position: relative;
  isolation: isolate;
  padding-block: clamp(1.5rem, 1rem + 3vw, 4.5rem) clamp(2.5rem, 2rem + 3vw, 5rem);
  overflow: hidden;
}

.wb-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 1.5rem + 2vw, 3.5rem);
  align-items: center;
}

@media (min-width: 1024px) {
  .wb-hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  }
}

.wb-hero__copy {
  display: grid;
  justify-items: start;
  gap: clamp(0.85rem, 0.6rem + 0.6vw, 1.35rem);
  min-width: 0;
}

.wb-breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--auth-subtle);
  font-size: var(--font-size-xs);
}

.wb-breadcrumb__list li + li::before {
  content: "/";
  margin-right: 0.5rem;
  color: var(--auth-line-strong);
}

.wb-breadcrumb__list a {
  color: var(--auth-muted);
  text-decoration: none;
}

.wb-breadcrumb__list a:hover {
  color: var(--auth-gold);
}

.wb-hero__title {
  max-width: 14ch;
  font-family: var(--font-brand);
  font-size: clamp(2.3rem, 1.3rem + 3.4vw, 4.4rem);
  font-weight: var(--font-weight-brand);
  line-height: 1.03;
  letter-spacing: -0.035em;
  background: linear-gradient(100deg, var(--auth-text) 35%, var(--auth-gold-strong) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.wb-hero__lead {
  max-width: 40em;
  color: var(--auth-muted);
  font-size: clamp(1rem, 0.92rem + 0.35vw, 1.2rem);
  line-height: 1.65;
}

.wb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wb-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--auth-line);
  border-radius: var(--radius-pill);
  background-color: var(--wb-raised);
  color: var(--auth-text);
  font-size: var(--auth-fs-small);
}

.wb-chip__icon {
  width: 1rem;
  height: 1rem;
  color: var(--auth-gold);
}

.wb-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.wb-open {
  width: auto;
  padding: 0 1.75rem;
  text-decoration: none;
}

.wb-open__icon {
  width: 1.15rem;
  height: 1.15rem;
}

.wb-how-link {
  min-height: var(--auth-control);
  padding: 0 1.4rem;
  text-decoration: none;
}

/* The decorative mock board. */
.wb-mock {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--auth-line-strong);
  border-radius: var(--auth-radius);
  background-color: #fbfbfd;
  box-shadow: 0 50px 90px -50px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(0, 0, 0, 0.4);
}

.wb-mock__bar {
  display: flex;
  gap: 0.4rem;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid #e7e9f0;
  background-color: #f3f4f8;
}

.wb-mock__bar span {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background-color: #d5d8e2;
}

.wb-mock__svg {
  display: block;
  width: 100%;
  height: auto;
}

.wb-draw {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.wb-draw--1 { stroke: #2563eb; stroke-width: 6; }
.wb-draw--2 { stroke: #16a34a; stroke-width: 5; }
.wb-draw--3 { stroke: #1c1c1c; stroke-width: 4; }
.wb-draw--4 { stroke: #dc2626; stroke-width: 5; }
.wb-draw--hl { stroke: rgba(250, 204, 21, 0.55); stroke-width: 18; stroke-linecap: square; }

.wb-mock__note rect {
  fill: #fde68a;
  stroke: #f5c542;
}

.wb-mock__note text {
  fill: #3b3317;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
}

.wb-mock__note {
  transform-box: fill-box;
  transform-origin: center;
}

.wb-mock__tools {
  position: absolute;
  top: 50%;
  left: 0.75rem;
  display: grid;
  gap: 0.4rem;
  padding: 0.45rem;
  border-radius: 12px;
  background-color: #1c1c22;
  transform: translateY(-30%);
}

.wb-mock__tools span {
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 7px;
  background-color: rgba(255, 255, 255, 0.12);
}

.wb-mock__tools span.is-active {
  background-color: var(--auth-gold);
}

/* ------------------------------------------------------------ Sections */

.wb-content {
  display: grid;
  gap: clamp(3rem, 2rem + 3vw, 5.5rem);
}

.wb-section {
  display: grid;
  gap: clamp(1rem, 0.8rem + 1vw, 1.75rem);
  min-width: 0;
  color: var(--auth-muted);
  line-height: 1.65;
}

.wb-section__title {
  color: var(--auth-text);
  font-family: var(--font-brand);
  font-size: clamp(1.5rem, 1.15rem + 1.3vw, 2.4rem);
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.wb-features,
.wb-uses {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: 0.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wb-feature,
.wb-use,
.wb-step,
.wb-faq__item {
  min-width: 0;
  padding: clamp(1rem, 0.85rem + 0.6vw, 1.5rem);
  border: 1px solid var(--auth-line);
  border-radius: var(--auth-radius-sm);
  background-color: var(--wb-surface);
}

.wb-feature {
  position: relative;
  overflow: hidden;
}

.wb-feature::before {
  content: "";
  display: block;
  width: 2.25rem;
  height: 4px;
  margin-bottom: 0.85rem;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--auth-gold), #7c9cff);
}

.wb-feature__title,
.wb-use__title,
.wb-step__title,
.wb-faq__question {
  margin-bottom: 0.35rem;
  color: var(--auth-text);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  font-weight: var(--font-weight-semibold);
}

.wb-feature__text,
.wb-use__text,
.wb-step__text,
.wb-faq__answer {
  font-size: var(--auth-fs-small);
}

.wb-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr));
  gap: 0.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wb-step {
  position: relative;
}

.wb-step__number {
  display: inline-grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  margin-bottom: 0.75rem;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--auth-gold-strong), var(--auth-gold));
  color: var(--color-brand-contrast);
  font-weight: var(--font-weight-bold);
}

.wb-privacy {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  padding: clamp(1.25rem, 1rem + 1.5vw, 2.5rem);
  border: 1px solid rgba(94, 224, 160, 0.3);
  border-radius: var(--auth-radius);
  background: linear-gradient(140deg, rgba(94, 224, 160, 0.08), rgba(17, 18, 24, 0.85) 60%);
}

.wb-privacy p {
  max-width: 52em;
  margin-top: 0.6rem;
}

.wb-privacy strong {
  color: var(--auth-text);
}

.wb-privacy__icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 14px;
  background-color: rgba(94, 224, 160, 0.14);
  color: var(--auth-success);
}

.wb-privacy__icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

@media (max-width: 559.98px) {
  .wb-privacy {
    grid-template-columns: minmax(0, 1fr);
  }
}

.wb-faq {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.8rem;
}

@media (min-width: 900px) {
  .wb-faq {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.wb-cta {
  display: grid;
  justify-items: center;
  gap: 1rem;
  padding: clamp(2rem, 1.5rem + 3vw, 4rem) 1.25rem;
  border: 1px solid rgba(235, 196, 42, 0.35);
  border-radius: var(--auth-radius);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(235, 196, 42, 0.16), transparent 65%),
    var(--wb-surface);
  text-align: center;
}

.wb-cta__title {
  font-family: var(--font-brand);
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.6rem);
  font-weight: var(--font-weight-bold);
}

.wb-cta__text {
  color: var(--auth-muted);
}

.wb-cta__text a {
  color: var(--auth-gold);
}

/* --------------------------------------------------------------- Motion */

@media (prefers-reduced-motion: no-preference) {
  .wb-draw--1 { animation: wb-draw var(--wb-loop) ease-in-out infinite; }
  .wb-draw--hl { animation: wb-draw var(--wb-loop) ease-in-out infinite; animation-delay: 0.6s; }
  .wb-draw--2 { animation: wb-draw var(--wb-loop) ease-in-out infinite; animation-delay: 1.4s; }
  .wb-draw--3 { animation: wb-draw var(--wb-loop) ease-in-out infinite; animation-delay: 2.2s; }
  .wb-draw--4 { animation: wb-draw var(--wb-loop) ease-in-out infinite; animation-delay: 3s; }

  .wb-mock__note {
    animation: wb-note var(--wb-loop) var(--auth-ease) infinite;
  }

  .wb-hero.is-offscreen .wb-draw,
  .wb-hero.is-offscreen .wb-mock__note {
    animation-play-state: paused;
  }

  .wb-feature,
  .wb-use,
  .wb-step,
  .wb-faq__item {
    transition: transform var(--transition-normal), border-color var(--transition-normal);
  }

  .wb-feature:hover,
  .wb-use:hover,
  .wb-step:hover,
  .wb-faq__item:hover {
    transform: translateY(-3px);
    border-color: var(--auth-line-strong);
  }

  .wb-reveal [data-reveal] {
    transition: opacity 650ms var(--auth-ease), transform 650ms var(--auth-ease);
  }

  .wb-reveal [data-reveal]:not(.is-revealed) {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
  }

  .wb-reveal [data-reveal].is-revealed:hover {
    transition-delay: 0ms;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-aurora,
  .auth-card__glow {
    animation: none;
  }
}

/* Each stroke draws in, holds, then fades away before the next cycle. */
@keyframes wb-draw {
  0% { stroke-dashoffset: 1; opacity: 1; }
  25% { stroke-dashoffset: 0; }
  85% { stroke-dashoffset: 0; opacity: 1; }
  95%, 100% { stroke-dashoffset: 0; opacity: 0; }
}

@keyframes wb-note {
  0%, 30% { opacity: 0; transform: scale(0.85) rotate(-4deg); }
  40% { opacity: 1; transform: scale(1.04) rotate(-2deg); }
  45%, 85% { opacity: 1; transform: scale(1) rotate(-2deg); }
  95%, 100% { opacity: 0; transform: scale(1) rotate(-2deg); }
}
