/* Compact portrait composition; laptop positioning keeps its existing rules. */
@media (max-width:820px), (min-width:821px) and (max-width:1180px) and (orientation:portrait), (min-width:821px) and (max-width:1366px) and (hover:none) and (pointer:coarse) {
  body[data-page="home"] .reference-portal {
    height:auto; min-height:100svh; overflow:visible;
    display:flex; flex-direction:column; align-items:center;
    padding:2rem 1rem 1.5rem;
  }
  .reference-portal .reference-kicker {
    position:static; transform:none; max-width:100%; gap:1rem;
    font-size:.43rem; letter-spacing:.3em;
  }
  .reference-kicker span { width:40px; flex:0 0 40px; }
  .reference-portal .reference-title {
    position:static; transform:none; width:100%; margin:1.6rem 0 2rem;
    text-align:center; white-space:normal; height:auto;
  }
  .reference-title strong,.reference-title span { display:block; transform:none; }
  .reference-title strong { font-size:clamp(3.6rem,18vw,5.2rem); }
  .reference-title span { margin:.3rem 0 0; font-size:clamp(2.2rem,11.5vw,3.2rem); }
  .reference-portal .reference-offer {
    position:static; transform:none; width:100%; max-width:570px;
    margin:0 0 2rem;
  }
  .reference-offer h2 { font-size:clamp(1.55rem,5vw,2rem); max-width:23ch; margin-inline:auto; }
  .reference-offer p { max-width:38ch; margin-inline:auto; }
  .reference-stage {
    position:static; inset:auto; width:100%; max-width:700px;
    display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.75rem;
    grid-template-areas:'portrait portrait' 'about services' 'projects calculate';
  }
  body[data-page="home"] .reference-portrait {
    position:relative; top:auto; left:auto; transform:none;
    grid-area:portrait; justify-self:center; margin:0 0 1.25rem;
    width:min(72vw,340px); border-radius:30px;
  }
  body[data-page="home"] .reference-node {
    position:relative; inset:auto; width:100%; min-height:164px;
    padding:1rem .5rem .65rem; border-radius:18px;
    display:flex; flex-direction:column; justify-content:center; gap:.25rem;
  }
  body[data-page="home"] .reference-node--about { grid-area:about; }
  body[data-page="home"] .reference-node--services { grid-area:services; }
  body[data-page="home"] .reference-node--projects { grid-area:projects; }
  body[data-page="home"] .reference-node--calculate { grid-area:calculate; }
  body[data-page="home"] .reference-node .portal-object {
    width:min(34vw,160px); height:110px;
  }
  body[data-page="home"] .reference-node .reference-label,
  body[data-page="home"] .reference-node:hover .reference-label,
  body[data-page="home"] .reference-node:focus-visible .reference-label { transform:none; }
  .reference-portal .reference-contact { position:relative; inset:auto; transform:none; margin-top:2.5rem; }
  body[data-page="home"] .reference-portal .reference-legal { position:static; inset:auto; transform:none; margin-top:1.5rem; max-width:100%; justify-content:center; }
  .reference-role,.reference-cross,.reference-star { display:none; }
}
@media (min-width:601px) and (max-width:820px), (min-width:821px) and (max-width:1180px) and (orientation:portrait), (min-width:821px) and (max-width:1366px) and (hover:none) and (pointer:coarse) {
  body[data-page="home"] .reference-portal { padding-top:2.5rem; }
  .reference-portal .reference-title { margin-bottom:2.25rem; }
  .reference-portal .reference-offer { margin-bottom:2.25rem; }
  body[data-page="home"] .reference-portrait { width:360px; margin-bottom:1.5rem; }
  body[data-page="home"] .reference-node { min-height:200px; }
  body[data-page="home"] .reference-node .portal-object { width:190px; height:150px; }
  .reference-label strong { font-size:.9rem; }
}
