/* Screenshot features for the TomeHaven landing page; the app's existing colours stay in couch-corner.css. */
#features { min-width: 0; scroll-margin-top: 24px; }
.screenshot-note { font-size: 0.875rem; line-height: 1.5; }
.feature-list { display: grid; gap: 48px; margin-top: 12px; min-width: 0; }
.feature-story {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}
.feature-story:last-child { border-bottom: 0; padding-bottom: 0; }
.feature-copy { display: grid; gap: 18px; grid-column: 2; grid-row: 1; }
.feature-copy h3 { font-size: clamp(1.65rem, 3.5vw, 2.15rem); line-height: 1.2; }
.feature-kicker { color: var(--accent); font-size: 0.9rem; font-weight: 800; letter-spacing: 0.06em; }
.feature-note { color: var(--text2); font-size: 0.98rem; }
.feature-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  grid-column: 1;
  grid-row: 1;
  cursor: zoom-in;
  border-radius: 16px;
}
.feature-visual img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 520px;
  border: 1px solid var(--border);
  border-radius: 14px;
}
.feature-visual.composite img { border: 0; border-radius: 16px; }
.feature-story:nth-child(even) { grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); }
.feature-story:nth-child(even) .feature-copy { grid-column: 1; }
.feature-story:nth-child(even) .feature-visual { grid-column: 2; }
/* Extra features use the same swipe-and-arrow pattern as Roll Anywhere. */
.feature-gallery { min-width: 0; gap: 16px; }
.gallery-controls { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: center; min-width: 0; }
.gallery-controls.has-controls { grid-template-columns: 44px minmax(0, 1fr) 44px; }
.gallery-position { justify-self: center; margin-top: -8px; min-width: 70px; text-align: center; color: var(--text2); font-variant-numeric: tabular-nums; }
.gallery-arrow {
  width: 44px;
  height: 44px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: var(--card);
  color: var(--accent);
  font: inherit;
  font-size: 1.35rem;
  cursor: pointer;
}
.gallery-arrow:hover:not(:disabled) { background: var(--card2); }
.gallery-arrow:disabled { opacity: 0.4; cursor: default; }
.gallery-arrow:focus-visible, .feature-track:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.feature-track {
  min-width: 0;
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 4px;
  padding: 6px 4px 14px;
  scrollbar-color: var(--border) var(--bg);
}
.feature-slide {
  flex: 0 0 calc((100% - 40px) / 2);
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  align-content: start;
  gap: 20px;
  scroll-snap-align: start;
}
.feature-slide .feature-visual { grid-column: auto; grid-row: auto; height: 300px; }
.feature-slide .feature-visual img { max-height: 300px; }
/* The detail reuses the screenshot; only its tab strip is visible in the callout. */
.feature-slide .tab-callout { position: relative; isolation: isolate; }
.feature-slide .tab-callout .tab-full {
  position: absolute;
  top: 0;
  left: 50%;
  height: 280px;
  max-width: none;
  transform: translateX(-50%);
}
.tab-source {
  position: absolute;
  z-index: 2;
  top: 15px;
  left: 50%;
  width: 120px;
  height: 24px;
  transform: translateX(-50%);
  border: 1px solid var(--accent);
  border-radius: 3px;
}
.tab-guide {
  position: absolute;
  z-index: 1;
  inset: 27px 12px 160px calc(50% + 60px);
  border-top: 1px solid var(--accent);
  border-right: 1px solid var(--accent);
  border-top-right-radius: 12px;
  opacity: 0.65;
}
.tab-detail {
  position: absolute;
  z-index: 3;
  inset: 140px 0 auto;
  transform: translateY(-50%);
  aspect-ratio: 1080 / 222;
  overflow: hidden;
  border: 2px solid var(--accent);
  border-radius: 10px;
  background: #24170e;
  box-shadow: 0 8px 24px #0006;
}
.feature-slide .tab-detail img {
  width: 100%;
  max-height: none;
  border: 0;
  border-radius: 0;
  transform: translateY(-5.31746%);
}
.feature-slide .feature-copy { grid-column: auto; grid-row: auto; gap: 14px; align-content: start; }
.feature-slide .feature-copy h3 { font-size: 1.45rem; line-height: 1.3; }
.feature-slide .feature-note { font-size: 0.9rem; line-height: 1.5; }
.feature-slide.text-feature { grid-template-rows: 1fr; }
.feature-slide.text-feature .feature-copy { align-content: center; }
@media (max-width: 760px) {
  .gallery-controls.has-controls { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .gallery-controls.has-controls > .feature-track, .gallery-arrow { grid-column: 1; grid-row: 1; }
  .gallery-arrow { position: relative; z-index: 1; }
  .gallery-prev { justify-self: start; transform: translateX(-10px); }
  .gallery-next { justify-self: end; transform: translateX(10px); }
  .feature-slide { flex-basis: calc(100% - 28px); }
}
/* The developer's story reads as a personal letter, distinct from the feature sections. */
.developer-letter {
  min-width: 0;
  padding: clamp(24px, 5vw, 48px);
  gap: 26px;
  background: #efe4d2;
  color: #352c23;
  border: 1px solid #d1baa0;
  border-radius: 12px;
}
.developer-letter-heading, .developer-letter-body { width: 100%; max-width: 44rem; margin-inline: auto; }
.developer-letter-heading { display: grid; gap: 12px; }
.developer-letter-eyebrow { color: #89593d; font-size: 0.85rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.developer-letter h2 { color: #513b2a; }
.developer-letter-body { display: grid; gap: 20px; font-family: Georgia, "Times New Roman", serif; font-size: 1.125rem; line-height: 1.75; }
.developer-letter-reflection { font-style: italic; color: #6d4b33; }
.developer-letter .signature { color: #705844; border-top: 1px solid #d1baa0; padding-top: 20px; margin-top: 4px; }
@media (max-width: 740px) {
  .feature-story, .feature-story:nth-child(even) { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .feature-copy, .feature-story:nth-child(even) .feature-copy { grid-column: 1; grid-row: 1; }
  .feature-story .feature-visual, .feature-story:nth-child(even) .feature-visual { grid-column: 1; grid-row: 2; }
  .feature-visual img { max-height: 560px; }
  .feature-visual.composite { width: min(100%, 420px); justify-self: center; }
}
@media (max-width: 560px) {
  .topbar { align-items: baseline; flex-wrap: wrap; }
  .topbar > a:last-child { font-size: 0.95rem; }
}
