/* ======================================================================
   PA-WEB-006-A07 — PROTOTYPE / RESEARCH-PHASE VISUAL PARITY
   Phase 2 atmospheric cityscape + exact phase Matrix glyph dimensions,
   rendered firetruck red. Original research-phase files are unchanged.
   ====================================================================== */

body.prototype-research.theme-prototype {
  --detail-accent: #D21E2B;
  --detail-line: rgba(210,30,43, .59);
  --detail-fog: rgba(210,30,43, .12);
  --prototype-red: #D21E2B;
  --atmos-scene: url('assets/pa-web-006-a07/prototype-cityscape-user-selected-rev9.jpg');
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  color: #f5ebe7;
  background-color: #06080b;
  /* Show the approved Phase 2 cityscape/waterfalls without its title
     occupying the upper hero area. The artwork itself is unmodified. */
  background-image:
    linear-gradient(180deg, rgba(6, 5, 8, .42), rgba(8, 4, 7, .42) 36%, rgba(3, 5, 8, .84) 100%),
    linear-gradient(90deg, rgba(210, 30, 43, .10), rgba(30, 0, 0, .04)),
    var(--atmos-scene);
  background-repeat: no-repeat;
  /* A07 approved: full-width, uncropped cityscape; remains stationary under scrolling content. */
  background-size: 100% 100%, 100% 100%, 100% auto;
  background-position: center top, center top, center top;
  background-attachment: fixed, fixed, fixed;
}

/* Exact research-phase Matrix pattern and scroll rate, colored true red.
   The mask preserves the original 0/1 shapes and column spacing. */
body.prototype-research.theme-prototype::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: #D21E2B;
  opacity: .91;
  -webkit-mask-image: url('assets/phase-atmospheres/matrix-02.png');
  mask-image: url('assets/phase-atmospheres/matrix-02.png');
  -webkit-mask-repeat: repeat;
  mask-repeat: repeat;
  -webkit-mask-size: 900px 1300px;
  mask-size: 900px 1300px;
  animation: atmos-a07-firetruck-rain 42s linear infinite;
}

/* Same readability veil found on the Phase 2–9 atmospheric system. */
body.prototype-research.theme-prototype::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,.30), rgba(0,0,0,.06) 51%, rgba(0,0,0,.28));
}

@keyframes atmos-a07-firetruck-rain {
  from { -webkit-mask-position: center 0; mask-position: center 0; }
  to { -webkit-mask-position: center 1300px; mask-position: center 1300px; }
}

body.prototype-research .detail-shell { position: relative; z-index: 1; }

body.prototype-research .detail-topline { border-bottom-color: var(--detail-line); }
body.prototype-research .detail-brand img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: none !important;
}
body.prototype-research .detail-brand strong,
body.prototype-research .detail-hero h1,
body.prototype-research .data-metric strong,
body.prototype-research .content-panel h2,
body.prototype-research .content-panel h3,
body.prototype-research .detail-kicker,
body.prototype-research .hero-eyebrow,
body.prototype-research .status-line,
body.prototype-research .preview-note b,
body.prototype-research .plain-meaning strong,
body.prototype-research .prototype-card-id,
body.prototype-research .prototype-card-open,
body.prototype-research .finding .mini-explain b { color: var(--prototype-red); }

body.prototype-research .detail-action {
  border-color: var(--detail-line);
  color: #ffdede;
  background: rgba(10, 14, 18, .91);
}
body.prototype-research .detail-action:hover {
  border-color: var(--prototype-red);
  background: rgba(210,30,43, .15);
}

body.prototype-research .detail-hero { grid-template-columns: 1.05fr .95fr; gap: 28px; }
body.prototype-research .detail-hero h1 {
  font-size: clamp(39px, 5vw, 60px);
  line-height: 1.09;
  text-shadow: 0 2px 14px #000c;
}
body.prototype-research .detail-lede { font-size: 20px; color: #fff2ee; }
body.prototype-research .status-dot { border-color: var(--prototype-red); background: rgba(210,30,43, .26); }
body.prototype-research .hero-image { border-color: var(--detail-line); }
body.prototype-research .hero-image img { height: 330px; object-fit: cover; filter: saturate(.95) brightness(.95); }

/* Match Phase-page dark, illuminated, elevated content panels. */
body.prototype-research .content-panel,
body.prototype-research .data-metric {
  border-color: rgba(210,30,43, .78);
  background: rgba(8, 13, 17, .94);
  backdrop-filter: blur(4px);
  box-shadow:
    inset 0 1px 0 rgba(210,30,43, .19),
    inset 0 0 25px rgba(210,30,43, .045),
    0 4px 0 rgba(73, 15, 18, .70),
    0 20px 42px rgba(0,0,0,.68),
    0 0 31px rgba(210,30,43, .18);
}
body.prototype-research .preview-note { border-color: var(--detail-line); background: rgba(14, 18, 22, .92); }
body.prototype-research .hero-image figcaption { background: #10161acc; }
body.prototype-research .plain-meaning { border-left-color: var(--prototype-red); background: rgba(13, 18, 22, .86); }

body.prototype-research .content-panel p,
body.prototype-research .content-panel li { font-size: 16px; line-height: 1.78; color: #e8e2dd; }
body.prototype-research .sidebar .content-panel p,
body.prototype-research .sidebar .content-panel li,
body.prototype-research .finding .mini-explain,
body.prototype-research .plain-meaning p { font-size: 14.5px; line-height: 1.72; color: #e9e1db; }
body.prototype-research .preview-note,
body.prototype-research .hero-image figcaption,
body.prototype-research .data-metric span { font-size: 13px; line-height: 1.65; color: #e7dbd6; }
body.prototype-research .research-footer { border-top-color: var(--detail-line); }

/* Full-image prototype gallery and six technical concept review cards. */
.prototype-gallery-link { display:block; margin-top: 12px; overflow:hidden; border-radius: 12px; border:1px solid var(--detail-line); box-shadow: 0 14px 28px #0008; }
.prototype-gallery-link img { width:100%; height:auto; display:block; }
.prototype-phase-cards { display:grid; gap:18px; margin-top:16px; }
.prototype-phase-card {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(230px,320px);
  gap:20px;
  align-items:center;
  padding:19px;
  border:1px solid rgba(210,30,43, .43);
  border-radius:12px;
  background:linear-gradient(160deg,rgba(13,17,21,.94),rgba(9,13,17,.94));
}
.prototype-research .prototype-phase-card h3 { font-size:28px; line-height:1.2; margin:0 0 10px; color:#fff1ee; }
.prototype-research .prototype-phase-card p { font-size:16px; line-height:1.7; margin:0; }
.prototype-card-id { font:700 12px var(--subheading); letter-spacing:1.65px; margin-bottom:9px; }
.prototype-card-art { display:block; border-radius:10px; overflow:hidden; border:1px solid var(--detail-line); }
.prototype-card-art img { width:100%; height:225px; object-fit:cover; display:block; }
.prototype-tags { display:flex; flex-wrap:wrap; gap:7px; margin-top:12px; }
.prototype-tags span { border:1px solid rgba(210,30,43,.38); border-radius:99px; padding:8px 11px; color:#ffe7e4; background:rgba(210,30,43,.025); font-size:12px; }
.prototype-card-open { display:inline-block; margin-top:15px; font:700 13px var(--subheading); letter-spacing:.9px; text-decoration:none; }
.prototype-card-open:hover { text-decoration:underline; text-underline-offset:4px; }
.prototype-sidebar .content-panel h2 { font-size:20px; }
.prototype-sidebar a { color:#eae1dd; }
.prototype-research .research-footer .detail-action { color:#fff2f0; }

/* The existing full-screen gallery zoom is preserved. */
#image-dialog { border:1px solid var(--detail-line); }
#image-dialog .prototype-viewer-notes,
#image-dialog .dialog-close { border-color:var(--detail-line); }

@media(max-width:960px) {
  .prototype-phase-card { grid-template-columns: 1fr; }
  .prototype-card-art img { height:auto; }
}
@media(max-width:720px) {
  body.prototype-research.theme-prototype {
    background-size: 100% 100%, 100% 100%, 100% auto;
    background-position: center top, center top, center top;
    background-attachment: fixed, fixed, fixed;
  }
  body.prototype-research .detail-hero { grid-template-columns:1fr; }
  body.prototype-research .detail-brand img { width:52px;height:52px; }
  body.prototype-research .detail-hero h1 { font-size:clamp(35px,8vw,49px); }
  body.prototype-research .detail-lede { font-size:18px; }
}
@media(prefers-reduced-motion:reduce) {
  body.prototype-research.theme-prototype::before { animation:none; }
}

/* Match the popup controls to the final bright-red palette. */
body.prototype-research #image-dialog .dialog-close {
  border-color: rgba(210,30,43,.65);
  background: linear-gradient(180deg, rgba(142,19,28,.90),rgba(26,10,12,.96));
}

/* A07 REV8 — Original Phase 2 binary overlay made visible directly.
   Cityscape remains the existing temporary image until user supplies new art. */
body.prototype-research.theme-prototype::before {
  content: "";
  display: block;
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url('assets/pa-web-006-a07/matrix-phase-red-rev9.png') center 0 / 900px 1300px repeat;
  opacity: 0.93;
  -webkit-mask-image: none;
  mask-image: none;
  animation: atmos-prototype-rain-rev8 23s linear infinite;
}
body.prototype-research.theme-prototype::after { content: none; }
body.prototype-research .detail-shell { position: relative; z-index: 1; }
@keyframes atmos-prototype-rain-rev8 {
  from { background-position: center 0; }
  to { background-position: center 1300px; }
}
@media (prefers-reduced-motion: reduce) {
  body.prototype-research.theme-prototype::before { animation: none; }
}

/* REV9: The supplied cityscape is the background only; the Phase 2
   layout, concept boards, and fixed-position animated 0/1 overlay remain. */

/* Class E A07 corrective patch: approved accent #D21E2B; background fixed; no layout/content changes. */
