/* Doc Mastro: full-page dark theme. Panels are subtle raised surfaces on #000.
   BeeBee band is owned by html[data-theme=docmastro] in themes.css. */
:root {
  --dm-black: #000000;
  --dm-surface: #12151A;
  --dm-silver: #C8CDD4;
  --dm-teal: #2EC4C6;
  --dm-amber: #F0A03A;
  --dm-ink: #E8EAED;
  --dm-muted: #A7ADB6;
  --dm-line: rgba(200, 205, 212, 0.14);
  --dm-glow-teal: rgba(46, 196, 198, 0.45);
  --dm-glow-amber: rgba(240, 160, 58, 0.4);
  --dm-radius: 22px;
  --dm-gutter: 20px;
  --dm-sticky-h: calc(68px + env(safe-area-inset-bottom, 0px));
}

body.page-docmastro {
  background: #000;
}

body.page-docmastro main.copy {
  max-width: none;
  padding: 0;
  padding-bottom: calc(var(--dm-sticky-h) + 24px);
  background: #000;
}

body.page-docmastro .dm {
  color: var(--dm-ink);
  background: transparent;
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 12px var(--dm-gutter) 28px;
  display: grid;
  gap: 16px;
}

body.page-docmastro .dm a:not(.dm-cta) {
  color: var(--dm-teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

body.page-docmastro .dm a:not(.dm-cta):hover {
  color: var(--dm-amber);
}

.dm-wrap {
  width: min(720px, 100%);
  margin-inline: auto;
}

/* Raised surfaces on the black page — still read as sections, no cream chrome. */
.dm-panel {
  background: var(--dm-surface);
  border: 1px solid var(--dm-line);
  border-radius: var(--dm-radius);
  padding: 28px 20px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.dm-hero {
  position: relative;
  isolation: isolate;
  /* Match avatar.png edge pixels (sampled pure #000) so the head floats —
     not a black square on the lighter --dm-surface panel. Corner glows stay. */
  background: #000;
  text-align: center;
  overflow: hidden;
  /* No BB band — clear the fixed header so the beta badge is not clipped. */
  margin-top: calc(var(--header-h, 60px) + 12px);
  padding: 18px 16px 22px;
}

/* Corner glows only - kept far from the centered avatar square. */
.dm-hero-glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 28% 24% at 0% 0%, var(--dm-glow-teal), transparent 70%),
    radial-gradient(ellipse 28% 24% at 100% 0%, var(--dm-glow-amber), transparent 70%),
    radial-gradient(ellipse 24% 20% at 0% 100%, rgba(46, 196, 198, 0.28), transparent 72%),
    radial-gradient(ellipse 24% 20% at 100% 100%, rgba(240, 160, 58, 0.24), transparent 72%);
  filter: blur(22px);
  opacity: 0.85;
  animation: dm-glow 4s var(--ease) infinite alternate;
}

.dm-badge {
  position: relative;
  z-index: 1;
  display: inline-block;
  margin: 0 0 8px;
  padding: 5px 10px;
  border: 1px solid rgba(46, 196, 198, 0.35);
  border-radius: 999px;
  color: var(--dm-teal);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: rgba(46, 196, 198, 0.08);
}

.dm-avatar-stage {
  position: relative;
  z-index: 1;
  /* Phone: avatar square size; black field pads outward beyond it. */
  width: min(38vw, 148px);
  margin: 0 auto 8px;
  padding: 28px;
  background: #000;
  box-sizing: content-box;
}

/* Extra solid #000 ring so glow in panel corners never meets the art edge. */
.dm-avatar-plate {
  background: #000;
  width: 100%;
}

.dm-avatar-float {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: #000;
  animation: dm-float 4s var(--ease) infinite alternate;
}

.dm-avatar-float picture,
.dm-avatar-float img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  /* Soft-feather the square's outer rim into the matching #000 field so no
     hard seam remains at high contrast / DPR3. Head stays fully opaque. */
  -webkit-mask-image: radial-gradient(closest-side, #000 86%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 86%, transparent 100%);
}

.dm-hero h1,
.dm-hero .dm-sub,
.dm-hero .dm-cta {
  position: relative;
  z-index: 1;
}

@keyframes dm-float {
  from { transform: translateY(0); }
  to { transform: translateY(-6px); }
}

@keyframes dm-glow {
  from { opacity: 0.55; }
  to { opacity: 0.95; }
}

@media (prefers-reduced-motion: reduce) {
  .dm-avatar-float,
  .dm-hero-glow {
    animation: none;
  }
}

.dm-hero h1 {
  margin: 0 auto 6px;
  width: 100%;
  font-size: clamp(26px, 7vw, 44px);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: #fff;
}

.dm-hero .dm-sub {
  margin: 0 auto 12px;
  margin-inline: auto;
  width: min(520px, 100%);
  font-size: clamp(14px, 3.6vw, 18px);
  line-height: 1.35;
  color: var(--dm-silver);
  text-align: center;
}

.dm-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 18px;
  background: var(--dm-teal);
  color: #041314 !important;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none !important;
  box-shadow: 0 0 0 1px rgba(46, 196, 198, 0.35);
  transition: background 160ms var(--ease), transform 160ms var(--ease);
}

.dm-cta:hover {
  background: #3AD4D6;
}

.dm-cta:active {
  transform: translateY(1px);
}

.dm-section h2 {
  margin: 0 0 10px;
  font-size: clamp(24px, 5.5vw, 34px);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: #fff;
}

.dm-section > .dm-wrap > p.lead {
  margin: 0 0 22px;
  font-size: 16px;
  line-height: 1.45;
  color: var(--dm-silver);
}

.dm-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.dm-features li {
  padding: 16px 16px 14px;
  border: 1px solid var(--dm-line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 70%);
}

.dm-features h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: #fff;
}

.dm-features p {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--dm-muted);
}

.dm-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: dm-step;
  display: grid;
  gap: 12px;
}

.dm-steps li {
  counter-increment: dm-step;
  position: relative;
  padding: 12px 12px 12px 48px;
  border: 1px solid var(--dm-line);
  border-radius: 14px;
  color: var(--dm-silver);
  font-size: 15px;
  line-height: 1.4;
}

.dm-steps li::before {
  content: counter(dm-step);
  position: absolute;
  left: 12px;
  top: 12px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #041314;
  background: var(--dm-teal);
}

.dm-launch {
  background:
    radial-gradient(ellipse at 20% 0%, rgba(46, 196, 198, 0.16), transparent 50%),
    radial-gradient(ellipse at 90% 20%, rgba(240, 160, 58, 0.14), transparent 45%),
    var(--dm-black);
}

.dm-countdown {
  margin: 18px 0 16px;
  padding: 16px;
  border: 1px solid var(--dm-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.dm-countdown-label {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dm-amber);
}

.dm-countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.dm-countdown-grid div {
  text-align: center;
  padding: 10px 4px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--dm-line);
}

.dm-countdown-grid strong {
  display: block;
  font-size: clamp(20px, 5.5vw, 28px);
  font-weight: 650;
  letter-spacing: -0.03em;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.dm-countdown-grid span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--dm-muted);
}

.dm-price {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: #fff;
}

.dm-price-note {
  margin: 0 0 20px;
  font-size: 15px;
  color: var(--dm-silver);
}

[data-dm-spots][hidden],
[data-dm-signup][hidden] {
  display: none !important;
}

.dm-spots {
  margin: 0 0 16px;
  padding: 16px 16px 14px;
  border: 1px solid var(--dm-line);
  border-radius: 16px;
  background: rgba(240, 160, 58, 0.08);
}

.dm-spots-line {
  margin: 0 0 6px;
  font-size: clamp(17px, 4.2vw, 21px);
  font-weight: 650;
  letter-spacing: -0.02em;
  color: #fff;
}

.dm-spots-line strong {
  color: var(--dm-amber);
  font-variant-numeric: tabular-nums;
}

.dm-spots-note {
  margin: 0;
  font-size: 14px;
  color: var(--dm-silver);
}

.dm-preview-banner {
  margin: 0 0 12px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px dashed rgba(240, 160, 58, 0.55);
  background: rgba(240, 160, 58, 0.12);
  color: var(--dm-amber);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.dm-signup-section.dm-panel {
  padding: 28px 20px;
}

.dm-signup {
  width: min(520px, 100%);
  margin-inline: auto;
}

.dm-signup-title {
  margin: 0 0 6px;
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: #fff;
}

.dm-signup-copy {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.4;
  color: var(--dm-silver);
}

.dm-signup-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dm-signup-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dm-signup-input {
  flex: 1 1 auto;
  min-height: 48px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--dm-line);
  background: #0A0B0D;
  color: #fff;
  font: inherit;
  font-size: 16px;
  box-sizing: border-box;
}

.dm-signup-input::placeholder {
  color: var(--dm-muted);
}

.dm-signup-input:focus {
  outline: 2px solid var(--dm-teal);
  outline-offset: 2px;
}

.dm-signup-submit.btn {
  flex: 0 0 auto;
  width: 100%;
  height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 18px;
  background: var(--dm-teal);
  color: #041314;
  font: 650 16px/1 var(--sans);
  letter-spacing: -0.01em;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: 0 0 0 1px rgba(46, 196, 198, 0.35);
  transition: background 160ms var(--ease), transform 160ms var(--ease);
}

.dm-signup-submit.btn:hover {
  background: #3AD4D6;
}

.dm-signup-submit.btn:active {
  transform: translateY(1px);
}

.dm-signup-status {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--dm-silver);
}

.dm-signup-status.is-ok { color: var(--dm-teal); }
.dm-signup-status.is-error { color: #F07167; }
.dm-signup-status.is-preview { color: var(--dm-amber); }
.dm-signup-status.is-pending { color: var(--dm-muted); }

.dm-band {
  text-align: center;
}

.dm-band p {
  margin: 0 auto 14px;
  width: min(520px, 100%);
  color: var(--dm-silver);
  font-size: 16px;
}

.dm-faq details {
  border-top: 1px solid var(--dm-line);
  padding: 14px 0;
}

.dm-faq details:last-child {
  border-bottom: 1px solid var(--dm-line);
}

.dm-faq summary {
  cursor: pointer;
  list-style: none;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
  padding-right: 28px;
  position: relative;
}

.dm-faq summary::-webkit-details-marker { display: none; }

.dm-faq summary::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 0.35em;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--dm-silver);
  border-bottom: 2px solid var(--dm-silver);
  transform: rotate(45deg);
}

.dm-faq details[open] summary::after {
  top: 0.55em;
  transform: rotate(-135deg);
}

.dm-faq details p {
  margin: 10px 0 4px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--dm-muted);
}

.dm-made {
  text-align: center;
}

.dm-made p {
  margin: 0 auto;
  width: min(520px, 100%);
  color: var(--dm-silver);
  font-size: 16px;
  line-height: 1.45;
}

.dm-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: none;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(0, 0, 0, 0.92);
  border-top: 1px solid rgba(200, 205, 212, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform: translateY(110%);
  transition: transform 220ms var(--ease);
  pointer-events: none;
}

.dm-sticky.is-on {
  transform: translateY(0);
  pointer-events: auto;
}

.dm-sticky .dm-cta {
  width: 100%;
}

@media (max-width: 720px) {
  .dm-sticky {
    display: block;
  }
}

@media (min-width: 480px) {
  .dm-avatar-stage {
    width: min(34vw, 180px);
  }
}

@media (min-width: 721px) {
  body.page-docmastro main.copy {
    padding-bottom: 40px;
  }

  .dm {
    padding: 16px 24px 40px;
    gap: 18px;
  }

  .dm-panel {
    padding: 40px 32px;
  }

  .dm-hero {
    padding: 24px 32px 28px;
  }

  .dm-badge {
    margin-bottom: 10px;
    font-size: 13px;
    padding: 6px 12px;
  }

  /* Keep avatar modest so H1 + CTA clear the fold under shrunk BB. */
  .dm-avatar-stage {
    width: min(22vw, 200px);
    margin-bottom: 12px;
  }

  .dm-hero h1 {
    margin-bottom: 8px;
    font-size: clamp(32px, 3.4vw, 44px);
  }

  .dm-hero .dm-sub {
    margin: 0 auto 16px;
    margin-inline: auto;
    font-size: 18px;
    line-height: 1.35;
  }

  .dm-signup-submit.btn {
    width: auto;
  }

  .dm-cta {
    min-height: 48px;
    padding: 12px 22px;
  }

  .dm-features {
    grid-template-columns: 1fr 1fr;
  }

  .dm-features li:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .dm-signup-row {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
  }

  .dm-signup-input {
    flex: 1 1 auto;
    width: auto;
  }
}

@media (min-width: 1440px) {
  /* Avatar square ~220px; plate pads outward. Keep H1 + CTA in a 900px fold. */
  .dm-avatar-stage {
    width: min(15vw, 220px);
    margin-bottom: 12px;
  }

  .dm-hero {
    padding: 20px 32px 22px;
  }
}

@media (min-width: 1440px) and (max-height: 900px) {
  .dm-avatar-stage {
    width: min(14vw, 200px);
    margin-bottom: 10px;
  }

  .dm-hero {
    padding: 16px 28px 18px;
  }

  .dm-hero h1 {
    margin-bottom: 6px;
    font-size: clamp(30px, 2.8vw, 40px);
  }

  .dm-hero .dm-sub {
    margin-bottom: 12px;
    font-size: 17px;
  }
}

@media (min-width: 721px) and (max-height: 820px) {
  .dm-hero {
    padding: 18px 28px 20px;
  }

  .dm-avatar-stage {
    width: min(18vw, 160px);
    margin-bottom: 8px;
  }

  .dm-hero h1 {
    margin-bottom: 6px;
    font-size: clamp(28px, 3vw, 36px);
  }

  .dm-hero .dm-sub {
    margin: 0 auto 12px;
    margin-inline: auto;
    font-size: 16px;
  }
}

@media (min-width: 721px) and (max-height: 740px) {
  .dm-avatar-stage {
    width: min(14vw, 128px);
    margin-bottom: 6px;
  }

  .dm-badge {
    margin-bottom: 6px;
  }
}
