/*
 * Dr.Prompt · PSD screenshot-level calibration (P4)
 *
 * Presentation-only follow-up to P3. This pass tightens large-screen
 * geometry, hero crop, gradient falloff, and panel rhythm against the
 * supplied 1920 × 1961 PSD. It does not add controls or alter behavior.
 */

:root {
  --psd-p4-content-max: 1480px;
  --psd-p4-page-gutter: clamp(28px, 4vw, 72px);
  --psd-p4-topbar-gutter: clamp(24px, 3.2vw, 64px);
  --psd-p4-panel-radius: 24px;
  --psd-p4-surface: rgba(12, 11, 16, .74);
  --psd-p4-surface-deep: rgba(7, 7, 10, .90);
}

/* -------------------------------------------------------------------------
   Shared canvas: keep the reference artwork visible behind the first fold,
   then let the dark workspace take over gradually rather than at a hard seam.
   ------------------------------------------------------------------------- */
#app#app[data-active-view="workbench"][data-creation-entry="fast"] .shell {
  background-image:
    linear-gradient(
      180deg,
      rgba(10, 9, 12, .08) 0,
      rgba(10, 9, 12, .16) 180px,
      rgba(39, 39, 39, .18) 320px,
      rgba(39, 39, 39, .68) 500px,
      #272727 680px,
      #272727 100%
    ),
    url("assets/directorflow-global-background-dark-mosaic-v2.webp") !important;
  background-position: center top, center top !important;
}

#app#app[data-active-view="home"] .shell {
  background-image:
    linear-gradient(
      180deg,
      rgba(9, 9, 11, .04) 0,
      rgba(9, 9, 11, .18) 180px,
      rgba(9, 9, 11, .42) 360px,
      rgba(9, 9, 11, .82) 540px,
      #09090b 700px,
      #09090b 100%
    ),
    url("assets/directorflow-global-background-dark-mosaic-v2.webp") !important;
  background-position: center top, center top !important;
}

/* -------------------------------------------------------------------------
   Topbar: align the transparent chrome to the PSD's wide content rails while
   retaining the existing navigation and account actions exactly as-is.
   ------------------------------------------------------------------------- */
@media (min-width: 1100px) {
  #app#app[data-active-view] .topbar {
    width: min(calc(100% - (var(--psd-p4-topbar-gutter) * 2)), 1800px) !important;
    min-height: 76px !important;
    margin: 16px auto 0 !important;
    padding: 11px 20px !important;
    border-radius: 20px !important;
    background:
      linear-gradient(180deg, rgba(28, 24, 34, .19), rgba(8, 8, 11, .075)) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .12),
      inset 0 -1px 0 rgba(0, 0, 0, .12),
      0 22px 64px rgba(6, 4, 9, .13) !important;
  }

  #app#app[data-active-view] .topbar-navigation > .workspace-topnav {
    min-height: 42px !important;
    padding-inline: 6px !important;
    border-radius: 14px !important;
    background: rgba(7, 6, 10, .14) !important;
  }

  #app#app[data-active-view] .topbar-navigation > .workspace-topnav .workspace-topnav-item {
    min-height: 32px !important;
    border-radius: 9px !important;
  }
}

/* -------------------------------------------------------------------------
   Workbench: use one centered rail, reduce the gap before the production
   surface, and give the composer/output modules the same visual weight.
   ------------------------------------------------------------------------- */
@media (min-width: 1100px) {
  #app#app[data-active-view="workbench"][data-creation-entry="fast"] .view[data-view-panel="workbench"] {
    padding-top: 0 !important;
  }

  #app#app[data-active-view="workbench"][data-creation-entry="fast"] .workbench-grid {
    width: min(var(--psd-p4-content-max), calc(100% - (var(--psd-p4-page-gutter) * 2))) !important;
    padding-top: 34px !important;
    padding-bottom: 96px !important;
    gap: 30px !important;
  }

  #app#app[data-active-view="workbench"][data-creation-entry="fast"] .output-panel {
    border-radius: var(--psd-p4-panel-radius) !important;
  }

  #app#app[data-active-view="workbench"][data-creation-entry="fast"] .output-panel {
    background:
      linear-gradient(180deg, rgba(21, 19, 27, .74), rgba(7, 7, 9, .92)) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .085),
      0 30px 96px rgba(8, 7, 12, .23) !important;
  }

  #app#app[data-active-view="workbench"][data-creation-entry="fast"] .prompt-card {
    margin-inline: 2px !important;
    border-radius: 18px !important;
    background:
      linear-gradient(160deg, rgba(38, 25, 62, .38), rgba(0, 0, 0, .27)) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .045),
      0 14px 32px rgba(0, 0, 0, .12) !important;
  }
}

/* -------------------------------------------------------------------------
   Landing page: match the same horizontal rail and media proportions so the
   home and workbench views read as one product rather than two themes.
   ------------------------------------------------------------------------- */
@media (min-width: 1100px) {
  #app#app[data-active-view="home"] .home-view,
  #app#app[data-active-view="home"] .home-hero,
  #app#app[data-active-view="home"] .home-stats,
  #app#app[data-active-view="home"] .home-entry-grid {
    width: min(var(--psd-p4-content-max), calc(100% - (var(--psd-p4-page-gutter) * 2))) !important;
    margin-inline: auto !important;
  }

  #app#app[data-active-view="home"] .home-hero {
    column-gap: clamp(44px, 6.5vw, 112px) !important;
    row-gap: 46px !important;
  }

  #app#app[data-active-view="home"] .home-hero-media-frame {
    aspect-ratio: 16 / 9 !important;
    min-height: clamp(320px, 31vw, 560px) !important;
    border-radius: 16px !important;
    background-position: center center !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .13),
      0 32px 96px rgba(0, 0, 0, .26) !important;
  }
}

/* Keep the P4 crop controlled on narrow screens; the existing mobile tray and
   responsive interaction rules remain authoritative below this breakpoint. */
@media (max-width: 1099px) {
  #app#app[data-active-view="workbench"][data-creation-entry="fast"] .shell,
  #app#app[data-active-view="home"] .shell {
    background-position: center top, center top !important;
  }
}
