/* =========================================================
   NOUS IMAGE
========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}


:root {
  --image-bg: #030508;
  --image-text: #ffffff;

  --image-muted:
    rgba(255, 255, 255, 0.44);

  --image-faint:
    rgba(255, 255, 255, 0.23);

  --image-border:
    rgba(255, 255, 255, 0.08);

  --image-blue:
    #76a9ff;

  --image-cyan:
    #72dcff;
}


html {
  min-height: 100%;

  background:
    var(--image-bg);

  color-scheme:
    dark;
}


body {
  min-height: 100vh;

  margin: 0;

  color:
    var(--image-text);

  background:
    var(--image-bg);

  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  -webkit-font-smoothing:
    antialiased;
}


button,
textarea {
  font: inherit;
}


button {
  color: inherit;
}


a {
  color: inherit;

  text-decoration:
    none;
}


/* =========================================================
   PAGE
========================================================= */

.image-page {
  position: relative;

  min-height: 100vh;

  isolation: isolate;

  overflow-x: hidden;

  background:
    linear-gradient(
      180deg,
      #030508,
      #020307
    );
}


/* =========================================================
   BACKGROUND
========================================================= */

.image-background {
  position: fixed;

  inset: 0;

  z-index: -10;

  overflow: hidden;

  pointer-events: none;
}


.image-stars {
  position: absolute;

  inset: 0;

  opacity: 0.38;

  background-image:
    radial-gradient(
      circle,
      rgba(255, 255, 255, 0.5) 1px,
      transparent 1.5px
    ),
    radial-gradient(
      circle,
      rgba(118, 169, 255, 0.45) 1px,
      transparent 1.5px
    );

  background-size:
    160px 160px,
    240px 240px;
}


.image-glow {
  position: absolute;

  border-radius: 50%;

  filter: blur(60px);
}


.image-glow-one {
  top: -300px;
  left: 50%;

  width: 800px;
  height: 800px;

  transform:
    translateX(-50%);

  background:
    rgba(70, 120, 220, 0.09);
}


.image-glow-two {
  right: -300px;
  bottom: -300px;

  width: 700px;
  height: 700px;

  background:
    rgba(152, 100, 225, 0.07);
}


/* =========================================================
   HEADER
========================================================= */

.image-header {
  width:
    calc(100% - 52px);

  height:
    76px;

  margin:
    0 auto;

  display:
    grid;

  grid-template-columns:
    1fr
    auto
    1fr;

  align-items:
    center;

  border-bottom:
    1px solid
    var(--image-border);
}


.image-back {
  justify-self:
    start;

  display:
    flex;

  align-items:
    center;

  gap:
    10px;

  color:
    var(--image-muted);

  font-size:
    0.68rem;
}


.image-back span:first-child {
  color:
    var(--image-blue);
}


.image-brand {
  justify-self:
    center;

  display:
    flex;

  align-items:
    center;

  gap:
    11px;
}


.image-brand img {
  width:
    34px;

  height:
    34px;

  object-fit:
    contain;

  animation:
    imageLogoSpin
    15s
    linear
    infinite;
}


.image-brand div {
  display:
    grid;

  gap:
    2px;
}


.image-brand strong {
  font-size:
    0.73rem;

  letter-spacing:
    0.18em;
}


.image-brand span {
  color:
    var(--image-faint);

  font-size:
    0.47rem;

  letter-spacing:
    0.18em;
}


.image-context {
  justify-self:
    end;

  color:
    var(--image-faint);

  font-size:
    0.52rem;

  letter-spacing:
    0.18em;
}


/* =========================================================
   WORKSPACE
========================================================= */

.image-workspace {
  width:
    min(
      calc(100% - 56px),
      1180px
    );

  margin:
    0 auto;

  padding:
    76px 0
    50px;
}


/* =========================================================
   HERO
========================================================= */

.image-hero {
  max-width:
    900px;
}


.image-eyebrow {
  margin:
    0 0 18px;

  color:
    rgba(118, 169, 255, 0.76);

  font-size:
    0.6rem;

  font-weight:
    800;

  letter-spacing:
    0.23em;
}


.image-hero h1 {
  margin:
    0;

  font-size:
    clamp(
      4rem,
      8vw,
      7rem
    );

  line-height:
    0.91;

  font-weight:
    470;

  letter-spacing:
    -0.07em;
}


.image-hero h1 span {
  display:
    block;

  color:
    rgba(255, 255, 255, 0.4);
}


.image-hero > p:last-child {
  max-width:
    650px;

  margin:
    26px 0 0;

  color:
    var(--image-muted);

  font-size:
    0.78rem;

  line-height:
    1.7;
}


/* =========================================================
   CREATOR
========================================================= */

.image-creator {
  margin-top:
    54px;
}


/* =========================================================
   PROMPT
========================================================= */

.image-prompt-form {
  max-width:
    900px;
}


.image-prompt-shell {
  overflow:
    hidden;

  border:
    1px solid
    rgba(255, 255, 255, 0.1);

  border-radius:
    25px;

  background:
    rgba(255, 255, 255, 0.035);

  backdrop-filter:
    blur(18px);

  -webkit-backdrop-filter:
    blur(18px);
}


#imagePrompt {
  width:
    100%;

  min-height:
    145px;

  resize:
    vertical;

  display:
    block;

  padding:
    22px;

  border:
    0;

  outline:
    0;

  background:
    transparent;

  color:
    #ffffff;

  font-size:
    0.93rem;

  line-height:
    1.65;
}


#imagePrompt::placeholder {
  color:
    rgba(255, 255, 255, 0.28);
}


/* =========================================================
   ACTIONS
========================================================= */

.image-prompt-actions {
  display:
    flex;

  align-items:
    center;

  justify-content:
    space-between;

  gap:
    12px;

  padding:
    12px;

  border-top:
    1px solid
    rgba(255, 255, 255, 0.06);
}


.image-secondary-action,
.image-generate-button {
  min-height:
    46px;

  display:
    inline-flex;

  align-items:
    center;

  justify-content:
    center;

  gap:
    9px;

  padding:
    0 16px;

  border-radius:
    15px;

  cursor:
    pointer;
}


.image-secondary-action {
  border:
    1px solid
    rgba(255, 255, 255, 0.08);

  background:
    rgba(255, 255, 255, 0.025);

  color:
    rgba(255, 255, 255, 0.64);
}


.image-generate-button {
  min-width:
    145px;

  justify-content:
    space-between;

  border:
    1px solid
    rgba(118, 169, 255, 0.25);

  background:
    rgba(118, 169, 255, 0.085);

  color:
    rgba(255, 255, 255, 0.88);
}


.image-prompt-meta {
  display:
    flex;

  align-items:
    center;

  justify-content:
    space-between;

  gap:
    20px;

  padding:
    9px 4px 0;

  color:
    var(--image-faint);

  font-size:
    0.58rem;
}


/* =========================================================
   REFERENCE
========================================================= */

.image-reference {
  max-width:
    900px;

  margin-top:
    24px;

  border:
    1px solid
    rgba(255, 255, 255, 0.08);

  border-radius:
    22px;

  overflow:
    hidden;

  background:
    rgba(255, 255, 255, 0.02);
}


.image-reference[hidden] {
  display:
    none;
}


.image-reference header {
  min-height:
    65px;

  display:
    flex;

  align-items:
    center;

  justify-content:
    space-between;

  gap:
    20px;

  padding:
    0 18px;

  border-bottom:
    1px solid
    rgba(255, 255, 255, 0.06);
}


.image-reference header div {
  display:
    grid;

  gap:
    4px;
}


.image-reference header span {
  color:
    rgba(118, 169, 255, 0.5);

  font-size:
    0.48rem;

  letter-spacing:
    0.17em;
}


.image-reference header strong {
  font-size:
    0.7rem;

  font-weight:
    560;
}


.image-reference header button {
  border:
    0;

  background:
    transparent;

  color:
    rgba(255, 140, 155, 0.68);

  cursor:
    pointer;

  font-size:
    0.61rem;
}


.image-reference-preview {
  padding:
    18px;
}


.image-reference-preview img {
  display:
    block;

  width:
    min(
      100%,
      480px
    );

  max-height:
    430px;

  object-fit:
    contain;

  border-radius:
    16px;
}


/* =========================================================
   RESULT
========================================================= */

.image-result {
  min-height:
    540px;

  margin-top:
    50px;

  display:
    grid;

  place-items:
    center;

  border-top:
    1px solid
    rgba(255, 255, 255, 0.07);

  border-bottom:
    1px solid
    rgba(255, 255, 255, 0.07);
}


.image-result-empty,
.image-result-loading {
  max-width:
    480px;

  padding:
    70px 20px;

  text-align:
    center;
}


.image-result-camera {
  width:
    100px;

  height:
    100px;

  margin:
    0 auto 30px;
}


.image-result-camera img {
  width:
    100%;

  height:
    100%;

  object-fit:
    contain;

  filter:
    drop-shadow(
      0 0 22px
      rgba(90, 150, 255, 0.18)
    );
}


.image-result-empty > span {
  color:
    rgba(118, 169, 255, 0.56);

  font-size:
    0.52rem;

  font-weight:
    800;

  letter-spacing:
    0.2em;
}


.image-result-empty h2 {
  margin:
    14px 0 0;

  font-size:
    2rem;

  font-weight:
    480;

  letter-spacing:
    -0.045em;
}


.image-result-empty p,
.image-result-loading p {
  margin:
    13px auto 0;

  color:
    var(--image-muted);

  font-size:
    0.7rem;

  line-height:
    1.65;
}


/* =========================================================
   GENERATING
========================================================= */

.image-result-loading[hidden],
.image-result-output[hidden],
.image-result-empty[hidden] {
  display:
    none;
}


.image-generation-orb {
  position:
    relative;

  width:
    90px;

  height:
    90px;

  margin:
    0 auto 30px;

  display:
    grid;

  place-items:
    center;

  border:
    1px solid
    rgba(118, 169, 255, 0.2);

  border-radius:
    50%;
}


.image-generation-orb span {
  position:
    absolute;

  inset:
    9px;

  border:
    1px solid
    rgba(114, 220, 255, 0.25);

  border-radius:
    50%;

  animation:
    imageGenerationOrbit
    1.6s
    linear
    infinite;
}


.image-generation-orb img {
  width:
    45px;

  height:
    45px;

  object-fit:
    contain;

  animation:
    imageLogoSpin
    9s
    linear
    infinite;
}


.image-result-loading strong {
  font-size:
    1rem;

  font-weight:
    520;
}


/* =========================================================
   OUTPUT
========================================================= */

.image-result-output {
  width:
    100%;

  padding:
    40px 0;
}


.image-output-frame {
  width:
    min(
      100%,
      900px
    );

  margin:
    0 auto;

  display:
    grid;

  place-items:
    center;

  overflow:
    hidden;

  border:
    1px solid
    rgba(255, 255, 255, 0.07);

  border-radius:
    24px;

  background:
    rgba(255, 255, 255, 0.015);
}


.image-output-frame img {
  display:
    block;

  max-width:
    100%;

  max-height:
    760px;

  object-fit:
    contain;
}


.image-output-actions {
  width:
    min(
      100%,
      900px
    );

  margin:
    14px auto 0;

  display:
    flex;

  flex-wrap:
    wrap;

  gap:
    9px;
}


.image-output-actions button {
  min-height:
    42px;

  padding:
    0 14px;

  border:
    1px solid
    rgba(255, 255, 255, 0.08);

  border-radius:
    13px;

  background:
    rgba(255, 255, 255, 0.025);

  color:
    rgba(255, 255, 255, 0.66);

  cursor:
    pointer;
}


/* =========================================================
   GUIDANCE
========================================================= */

.image-guidance {
  padding:
    58px 0;

  border-bottom:
    1px solid
    rgba(255, 255, 255, 0.07);
}


.image-guidance > span {
  color:
    rgba(118, 169, 255, 0.55);

  font-size:
    0.5rem;

  font-weight:
    800;

  letter-spacing:
    0.2em;
}


.image-guidance-grid {
  display:
    grid;

  grid-template-columns:
    repeat(
      3,
      minmax(0, 1fr)
    );

  gap:
    12px;

  margin-top:
    18px;
}


.image-prompt-example {
  min-height:
    150px;

  padding:
    20px;

  text-align:
    left;

  border:
    1px solid
    rgba(255, 255, 255, 0.07);

  border-radius:
    19px;

  background:
    rgba(255, 255, 255, 0.018);

  cursor:
    pointer;
}


.image-prompt-example strong {
  color:
    rgba(255, 255, 255, 0.8);

  font-size:
    0.76rem;

  font-weight:
    570;
}


.image-prompt-example p {
  margin:
    10px 0 0;

  color:
    var(--image-muted);

  font-size:
    0.65rem;

  line-height:
    1.55;
}


/* =========================================================
   FOOTER
========================================================= */

.image-footer {
  display:
    flex;

  align-items:
    center;

  justify-content:
    space-between;

  gap:
    30px;

  padding:
    32px 0 0;
}


.image-footer > div {
  display:
    flex;

  align-items:
    center;

  gap:
    10px;
}


.image-footer img {
  width:
    30px;

  height:
    30px;

  object-fit:
    contain;
}


.image-footer span {
  color:
    rgba(255, 255, 255, 0.46);

  font-size:
    0.57rem;

  letter-spacing:
    0.16em;
}


.image-footer p {
  margin:
    0;

  color:
    var(--image-faint);

  font-size:
    0.56rem;
}


/* =========================================================
   ANIMATIONS
========================================================= */

@keyframes imageLogoSpin {

  from {
    transform:
      rotate(0deg);
  }

  to {
    transform:
      rotate(360deg);
  }

}


@keyframes imageGenerationOrbit {

  from {
    transform:
      rotateX(62deg)
      rotateZ(0deg);
  }

  to {
    transform:
      rotateX(62deg)
      rotateZ(360deg);
  }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

  .image-header {
    width:
      calc(100% - 28px);

    height:
      68px;
  }


  .image-context {
    display:
      none;
  }


  .image-back span:last-child {
    display:
      none;
  }


  .image-workspace {
    width:
      calc(100% - 28px);

    padding:
      52px 0 36px;
  }


  .image-hero h1 {
    font-size:
      clamp(
        3.2rem,
        15vw,
        4.7rem
      );
  }


  .image-prompt-actions {
    align-items:
      stretch;

    flex-direction:
      column;
  }


  .image-secondary-action,
  .image-generate-button {
    width:
      100%;
  }


  .image-prompt-meta {
    align-items:
      flex-start;

    flex-direction:
      column;
  }


  .image-guidance-grid {
    grid-template-columns:
      1fr;
  }


  .image-footer {
    align-items:
      flex-start;

    flex-direction:
      column;
  }

}