.page-hero h1 {
  max-width: 16ch;
  font-size: clamp(3rem, 5.2vw, 4.75rem);
  line-height: 0.98;
}

/* The portfolio shows finished work, not source materials or production-room photos. */
.portfolio-grid .portfolio-item img {
  object-fit: contain;
  object-position: center;
  background: #091422;
}

.portfolio-grid .portfolio-item-screen img {
  object-fit: cover;
}

.portfolio-grid .portfolio-item {
  height: 520px;
  min-height: 0;
}

.page-hero-grid > * {
  min-width: 0;
}

.page-hero-single {
  grid-template-columns: minmax(0, 900px);
}

.page-hero-image,
.video-trigger img {
  object-position: center;
}

@media (max-width: 920px) {
  .portfolio-grid .portfolio-item {
    height: 460px;
  }

  .page-hero-single {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .portfolio-grid .portfolio-item {
    height: 500px;
  }

  .page-hero h1 {
    max-width: 100%;
    font-size: clamp(2.25rem, 10.5vw, 2.8rem);
    line-height: 1.02;
    overflow-wrap: break-word;
    hyphens: auto;
  }
}

.calculator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: 28px;
  align-items: start;
}

.calculator-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
}

.calculator-form .button {
  border: 0;
  cursor: pointer;
}

.calculator-form .button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.calculator-form .stl-drop-zone {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 28px 20px;
  border: 2px dashed rgba(100, 201, 255, 0.38);
  border-radius: 18px;
  background: rgba(8, 17, 31, 0.56);
  text-align: center;
  font-weight: 400;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.stl-drop-zone:hover,
.stl-drop-zone:focus-visible,
.stl-drop-zone.is-dragging {
  border-color: var(--blue-2);
  background: rgba(33, 150, 243, 0.1);
  outline: none;
  transform: translateY(-1px);
}

.calculator-form .stl-drop-zone strong {
  display: block;
  color: #fff;
  font-size: 1.2rem;
  line-height: 1.25;
}

.calculator-form .stl-drop-zone span:last-child {
  display: block;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.45;
}

.stl-status {
  color: var(--muted);
}

.stl-drop-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--blue), var(--blue-2));
  color: #04101d;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.stl-status {
  min-height: 1.5em;
  margin: 12px 0 16px;
  font-size: 0.92rem;
}

.stl-status[data-kind="success"] { color: #8ce6bc; }
.stl-status[data-kind="warning"] { color: #ffd479; }
.stl-status[data-kind="error"] { color: #ffb2b2; }

.stl-preview {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 10;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(100, 201, 255, 0.22);
  border-radius: 18px;
  background: #091422;
}

.stl-preview canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
}

#stl-preview-empty {
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 20px;
  color: var(--muted);
  text-align: center;
}

#stl-preview-empty[hidden] {
  display: none;
}

#stl-preview-empty strong { color: #fff; }

.stl-model-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 16px 0;
  overflow: hidden;
  border: 1px solid rgba(100, 201, 255, 0.2);
  border-radius: 16px;
  background: rgba(100, 201, 255, 0.16);
}

.stl-model-details[hidden] { display: none; }

.stl-model-details > div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 14px;
  background: #0d1b2c;
}

.stl-model-details span {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stl-model-details strong {
  overflow: hidden;
  color: #fff;
  text-overflow: ellipsis;
}

.calculator-result-panel {
  padding: 38px;
  border: 1px solid rgba(100, 201, 255, 0.22);
  border-radius: var(--radius);
  background: linear-gradient(145deg, #142a43, #0c1a2b);
}

.calculator-price {
  margin: 20px 0 12px;
  color: var(--blue-2);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.calculator-result-panel strong {
  color: #fff;
}

.calculator-contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.calculator-contact-actions .button {
  max-width: 100%;
  white-space: normal;
  text-align: center;
}

.calculator-error {
  color: #ffd5d5;
}

.calculator-error .button {
  margin-top: 18px;
}

.contact-request-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
}

.contact-request-grid .contact-request-wide {
  grid-column: 1 / -1;
}

.contact-form-status {
  min-height: 1.6em;
  margin: 14px 0 0;
  color: var(--blue-2);
}

.voice-assistant-open-button {
  border: 1px solid rgba(255,255,255,.22);
  cursor: pointer;
  font: inherit;
}

@media (max-width: 920px) {
  .calculator-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .contact-request-grid {
    grid-template-columns: 1fr;
  }

  .contact-request-grid .contact-request-wide {
    grid-column: auto;
  }

  .calculator-fields {
    grid-template-columns: 1fr;
  }

  .calculator-result-panel {
    padding: 28px;
  }

  .stl-model-details {
    grid-template-columns: 1fr;
  }
}

/* DreamPrintLab UA 3D identity */
.brand {
  display: block;
  flex: 0 0 230px;
  height: 64px;
  overflow: hidden;
}

.brand img {
  width: 230px;
  height: 64px;
  object-fit: contain;
  object-position: center;
}

.footer-logo {
  width: 300px;
  height: 100px;
  object-fit: contain;
  object-position: center;
}

@media (max-width: 920px) {
  .brand {
    flex-basis: 205px;
    height: 58px;
  }

  .brand img {
    width: 205px;
    height: 58px;
  }
}

@media (max-width: 620px) {
  .brand {
    flex-basis: 174px;
    height: 52px;
  }

  .brand img {
    width: 174px;
    height: 52px;
  }

  .footer-logo {
    width: 260px;
    height: 90px;
  }
}
