/* Spotlights: the homepage's three (#vision) and the pages they lead to (share, discover,
   create-space), which open with the same section and go deeper. The pictures are live stills of the
   Dojo story (dojo-still.js), so they follow light/dark mode with the rest of the page. */

.spotlights {
  display: grid;
  gap: clamp(80px, 11vw, 150px);
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 16px 112px;
}

.spotlight {
  display: grid;
  gap: 36px;
  justify-items: center;
}

.spotlight-copy {
  width: 100%;
  max-width: 520px;
  text-align: left;
}

.spotlight-eyebrow {
  margin: 0 0 14px;
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.spotlight-title {
  margin: 0 0 18px;
  font-size: clamp(2rem, 3.6vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.08;
  color: var(--text-primary);
  text-wrap: balance;
}

.spotlight-lead {
  margin: 0 0 24px;
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--text-secondary);
  text-wrap: pretty;
}

.spotlight-list {
  display: grid;
  gap: 12px;
  margin: 0 0 30px;
  padding: 0;
  list-style: none;
}

.spotlight-list li {
  position: relative;
  padding-left: 26px;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.spotlight-list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.45em;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--text-primary);
  border-bottom: 2px solid var(--text-primary);
  transform: rotate(-45deg);
}

.spotlight-list strong {
  color: var(--text-primary);
  font-weight: 600;
}

.spotlight-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 160ms ease, opacity 160ms ease;
}

.spotlight-link::after {
  content: '→';
  transition: transform 160ms ease;
}

.spotlight-link:hover { opacity: 0.88; }
.spotlight-link:hover::after { transform: translateX(3px); }
.spotlight-link:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 3px; }

.spotlight-link--quiet {
  padding: 12px 4px;
  background: none;
  color: var(--text-primary);
}

.spotlight-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.spotlight-visual {
  display: grid;
  justify-items: center;
  gap: 14px;
  width: 100%;
}

.spotlight-visual .dojo-still {
  width: min(360px, 100%);
  border-radius: 28px;
  box-shadow: 0 0 0 1px var(--border-color);
}

body.light-mode .spotlight-visual .dojo-still {
  box-shadow: 0 0 0 1px var(--border-color), 0 18px 48px rgba(0, 0, 0, 0.08);
}

.spotlight-hint {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-tertiary);
  text-align: center;
}

@media (min-width: 960px) {
  .spotlights { padding: 96px 48px 140px; }
  .spotlight {
    grid-template-columns: minmax(0, 520px) auto;
    grid-template-areas: 'copy visual';
    justify-content: center;
    justify-items: stretch;
    align-items: center;
    gap: clamp(56px, 7vw, 128px);
  }
  /* Alternate sides down the page. */
  .spotlight--flip {
    grid-template-columns: auto minmax(0, 520px);
    grid-template-areas: 'visual copy';
  }
  .spotlight-copy { grid-area: copy; }
  .spotlight-visual { grid-area: visual; width: auto; }
  .spotlight-visual .dojo-still {
    width: auto;
    height: min(680px, calc(100svh - 160px));
  }
}

/* ---- The pages behind each section ------------------------------------------------------------ */

.spotlight-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 16px 112px;
}

.spotlight-page .spotlight { padding-bottom: clamp(64px, 9vw, 120px); }

.spotlight-page h1.spotlight-title { font-size: clamp(2.3rem, 4.6vw, 3.6rem); }

/* What the page adds beyond the homepage: the details, three across. */
.spotlight-points {
  display: grid;
  gap: 16px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.spotlight-point {
  padding: 26px 26px 28px;
  border: 1px solid var(--border-color);
  border-radius: 22px;
  background: var(--bg-card);
}

.spotlight-point h2 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.spotlight-point p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

@media (min-width: 860px) {
  .spotlight-points { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* The other two pages, so a visitor can keep going without heading back home. */
.spotlight-next {
  margin-top: clamp(64px, 9vw, 112px);
}

.spotlight-next > h2 {
  margin: 0 0 18px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.spotlight-next-links {
  display: grid;
  gap: 12px;
}

.spotlight-next-links a {
  display: grid;
  gap: 6px;
  padding: 22px 24px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: var(--text-primary);
  text-decoration: none;
  transition: background-color 160ms ease;
}

.spotlight-next-links a:hover { background: var(--bg-card); }
.spotlight-next-links a:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 2px; }

.spotlight-next-links strong {
  font-size: 1.15rem;
  font-weight: 700;
}

.spotlight-next-links strong::after { content: ' →'; }

.spotlight-next-links span {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

@media (min-width: 720px) {
  .spotlight-next-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* The pages' shared shell (subpage-modern.css) sets its own headline face and looser text; these pages
   use the homepage's spotlight type instead. */
.spotlight-page .spotlight-title {
  font-family: inherit;
  letter-spacing: -0.025em;
  line-height: 1.08;
}
.spotlight-page h1.spotlight-title { font-size: clamp(2.3rem, 4.6vw, 3.6rem); }
.spotlight-page .spotlight-lead { line-height: 1.55; }
.spotlight-page .spotlight-list li,
.spotlight-page .spotlight-point p { line-height: 1.55; }
.spotlight-page .spotlight-more { margin-top: clamp(72px, 10vw, 128px); }

/* ---- Join: the close of the homepage and of each page ------------------------------------------
   Ends where the story ends: the brush-stroke logo draws itself in (dojo-still.js), then its sign-off.
   On a computer, a QR code takes the visitor straight to the App Store on their iPhone. */

.join {
  padding: 24px 16px 96px;
}

.join-card {
  display: grid;
  gap: 40px;
  justify-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px 24px;
  border: 1px solid var(--border-color);
  border-radius: 32px;
  background: var(--bg-card);
  text-align: center;
}

.join-copy {
  display: grid;
  justify-items: center;
}

.join-logo {
  --ds-ink: var(--text-primary);
  width: min(200px, 56vw);
  aspect-ratio: 840 / 442.105;
  margin-bottom: 28px;
}

.join-logo svg { display: block; width: 100%; height: 100%; }

.join-title {
  margin: 0 0 12px;
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--text-primary);
}

.join-lead {
  margin: 0 0 32px;
  text-wrap: balance;
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.join-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 24px;
}

.join-badge {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 196px;
  padding: 10px 20px 11px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 13px;
  background: #000;
  color: #fff;
  text-decoration: none;
  box-sizing: border-box;
  transition: transform 160ms ease;
}

.join-badge:hover { transform: translateY(-1px); }
.join-badge:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 3px; }
.join-badge svg { flex: 0 0 30px; width: 30px; height: 30px; display: block; }
.join-badge-copy { display: flex; flex-direction: column; align-items: flex-start; line-height: 1; }
.join-badge-kicker { margin-bottom: 4px; font-size: 0.68rem; }
.join-badge-title { font-size: 1.35rem; font-weight: 500; }

.join-web {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 1px solid var(--border-color);
}

.join-web:hover { color: var(--text-primary); }

.join-note {
  margin: 18px 0 0;
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

/* The QR code: only where there's a mouse and room, i.e. a computer. Always dark on white, so every
   phone camera reads it. */
.join-qr { display: none; }

@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  .join-card {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    justify-items: stretch;
    gap: clamp(40px, 6vw, 96px);
    padding: clamp(56px, 6vw, 80px) clamp(40px, 6vw, 88px);
    text-align: left;
  }
  .join-copy { justify-items: start; }
  .join-actions { justify-content: flex-start; }
  .join-qr {
    display: grid;
    justify-items: center;
    gap: 14px;
    margin: 0;
  }
  .join-qr-tile {
    padding: 16px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
  }
  .join-qr img { display: block; width: 148px; height: 148px; image-rendering: pixelated; }
  .join-qr figcaption {
    max-width: 180px;
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--text-secondary);
    text-align: center;
  }
}

/* The logo draws itself in, stroke by stroke, with the story's timing. */
.dojo-logo-draw path[pathLength] { stroke-dasharray: 0 1; visibility: hidden; }
.dojo-logo-draw.is-drawn path[pathLength] {
  stroke-dasharray: 1 1;
  visibility: visible;
  transition: stroke-dasharray 0.64s cubic-bezier(0.35, 0.05, 0.25, 1), visibility 0s;
}
.dojo-logo-draw.is-drawn path[pathLength].m-2004-162 { transition-delay: 0.12s; transition-duration: 0.68s, 0s; }
.dojo-logo-draw.is-drawn path[pathLength].m-2004-177 { transition-delay: 0.24s; transition-duration: 0.68s, 0s; }
.dojo-logo-draw.is-drawn path[pathLength].m-2004-180 { transition-delay: 0.36s; transition-duration: 0.68s, 0s; }
@media (prefers-reduced-motion: reduce) {
  .dojo-logo-draw path[pathLength] { stroke-dasharray: 1 1; visibility: visible; transition: none !important; }
}
.spotlight-page .join { padding: clamp(64px, 9vw, 112px) 0 0; }
.spotlight-page .join-lead { line-height: 1.5; }

/* subpage-modern.css cuts every animation short under reduced motion; the live stills are paused
   animations, held at a moment of the loop, and need their real length to show the right frame. */
@media (prefers-reduced-motion: reduce) {
  .dojo-still [class*="m-"] { animation-duration: 21.2s !important; }
}

/* ---- Guides and comparisons (tools/seo/pages.py): a reading column, tables, FAQ, breadcrumbs ------ */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
  font-size: 0.85rem;
  color: var(--text-tertiary);
}
.crumbs a { color: var(--text-secondary); text-decoration: none; }
.crumbs a:hover { color: var(--text-primary); }

.prose {
  max-width: 720px;
  margin: 0 auto;
  color: var(--text-secondary);
  font-size: 1.075rem;
  line-height: 1.65;
}
.spotlight-page .prose p,
.spotlight-page .prose li { line-height: 1.65; }
.prose h2 {
  margin: 56px 0 16px;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text-primary);
}
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 1.4em; display: grid; gap: 10px; }
.prose strong { color: var(--text-primary); font-weight: 600; }
.prose a { color: var(--text-primary); text-decoration: underline; text-decoration-color: var(--border-color); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: currentColor; }

.prose-table {
  margin: 8px 0 24px;
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 18px;
}
.prose-table table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.prose-table th, .prose-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  vertical-align: top;
}
.prose-table tr:last-child > * { border-bottom: 0; }
.prose-table thead th { color: var(--text-primary); font-weight: 700; background: var(--bg-card); }
.prose-table tbody th { color: var(--text-primary); font-weight: 600; width: 22%; }
.prose-table td:last-child { color: var(--text-primary); }

.spotlight-faq {
  max-width: 720px;
  margin: clamp(64px, 9vw, 112px) auto 0;
}
.spotlight-faq > h2 {
  margin: 0 0 18px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.spotlight-faq-item {
  border-top: 1px solid var(--border-color);
}
.spotlight-faq-item:last-child { border-bottom: 1px solid var(--border-color); }
.spotlight-faq-item summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
}
.spotlight-faq-item summary::-webkit-details-marker { display: none; }
.spotlight-faq-item summary::after { content: '+'; color: var(--text-secondary); font-weight: 400; }
.spotlight-faq-item[open] summary::after { content: '−'; }
.spotlight-faq-item summary:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 4px; }
.spotlight-page .spotlight-faq-item p { margin: 0 0 20px; color: var(--text-secondary); line-height: 1.6; }
.spotlight-faq-item a { color: var(--text-primary); }
.spotlight-page .prose { margin-top: 0; }
.spotlight-page .spotlight + .prose { margin-top: clamp(24px, 4vw, 48px); }
/* The homepage's guides row: same cards, three across on wide screens. */
.spotlight-guides { max-width: 1100px; margin: 0 auto clamp(48px, 7vw, 96px); padding: 0 16px; }
@media (min-width: 960px) { .spotlight-guides .spotlight-next-links { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
