/* sections.css — Owner: content agent.
   Styles for content inside the SECTION markers of index.html:
   video, engines, tour, sounds, about. Everything else belongs elsewhere.
   Rules: tokens only, border-radius 0, no gradients/shadows/glows.
   This file ships NO motion of its own (hover transitions only, guarded at
   the bottom). Tour stickiness/reveal comes from the motion agent's
   motion.css (.scene-wrap/.scene + [data-reveal]); without it the tour
   degrades to a normal vertical stack, which is intentional and readable. */

/* ================= VIDEO — inline, in a landscape iPhone frame =================
   The phone recording is landscape 1920x1080, so the device is shown in
   landscape: bezel, rounded screen, side buttons. It just plays — no
   lightbox, no fullscreen theater. (Radius here is deliberate device
   chrome: realism beats the zero-radius rule for this element.) */
.vid-fig { margin: var(--s6) auto 0; max-width: 900px; }
.iphone-frame {
  position: relative;
  background: #0b0b0c;
  border: 1px solid #34343a;
  border-radius: 44px;
  padding: 16px;
  box-shadow: inset 0 0 0 2px #1c1c1f; /* rim between bezel and screen */
}
.iphone-frame video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9; /* phone video is landscape 1920x1080; loops 1280x720 */
  object-fit: cover;
  background: var(--panel);
  border-radius: 28px;                  /* the screen's rounded glass */
}
/* hardware: volume rockers + power button on the (now top) long edge */
.iphone-frame::before,
.iphone-frame::after {
  content: "";
  position: absolute;
  top: -3px;
  height: 3px;
  background: #4a4a52;
  border-radius: 2px 2px 0 0;
}
.iphone-frame::before { left: 22%; width: 64px; }   /* volume rockers */
.iphone-frame::after  { right: 18%; width: 90px; }  /* power button */

/* sound toggle — sits on the glass, bottom-right; the loop starts muted
   because browsers block unmuted autoplay, and this audio IS the product */
.sound-btn {
  position: absolute;
  right: 28px;
  bottom: 28px;
  z-index: 2;
  font-family: var(--font-m);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(13, 13, 13, 0.72);
  border: 1px solid var(--line-2);
  padding: 8px 14px;
  cursor: pointer;
}
.sound-btn:hover { border-color: var(--accent); }
.sound-btn.is-on {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}

.vid-fig figcaption { margin-top: var(--s3); text-align: center; }

/* ================= FULL DEMO =================
   The whole 3:18 phone recording with native controls — the user scrubs,
   pauses and hears everything. Poster from the energetic window (150s). */
.demo-frame { max-width: 900px; margin: var(--s6) auto 0; }
.demo-frame video { width: 100%; }
.demo-caption { text-align: center; margin-top: var(--s3); }

/* ================= ENGINES =================
   Asymmetric 12-col grid: varied spans (7/5, 5/7, 6/6, 12), image side
   alternates per card via .eng-card--flip. Never 3 equal cards in a row. */
.eng-picker { margin: var(--s6) 0 0; }
.eng-picker img { width: 100%; height: auto; display: block; border: 1px solid var(--line); background: var(--panel); }
.eng-picker figcaption { margin-top: var(--s3); text-align: center; }
.eng-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--s4);
  margin-top: var(--s6);
}
.eng-grid .c5  { grid-column: span 5; }
.eng-grid .c6  { grid-column: span 6; }
.eng-grid .c7  { grid-column: span 7; }
.eng-grid .c12 { grid-column: span 12; }

.eng-card {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: var(--s5);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: var(--s4);
  align-items: center;
  align-content: start;
}
.eng-card--wide { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
.eng-card--flip > .eng-shot { order: 2; } /* image on the right */

.eng-shot {
  overflow: hidden;
  border: 1px solid var(--line-2);
  aspect-ratio: 16 / 10;
  background: var(--bg-2);
}
.eng-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Shared screenshot, two crops (wavetable / physical modeling): */
.eng-shot--cropA img { object-position: 12% 40%; }
.eng-shot--epiano img { object-position: 0% 55%; } /* left of the mixer frame: the E.PIANO strip */

.eng-info h3 { margin-bottom: var(--s2); }
.eng-desc { color: var(--ink-2); font-size: 0.92rem; line-height: 1.5; }
.eng-kv { margin-top: var(--s3); }
.eng-actions {
  margin-top: var(--s4);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s3);
}
.demo-btn { padding: 10px 16px; font-size: 0.72rem; }
.demo-btn.is-playing { border-color: var(--accent); }
.demo-label::after { content: " ▶"; color: var(--accent); }
.demo-btn.is-playing .demo-label::after { content: " ■"; }
.eng-nodemo { font-size: 0.68rem; }

/* ================= TOUR ================= */
.tour-scenes { margin-top: var(--s7); }
/* Sticky scenes need scroll room: the wrapper is taller than the viewport so
   .scene stays pinned while the reader travels through it. */
.tour-scenes .scene-wrap { min-height: 170vh; }
.scene-num {
  font-family: var(--font-m);
  font-size: clamp(3.2rem, 7vw, 5.5rem);
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent);
}
.scene h3 { margin: var(--s3) 0 var(--s2); font-size: clamp(1.35rem, 2.6vw, 1.9rem); }
.scene-body { color: var(--ink-2); }
.scene .kv { margin-top: var(--s3); }

@media (min-width: 901px) {
  /* Text-only scenes: asymmetric column, alternate sides */
  .tour-scenes .scene-wrap:nth-child(odd)  .scene { max-width: 62%; }
  .tour-scenes .scene-wrap:nth-child(even) .scene { max-width: 62%; margin-left: auto; text-align: right; }
  .tour-scenes .scene-wrap:nth-child(even) .scene-body,
  .tour-scenes .scene-wrap:nth-child(even) .scene .kv { margin-left: auto; }
}

/* ================= SOUNDS ================= */
.snd-notes {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3) var(--s5);
  margin-top: var(--s5);
}
.snd-note {
  border-left: 2px solid var(--accent);
  padding-left: var(--s3);
  color: var(--ink-2);
  font-size: 0.9rem;
  max-width: 34ch;
}
.snd-note--lead { color: var(--ink); font-weight: 600; font-size: 1.05rem; max-width: none; }

.snd-tablewrap { margin-top: var(--s6); }
.snd-table { width: 100%; border-collapse: collapse; }
.snd-table th {
  font-family: var(--font-m);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: left;
  padding: var(--s3) var(--s3) var(--s2);
  border-bottom: 1px solid var(--line-2);
}
.snd-table td { padding: var(--s4) var(--s3); border-bottom: 1px solid var(--line); vertical-align: top; }
.snd-piano strong { display: block; font-size: 1.05rem; }
.snd-desc { display: block; color: var(--ink-2); font-size: 0.85rem; margin-top: var(--s1); max-width: 40ch; }
.snd-lic {
  font-family: var(--font-m);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  max-width: 22ch;
}
.snd-size { font-family: var(--font-m); font-size: 0.8rem; color: var(--ink-2); white-space: nowrap; }

/* ================= ABOUT ================= */
.about-body {
  margin-top: var(--s5);
  max-width: 62ch;
  font-size: 1.05rem;
  line-height: 1.7;
  white-space: pre-line; /* dict value carries \n for the manifesto line breaks */
}
.about-more { margin-top: var(--s4); }
.about-more a { font-family: var(--font-m); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; }

/* ================= RESPONSIVE (375px first-class) ================= */
@media (max-width: 900px) {
  .eng-grid { grid-template-columns: 1fr; }
  .eng-grid .c5, .eng-grid .c6, .eng-grid .c7, .eng-grid .c12 { grid-column: auto; }
  .eng-card, .eng-card--wide { grid-template-columns: 1fr; }
  .eng-card--flip > .eng-shot { order: 0; } /* image back on top */
  .tour-scenes .scene-wrap:nth-child(odd) .scene,
  .tour-scenes .scene-wrap:nth-child(even) .scene { max-width: none; margin-left: 0; text-align: left; }
  .tour-scenes .scene-wrap:nth-child(even) .scene-body,
  .tour-scenes .scene-wrap:nth-child(even) .scene .kv { margin-left: 0; }
}

@media (max-width: 720px) {
  /* Catalog table -> stacked rows; headers stay for screen readers */
  .snd-table thead {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .snd-table tbody, .snd-table tr, .snd-table td { display: block; }
  .snd-table tr { border-bottom: 1px solid var(--line-2); padding: var(--s4) 0; }
  .snd-table td { border-bottom: 0; padding: var(--s2) 0; }
  .snd-table td::before {
    content: attr(data-label);
    display: block;
    font-family: var(--font-m);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-bottom: var(--s1);
  }
  .snd-table td[data-label=""]::before { content: none; }
  .snd-desc { max-width: none; }
}

/* ================= REDUCED MOTION =================
   This file animates nothing; kill any inherited transition on content-agent
   elements. The video section plays inline (muted loop); fullscreen entry is
   a user action, not an animation. */
@media (prefers-reduced-motion: reduce) {
  .demo-btn, .eng-shot img, .snd-note, .scene, .about-body { transition: none !important; animation: none !important; }
}
