/* ============================================
   METRICA — Premium Renovation Company
   WordPress-ready static site styles
   ============================================ */

/* Load fonts.css and variables.css via <link> in HTML for faster first paint. */
/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-family);
  font-weight: 400;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.hero__banner img,
.service-card__image img,
.about-section__image img,
.portfolio-card__image img,
.wcu-section__figure img,
.technical-card__image img,
.technical-hero img,
.technical-grid img,
.image-strip img,
.stella-grid__img,
.lightbox__image {
  filter: var(--photo-filter);
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity var(--transition);
}

a:hover { opacity: 0.7; }

ul { list-style: none; }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

.section-number {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--color-text-light);
  margin-bottom: var(--space-xs);
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.2;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 var(--section-content-gap);
}

.section-title--large {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding: var(--section-pad-y) 0;
}

body[data-page="home"] {
  --field-text-sm: 0.8125rem;
  --field-text-md: 0.9375rem;
  --field-text-lg: 1.0625rem;
  --field-text-xl: 1.1875rem;
  --field-title-sm: clamp(1.5rem, 3.2vw, 2.25rem);
  --field-title-md: clamp(2rem, 4vw, 3rem);
  --field-title-lg: clamp(2.35rem, 4.8vw, 3.5rem);
  --field-title-xl: clamp(2.75rem, 5.5vw, 4rem);
  --field-hero-sm: clamp(1.5rem, 3.5vw, 2.5rem);
  --field-hero-md: clamp(1.75rem, 4.2vw, 3.25rem);
  --field-hero-lg: clamp(2rem, 4.8vw, 3.75rem);
  --field-hero-xl: clamp(2.35rem, 5.5vw, 4.25rem);
  --field-intro-sm: clamp(0.95rem, 1.8vw, 1.2rem);
  --field-intro-md: clamp(1.05rem, 2.2vw, 1.5rem);
  --field-intro-lg: clamp(1.15rem, 2.5vw, 1.65rem);
  --field-intro-xl: clamp(1.25rem, 2.8vw, 1.8rem);
  --field-subtitle-sm: clamp(1.4rem, 2.5vw, 2rem);
  --field-subtitle-md: clamp(1.75rem, 3vw, 2.5rem);
  --field-subtitle-lg: clamp(2rem, 3.5vw, 2.85rem);
  --field-subtitle-xl: clamp(2.25rem, 4vw, 3.25rem);
  --field-subhead-sm: clamp(0.95rem, 1.6vw, 1.1rem);
  --field-subhead-md: clamp(1.05rem, 1.8vw, 1.25rem);
  --field-subhead-lg: clamp(1.15rem, 2vw, 1.4rem);
  --field-subhead-xl: clamp(1.25rem, 2.2vw, 1.55rem);
}

/* Per-field text sizes */
body[data-page="home"] .intro__text[data-text-size="sm"] { font-size: var(--field-intro-sm) !important; }
body[data-page="home"] .intro__text[data-text-size="md"] { font-size: var(--field-intro-md) !important; }
body[data-page="home"] .intro__text[data-text-size="lg"] { font-size: var(--field-intro-lg) !important; }
body[data-page="home"] .intro__text[data-text-size="xl"] { font-size: var(--field-intro-xl) !important; }

body[data-page="home"] .hero__title[data-text-size="sm"] { font-size: var(--field-hero-sm) !important; }
body[data-page="home"] .hero__title[data-text-size="md"] { font-size: var(--field-hero-md) !important; }
body[data-page="home"] .hero__title[data-text-size="lg"] { font-size: var(--field-hero-lg) !important; }
body[data-page="home"] .hero__title[data-text-size="xl"] { font-size: var(--field-hero-xl) !important; }

/* Multiline hero — fixed size on hero image; ignore dashboard size presets */
body[data-page="home"] .hero__title[data-i18n-format="lines"][data-text-size] {
  font-size: var(--hero-title-size, 40px) !important;
  font-weight: 400 !important;
}

body[data-page="home"] .section-title[data-text-size="sm"],
body[data-page="home"] .technical-highlights__title[data-text-size="sm"],
body[data-page="home"] .why-section__title[data-text-size="sm"] { font-size: var(--field-title-sm) !important; }
body[data-page="home"] .section-title[data-text-size="md"],
body[data-page="home"] .technical-highlights__title[data-text-size="md"],
body[data-page="home"] .why-section__title[data-text-size="md"] { font-size: var(--field-title-md) !important; }
body[data-page="home"] .section-title[data-text-size="lg"],
body[data-page="home"] .technical-highlights__title[data-text-size="lg"],
body[data-page="home"] .why-section__title[data-text-size="lg"] { font-size: var(--field-title-lg) !important; }
body[data-page="home"] .section-title[data-text-size="xl"],
body[data-page="home"] .technical-highlights__title[data-text-size="xl"],
body[data-page="home"] .why-section__title[data-text-size="xl"] { font-size: var(--field-title-xl) !important; }

body[data-page="home"] .cta-section__title[data-text-size="sm"] { font-size: var(--field-subtitle-sm) !important; }
body[data-page="home"] .cta-section__title[data-text-size="md"] { font-size: var(--field-subtitle-md) !important; }
body[data-page="home"] .cta-section__title[data-text-size="lg"] { font-size: var(--field-subtitle-lg) !important; }
body[data-page="home"] .cta-section__title[data-text-size="xl"] { font-size: var(--field-subtitle-xl) !important; }

body[data-page="home"] .service-card__title[data-text-size="sm"],
body[data-page="home"] .process-step__title[data-text-size="sm"],
body[data-page="home"] .why-block__title[data-text-size="sm"] { font-size: var(--field-subhead-sm) !important; }
body[data-page="home"] .service-card__title[data-text-size="md"],
body[data-page="home"] .process-step__title[data-text-size="md"],
body[data-page="home"] .why-block__title[data-text-size="md"] { font-size: var(--field-subhead-md) !important; }
body[data-page="home"] .service-card__title[data-text-size="lg"],
body[data-page="home"] .process-step__title[data-text-size="lg"],
body[data-page="home"] .why-block__title[data-text-size="lg"] { font-size: var(--field-subhead-lg) !important; }
body[data-page="home"] .service-card__title[data-text-size="xl"],
body[data-page="home"] .process-step__title[data-text-size="xl"],
body[data-page="home"] .why-block__title[data-text-size="xl"] { font-size: var(--field-subhead-xl) !important; }

body[data-page="home"] .service-card__text[data-text-size="sm"],
body[data-page="home"] .process-step__text[data-text-size="sm"],
body[data-page="home"] .technical-highlights__intro[data-text-size="sm"],
body[data-page="home"] .why-section__intro[data-text-size="sm"],
body[data-page="home"] .why-block__text[data-text-size="sm"],
body[data-page="home"] .cta-section__text[data-text-size="sm"],
body[data-page="home"] .technical-card__label[data-text-size="sm"] { font-size: var(--field-text-sm) !important; }
body[data-page="home"] .service-card__text[data-text-size="md"],
body[data-page="home"] .process-step__text[data-text-size="md"],
body[data-page="home"] .technical-highlights__intro[data-text-size="md"],
body[data-page="home"] .why-section__intro[data-text-size="md"],
body[data-page="home"] .why-block__text[data-text-size="md"],
body[data-page="home"] .cta-section__text[data-text-size="md"],
body[data-page="home"] .technical-card__label[data-text-size="md"] { font-size: var(--field-text-md) !important; }
body[data-page="home"] .service-card__text[data-text-size="lg"],
body[data-page="home"] .process-step__text[data-text-size="lg"],
body[data-page="home"] .technical-highlights__intro[data-text-size="lg"],
body[data-page="home"] .why-section__intro[data-text-size="lg"],
body[data-page="home"] .why-block__text[data-text-size="lg"],
body[data-page="home"] .cta-section__text[data-text-size="lg"],
body[data-page="home"] .technical-card__label[data-text-size="lg"] { font-size: var(--field-text-lg) !important; }
body[data-page="home"] .service-card__text[data-text-size="xl"],
body[data-page="home"] .process-step__text[data-text-size="xl"],
body[data-page="home"] .technical-highlights__intro[data-text-size="xl"],
body[data-page="home"] .why-section__intro[data-text-size="xl"],
body[data-page="home"] .why-block__text[data-text-size="xl"],
body[data-page="home"] .cta-section__text[data-text-size="xl"],
body[data-page="home"] .technical-card__label[data-text-size="xl"] { font-size: var(--field-text-xl) !important; }

body[data-page="home"] .about-section__text[data-text-size="sm"] { font-size: var(--field-text-sm); }
body[data-page="home"] .about-section__text[data-text-size="md"] { font-size: var(--field-text-md); }
body[data-page="home"] .about-section__text[data-text-size="lg"] { font-size: var(--field-text-lg); }
body[data-page="home"] .about-section__text[data-text-size="xl"] { font-size: var(--field-text-xl); }
body[data-page="home"] .about-section__text[data-text-size] p { font-size: 1em; }

.page-header__title[data-text-size="sm"] { font-size: clamp(1.75rem, 3.5vw, 2.25rem) !important; }
.page-header__title[data-text-size="md"] { font-size: clamp(2rem, 4vw, 2.75rem) !important; }
.page-header__title[data-text-size="lg"] { font-size: clamp(2.25rem, 4.5vw, 3.25rem) !important; }
.page-header__title[data-text-size="xl"] { font-size: clamp(2.5rem, 5vw, 3.75rem) !important; }

.page-header__subtitle[data-text-size="sm"] { font-size: 0.875rem !important; }
.page-header__subtitle[data-text-size="md"] { font-size: 1rem !important; }
.page-header__subtitle[data-text-size="lg"] { font-size: 1.125rem !important; }
.page-header__subtitle[data-text-size="xl"] { font-size: 1.25rem !important; }

#what-we-do,
#about,
#technical-highlights,
#how-we-work,
#why-choose-us,
#top {
  scroll-margin-top: calc(var(--header-height) + var(--space-lg));
}

.section--dark {
  background: var(--color-bg-dark);
  color: var(--color-text-on-dark);
}

/* Logo */
.logo {
  font-family: var(--font-logo);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-transform: lowercase;
}

.logo .dot,
.brand-mark .dot,
.footer__copy .dot,
.footer--dark .brand-mark .dot {
  color: var(--color-accent);
  display: inline-block;
  font-size: 1.335em;
  font-weight: 700;
  line-height: 0;
  vertical-align: -0.09em;
  margin-left: 0.02em;
}

/* Header */
.header {
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: background var(--transition), box-shadow var(--transition);
}

body:not([data-page="home"]) .header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
}

.header--scrolled {
  background: rgba(242, 240, 235, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--color-border);
}

.header--home {
  background: var(--color-bg);
  color: var(--color-text);
}

.header--home .logo {
  color: var(--color-text);
}

.header--home .logo .dot {
  color: var(--color-accent);
}

.header--home.header--scrolled {
  background: rgba(242, 240, 235, 0.98);
}

body[data-page="home"] {
  --header-height: var(--header-height-home);
}

body[data-page="home"] .header.header--home {
  position: sticky;
  top: 0;
  height: auto;
  min-height: 0;
  padding: 0.5rem 0;
  box-shadow: none;
  border-bottom: none;
}

body[data-page="home"] .header.header--home.header--scrolled {
  background: rgba(242, 240, 235, 0.98);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--color-border);
}

body[data-page="home"] .header.header--home .header__inner {
  min-height: 0;
}

body[data-page="home"] .hero--banner {
  padding-top: 0;
  margin-top: 0;
  background: var(--color-bg);
}

body[data-page="home"] .hero__banner {
  margin: 0;
  line-height: 0;
  overflow: visible;
}

body[data-page="home"] .hero__overlay {
  overflow: visible;
}

body[data-page="home"] .hero__title,
body[data-page="home"] .hero__title[data-i18n-format="lines"] {
  overflow: visible;
}

body[data-page="home"] .hero__banner img {
  display: block;
  vertical-align: top;
  min-height: 42vh;
  object-fit: cover;
  object-position: center;
}

.header--dark .header--scrolled,
.header--on-dark {
  background: rgba(61, 56, 52, 0.95);
}

.header--menu-open {
  background: rgba(242, 240, 235, 0.98);
  color: var(--color-text);
  box-shadow: 0 1px 0 var(--color-border);
}

body[data-page="home"] .header--menu-open,
.header--on-dark.header--menu-open {
  background: rgba(242, 240, 235, 0.98);
  color: var(--color-text);
}

body[data-page="home"] .header--menu-open .logo,
.header--on-dark.header--menu-open .logo {
  color: var(--color-text);
}

body[data-page="home"] .header--menu-open .logo .dot,
.header--on-dark.header--menu-open .logo .dot {
  color: var(--color-accent);
}

body.nav-open {
  overflow: hidden;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.header__right {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav__link {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 1px;
  background: currentColor;
  transform: translateX(-50%);
  transition: width var(--transition-nav);
}

.nav__link:hover::after,
.nav__link--active::after {
  width: 100%;
}

.nav__link:hover { opacity: 1; }

/* Language switcher */
.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.lang-btn {
  background: none;
  border: none;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  opacity: 0.45;
  transition: opacity var(--transition);
  color: inherit;
}

.lang-btn:hover,
.lang-btn--active {
  opacity: 1;
}

.lang-divider {
  opacity: 0.3;
  font-size: 0.75rem;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  transition: var(--transition);
}

.menu-toggle--open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.menu-toggle--open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle--open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--btn-padding-y) var(--btn-padding-x);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  border-radius: var(--radius-btn);
  background: transparent;
  cursor: pointer;
  transition:
    background var(--transition-smooth),
    color var(--transition-smooth),
    border-color var(--transition-smooth),
    opacity var(--transition-smooth);
}

.btn:hover {
  opacity: 1;
  background: rgba(51, 51, 51, 0.94);
  color: var(--color-bg);
  border-color: rgba(51, 51, 51, 0.94);
}

.btn--primary {
  background: var(--color-text);
  color: var(--color-bg);
  border-color: var(--color-text);
}

.btn--primary:hover {
  background: rgba(51, 51, 51, 0.94);
  color: var(--color-bg);
  border-color: rgba(51, 51, 51, 0.94);
}

.btn--light {
  color: var(--color-text-on-dark);
  border-color: var(--color-text-on-dark);
}

.btn--light:hover {
  background: rgba(242, 240, 235, 0.88);
  color: var(--color-bg-dark);
  border-color: rgba(242, 240, 235, 0.88);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* Hero */
.hero--banner {
  display: block;
  min-height: auto;
  margin-top: 0;
  background: var(--color-bg);
}

body:not([data-page="home"]) .hero--banner {
  padding-top: var(--header-height);
}

.hero__banner {
  position: relative;
  margin: 0;
  width: 100%;
  line-height: 0;
  background: var(--color-bg-dark);
  overflow: hidden;
}

.hero__banner img {
  width: 100%;
  height: auto;
  min-height: 42vh;
  object-fit: cover;
  object-position: center;
}

html:not(.hero-ready) body[data-page="home"] .hero__banner img {
  opacity: 0;
  visibility: hidden;
}

html.hero-ready body[data-page="home"] .hero__banner img {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.2s ease;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  margin: 0;
  padding: clamp(2.5rem, 14vh, 6.5rem) var(--space-lg) var(--space-lg);
  background: linear-gradient(
    to bottom,
    rgba(var(--hero-overlay-dark), 0.44) 0%,
    rgba(var(--hero-overlay-dark), 0.15) 42%,
    transparent 72%
  );
  line-height: normal;
}

.hero__overlay-inner {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__title {
  font-size: clamp(1.75rem, 4.2vw, 3.25rem);
  margin: 0 0 var(--space-lg);
  max-width: min(var(--hero-content-max), 92vw);
  line-height: 1.12;
  color: var(--color-text-on-dark);
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.35);
}

html[lang="ka"] body[data-page="home"] .hero__title {
  font-family: var(--font-hero);
  font-weight: 400;
  letter-spacing: var(--hero-title-track, 0.3px);
  line-height: 1.05;
}

html[lang="en"] body[data-page="home"] .hero__title {
  font-family: var(--font-hero);
  font-weight: 400;
  letter-spacing: var(--hero-title-track, 0.3px);
  line-height: 1.05;
}

.hero__actions {
  justify-content: center;
  gap: 0.625rem;
}

/* Homepage hero — CTAs anchored over coffee table in hero image */
body[data-page="home"] {
  --hero-cta-top: 61%;
  --hero-content-lift: 6cm;
  --hero-actions-drop: 4cm;
  --hero-title-drop: 2cm;
  --hero-title-btn-gap: calc(var(--hero-actions-drop) + clamp(0.75rem, 1.6vw, 1.35rem));
}

body[data-page="home"] .hero__overlay {
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  overflow: visible;
  background: linear-gradient(
    to bottom,
    var(--hero-overlay-top) 0%,
    var(--hero-overlay-mid) 32%,
    transparent 50%
  );
}

body[data-page="home"] .hero__overlay-inner {
  position: absolute;
  left: 50%;
  top: calc(var(--hero-cta-top) - var(--hero-content-lift, 6cm));
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--hero-title-btn-gap);
  width: min(var(--hero-content-max), 92vw);
  max-width: min(var(--hero-content-max), 92vw);
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0 clamp(0.75rem, 2vw, 1.25rem);
  box-sizing: border-box;
  text-align: center;
  container-type: inline-size;
  container-name: hero-content;
}

body[data-page="home"] .hero__title {
  position: relative;
  transform: none;
  top: auto;
  left: auto;
  width: 100%;
  max-width: 100%;
  margin: var(--hero-title-drop, 0) 0 0;
  flex: 0 0 auto;
  color: var(--hero-title-color, #D8CBB8);
  text-shadow: var(--hero-text-shadow);
}

body[data-page="home"] .hero__title[data-i18n-format="lines"] {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--hero-title-line-gap, 18px);
  font-size: var(--hero-title-size, 40px) !important;
  line-height: 1.02;
  max-width: 100%;
  transform: scaleX(var(--hero-title-stretch-x, 0.84)) scaleY(var(--hero-title-stretch-y, 1.22));
  transform-origin: center center;
}

html[lang="ka"] body[data-page="home"] .hero__title[data-i18n-format="lines"] {
  font-family: var(--font-hero);
  font-weight: 400;
  letter-spacing: var(--hero-title-track, 0.3px);
  line-height: 1.02;
}

html[lang="en"] body[data-page="home"] .hero__title[data-i18n-format="lines"] {
  font-family: var(--font-hero);
  font-weight: 400;
  letter-spacing: var(--hero-title-track, 0.3px);
  line-height: 1.02;
}

body[data-page="home"] .hero__title-line {
  font-family: inherit;
  color: inherit;
  display: block;
  flex: 0 0 auto;
  width: max-content;
  max-width: none;
  white-space: nowrap !important;
  overflow-wrap: normal;
  word-break: normal;
  overflow: visible;
  text-align: center;
  margin-inline: auto;
}

body[data-page="home"] .hero__title::before {
  content: '';
  position: absolute;
  inset: -0.35em -0.65em;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  mask-image: radial-gradient(
    ellipse 92% 88% at 50% 50%,
    rgba(0, 0, 0, 0.9) 25%,
    transparent 75%
  );
  -webkit-mask-image: radial-gradient(
    ellipse 92% 88% at 50% 50%,
    rgba(0, 0, 0, 0.9) 25%,
    transparent 75%
  );
  z-index: -1;
  pointer-events: none;
}

body[data-page="home"] .hero__title:empty {
  display: none;
}

body[data-page="home"] .hero__actions {
  position: static;
  transform: none;
  top: auto;
  left: auto;
  flex: 0 0 auto;
  flex-direction: row;
  flex-wrap: nowrap;
  width: auto;
  max-width: min(92vw, 520px);
  margin: calc(-1 * var(--hero-title-drop, 0)) 0 0;
  z-index: 1;
}

body[data-page="home"] .hero__actions .btn {
  white-space: nowrap;
}

/* Intro */
.hero-intro {
  padding: var(--space-md) 0 var(--space-lg);
  text-align: center;
  background: var(--color-bg);
}

.intro__text {
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 2.2vw, 1.5rem);
  max-width: var(--hero-content-max);
  margin: 0 auto;
  line-height: 1.68;
  font-weight: 400;
}

html[lang="en"] .intro__text {
  font-family: var(--font-family-en);
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 1.72;
}

/* ── Homepage section rhythm (reference gap: Services → How We Work) ── */
body[data-page="home"] > main {
  display: flex;
  flex-direction: column;
  gap: var(--home-section-between);
}

body[data-page="home"] > main > .hero,
body[data-page="home"] > main > .section,
body[data-page="home"] > main > .process-section,
body[data-page="home"] > main > .cta-section {
  margin: 0;
  padding: 0;
}

body[data-page="home"] > main > .process-section .process-content,
body[data-page="home"] > main > .wcu-section {
  padding: 0;
}

body[data-page="home"] > main > .section > .container,
body[data-page="home"] > main > .process-section .process-content > .container,
body[data-page="home"] > main > .cta-section > .container {
  padding-block: 0;
}

body[data-page="home"] .about-section {
  padding: 0;
}

body[data-page="home"] .about-section__content {
  padding-top: 0;
}

body[data-page="home"] .about-section__content > .section-title {
  margin-bottom: var(--section-title-to-lead);
}

body[data-page="home"] .section-title {
  margin-top: var(--home-heading-top);
  margin-bottom: var(--home-heading-bottom);
}

body[data-page="home"] .technical-highlights__head {
  margin-bottom: var(--section-head-gap);
}

body[data-page="home"] .process-steps {
  margin-top: var(--section-content-gap);
}

/* Services grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.service-card {
  position: relative;
  overflow: hidden;
}

.service-card__image {
  aspect-ratio: 4/5;
  overflow: hidden;
  margin-bottom: var(--space-md);
}

.service-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-image);
}

.service-card:hover .service-card__image img {
  transform: scale(var(--hover-scale));
}

.service-card__title {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  margin-bottom: var(--space-xs);
}

.service-card__text {
  font-size: 0.875rem;
  color: var(--color-text-light);
  line-height: 1.6;
}

/* Highlights */
.highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.highlight-item {
  font-size: 0.875rem;
  padding: var(--space-sm) 0;
  position: relative;
  padding-left: var(--space-md);
}

.highlight-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: var(--color-accent);
  border-radius: 50%;
}

/* Portfolio preview */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.portfolio-card {
  position: relative;
  overflow: hidden;
  group: portfolio;
}

.portfolio-card__image {
  aspect-ratio: 4/3;
  overflow: hidden;
  margin-bottom: var(--space-md);
}

.portfolio-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-image);
}

.portfolio-card:hover .portfolio-card__image img {
  transform: scale(var(--hover-scale-subtle));
}

.portfolio-card__date {
  font-size: 0.75rem;
  color: var(--color-text-light);
  margin-bottom: var(--space-xs);
}

.portfolio-card__title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
}

.portfolio-card__category {
  font-size: 0.8125rem;
  color: var(--color-text-light);
  margin-top: var(--space-xs);
}

/* CTA section */
.cta-section {
  text-align: center;
  padding: var(--section-pad-y) 0;
  background: var(--color-bg-dark);
  color: var(--color-text-on-dark);
}

.cta-section__title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin-bottom: var(--section-title-to-lead);
}

.cta-section__text {
  font-size: 0.9375rem;
  opacity: 0.8;
  max-width: 500px;
  margin: 0 auto var(--section-content-gap);
}

/* About page sections */
.about-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
  padding: 0;
}

.about-section--reverse {
  direction: rtl;
}

.about-section--reverse > * {
  direction: ltr;
}

.about-section--single {
  grid-template-columns: 1fr;
  max-width: 800px;
  margin: 0 auto;
}

.about-section__content {
  padding-top: 0;
}

.about-section__content > .section-title {
  margin-bottom: var(--section-title-to-lead);
}

.about-section__text p {
  margin-bottom: var(--space-md);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.approach-list {
  margin-top: var(--space-lg);
}

.approach-list li {
  font-size: 0.875rem;
  padding: var(--space-xs) 0;
  padding-left: var(--space-md);
  position: relative;
  line-height: 1.5;
}

.approach-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--color-accent);
}

.about-section__image {
  position: sticky;
  top: calc(var(--header-height) + var(--space-lg));
}

.about-section__image img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Services detail */
.services-detail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  margin-top: var(--space-xl);
}

.service-detail__title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
}

.service-detail__text {
  font-size: 0.875rem;
  color: var(--color-text-light);
  line-height: 1.7;
}

/* Image strip */
.image-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2px;
  margin-top: var(--space-xl);
}

.image-strip img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

/* Technical highlights */
.technical-highlights__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-xl);
  align-items: end;
  margin-bottom: var(--section-head-gap);
}

.technical-highlights__title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.15;
  margin: 0;
}

.technical-highlights__intro {
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--color-text-light);
  max-width: 26rem;
  margin: 0 0 0 auto;
}

.technical-highlights__rule {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 0 0 var(--section-content-gap);
}

.technical-highlights__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl) var(--space-md);
}

.technical-card__image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  margin-bottom: var(--space-sm);
  background: var(--color-bg-muted, #e8e4dc);
}

.technical-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.technical-card__label {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--color-text);
  margin: 0;
}

.technical-card__num {
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* Legacy technical layout (unused on homepage) */
.technical-section {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-md);
  align-items: start;
}

.technical-hero {
  grid-row: span 2;
}

.technical-hero img {
  width: 100%;
  height: 100%;
  min-height: 500px;
  object-fit: cover;
}

.technical-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
}

.technical-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.technical-section--grid-only .technical-grid {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
  .technical-section--grid-only .technical-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .technical-section--grid-only .technical-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* How we work */
.process-section {
  position: relative;
}

.process-hero {
  width: 100%;
  height: 50vh;
  min-height: 400px;
  overflow: hidden;
}

.process-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.process-content {
  background: var(--color-bg-darker);
  color: var(--color-text-on-dark);
  padding: var(--section-pad-y) 0;
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-lg);
  margin-top: var(--section-content-gap);
}

.process-step__icon {
  display: flex;
  margin-bottom: var(--space-sm);
  color: var(--color-gold-light);
}

.process-step__icon svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.process-step__title {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.process-step__text {
  font-size: 0.8125rem;
  opacity: 0.75;
  line-height: 1.5;
}

/* Why choose us */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  margin-top: var(--section-content-gap);
}

.audience-card__title {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
}

.audience-card ul li {
  font-size: 0.8125rem;
  padding: var(--space-xs) 0;
  padding-left: var(--space-md);
  position: relative;
  line-height: 1.5;
  color: var(--color-text-light);
}

.audience-card ul li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--color-accent);
}

/* Why Choose Us — editorial premium layout */
.wcu-section {
  padding: var(--section-pad-y) 0;
}

.wcu-section__header {
  max-width: 54rem;
  margin-bottom: var(--section-content-gap);
}

.wcu-section__title {
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 5.2vw, 3.75rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 var(--section-title-to-lead);
}

.wcu-section__intro {
  font-size: clamp(1rem, 1.6vw, 1.125rem);
  line-height: 1.8;
  color: var(--color-text-light);
  max-width: 38rem;
  margin: 0;
}

.wcu-section__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 38%);
  gap: clamp(var(--space-xl), 4vw, var(--space-2xl));
  align-items: start;
}

.wcu-section__blocks {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.wcu-block {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: clamp(var(--space-lg), 3vw, var(--space-2xl));
  row-gap: var(--space-sm);
  padding: clamp(var(--space-lg), 3vw, var(--space-2xl)) 0;
  border-top: 1px solid var(--color-border);
}

.wcu-block:first-child {
  padding-top: 0;
  border-top: none;
}

.wcu-block__number {
  grid-row: 1 / 3;
  align-self: start;
  font-family: var(--font-serif);
  font-size: clamp(2.75rem, 4.5vw, 4.25rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--color-accent);
}

.wcu-block__title {
  font-family: var(--font-serif);
  font-size: clamp(1.375rem, 2.4vw, 1.875rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0;
  align-self: end;
}

.wcu-block__text {
  font-size: 0.9375rem;
  line-height: 1.85;
  color: var(--color-text-light);
  margin: 0;
  max-width: 34rem;
}

.wcu-section__figure {
  margin: 0;
  position: sticky;
  top: calc(var(--header-height) + var(--space-lg));
}

.wcu-section__figure img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

body[data-page="home"] .wcu-section__title[data-text-size="sm"] { font-size: clamp(1.75rem, 4vw, 2.25rem); }
body[data-page="home"] .wcu-section__title[data-text-size="md"] { font-size: clamp(2rem, 4.5vw, 2.75rem); }
body[data-page="home"] .wcu-section__title[data-text-size="lg"] { font-size: clamp(2.25rem, 5vw, 3.25rem); }
body[data-page="home"] .wcu-section__title[data-text-size="xl"] { font-size: clamp(2.5rem, 5.5vw, 3.75rem); }

body[data-page="home"] .wcu-section__intro[data-text-size="sm"],
body[data-page="home"] .wcu-block__text[data-text-size="sm"] { font-size: 0.8125rem; }
body[data-page="home"] .wcu-section__intro[data-text-size="md"],
body[data-page="home"] .wcu-block__text[data-text-size="md"] { font-size: 0.9375rem; }
body[data-page="home"] .wcu-section__intro[data-text-size="lg"],
body[data-page="home"] .wcu-block__text[data-text-size="lg"] { font-size: 1.0625rem; }
body[data-page="home"] .wcu-section__intro[data-text-size="xl"],
body[data-page="home"] .wcu-block__text[data-text-size="xl"] { font-size: 1.1875rem; }

body[data-page="home"] .wcu-block__title[data-text-size="sm"] { font-size: 1.125rem; }
body[data-page="home"] .wcu-block__title[data-text-size="md"] { font-size: 1.375rem; }
body[data-page="home"] .wcu-block__title[data-text-size="lg"] { font-size: 1.625rem; }
body[data-page="home"] .wcu-block__title[data-text-size="xl"] { font-size: 1.875rem; }

@media (max-width: 900px) {
  .wcu-section__body {
    grid-template-columns: 1fr;
  }

  .wcu-section__figure {
    position: static;
    order: -1;
    max-width: 28rem;
  }

  .wcu-section__figure img {
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 600px) {
  .wcu-block {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    row-gap: var(--space-xs);
  }

  .wcu-block__number {
    grid-row: auto;
    font-size: 2.25rem;
    margin-bottom: var(--space-xs);
  }
}

body[data-page="portfolio"] main,
body[data-page="project"] main {
  overflow-x: clip;
}

/* ── Stella-style projects (metrica brand) ── */
body[data-page="portfolio"],
body[data-page="project"] {
  background: var(--color-bg-darker);
  color: var(--color-text-on-dark);
}

body[data-page="portfolio"] .header:not(.header--scrolled):not(.header--menu-open),
body[data-page="project"] .header:not(.header--scrolled):not(.header--menu-open) {
  color: var(--color-text-on-dark);
}

body[data-page="portfolio"] .header:not(.header--scrolled):not(.header--menu-open) .logo,
body[data-page="project"] .header:not(.header--scrolled):not(.header--menu-open) .logo {
  color: var(--color-text-on-dark);
}

body[data-page="portfolio"] .header:not(.header--scrolled):not(.header--menu-open) .logo .dot,
body[data-page="project"] .header:not(.header--scrolled):not(.header--menu-open) .logo .dot {
  color: var(--color-accent);
}

.stella-projects-page {
  padding-top: calc(var(--header-height) + var(--section-pad-y));
  padding-bottom: var(--section-pad-y);
}

.stella-projects-page__head {
  text-align: center;
  padding: 0 var(--space-lg) var(--section-content-gap);
}

.stella-projects-page__title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(242, 240, 235, 0.5);
  margin-bottom: var(--section-head-gap);
}

.stella-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(1rem, 4vw, 2rem);
  padding: 0 var(--space-lg);
}

.stella-filter {
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(242, 240, 235, 0.32);
  cursor: pointer;
  padding: 0.35rem 0;
  transition: color 0.35s ease;
}

.stella-filter:hover {
  color: rgba(242, 240, 235, 0.6);
}

.stella-filter--active {
  color: var(--color-gold-light);
}

.stella-grid__cell.is-filtered-out {
  display: none;
}

.stella-projects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 0 8px var(--space-3xl);
}

.stella-grid__cell {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: #141312;
  color: inherit;
}

.stella-grid__img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  transition: transform var(--transition-image), opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.stella-grid__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  text-align: center;
  background: rgba(242, 240, 235, 0);
  opacity: 0;
  transition: opacity 0.4s ease, background 0.4s ease;
  pointer-events: none;
}

.stella-grid__label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15em;
  transform: translateY(8px);
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.stella-grid__name,
.stella-grid__loc,
.stella-grid__country {
  font-family: var(--font-serif);
  font-size: clamp(0.6875rem, 1.25vw, 0.9375rem);
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.35;
  color: var(--color-bg-darker);
}

.stella-grid__loc,
.stella-grid__country {
  font-style: italic;
}

@media (hover: hover) and (pointer: fine) {
  .stella-grid__cell:hover .stella-grid__img {
    transform: scale(var(--hover-scale-subtle));
    opacity: 0.38;
  }

  .stella-grid__cell:hover .stella-grid__overlay {
    opacity: 1;
    background: rgba(242, 240, 235, 0.9);
  }

  .stella-grid__cell:hover .stella-grid__label {
    opacity: 1;
    transform: translateY(0);
  }
}

.stella-grid__cell--revealed .stella-grid__img {
  transform: scale(var(--hover-scale-subtle));
  opacity: 0.38;
}

.stella-grid__cell--revealed .stella-grid__overlay {
  opacity: 1;
  background: rgba(242, 240, 235, 0.9);
}

.stella-grid__cell--revealed .stella-grid__label {
  opacity: 1;
  transform: translateY(0);
}

.stella-grid__cell:focus-visible .stella-grid__overlay,
.stella-grid__cell:focus-visible .stella-grid__label {
  opacity: 1;
}

.stella-grid__cell:focus-visible .stella-grid__overlay {
  background: rgba(242, 240, 235, 0.9);
}

.stella-grid__cell:focus-visible .stella-grid__label {
  transform: translateY(0);
}

/* ── Project case study (Stella detail) ── */
.stella-case {
  position: relative;
  padding: calc(var(--header-height) + var(--section-pad-y)) 0 var(--section-pad-y);
}

.stella-case__rail {
  position: fixed;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(242, 240, 235, 0.28);
  white-space: nowrap;
  z-index: 40;
  transition: color 0.4s ease;
}

.stella-case__rail:hover {
  color: var(--color-gold);
}

.stella-case__rail--prev {
  left: 0.35rem;
}

.stella-case__rail--next {
  right: 0.35rem;
}

.stella-case__head {
  text-align: center;
  max-width: 920px;
  margin: 0 auto var(--section-content-gap);
  padding: 0 var(--space-lg);
}

.stella-case__eyebrow {
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(242, 240, 235, 0.35);
  margin-bottom: var(--space-lg);
}

.stella-case__title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5.5vw, 3.75rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.08;
  color: rgba(242, 240, 235, 0.68);
  margin: 0;
}

.stella-case__location,
.stella-case__country {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 3.2vw, 2.35rem);
  font-style: italic;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(242, 240, 235, 0.45);
  margin: 0.25em 0 0;
}

.stella-case__toggle {
  display: inline-block;
  margin-top: var(--space-lg);
  background: none;
  border: none;
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(242, 240, 235, 0.38);
  cursor: pointer;
  padding: 0;
  transition: color 0.4s ease;
}

.stella-case__toggle:hover,
.stella-case__toggle[aria-expanded="true"] {
  color: var(--color-gold-light);
}

.stella-case__panel {
  max-width: 640px;
  margin: var(--space-lg) auto 0;
  text-align: center;
}

.stella-case__meta {
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-md);
}

.stella-case__story {
  font-family: var(--font-serif);
  font-size: clamp(1rem, 1.8vw, 1.1875rem);
  line-height: 1.8;
  color: rgba(242, 240, 235, 0.58);
}

.stella-case__hero {
  margin: 0 0 var(--space-2xl);
  padding: 0 clamp(14px, 3vw, 48px);
  width: 100%;
  max-width: none;
}

.stella-case__hero-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
}

.stella-case__media {
  width: 100%;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  box-shadow: 0 20px 46px -22px rgba(0, 0, 0, 0.8),
    0 3px 10px -5px rgba(0, 0, 0, 0.5);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.stella-case__frame--hero .stella-case__media {
  aspect-ratio: 16 / 10;
}

.stella-case__hero img,
.stella-case__media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.55s ease;
}

/* ── Gallery: 3 portrait photos per row (floating cards) ── */
.stella-case__gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 1.6vw, 26px);
  padding: 0 clamp(14px, 3vw, 48px) var(--space-2xl);
}

.stella-case__frame {
  margin: 0;
  min-width: 0;
}

.stella-case__img-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: rgba(0, 0, 0, 0.25);
  cursor: zoom-in;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 6px;
  box-shadow: 0 14px 34px -18px rgba(0, 0, 0, 0.75),
    0 2px 8px -4px rgba(0, 0, 0, 0.5);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.stella-case__img-btn img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.55s ease;
}

@media (hover: hover) {
  .stella-case__img-btn:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 48px -18px rgba(0, 0, 0, 0.85),
      0 6px 16px -6px rgba(0, 0, 0, 0.55);
  }

  .stella-case__img-btn:hover img {
    transform: scale(1.04);
  }

  .stella-case__hero-btn:hover .stella-case__media {
    transform: translateY(-6px);
    box-shadow: 0 32px 60px -22px rgba(0, 0, 0, 0.9),
      0 8px 20px -8px rgba(0, 0, 0, 0.6);
  }

  .stella-case__hero-btn:hover .stella-case__media img {
    transform: scale(1.03);
  }
}

@media (max-width: 1024px) {
  .stella-case__gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tablet / mobile: single-column vertical gallery */
@media (max-width: 768px) {
  .stella-case__gallery {
    grid-template-columns: 1fr;
    gap: clamp(16px, 4vw, 24px);
  }
}

.stella-case--missing {
  text-align: center;
  padding: calc(var(--header-height) + var(--space-3xl)) var(--space-lg);
  color: rgba(242, 240, 235, 0.5);
}

.stella-case__back {
  display: inline-block;
  margin-top: var(--space-lg);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-gold-light);
  transition: color 0.35s ease, opacity 0.35s ease;
}

.stella-case__back--head {
  margin-top: 0;
  margin-bottom: var(--space-lg);
}

.stella-case__back:hover {
  opacity: 1;
  color: var(--color-gold);
}

.stella-case__foot {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg) 0;
}

.footer--dark {
  background: var(--color-bg-darker);
  border-top: 1px solid rgba(242, 240, 235, 0.06);
}

.footer--dark .footer__copy,
.footer--dark .footer__contact a {
  color: rgba(242, 240, 235, 0.38);
}

.footer--dark .logo {
  color: var(--color-text-on-dark);
}

.footer--dark .logo .dot {
  color: var(--color-accent);
}

/* Portfolio lightbox */
body.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.38s ease, visibility 0.38s ease;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox[hidden] {
  display: none !important;
}

.lightbox:not([hidden]) {
  display: flex;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 28, 26, 0.9);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.lightbox__dialog {
  position: relative;
  z-index: 1;
  width: min(1200px, 94vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  transform: scale(0.94) translateY(12px);
  opacity: 0;
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.38s ease;
  touch-action: pan-y pinch-zoom;
}

.lightbox.is-open .lightbox__dialog {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.lightbox__figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  max-height: calc(92vh - 4rem);
}

.lightbox__image {
  max-width: 100%;
  max-height: calc(92vh - 5.5rem);
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  border-radius: 2px;
  box-shadow: var(--shadow-strong);
}

.lightbox__caption {
  color: var(--color-text-on-dark);
  font-family: var(--font-serif);
  font-size: 1rem;
  text-align: center;
  margin: 0;
  opacity: 0.88;
  max-width: 60ch;
}

.lightbox__counter {
  color: rgba(242, 240, 235, 0.7);
  font-size: 0.8125rem;
  margin: 0;
  letter-spacing: 0.06em;
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  border: 1px solid rgba(242, 240, 235, 0.25);
  background: rgba(61, 56, 52, 0.65);
  color: var(--color-text-on-dark);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  z-index: 2;
}

.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover {
  background: rgba(61, 56, 52, 0.92);
  border-color: var(--color-gold-light);
}

.lightbox__close {
  top: var(--space-md);
  right: var(--space-md);
}

.lightbox__prev,
.lightbox__next {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__prev {
  left: var(--space-md);
}

.lightbox__next {
  right: var(--space-md);
}

.lightbox__prev:disabled,
.lightbox__next:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

/* Contact page */
body[data-page="contact"] .page-header {
  padding: calc(var(--header-height) + var(--section-pad-y)) 0 var(--section-content-gap);
}

body[data-page="contact"] .section {
  padding: var(--section-pad-y) 0;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.contact-info {
  margin-top: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.contact-info__item {
  margin-bottom: 0;
}

.contact-info__label {
  font-family: var(--font-serif);
  font-size: 0.8125rem;
  margin-bottom: 0.2rem;
}

.contact-info__value {
  font-size: 1rem;
}

.contact-info__value a:hover {
  opacity: 0.7;
}

.contact-social {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.contact-social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  transition: color var(--transition), border-color var(--transition), opacity var(--transition);
}

.contact-social__link:hover {
  opacity: 0.85;
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.contact-social__link svg {
  width: 1.125rem;
  height: 1.125rem;
}

.contact-social__link--instagram svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-social__link--instagram svg circle[cx="17.2"] {
  fill: currentColor;
  stroke: none;
}

.contact-social__link--facebook svg {
  fill: currentColor;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.form-group label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 1rem;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text);
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-text);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-image {
  margin-top: var(--space-xl);
}

.contact-image img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.form-success {
  display: none;
  padding: var(--space-md);
  background: var(--color-bg-dark);
  color: var(--color-text-on-dark);
  text-align: center;
  font-size: 0.875rem;
}

.form-success--visible {
  display: block;
}

/* Footer */
.footer {
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--color-border);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer__inner--simple {
  justify-content: space-between;
}

.footer__contact {
  display: flex;
  gap: var(--space-lg);
  font-size: 0.8125rem;
}

.footer__copy {
  font-size: 0.75rem;
  color: var(--color-text-light);
}

/* Page header */
.page-header {
  padding: calc(var(--header-height) + var(--section-pad-y)) 0 var(--section-content-gap);
}

.page-header__title {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

.page-header__subtitle {
  font-size: 0.9375rem;
  color: var(--color-text-light);
  max-width: 500px;
  margin-top: var(--section-title-to-lead);
}

/* Utility */
.text-center { text-align: center; }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1), transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in--visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 1440px) {
  body[data-page="home"] .hero__overlay-inner {
    width: min(var(--hero-content-max), 94vw);
    max-width: min(var(--hero-content-max), 94vw);
  }
}

@media (max-width: 1024px) {
  body[data-page="home"] {
    --header-height: 40px;
  }

  body[data-page="home"] .header.header--home {
    padding: 0.4rem 0;
  }

  .hero__overlay {
    padding: clamp(2rem, 11vh, 4.5rem) var(--space-md) var(--space-md);
  }

  .hero__title {
    font-size: clamp(1.5rem, 3.8vw, 2.35rem);
  }

  body[data-page="home"] .hero__overlay-inner {
    width: min(var(--hero-content-max), 90vw);
    max-width: min(var(--hero-content-max), 90vw);
  }

  html[lang="ka"] body[data-page="home"] .hero__title[data-i18n-format="lines"] {
    letter-spacing: var(--hero-title-track, 0.3px);
    line-height: 1.02;
  }

  .services-grid,
  .portfolio-grid,
  .highlights {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-section {
    grid-template-columns: 1fr;
  }

  .about-section--reverse {
    direction: ltr;
  }

  .about-section__image {
    position: static;
    order: -1;
  }

  .technical-section {
    grid-template-columns: 1fr;
  }

  .technical-hero {
    grid-row: auto;
  }

  .technical-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .process-steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .audience-grid {
    grid-template-columns: 1fr;
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }

  .image-strip {
    grid-template-columns: repeat(3, 1fr);
  }

  .stella-projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .stella-case__rail {
    display: none;
  }
}

@media (max-width: 768px) {
  :root {
    --space-2xl: 4rem;
    --space-3xl: 5rem;
  }

  html,
  body {
    overflow-x: clip;
  }

  body[data-page="home"] .hero--banner,
  body[data-page="home"] .hero__banner {
    max-width: 100vw;
  }

  .menu-toggle {
    display: flex;
  }

  .header__right {
    margin-left: auto;
    gap: var(--space-sm);
  }

  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    z-index: 1001;
    background: var(--color-bg);
    color: var(--color-text);
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-lg);
    gap: 0;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    box-shadow: var(--shadow-medium);
    width: 100%;
    max-height: calc(100dvh - var(--header-height));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav__link {
    display: block;
    padding: 0.875rem 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text);
    opacity: 1;
    border-bottom: 1px solid var(--color-border);
  }

  .nav__link:last-child {
    border-bottom: none;
  }

  .nav__link::after {
    display: none;
  }

  body[data-page="home"] .nav,
  body[data-page="home"] .nav__link,
  body > .nav,
  body > .nav .nav__link {
    color: var(--color-text);
  }

  .nav--open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }

  /* Homepage hero — mobile: wrapped headline + stacked CTAs */
  body[data-page="home"] {
    --hero-title-drop: 0;
    --hero-actions-mobile-drop: 0;
    --hero-title-btn-gap: 18px;
    --hero-mobile-lift: 2cm;
    --hero-title-track: 0.3px;
  }

  body[data-page="home"] .hero__banner {
    overflow: hidden;
  }

  body[data-page="home"] .hero__banner img {
    min-height: min(72vh, 100svh);
    object-position: center center;
  }

  body[data-page="home"] .hero__overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    inset: 0;
    padding: 0 8px;
    overflow: visible;
    pointer-events: none;
    background: linear-gradient(
      to bottom,
      var(--hero-overlay-mobile-top) 0%,
      var(--hero-overlay-mobile-mid) 28%,
      rgba(var(--hero-overlay-dark), 0.05) 48%,
      transparent 62%
    );
  }

  body[data-page="home"] .hero__overlay-inner {
    position: relative;
    inset: auto;
    left: auto;
    top: auto;
    transform: translateY(calc(-1 * var(--hero-mobile-lift, 2cm)));
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: var(--hero-title-btn-gap, 18px);
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 4px;
    box-sizing: border-box;
    overflow: visible;
    pointer-events: auto;
    container-type: normal;
    text-align: center;
  }

  body[data-page="home"] .hero__title {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    transform: none !important;
    margin: 0;
    width: 100%;
    max-width: 100%;
    flex: 0 0 auto;
    opacity: 1;
    visibility: visible;
    z-index: 2;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    overflow: visible;
  }

  body[data-page="home"] .hero__title,
  body[data-page="home"] .hero__title[data-i18n-format="lines"],
  body[data-page="home"] .hero__title-line {
    color: #D8CBB8 !important;
    -webkit-text-fill-color: #D8CBB8;
    font-family: var(--font-hero) !important;
  }

  body[data-page="home"] .hero__title[data-i18n-format="lines"],
  body[data-page="home"] .hero__title[data-i18n-format="lines"][data-text-size] {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-size: clamp(22px, 5.8vw, 26px) !important;
    font-weight: 400 !important;
    line-height: 1.35 !important;
    letter-spacing: 0.3px !important;
    text-align: center;
    gap: 0.2em;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
    transform: none !important;
    overflow: visible;
  }

  body[data-page="home"] .hero__title-line {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    text-align: center;
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: clip;
    overflow-wrap: normal;
    word-break: normal;
    line-height: inherit;
    letter-spacing: inherit;
  }

  html[lang="ka"] body[data-page="home"] .hero__title[data-i18n-format="lines"],
  html[lang="en"] body[data-page="home"] .hero__title[data-i18n-format="lines"] {
    line-height: 1.35;
    letter-spacing: 0.3px;
  }

  body[data-page="home"] .hero__title::before {
    display: block;
    content: '';
    position: absolute;
    inset: -0.45em -0.55em;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    background: rgba(46, 43, 40, 0.1);
    border-radius: 0.4em;
    mask-image: radial-gradient(
      ellipse 94% 88% at 50% 50%,
      rgba(0, 0, 0, 0.88) 28%,
      transparent 76%
    );
    -webkit-mask-image: radial-gradient(
      ellipse 94% 88% at 50% 50%,
      rgba(0, 0, 0, 0.88) 28%,
      transparent 76%
    );
    z-index: -1;
    pointer-events: none;
  }

  body[data-page="home"] .hero__actions {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    transform: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 11px;
    width: min(90%, 320px);
    max-width: 320px;
    margin: 0 auto;
    align-self: center;
    flex: 0 0 auto;
    z-index: 2;
    flex-wrap: nowrap;
  }

  body[data-page="home"] .hero__actions .btn {
    width: 100%;
    flex: 0 0 auto;
    min-width: 0;
    padding: 0.625rem 1rem;
    font-size: 0.625rem;
    letter-spacing: 0.06em;
    line-height: 1.3;
    white-space: normal;
    text-align: center;
  }

  body[data-page="home"] .header.header--home .logo {
    font-size: 1.0625rem;
  }

  body[data-page="home"] .header.header--home .menu-toggle {
    padding: 6px;
    gap: 5px;
  }

  body[data-page="home"] .header.header--home .menu-toggle span {
    width: 18px;
    height: 1.5px;
  }

  body[data-page="home"] .header.header--home .menu-toggle--open span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 5px);
  }

  body[data-page="home"] .header.header--home .menu-toggle--open span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -5px);
  }

  body[data-page="home"] .header.header--home .lang-btn {
    font-size: 0.625rem;
    padding: 0.15rem 0.3rem;
  }

  body[data-page="home"] .header.header--home .lang-divider {
    font-size: 0.625rem;
  }

  .services-grid,
  .portfolio-grid,
  .highlights,
  .services-detail {
    grid-template-columns: 1fr;
  }

  .stella-projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 0 6px var(--space-2xl);
  }

  .lightbox__prev {
    left: var(--space-sm);
  }

  .lightbox__next {
    right: var(--space-sm);
  }

  .lightbox__close {
    top: var(--space-sm);
    right: var(--space-sm);
  }

  .process-steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-step__icon svg {
    width: 22px;
    height: 22px;
  }

  .technical-highlights__head {
    grid-template-columns: 1fr;
    gap: var(--space-md);
    align-items: start;
  }

  .technical-highlights__intro {
    margin: 0;
    max-width: none;
  }

  .technical-highlights__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg) var(--space-sm);
  }

  .technical-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .image-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }

  .footer__contact {
    flex-direction: column;
    gap: var(--space-sm);
  }
}

@media (max-width: 480px) {
  .process-steps {
    grid-template-columns: 1fr;
  }

  .technical-highlights__grid {
    grid-template-columns: 1fr;
  }

  .btn-group:not(.hero__actions) {
    flex-direction: column;
  }

  .btn-group:not(.hero__actions) .btn {
    width: 100%;
  }

  body[data-page="home"] {
    --hero-title-btn-gap: 16px;
  }

  body[data-page="home"] .hero__banner img {
    min-height: min(74vh, 100svh);
  }

  body[data-page="home"] .hero__title[data-i18n-format="lines"],
  body[data-page="home"] .hero__title[data-i18n-format="lines"][data-text-size] {
    font-size: clamp(20px, 5.5vw, 24px) !important;
    line-height: 1.35 !important;
    letter-spacing: 0.3px !important;
  }

  body[data-page="home"] .hero__actions {
    width: min(88%, 320px);
    gap: 10px;
  }

  body[data-page="home"] .hero__actions .btn {
    width: 100%;
    padding: 0.5625rem 0.875rem;
    font-size: 0.5625rem;
  }
}

/* Homepage section gaps — keep last so global .section / .process-content rules cannot override */
body[data-page="home"] > main {
  display: flex;
  flex-direction: column;
  gap: var(--home-section-between);
}

body[data-page="home"] > main > .hero,
body[data-page="home"] > main > .section,
body[data-page="home"] > main > .process-section,
body[data-page="home"] > main > .cta-section,
body[data-page="home"] > main > .wcu-section {
  margin: 0;
  padding: 0;
}

body[data-page="home"] > main > .process-section .process-content {
  padding-block: var(--dark-section-extend, 1cm);
  padding-inline: 0;
}

body[data-page="home"] > main > .cta-section {
  padding-block: var(--dark-section-extend, 1cm);
  padding-inline: 0;
}

body[data-page="home"] > main > .section > .container,
body[data-page="home"] > main > .process-section .process-content > .container,
body[data-page="home"] > main > .cta-section > .container {
  padding-block: 0;
}
