/* Homepage */

.hero {
  --hero-heading: clamp(56px, 7vw, 96px);
  --hero-text: var(--fs-copy);
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding: 124px var(--pad) 44px;
  overflow: hidden;
  isolation: isolate;
  background: var(--paper);
}

/* Full-screen abstract architectural glass planes (SVG) */
.hero-wash {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-geo-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Single editorial stage — no rigid columns */
.hero-compose {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: var(--max);
  margin: auto;
  flex: 1;
  min-height: calc(100svh - 180px);
}

.hero-copy {
  position: relative;
  z-index: 4;
  top: 0;
  width: min(780px, 58vw);
  max-width: 100%;
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  container-type: inline-size;
}

.hero h1 {
  margin-top: 0;
  font-size: var(--hero-heading);
  line-height: .92;
  font-weight: 300;
  letter-spacing: -.06em;
}

html[lang="uk"] .hero h1 {
  letter-spacing: -.05em;
}

.headline-line {
  display: block;
  overflow: hidden;
  padding: 0 .08em .08em 0;
}

.headline-line i {
  display: block;
  font-style: normal;
}

.hero h1 .headline-line:last-child {
  color: var(--blue-dark);
}

.hero-lead {
  max-width: 28em;
  margin-top: 30px;
  font-size: var(--hero-text);
  line-height: 1.5;
  letter-spacing: -.03em;
  color: var(--blue-dark);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 32px;
}

.hero-actions .button {
  font-size: var(--hero-text);
}

.hero-link {
  color: var(--black);
  font-size: var(--hero-text);
  font-weight: 600;
  letter-spacing: -.02em;
  transition: color .25s ease;
}

.hero-link:hover {
  color: var(--blue-dark);
}

.hero-bottom {
  position: relative;
  display: flex;
  align-items: center;
  gap: 32px;
  max-width: calc(100% - 96px);
  margin-top: 36px;
}

.hero-stat {
  display: flex;
  align-items: flex-end;
  gap: 15px;
}

.hero-stat strong {
  font-size: 70px;
  line-height: .8;
  font-weight: 300;
  letter-spacing: -.06em;
}

.hero-stat span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.hero-divider {
  width: 1px;
  height: 62px;
  transform: rotate(20deg);
  background: rgba(10,39,72,.28);
}

.hero-down {
  position: absolute;
  z-index: 5;
  right: 28px;
  bottom: 28px;
}

@media (max-width: 1180px) {
  .hero-stat strong {
    font-size: 56px;
  }
}

@media (min-width: 1280px) {
  .hero {
    --hero-heading: clamp(68px, 6.4vw, 104px);
  }
}

@media (min-width: 1600px) {
  .hero {
    --hero-heading: clamp(88px, 6.2vw, 132px);
  }

  .hero-compose {
    align-items: flex-start;
  }

  .hero-copy {
    width: min(920px, 48vw);
    margin-right: auto;
  }

  .hero-lead {
    max-width: 30em;
    margin-top: 36px;
  }

  .hero-actions {
    margin-top: 40px;
  }
}

@media (min-width: 1920px) {
  .hero {
    --hero-heading: clamp(108px, 6.5vw, 152px);
  }

  .hero-compose {
    align-items: flex-start;
  }

  .hero-copy {
    width: min(1000px, 42vw);
    max-width: 42vw;
    margin-right: auto;
  }

  .hero-lead {
    max-width: 28em;
    margin-top: 40px;
  }

  .hero-actions {
    margin-top: 48px;
  }

  .hero-actions .button {
    min-height: 64px;
    padding-left: 28px;
    font-size: var(--fs-copy);
  }
}

/* Tablet + compact desktop */
@media (max-width: 1100px) {
  .hero {
    --hero-heading: clamp(64px, 8.5vw, 96px);
    min-height: 0;
    height: auto;
    padding: 120px var(--pad) 36px;
  }

  .hero-home {
    min-height: 0;
  }

  .hero-compose {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: min(70svh, 620px);
    padding-bottom: 56px;
  }

  .hero-copy {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    top: 0;
    width: 100%;
    max-width: none;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
  }

  .hero h1 {
    margin-top: auto;
    line-height: .96;
    letter-spacing: -.055em;
  }

  .hero-lead {
    max-width: 34em;
    margin-top: 36px;
    margin-bottom: auto;
  }

  .hero-actions {
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 0;
  }

  .hero-actions .button {
    min-height: 56px;
    font-size: var(--fs-copy);
  }

  .hero-down {
    right: 16px;
    bottom: 20px;
  }
}

@media (max-width: 820px) {
  .hero {
    --hero-heading: clamp(48px, 9.5vw, 72px);
    padding: 112px 20px 28px;
  }

  .hero-compose {
    min-height: min(80svh, 640px);
    padding-bottom: 64px;
  }

  .hero-bottom {
    gap: 21px;
    max-width: calc(100% - 76px);
    margin-top: 0;
  }

  .hero-stat strong {
    font-size: 50px;
  }

  .hero-stat span {
    font-size: 10px;
  }

  .hero-divider {
    height: 48px;
  }
}

@media (max-width: 480px) {
  .hero,
  .hero-home {
    padding: 104px 16px 24px;
  }

  .hero {
    --hero-heading: clamp(40px, 10vw, 56px);
  }

  .hero-compose {
    min-height: min(78svh, 600px);
    padding-bottom: 56px;
  }

  .hero-down {
    right: 12px;
    bottom: 14px;
  }

  .hero-bottom {
    gap: 14px;
    max-width: calc(100% - 68px);
  }

  .hero-stat {
    gap: 8px;
  }

  .hero-stat strong {
    font-size: 43px;
  }
}

.services {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-top: 100px;
  padding-bottom: 100px;
  background: var(--paper-blue);
}

.services-wash {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.services-geo-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.services > .section-head,
.services > .service-stage {
  position: relative;
  z-index: 1;
}

.services .section-head {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: start;
}

.services .section-head h2 {
  margin-top: 0;
  max-width: 11em;
  font-size: clamp(36px, 5vw, 64px);
}

.services .section-head > p {
  max-width: 36em;
  margin-top: 24px;
  padding-bottom: 0;
  color: var(--muted);
  font-size: var(--fs-lead);
  line-height: 1.65;
}

.service-stage {
  --square: 220px;
  max-width: var(--max);
  margin: 85px 0 0;
  display: grid;
  grid-template-columns: calc(var(--square) * 2) minmax(0, 1fr);
  column-gap: clamp(72px, 8vw, 140px);
  row-gap: 48px;
  align-items: start;
}

.service-panel {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  display: grid;
  align-items: start;
}

.service-note {
  grid-column: 1;
  grid-row: 2;
  justify-self: start;
  max-width: 36em;
  margin: 110px 0 0;
  color: var(--muted);
  font-size: var(--fs-lead);
  line-height: 1.65;
}

.service-detail {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateX(-10px);
  pointer-events: none;
}

/* Keep inactive details in layout so panel height stays stable */
.service-detail[hidden] {
  display: block !important;
  visibility: hidden;
}

.service-detail.is-shown,
.service-detail.is-leaving {
  visibility: visible;
  transition: opacity .3s ease, transform .3s ease;
}

.service-detail.is-shown {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.service-detail.is-leaving {
  opacity: 0;
  transform: translateX(-10px);
}

.service-detail h3 {
  max-width: 14em;
  margin-top: 18px;
  font-size: var(--fs-display);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -.055em;
}

.service-detail p {
  max-width: 36em;
  margin-top: 22px;
  color: var(--muted);
  font-size: var(--fs-body);
  line-height: 1.65;
}

.service-detail .service-tags {
  margin-top: 28px;
}

.service-list {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.service-card {
  position: relative;
  width: 100%;
  min-height: var(--square);
  aspect-ratio: 1;
  padding: 22px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: background .28s ease, border-color .28s ease, color .28s ease;
}

.service-card:hover {
  background: var(--blue-light);
  border-color: rgba(10, 39, 72, .32);
}

.service-card.is-active,
.service-card.is-active:hover {
  background: var(--ink);
  border-color: rgba(245, 249, 253, .55);
  color: var(--paper);
}

.service-card:focus-visible {
  outline: 1px solid var(--blue);
  outline-offset: -1px;
}

.service-icon {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .5);
  transition: border-color .28s ease, background .28s ease, color .28s ease;
}

.service-icon svg {
  width: 29px;
  height: 29px;
}

.service-card.is-active .service-index,
.service-card.is-active h3,
.service-card.is-active .service-icon {
  color: var(--paper);
}

.service-card.is-active .service-icon {
  border-color: rgba(245, 249, 253, .42);
  background: transparent;
}

.service-card h3 {
  max-width: 9em;
  margin-top: 42px;
  font-size: var(--fs-h3);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -.055em;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.service-tags span {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--blue-dark);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

@media (min-width: 821px) {
  .service-stage {
    --cubes-shift: clamp(0px, calc((100vw - 1320px) * 0.9), 140px);
    grid-template-columns: calc(var(--square) * 2 + var(--cubes-shift)) minmax(0, 1fr);
    grid-template-rows: auto auto;
    row-gap: 0;
    align-items: start;
  }

  .service-list {
    grid-row: 1;
    width: calc(var(--square) * 2);
    margin-left: var(--cubes-shift);
    grid-template-columns: repeat(2, var(--square));
    grid-template-rows: repeat(5, calc(var(--square) / 2));
    border-top: 0;
    border-left: 0;
  }

  .service-note {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
    align-self: start;
    position: relative;
    left: calc(50vw - var(--pad) - 50%);
    width: max-content;
    max-width: 100%;
    margin: 110px 0 0;
  }

  .service-panel {
    margin-top: 70px;
    display: grid;
    justify-items: center;
  }

  .service-detail {
    width: min(100%, 612px);
  }

  .service-card {
    width: var(--square);
    height: var(--square);
    min-height: 0;
    aspect-ratio: auto;
    border: 1px solid var(--line);
  }

  .service-card:hover {
    z-index: 1;
  }

  .service-card.is-active,
  .service-card.is-active:hover {
    z-index: 2;
    border-color: rgba(245, 249, 253, .55);
  }

  /* Right column dropped by half a square */
  .service-card:nth-child(1) {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .service-card:nth-child(2) {
    grid-column: 2;
    grid-row: 2 / span 2;
  }

  .service-card:nth-child(3) {
    grid-column: 1;
    grid-row: 3 / span 2;
  }

  .service-card:nth-child(4) {
    grid-column: 2;
    grid-row: 4 / span 2;
  }
}

@media (max-width: 1100px) and (min-width: 821px) {
  .service-stage {
    --square: clamp(168px, 20vw, 220px);
    column-gap: clamp(28px, 4vw, 64px);
  }

  .service-card h3 {
    margin-top: 24px;
    font-size: 22px;
  }

  .service-detail h3 {
    font-size: clamp(26px, 3.2vw, 34px);
  }
}

@media (max-width: 820px) {
  .services {
    padding-bottom: 64px;
  }

  .services .section-head h2 {
    font-size: clamp(32px, 8vw, 44px);
  }

  .service-stage {
    grid-template-columns: 1fr;
    row-gap: 36px;
    margin-top: 48px;
  }

  .service-list,
  .service-panel,
  .service-note {
    grid-column: auto;
    grid-row: auto;
    position: static;
    left: auto;
    width: auto;
    max-width: none;
    margin: 0;
  }

  .service-list {
    order: 1;
    width: min(100%, 520px);
    justify-self: center;
    grid-template-columns: 1fr 1fr;
  }

  .service-panel,
  .service-note {
    width: min(100%, 520px);
    justify-self: center;
    padding-right: 16px;
    padding-left: 16px;
  }

  .service-panel {
    order: 2;
  }

  .service-note {
    order: 3;
  }

  .service-card {
    min-height: 0;
    aspect-ratio: 1;
    padding: 16px;
  }

  .service-card h3 {
    max-width: none;
    margin-top: 22px;
  }

  .service-icon {
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
  }

  .service-icon svg {
    width: 22px;
    height: 22px;
  }

  .service-detail p,
  .service-note {
    font-size: var(--fs-body);
    line-height: 1.6;
  }
}

@media (max-width: 480px) {
  .service-panel,
  .service-note {
    padding-right: 14px;
    padding-left: 14px;
  }

  .service-list {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .service-card {
    aspect-ratio: auto;
    min-height: 120px;
    padding: 18px 16px;
  }

  .service-card h3 {
    margin-top: 16px;
    font-size: var(--fs-sm);
  }

  .service-icon {
    width: 32px;
    height: 32px;
  }

  .service-icon svg {
    width: 20px;
    height: 20px;
  }
}

/* Homepage — Editorial Minimalism + Futuristic Premium */

/* —— Hero + architectural project gallery —— */
.hero-home {
  min-height: 100svh;
  padding-top: 120px;
}

/* —— Company highlights —— */
.highlights {
  padding-top: clamp(100px, 12vw, 160px);
  padding-bottom: clamp(100px, 12vw, 160px);
  color: var(--blue-light);
  background: var(--ink);
}

.highlights-grid {
  max-width: var(--max);
  margin: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  column-gap: clamp(48px, 9vw, 160px);
  row-gap: 64px;
  align-items: end;
}

.highlights-display {
  max-width: 11em;
  margin-bottom: 36px;
  color: var(--white);
  font-size: clamp(34px, 4.6vw, 64px);
  font-weight: 300;
  line-height: .98;
  letter-spacing: -.055em;
}

.highlights-copy > p {
  max-width: 34em;
  margin-bottom: 22px;
  color: rgba(212, 231, 248, .84);
  font-size: var(--fs-lead);
  line-height: 1.65;
}

.highlights-note {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid rgba(212, 231, 248, .2);
  color: var(--blue-light) !important;
  font-size: var(--fs-body) !important;
}

.highlights-stats {
  display: grid;
  gap: clamp(36px, 5vw, 64px);
  padding-bottom: 8px;
}

.highlights-stat {
  display: grid;
  gap: 12px;
  padding-top: 28px;
  border-top: 1px solid rgba(212, 231, 248, .2);
}

.highlights-stat strong {
  font-size: clamp(72px, 8.5vw, 120px);
  line-height: .82;
  font-weight: 300;
  letter-spacing: -.06em;
  color: var(--white);
}

.highlights-stat span {
  color: var(--blue-light);
  font-size: var(--fs-sm);
  line-height: 1.35;
}

/* —— Sticky process / Architectural timeline —— */
.how-we-work {
  position: relative;
  isolation: isolate;
  padding-top: clamp(80px, 10vw, 120px);
  padding-bottom: clamp(80px, 10vw, 120px);
  background: var(--paper);
}

.process-wash {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.process-wash::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, .94) 0%, rgba(255, 255, 255, .72) 34%, rgba(255, 255, 255, .28) 58%, rgba(255, 255, 255, .06) 78%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

.process-geo-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.process-sticky {
  --process-chrome-top: 18vh;
  --process-chrome-h: min(64vh, 620px);
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: auto;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  column-gap: clamp(40px, 8vw, 140px);
  align-items: start;
}

.process-sticky-head {
  position: sticky;
  top: 28vh;
  z-index: 2;
  padding-bottom: 40px;
}

.process-sticky-head h2 {
  max-width: 9.5em;
  margin-top: 24px;
}

.process-sticky-count {
  margin-top: 40px;
  color: var(--blue-dark);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: .14em;
}

.process-sticky-main {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto;
  min-width: 0;
}

.process-stage-chrome {
  position: sticky;
  top: var(--process-chrome-top);
  z-index: 0;
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  display: grid;
  place-items: center;
  width: 100%;
  height: var(--process-chrome-h);
  pointer-events: none;
}

.process-bg-num {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--ink);
  font-size: clamp(120px, 18vw, 240px);
  font-weight: 500;
  line-height: .8;
  letter-spacing: -.08em;
  opacity: .08;
  transform: translate3d(0, 0, 0);
  transition: opacity .45s var(--ease), transform .45s var(--ease);
  user-select: none;
}

.process-bg-num.is-exit {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
}

.process-bg-num.is-enter {
  opacity: 0;
  transform: translate3d(0, -14px, 0);
}

.process-sticky-stages {
  position: relative;
  z-index: 1;
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  padding: 0;
  list-style: none;
}

.process-stage {
  display: grid;
  align-content: center;
  min-height: 75vh;
  padding: 56px 0;
  opacity: .28;
  transform: translateY(18px);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}

.process-stage:first-child {
  padding-top: 12px;
}

.process-stage.is-active {
  opacity: 1;
  transform: translateY(0);
}

.process-stage-index {
  display: block;
  margin-bottom: 28px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
}

.process-stage h3 {
  margin: 0 0 14px;
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 350;
  line-height: 1.05;
  letter-spacing: -.05em;
}

.process-stage-time {
  display: block;
  margin-bottom: 22px;
  color: var(--blue-dark);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.process-stage p {
  max-width: 32em;
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-lead);
  line-height: 1.6;
}

@media (prefers-reduced-motion: reduce) {
  .process-stage,
  .process-bg-num,
  .process-wash {
    transition: none;
  }

  .process-bg-num.is-exit,
  .process-bg-num.is-enter {
    opacity: .08;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce)  {
  .process-stage,
  .process-bg-num,
  .process-wash {
    transition: none;
  }

  .process-bg-num.is-exit,
  .process-bg-num.is-enter {
    opacity: .08;
    transform: none;
  }
}

@media (max-width: 1100px)  {
  .highlights-grid {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .highlights-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .process-sticky {
    grid-template-columns: 1fr;
    row-gap: 36px;
  }

  .process-sticky-head {
    position: static;
    top: auto;
    padding-bottom: 0;
  }

  .process-sticky-main {
    display: block;
  }

  .process-wash::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, .88) 0%, rgba(255, 255, 255, .55) 40%, rgba(255, 255, 255, .2) 100%);
  }

  .process-stage-chrome,
  .process-bg-num,
  .process-sticky-count {
    display: none;
  }

  .process-sticky-stages {
    grid-column: auto;
    grid-row: auto;
  }

  .process-stage {
    min-height: 0;
    padding: 36px 0;
    border-bottom: 1px solid var(--line);
    opacity: 1;
    transform: none;
  }

  .process-stage:first-child {
    padding-top: 4px;
  }

  .process-stage:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 1100px) {
  .hero-home {
    min-height: 0;
    padding-top: 112px;
  }
}

@media (max-width: 820px)  {
  .hero-home {
    padding-top: 112px;
  }

  .highlights-display {
    max-width: none;
  }

  .highlights-stats {
    grid-template-columns: 1fr;
  }

  .how-we-work {
    padding-top: 72px;
    padding-bottom: 72px;
  }

  .process-stage {
    padding: 28px 0;
  }

  .process-stage h3 {
    font-size: clamp(26px, 7vw, 34px);
  }

  .process-stage p {
    font-size: var(--fs-body);
  }
}
