/*
Theme Name: Arfil
Theme URI: https://arfil.eu
Author: Arfil LTD
Description: Custom theme for Arfil property development — Cyprus.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: arfil
*/

/* ============================================
   00. CUSTOM PROPERTIES & RESET
   ============================================ */
:root {
  /* Backgrounds */
  --color-bg-white: #ffffff;
  --color-bg-light: #f5f4f0;
  --color-bg-dark: #1a1a2e;
  --color-bg-overlay: rgba(26, 26, 46, 0.55);

  /* Text */
  --color-text-primary: #1a1a2e;
  --color-text-secondary: #5a5a6e;
  --color-text-light: #ffffff;
  --color-text-muted: #8a8a9a;

  /* Accent */
  --color-accent: #c9a96e;
  --color-accent-hover: #b8944f;

  /* Borders */
  --color-border: #e0ddd6;
  --color-border-light: #eeece6;

  /* Status */
  --color-status-done: #4a8c6f;
  --color-status-active: #c9a96e;
  --color-status-new: #1a1a2e;

  /* Typography */
  --font-heading: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;

  /* Layout */
  --container-max: 1400px;
  --header-h: 5rem;

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* Reusable transition patterns */
  --t-fast: 0.3s ease;
  --t-medium: 0.4s ease;
  --t-transform-card: transform 0.4s var(--ease-out-expo), box-shadow 0.4s ease;
  --t-image-zoom: transform 0.7s var(--ease-out-expo);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text-primary);
  background: var(--color-bg-light);
  overflow-x: hidden;
  max-width: 100vw;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.site-main {
  flex: 1;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

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

/* ============================================
   01. BASE TYPOGRAPHY
   ============================================ */
.section-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.2;
  color: var(--color-text-primary);
  margin-bottom: 1rem;
}

.section-title--light {
  color: var(--color-text-light);
}

.section-subtitle {
  font-size: 1.0625rem;
  color: var(--color-text-secondary);
  max-width: 500px;
}

.section-header {
  margin-bottom: 3.5rem;
}

/* ============================================
   02. LAYOUT UTILITIES
   ============================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 5rem);
}

.section {
  padding: clamp(4rem, 8vh, 7rem) 0;
}

.section--alt {
  background: var(--color-bg-light);
}

.section--white {
  background: var(--color-bg-white);
}

/* ============================================
   03. HEADER & NAVIGATION
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

.header[data-state="top"] {
  background: transparent;
}

.header[data-state="scrolled"] {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--color-border-light);
}

.header__inner {
  display: flex;
  align-items: center;
  height: var(--header-h);
  gap: 2rem;
}

/* Inline SVG logo — `color` drives the fill via currentColor */
.header__logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  color: var(--color-text-primary);
  transition: color 0.4s ease;
}
.header__logo svg {
  height: 22px;
  width: auto;
  display: block;
}
.header[data-state="top"] .header__logo {
  color: #fff;
}
/* Legacy support: if an <img> is still there, keep original filter behavior */
.header__logo img {
  height: 40px;
  width: auto;
  transition: filter 0.4s ease;
}
.header[data-state="top"] .header__logo img {
  filter: brightness(0) invert(1);
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-left: auto;
}

.header__nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: color 0.3s ease;
  position: relative;
}

.header[data-state="top"] .header__nav-link {
  color: rgba(255, 255, 255, 0.85);
}

.header[data-state="top"] .header__nav-link:hover {
  color: #fff;
}

.header[data-state="scrolled"] .header__nav-link {
  color: var(--color-text-secondary);
}

.header[data-state="scrolled"] .header__nav-link:hover {
  color: var(--color-text-primary);
}

.header__nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--color-accent);
  transition: width 0.3s var(--ease-out-expo);
}

.header__nav-link:hover::after {
  width: 100%;
}

.header__cta {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.625rem 1.5rem;
  border-radius: 3px;
  transition: all 0.3s ease;
  margin-left: 1rem;
}

.header[data-state="top"] .header__cta {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.header[data-state="top"] .header__cta:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.7);
}

.header[data-state="scrolled"] .header__cta {
  color: var(--color-text-light);
  background: var(--color-accent);
  border: 1px solid var(--color-accent);
}

.header[data-state="scrolled"] .header__cta:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

/* Burger */
.header__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  margin-left: auto;
  z-index: 1001;
}

.header__burger span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 1px;
  transition: all 0.3s ease;
}

.header[data-state="top"] .header__burger span {
  background: #fff;
}

.header[data-state="scrolled"] .header__burger span {
  background: var(--color-text-primary);
}

.header__burger.is-active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.header__burger.is-active span:nth-child(2) {
  opacity: 0;
}

.header__burger.is-active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile menu */
.header__mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100dvh;
  background: var(--color-bg-dark);
  padding: calc(var(--header-h) + 2rem) 2rem 2rem;
  transform: translateY(-100%);
  transition: transform 0.5s var(--ease-out-expo);
  z-index: 999;
  display: none;
}

.header__mobile-menu.is-open {
  transform: translateY(0);
}

.header__mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.header__mobile-link {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 400;
  color: var(--color-text-light);
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: color 0.3s ease;
}

.header__mobile-link:hover {
  color: var(--color-accent);
}

/* Overlay */
.header__overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 46, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  z-index: 998;
}

.header__overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

/* ============================================
   04. HERO SECTION
   ============================================ */
.hero {
  position: relative;
  height: 100vh;
  height: 100dvh;
  min-height: 600px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #2a3040;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: heroZoom 2s var(--ease-smooth) forwards;
}

@keyframes heroZoom {
  from { transform: scale(1.08); }
  to   { transform: scale(1); }
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(26, 26, 46, 0.6) 0%,
    rgba(26, 26, 46, 0.25) 40%,
    rgba(26, 26, 46, 0.1) 100%
  );
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  padding-bottom: 12vh;
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(3.5rem, 7vw, 6rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.06em;
  line-height: 1;
  animation: fadeUp 1s ease 0.4s both;
}

/* Hero title rendered as logo SVG — color via currentColor, sized with clamp */
.hero__title--logo {
  display: flex;
  justify-content: flex-start;
  margin: 0;
  line-height: 0;
}
.hero__title--logo svg {
  width: auto;
  /* Logotype is ~1.22:1 (668x545). 18vh feels right on desktop,
     capped so it doesn't balloon on ultra-wide displays. */
  height: clamp(140px, 22vh, 240px);
  display: block;
  filter: drop-shadow(0 4px 24px rgba(0, 0, 0, 0.25));
}

.hero__subtitle {
  font-size: clamp(0.9375rem, 1.5vw, 1.125rem);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 1rem;
  animation: fadeUp 1s ease 0.7s both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll indicator — centered via left:0 + right:0 + flex,
   NOT via transform: translateX(-50%), because the fadeUp animation's
   final keyframe (transform: translateY(0)) would override it. */
.hero__scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  animation: fadeUp 1s ease 1.2s both;
}

.hero__scroll-text {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

/* Desktop text shown by default; mobile variant hidden (swapped via @media below) */
.hero__scroll-text--mobile { display: none; }

.hero__scroll-line {
  width: 1px;
  height: clamp(35px, 3.5vh, 65px);
  background: rgba(255, 255, 255, 0.15);
  position: relative;
  overflow: hidden;
}

.hero__scroll-line::after {
  content: '';
  position: absolute;
  top: calc(-1 * clamp(35px, 3.5vh, 65px));
  left: 0;
  width: 1px;
  height: clamp(35px, 3.5vh, 65px);
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.6));
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0%   { transform: translateY(0); }
  100% { transform: translateY(calc(2 * clamp(35px, 3.5vh, 65px))); }
}

/* ── Touch devices (phones + tablets): "Swipe" label + reversed bottom→top animation ──
   Combined query: real touch (hover:none + pointer:coarse) OR narrow viewport ≤1023px,
   so it also catches desktop users resizing to a narrow window (common for responsive QA). */
@media (hover: none) and (pointer: coarse), (max-width: 1023px) {
  .hero__scroll-text--desktop { display: none; }
  .hero__scroll-text--mobile  { display: inline; }

  /* Reverse the decorative line: start below, travel up */
  .hero__scroll-line::after {
    top: auto;
    bottom: calc(-1 * clamp(35px, 3.5vh, 65px));
    background: linear-gradient(to top, transparent, rgba(255, 255, 255, 0.6));
    animation-name: scrollLineUp;
  }

  @keyframes scrollLineUp {
    0%   { transform: translateY(0); }
    100% { transform: translateY(calc(-2 * clamp(35px, 3.5vh, 65px))); }
  }
}

/* ============================================
   05. PROJECTS SECTION
   ============================================ */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.project-card {
  display: block;
  background: transparent;
  transition: transform 0.5s var(--ease-out-expo);
}

/* [data-animate] selector bumps specificity above [data-animate].is-visible (0,2,0) so hover transform wins */
.project-card[data-animate]:hover {
  transform: translateY(-4px);
}

.project-card__image-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
}

/* img.project-card__image (0,1,1) beats WP Smush lazy-load's .lazyloaded (0,1,0) which sets transition:opacity 400ms */
img.project-card__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card[data-animate]:hover img.project-card__image {
  transform: scale(1.06);
}

/* Glass-morphism status badge (bottom-left) */
.project-card__badge--status {
  position: absolute;
  bottom: 0.875rem;
  left: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 4px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.project-card__badge--status svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* Pill badges (top-right) — solid */
.project-card__badges {
  position: absolute;
  top: 0.875rem;
  right: 0.875rem;
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.project-card__badge--pill {
  padding: 0.25rem 0.75rem;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 100px;
  color: #fff;
  background: var(--color-bg-dark);
}

/* Card info — text directly on section background, flex row */
.project-card__info {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 0.25rem 0.5rem;
}

.project-card__info-text {
  flex: 1;
  min-width: 0;
}

.project-card__title {
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.125rem;
  color: var(--color-text-primary);
  /* Allow long titles to wrap instead of stretching the card
     (was: white-space:nowrap + overflow:hidden + text-overflow:ellipsis,
     which combined with flex: 1 on .project-card__info-text caused the
     card to expand past viewport on mobile). */
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.25;
}

.project-card__location {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.project-card__location svg {
  flex-shrink: 0;
  opacity: 0.5;
}

.project-card__price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
  white-space: nowrap;
  align-self: center;
}

.project-card__price-from {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-transform: lowercase;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.project-card__price-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

/* ============================================
   06. ABOUT SECTION
   ============================================ */
.about__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

/* No gallery images yet (no project has CMB2 _arfil_gallery filled) →
   let the text block use the full row. Rather than shipping foreign stock
   imagery as a "visual fallback", we honor the empty state and reveal a
   cleaner text-only About until the user uploads gallery photos. */
.about--no-gallery .about__inner {
  grid-template-columns: 1fr;
  max-width: 720px;
  margin: 0 auto;
}

.about__text .section-title {
  margin-bottom: 1.5rem;
}

.about__lead {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--color-text-primary);
  margin-bottom: 1rem;
}

.about__text p {
  color: var(--color-text-secondary);
  margin-bottom: 1rem;
}

.about__stats {
  display: flex;
  gap: 3rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.about__stat {
  display: flex;
  flex-direction: column;
}

.about__stat-number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
}

.about__stat-label {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.375rem;
}

/* Scrolling columns */
.about__columns {
  display: flex;
  gap: 1rem;
  height: 550px;
  overflow: hidden;
  border-radius: 8px;
}

.about__scroll-col {
  flex: 1;
  overflow: hidden;
}

.about__scroll-track {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about__scroll-track img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 4px;
}

/* Scroll is handled entirely by JS (initAboutColumns) for smooth
   interaction — no CSS keyframes needed. */

@media (prefers-reduced-motion: reduce) {
  .about__scroll-track {
    transform: none !important;
  }
}

/* ============================================
   07. PROGRESS SECTION
   ============================================ */
/* Flex layout so the row adapts to the actual number of active projects:
   1 project → centered, 2 → side by side, 3 → three across, 4+ wraps.
   max-width caps the column so a lone card doesn't stretch the full container. */
.progress__projects {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4rem;
}
.progress__project {
  flex: 1 1 420px;
  max-width: 600px;
  min-width: 0;
}

.progress__project-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
}

.progress__project-location {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin-bottom: 2rem;
}

.progress__timeline {
  position: relative;
  padding-left: 2.5rem;
}

.progress__timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: var(--timeline-bottom, 8px);
  width: 2px;
  background: var(--color-border);
}

.progress__milestone {
  position: relative;
  padding-bottom: 2rem;
}

.progress__milestone:last-child {
  padding-bottom: 0;
}

.progress__milestone-dot {
  position: absolute;
  left: -2.5rem;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: var(--color-bg-light);
  z-index: 1;
  transition: all 0.3s ease;
}

.progress__milestone[data-status="done"] .progress__milestone-dot {
  background: var(--color-status-done);
  border-color: var(--color-status-done);
}

.progress__milestone[data-status="current"] .progress__milestone-dot {
  background: var(--color-accent);
  border-color: var(--color-accent);
  box-shadow: 0 0 0 5px rgba(201, 169, 110, 0.2);
}

.progress__milestone[data-status="upcoming"] .progress__milestone-dot {
  background: var(--color-bg-light);
  border-color: var(--color-border);
}

.progress__milestone-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.progress__milestone-date {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.progress__milestone[data-status="current"] .progress__milestone-date {
  color: var(--color-accent);
}

.progress__milestone-label {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text-primary);
}

.progress__milestone[data-status="upcoming"] .progress__milestone-label {
  color: var(--color-text-muted);
}

.progress__milestone-image {
  width: 100%;
  max-width: 280px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  margin-top: 0.5rem;
}

/* ============================================
   07b. NEWS SECTION
   ============================================ */
.news__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.news-card {
  background: var(--color-bg-light);
  border-radius: 8px;
  overflow: hidden;
  transition: var(--t-transform-card);
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(26, 26, 46, 0.1);
}

.news-card__link {
  display: block;
  color: inherit;
}

.news-card__image-wrap {
  overflow: hidden;
  aspect-ratio: 2 / 1;
  background: var(--color-border-light);
}

.news-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
}

.news-card__image-wrap img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: var(--t-image-zoom);
}

.news-card:hover .news-card__image-wrap img {
  transform: scale(1.05);
}

.news-card__body {
  padding: 1.5rem;
}

.news-card__date {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.news-card__title {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  color: var(--color-text-primary);
  transition: color 0.3s ease;
}

.news-card:hover .news-card__title {
  color: var(--color-accent);
}

.news-card__excerpt {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card__read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-accent);
  transition: gap 0.3s ease;
}

.news-card:hover .news-card__read-more {
  gap: 0.625rem;
}

/* News "View All" link (used in homepage + project page news sections) */
.news__all-link {
  text-align: center;
  margin-top: 2.5rem;
}

.news__view-all {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-accent);
  transition: gap 0.3s ease;
}

.news__view-all:hover {
  gap: 0.75rem;
}

/* ============================================
   07c. COMPACT PAGE HERO (archives, news, etc.)
   ============================================ */
.page-hero {
  background: var(--color-bg-dark);
  padding: calc(var(--header-h) + 2.5rem) 0 2.5rem;
  text-align: center;
}

.page-hero__title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.375rem;
}

.page-hero__subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.55);
}

/* Filter tabs */
.news-filters {
  padding: 1.5rem 0 0;
  background: var(--color-bg-white);
}

.news-filters__tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.news-filters__tab {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: 100px;
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  background: transparent;
  transition: all 0.3s ease;
}

.news-filters__tab:hover {
  color: var(--color-text-primary);
  border-color: var(--color-text-primary);
}

.news-filters__tab.is-active {
  background: var(--color-bg-dark);
  color: #fff;
  border-color: var(--color-bg-dark);
}

/* ============================================
   07d. SINGLE NEWS ARTICLE
   ============================================ */

/* Hero with featured image overlay */
.single-news__hero {
  position: relative;
  min-height: 380px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.single-news__hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.single-news__hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(26, 26, 46, 0.85) 0%,
    rgba(26, 26, 46, 0.45) 50%,
    rgba(26, 26, 46, 0.25) 100%
  );
  pointer-events: none;
}

.single-news__hero .container {
  position: relative;
  z-index: 1;
  padding-top: calc(var(--header-h) + 2rem);
  padding-bottom: 2.5rem;
}

.single-news__hero .page-hero__title {
  color: var(--color-text-light);
}

.single-news__hero .page-hero__subtitle {
  color: rgba(255, 255, 255, 0.7);
}

.single-news__category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--color-accent);
  color: var(--color-bg-dark);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.single-news__content {
  max-width: 750px;
  margin: 0 auto;
  padding: 2.5rem 0 3rem;
  line-height: 1.9;
  font-size: 1.05rem;
  color: var(--color-text-secondary);
}

.single-news__content p {
  margin-bottom: 1.25rem;
}

.single-news__content h2,
.single-news__content h3 {
  color: var(--color-text-primary);
  margin: 2rem 0 0.75rem;
}

.single-news__content img {
  border-radius: 8px;
  margin: 1.5rem 0;
}

/* Prev / Next navigation */
.single-news__nav {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem 0;
  border-top: 1px solid var(--color-border-light);
}

.single-news__nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  max-width: 45%;
  transition: color var(--t-fast);
}

.single-news__nav-link:hover {
  color: var(--color-accent);
}

.single-news__nav-link--next {
  margin-left: auto;
  text-align: right;
}

.single-news__nav-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
}

.single-news__nav-title {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
}

.single-news__back {
  display: inline-block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-accent);
  transition: opacity var(--t-fast);
}

.single-news__back:hover {
  opacity: 0.7;
}

/* ============================================
   08. CONTACT SECTION
   ============================================ */
.contact {
  position: relative;
  overflow: hidden;
}

/* No user-supplied contact background photo → solid brand-dark under the overlay
   so the section stays visually consistent with the rest of the dark-footer strip.
   (Hero has the same baseline via its own `background: #2a3040;` declaration.) */
.contact--no-bg {
  background: var(--color-bg-dark, #1a1a2e);
}

.contact__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

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

.contact__overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 46, 0.82);
  z-index: 1;
}

.contact .container {
  position: relative;
  z-index: 2;
}

.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact__text {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.0625rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.contact__details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact__detail {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9375rem;
}

.contact__detail svg {
  opacity: 0.5;
  flex-shrink: 0;
}

/* Form */
.contact__form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.contact__form input,
.contact__form textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  color: #fff;
  font-size: 0.9375rem;
  transition: border-color 0.3s ease, background 0.3s ease;
  outline: none;
}

.contact__form input::placeholder,
.contact__form textarea::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.contact__form input:focus,
.contact__form textarea:focus {
  border-color: var(--color-accent);
  background: rgba(255, 255, 255, 0.1);
}

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

.contact__submit {
  align-self: flex-start;
  padding: 1rem 2.5rem;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 4px;
  border: none;
  transition: background 0.3s ease, transform 0.3s ease;
}

.contact__submit:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
}

/* ============================================
   09. FOOTER
   ============================================ */
.footer {
  background: var(--color-bg-dark);
  color: rgba(255, 255, 255, 0.6);
  padding: 4rem 0 0;
}

.footer__top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer__logo {
  display: inline-flex;
  align-items: center;
  color: #fff; /* inline SVG uses currentColor */
  margin-bottom: 0.75rem;
  line-height: 0;
}
.footer__logo svg {
  height: 72px; /* logotype is ~1.2:1 so ~86px wide */
  width: auto;
  display: block;
}
/* Legacy <img> fallback */
.footer__logo img {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
}

.footer__tagline {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.4);
}

.footer__heading {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.25rem;
}

.footer__nav-col {
  display: flex;
  flex-direction: column;
}

.footer__link {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
  padding: 0.3rem 0;
  transition: color 0.3s ease;
}

.footer__link:hover {
  color: var(--color-accent);
}

.footer__contact-col {
  display: flex;
  flex-direction: column;
}

.footer__contact-item {
  font-size: 0.875rem;
  padding: 0.3rem 0;
}

.footer__bottom {
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.3);
}

.footer__bottom-link {
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.2);
  text-underline-offset: 2px;
  transition: color 0.2s ease-in-out, text-decoration-color 0.2s ease-in-out;
}

.footer__bottom-link:hover {
  color: rgba(255, 255, 255, 0.7);
  text-decoration-color: rgba(255, 255, 255, 0.5);
}

.footer__bottom-sep {
  margin: 0 0.5rem;
  opacity: 0.5;
}

/* ============================================
   P1. PROJECT HERO (split-panel, level.ru style)
   ============================================ */
.project-hero {
  background: var(--color-bg-light);
  padding-top: calc(var(--header-h) + 1.5rem);
  padding-bottom: 1.5rem;
}

.project-hero__container {
  display: flex;
  gap: 1.5rem;
  align-items: stretch;
}

/* — Left: Info Card — */
.project-hero__card {
  width: 380px;
  min-width: 340px;
  flex-shrink: 0;
  background: #fff;
  border-radius: 12px;
  padding: 2rem 0;
  display: flex;
  flex-direction: column;
}

.project-hero__card-head {
  padding: 0 2rem;
  margin-bottom: 1.75rem;
}

.project-hero__title {
  font-family: var(--font-heading);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.project-hero__location {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.project-hero__location svg {
  opacity: 0.5;
  flex-shrink: 0;
}

/* Info rows */
.project-hero__info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 0 2rem;
}

.project-hero__info-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.project-hero__info-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.project-hero__info-label {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.project-hero__info-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-primary);
  text-align: right;
}

.project-hero__info-value--price {
  font-size: 1rem;
  font-weight: 700;
}

/* Card buttons */
.project-hero__card-actions {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding: 0 2rem;
  margin-top: 1.75rem;
}

.project-hero__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.25s ease;
  text-align: center;
}

.project-hero__btn--outline {
  background: transparent;
  color: var(--color-text-primary);
  border: 1.5px solid var(--color-border);
}

.project-hero__btn--outline:hover {
  border-color: var(--color-text-secondary);
}

.project-hero__btn--outline svg {
  opacity: 0.6;
}

/* ----- Animated brochure button (outline only, rotating conic-gradient arc) ----- */
/* Idle: the conic-gradient's `from` angle is animated via @property --brochure-angle,
   so the gradient itself rotates inside a fixed element — no rotating oversized square,
   no compound clipping. The mask recipe (content-box XOR border-box) paints only the
   3px padding band. Because the padding is uniform and the mask inherits border-radius
   on both clips, the inner and outer edges are concentric pill arcs — no crooked cut. */
@property --brochure-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

.project-hero__btn--animated {
  position: relative;
  background: transparent;                   /* interior = card background */
  color: var(--color-text-primary);
  border: none;                              /* ring is painted by .project-hero__btn-animated */
  transition: color 0.3s ease-in-out;
  isolation: isolate;                        /* contain any negative z-index children */
}

.project-hero__btn-animated {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;                    /* match parent 50px pill */
  padding: 3px;                              /* ring thickness — uniform on all sides */
  /* Gradient painted directly on the padding box — same pill footprint as the button. */
  background: conic-gradient(
    from var(--brochure-angle),
    var(--color-border) 0deg,
    var(--color-bg-dark) 45deg,
    var(--color-border) 110deg,
    var(--color-border) 360deg
  );
  /* CSS-tricks "gradient border" recipe: XOR a content-box mask against a
     full-box mask, leaving only the padding band visible. Both clip layers
     inherit the pill border-radius so the inner edge curves properly. */
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: arfil-brochure-angle 3s linear infinite;
}

.project-hero__btn-label {
  position: relative;
  z-index: 1;                                 /* sit above .project-hero__btn-animated */
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Hover: collapse the rotating gradient to a solid stroke and freeze it. */
.project-hero__btn--animated:hover .project-hero__btn-animated {
  background: var(--color-text-secondary);
  animation-play-state: paused;
}

.project-hero__btn--animated svg {
  opacity: 0.6;
}

@keyframes arfil-brochure-angle {
  from { --brochure-angle: 0deg; }
  to   { --brochure-angle: 360deg; }
}

/* Respect user's reduced-motion preference — freeze the ring on a static stroke. */
@media (prefers-reduced-motion: reduce) {
  .project-hero__btn-animated {
    animation: none;
    background: var(--color-border);
  }
}

.project-hero__btn--solid {
  background: var(--color-bg-dark);
  color: #fff;
  border: 1.5px solid var(--color-bg-dark);
}

.project-hero__btn--solid:hover {
  background: #2a2a42;
  border-color: #2a2a42;
}

/* — Right: Image Slider — */
.project-hero__slider {
  flex: 1;
  min-width: 0;
  min-height: 480px;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.project-hero__slider-track {
  display: flex;
  width: 100%;
  flex: 1;
  transition: transform 0.5s var(--ease-out-expo);
  will-change: transform;
}

.project-hero__slider-track.is-dragging {
  transition: none;
}

.project-hero__slide {
  flex: 0 0 100%;
  min-width: 0;
  position: relative;
}

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

.project-hero__slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.45) 0%,
    rgba(0, 0, 0, 0.1) 40%,
    rgba(0, 0, 0, 0) 60%
  );
}

.project-hero__slide-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2.5rem;
}

.project-hero__slide-text {
  margin-bottom: 1.5rem;
}

.project-hero__slide-title {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}

.project-hero__slide-subtitle {
  display: block;
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 0.5rem;
}

.project-hero__slide-actions {
  display: flex;
  gap: 0.75rem;
}

.project-hero__slide-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.25s ease;
}

.project-hero__slide-btn--outline {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
}

.project-hero__slide-btn--outline:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.project-hero__slide-btn--filled {
  background: #fff;
  color: var(--color-text-primary);
  border: 1.5px solid #fff;
}

.project-hero__slide-btn--filled:hover {
  background: rgba(255, 255, 255, 0.9);
}

/* Badge (top-right of slider) */
.project-hero__badge {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 3;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--color-bg-dark);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
  padding: 0.5rem;
}

/* Slider navigation (bottom-right) */
.project-hero__slider-nav {
  position: absolute;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.project-hero__slider-counter {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  padding: 0.5rem 0.875rem;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.project-hero__slider-sep {
  opacity: 0.5;
  margin: 0 0.125rem;
}

.project-hero__slider-total {
  opacity: 0.5;
}

.project-hero__slider-arrows {
  display: flex;
  gap: 0.375rem;
}

.project-hero__slider-arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

.project-hero__slider-arrow:hover {
  background: #fff;
  transform: scale(1.05);
}

/* ============================================
   P2. GALLERY SECTION
   ============================================ */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.gallery__item {
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
  position: relative;
}

.gallery__item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 46, 0);
  transition: background 0.3s ease;
}

.gallery__item:hover::after {
  background: rgba(26, 26, 46, 0.15);
}

.gallery__item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: var(--t-image-zoom);
}

.gallery__item:hover img {
  transform: scale(1.05);
}

.gallery__item--large {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery__item--large img {
  aspect-ratio: auto;
  height: 100%;
}

/* Gallery "more" tile — 6th slot when total > 6 images.
   Shows a 2×2 mini-grid of the next 4 hidden photos under a dimmed overlay
   with "+N more" text. z-index is explicit so the mini-grid sits under
   the overlay, and the parent ::after hover tint is disabled here so it
   doesn't mask the thumbnails. */
.gallery__item--more {
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  aspect-ratio: 4 / 3;
}
.gallery__item--more::after { display: none; }

.gallery__more-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
  position: absolute;
  inset: 0;
  z-index: 1;
}

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

.gallery__more-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(26, 26, 46, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.gallery__item--more:hover .gallery__more-overlay {
  background: rgba(26, 26, 46, 0.35);
}

.gallery__more-text {
  color: #fff;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.5rem 1rem;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.lightbox__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.7);
  background: none;
  border: none;
  cursor: pointer;
  z-index: 2001;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease;
}

.lightbox__close:hover {
  color: #fff;
}

.lightbox__prev,
.lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  cursor: pointer;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, color 0.3s ease;
  z-index: 2001;
}

.lightbox__prev { left: 1.5rem; }
.lightbox__next { right: 1.5rem; }

.lightbox__prev:hover,
.lightbox__next:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.lightbox__image-wrap {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__image {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox__counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
}

/* ============================================
   P3. SPECIFICATIONS SECTION
   ============================================ */
.specs__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.specs__card {
  padding: 1.75rem;
  background: var(--color-bg-white);
  border-radius: 10px;
  border: 1px solid var(--color-border-light);
  transition: var(--t-transform-card);
}

.specs__card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(26, 26, 46, 0.08);
}

.specs__icon {
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.specs__card-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 0.375rem;
}

.specs__card-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-primary);
  line-height: 1.4;
}

/* ============================================
   P4. FLOOR PLANS SECTION
   ============================================ */
.floor-plans__tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.floor-plans__tab {
  padding: 0.625rem 1.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: 4px;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.floor-plans__tab:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.floor-plans__tab.is-active {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.floor-plans__viewer {
  position: relative;
  min-height: 300px;
}

.floor-plans__image {
  display: none;
}

.floor-plans__image.is-active {
  display: block;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.floor-plans__image img {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  border-radius: 10px;
  border: 1px solid var(--color-border-light);
}

/* Compass — position + size + rotation all configurable per project via CMB2.
   v1.6.8: both modes now render at full opacity with a solid disc
   background so the compass is readable on any floor plan. */
.floor-plans__compass {
  position: absolute;
  z-index: 2;
  transform: rotate(var(--compass-rotation, 0deg));
  pointer-events: none;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.18));
}
.floor-plans__compass svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Counter-rotate the cardinal labels (N, S, W) and the E-sun so they always read
   right-side-up from the viewer's perspective, no matter how the outer disc is
   rotated to point true-north. `--compass-rotation` is set inline on the parent
   .floor-plans__compass div and cascades here via CSS-variable inheritance —
   we simply negate it with `calc(-1 * ...)`. `transform-box: fill-box` +
   `transform-origin: center` makes each group rotate around its own bounding-box
   center, which is why we don't need to hardcode pivot coordinates per letter. */
.floor-plans__compass .compass-label {
  transform-box: fill-box;
  transform-origin: center;
  transform: rotate(calc(-1 * var(--compass-rotation, 0deg)));
}
/* Letters additionally scale down — the 286×264 viewBox renders cardinal glyphs
   visually larger than the previous 309×310 viewBox at the same container width,
   so we match the editor-intended proportions. The sun (no `--letter` modifier)
   keeps its full size. */
.floor-plans__compass .compass-label--letter {
  transform: rotate(calc(-1 * var(--compass-rotation, 0deg))) scale(0.78);
}
/* S letter is naturally narrower than N/W in the source paths (25px vs 33/47px
   wide). At the shared 0.78 scale that makes it read as visibly smaller than the
   others. Bump S up so its rendered height matches N/W more closely without
   stretching the actual glyph shape. */
.floor-plans__compass .compass-label--s {
  transform: rotate(calc(-1 * var(--compass-rotation, 0deg))) scale(0.92);
}
/* N is the primary compass indicator (points true-north), so we give it more
   visual weight than S and W: no scale reduction AND a thin gold stroke on top
   of the fill to read as semi-bold. This preserves the glyph shape exactly. */
.floor-plans__compass .compass-label--n {
  transform: rotate(calc(-1 * var(--compass-rotation, 0deg)));
  transform-box: fill-box;
  transform-origin: center;
}

/* Size variants (both solid now — no more faded watermark mode) */
.floor-plans__compass--indicator {
  width: 92px;
}
.floor-plans__compass--background {
  width: clamp(130px, 14vw, 180px);
}

/* Position variants */
.floor-plans__compass--top-right    { top: 1.5rem;   right: 1.5rem; }
.floor-plans__compass--top-left     { top: 1.5rem;   left: 1.5rem; }
.floor-plans__compass--bottom-right { bottom: 1.5rem; right: 1.5rem; }
.floor-plans__compass--bottom-left  { bottom: 1.5rem; left: 1.5rem; }
.floor-plans__compass--center {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(var(--compass-rotation, 0deg));
}

/* ============================================
   P5. LOCATION SECTION
   ============================================ */
.location__content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2.5rem;
  align-items: stretch;
}

.location__highlights {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.location__item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1rem 1.25rem;
  background: var(--color-bg-white);
  border-radius: 10px;
  border: 1px solid var(--color-border-light);
}

.location__item-icon {
  color: var(--color-accent);
  flex-shrink: 0;
}

.location__item-text {
  flex: 1;
  min-width: 0;
}

.location__item-distance {
  display: block;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
}

.location__item-label {
  display: block;
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

/* Transport icon + time sit to the right, aligned vertically with the text column */
.location__item-transport {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
  padding-left: 0.5rem;
  color: var(--color-text-muted);
}

.location__transport-icon {
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.location__item-time {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.location__map {
  border-radius: 10px;
  overflow: hidden;
  min-height: 300px;
  border: 1px solid var(--color-border-light);
}

.location__map iframe {
  display: block;
}

/* ============================================
   P6. UNITS TABLE
   ============================================ */
.units__table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
  border: 1px solid var(--color-border-light);
  /* v1.6.9.1: always-visible custom scrollbar as overflow hint. Works when
     the user has >12 columns and the table needs horizontal scrolling —
     the scrollbar is clearly visible on macOS/iOS where native scrollbars
     default to hidden. Firefox uses `scrollbar-width/color`, Webkit uses
     the ::-webkit-scrollbar family. Scroll-shadow via Lea Verou's trick
     doesn't work here: the table's own <thead>/<tbody> backgrounds paint
     on top of the wrap, hiding any gradient we'd put on the wrap itself. */
  scrollbar-width: thin;
  scrollbar-color: rgba(26, 26, 46, 0.35) rgba(26, 26, 46, 0.06);
}
.units__table-wrap::-webkit-scrollbar { height: 10px; }
.units__table-wrap::-webkit-scrollbar-track {
  background: rgba(26, 26, 46, 0.06);
  border-radius: 0 0 10px 10px;
}
.units__table-wrap::-webkit-scrollbar-thumb {
  background: rgba(26, 26, 46, 0.35);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.units__table-wrap::-webkit-scrollbar-thumb:hover { background-color: rgba(26, 26, 46, 0.6); background-clip: padding-box; }

.units__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.units__table thead {
  background: var(--color-bg-dark);
  color: #fff;
}

.units__table th {
  padding: 0.625rem 0.5rem;
  text-align: center;               /* v1.6.11: centered headers + values */
  font-weight: 600;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: normal;              /* v1.6.9.1: wrap header text so 10+ columns fit viewport */
  vertical-align: bottom;
  line-height: 1.3;
  word-break: normal;
  overflow-wrap: break-word;
}

.units__table td {
  padding: 0.625rem 0.5rem;
  border-bottom: 1px solid var(--color-border-light);
  white-space: nowrap;              /* keep value+suffix on one line (e.g. "128 m²") */
  vertical-align: middle;
  font-size: 0.875rem;
  text-align: center;               /* v1.6.11 */
}

/* Narrow fixed width for the auto-№ column so it doesn't eat horizontal space at 15+ cols */
.units__table .units__th-num,
.units__table .units__td-num {
  width: 2.5rem;
  min-width: 2.5rem;
  text-align: center;
  color: var(--color-text-muted);
}

.units__table tbody tr {
  background: var(--color-bg-white);
}

.units__table tbody tr:nth-child(even) {
  background: var(--color-bg-light);
}

.units__table tbody tr:last-child td {
  border-bottom: none;
}

.units__table tbody tr:hover {
  background: rgba(201, 169, 110, 0.06);
}

/* ---- Hero slide overlay caption (per-image text, level.ru style) ---- */
.project-hero__slide-caption {
  position: absolute;
  z-index: 3;
  max-width: min(520px, 80%);
  padding: 1.25rem 1.5rem;
  color: #fff;
  background: linear-gradient(135deg, rgba(0,0,0,0.55), rgba(0,0,0,0.25));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 8px;
  pointer-events: none;
}
.project-hero__slide-heading {
  font-size: clamp(1.25rem, 2.2vw, 1.875rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}
.project-hero__slide-text {
  font-size: 0.9375rem;
  line-height: 1.5;
  margin: 0;
  opacity: 0.92;
}
.project-hero__slide-caption--bottom-left  { left: 1.5rem;  bottom: 1.5rem; }
.project-hero__slide-caption--bottom-right { right: 1.5rem; bottom: 1.5rem; }
.project-hero__slide-caption--top-left     { left: 1.5rem;  top: 1.5rem; }
.project-hero__slide-caption--top-right    { right: 1.5rem; top: 1.5rem; }
.project-hero__slide-caption--center {
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
@media (max-width: 767px) {
  .project-hero__slide-caption {
    padding: 0.875rem 1rem;
    max-width: calc(100% - 2rem);
  }
  .project-hero__slide-caption--bottom-left,
  .project-hero__slide-caption--bottom-right { left: 1rem; right: 1rem; bottom: 1rem; }
  .project-hero__slide-caption--top-left,
  .project-hero__slide-caption--top-right    { left: 1rem; right: 1rem; top: 1rem; }
}

.units__row--sold {
  background: rgba(0, 0, 0, 0.04) !important;
}

.units__table tbody tr.units__row--sold:nth-child(even) {
  background: rgba(0, 0, 0, 0.07) !important;
}

.units__row--sold td {
  color: var(--color-text-muted);
}

.units__status {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 100px;
}

.units__status--available {
  background: rgba(74, 140, 111, 0.12);
  color: var(--color-status-done);
}

.units__status--reserved {
  background: rgba(201, 169, 110, 0.18);
  color: var(--color-accent);
}

.units__status--sold {
  background: rgba(26, 26, 46, 0.08);
  color: var(--color-text-muted);
}

/* ============================================
   P7. CONSTRUCTION TIMELINE
   ============================================ */

/* Date pill strip */
.timeline__dates {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.25rem;
  margin-bottom: 1.25rem;
}
.timeline__dates::-webkit-scrollbar { display: none; }

.timeline__date {
  flex-shrink: 0;
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-white);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}
.timeline__date:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.timeline__date.is-active {
  background: var(--color-bg-dark);
  border-color: var(--color-bg-dark);
  color: #fff;
}

/* Progress bar */
.timeline__progress {
  height: 2px;
  background: var(--color-border-light);
  border-radius: 2px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.timeline__progress-bar {
  height: 100%;
  background: var(--color-accent);
  border-radius: 2px;
  transition: width 0.5s var(--ease-out-expo);
}

/* Viewer: arrows + photo area */
.timeline__viewer {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
}

.timeline__arrow {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-bg-white);
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}
.timeline__arrow:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.timeline__arrow:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

/* Photo track — horizontal flex strip */
.timeline__photo-wrap {
  flex: 1;
  overflow: hidden;
  border-radius: 10px;
}
.timeline__photo-track {
  display: flex;
  width: 100%; /* needed so child flex-basis: 100% resolves correctly, and translateX(%) works per-slide */
  transition: transform 0.5s var(--ease-out-expo);
  will-change: transform;
}
.timeline__photo-track.is-dragging {
  transition: none;
}
.timeline__slide {
  flex: 0 0 100%;
  min-width: 0;
  position: relative;
}
.timeline__slide img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

/* Glass caption badge */
.timeline__slide-caption {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Photo counter */
.timeline__photo-counter {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
}

/* News "All" link */
.news__all-link {
  text-align: center;
  margin-top: 2.5rem;
}

.news__view-all {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-accent);
  letter-spacing: 0.03em;
  transition: gap 0.3s ease;
}

.news__view-all:hover {
  gap: 0.75rem;
}

/* ============================================
   10. ANIMATIONS & SCROLL REVEAL
   ============================================ */
[data-animate] {
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-animate="fade-up"] {
  transform: translateY(40px);
}

[data-animate="fade-left"] {
  transform: translateX(-40px);
}

[data-animate="fade-right"] {
  transform: translateX(40px);
}

[data-animate].is-visible {
  opacity: 1;
  transform: none;
}

/* Milestone scroll animation */
.progress__milestone {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.progress__milestone.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* ============================================
   11. MEDIA QUERIES — TABLET (max-width: 1279px)
   ============================================ */
@media (max-width: 1279px) {
  .projects__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about__inner {
    gap: 3rem;
  }

  .about__columns {
    height: 450px;
  }

  .progress__projects {
    gap: 3rem;
  }

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

  .footer__top {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  /* Project hero tablet — narrower card, keep side-by-side */
  .project-hero__card {
    width: 320px;
    min-width: 280px;
  }

  .project-hero__slider {
    min-height: 400px;
  }

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

  .gallery__item--large {
    grid-column: span 2;
    grid-row: span 1;
  }

  .gallery__item--large img {
    aspect-ratio: 16 / 9;
  }

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

  .location__content {
    grid-template-columns: 1fr 1.5fr;
  }

  /* Timeline: no changes needed at tablet — single-slide view works */
}

/* ============================================
   11b. LANGUAGE SWITCHER (desktop)
   ============================================ */
.header__lang {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 1rem;
}

.header__lang-btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 3px;
  background: none;
  color: var(--color-text-muted);
  transition: color 0.3s ease, background 0.3s ease;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.header__lang-btn:hover {
  color: var(--color-text-primary);
}

.header__lang-btn.is-active {
  color: var(--color-accent);
  background: rgba(201, 169, 110, 0.1);
}

.header[data-state="top"] .header__lang-btn {
  color: rgba(255, 255, 255, 0.5);
}

.header[data-state="top"] .header__lang-btn:hover {
  color: rgba(255, 255, 255, 0.85);
}

.header[data-state="top"] .header__lang-btn.is-active {
  color: var(--color-accent);
  background: rgba(201, 169, 110, 0.15);
}

/* ============================================
   11c. BOTTOM NAV + OVERLAYS (hidden on desktop)
   ============================================ */
.bottom-nav,
.contact-overlay,
.mobile-menu-overlay {
  display: none;
}

/* Card swipe track (desktop — no swipe, single image) */
.project-card__swipe-track {
  display: contents;
}

.project-card__slide--image {
  display: contents;
}

.project-card__slide--map {
  display: none;
}

.project-card__dots {
  display: none;
}

/* Hero slider dots (hidden on desktop) */
.project-hero__slider-dots {
  display: none;
}

/* ============================================
   12. MEDIA QUERIES — MOBILE (max-width: 767px)
   ============================================ */
@media (max-width: 767px) {
  :root {
    --header-h: 4rem;
  }

  /* Header — hidden on mobile, replaced by bottom nav */
  .header {
    display: none;
  }

  .header__lang {
    display: none;
  }

  /* Hero — main layout overrides are in the bottom-nav section below */

  /* Projects — vertical stack */
  .projects__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .project-card__image {
    aspect-ratio: 16 / 10;
  }

  /* About */
  .about__inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .about__columns {
    height: 350px;
  }

  .about__scroll-track img {
    height: 200px;
  }


  .about__stats {
    gap: 2rem;
  }

  /* Progress — flex layout already wraps via flex-basis + min-width */
  .progress__projects {
    gap: 3rem;
  }
  .progress__project {
    flex-basis: 100%;
  }

  .progress__milestone-image {
    max-width: 100%;
  }

  /* News */
  .news__grid {
    grid-template-columns: 1fr;
  }

  /* Contact */
  .contact__inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .contact__submit {
    width: 100%;
    text-align: center;
  }

  /* Footer */
  .footer__top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Project hero mobile — stack vertically */
  .project-hero {
    padding-top: calc(var(--header-h) + 1rem);
    padding-bottom: 1rem;
  }

  .project-hero__container {
    flex-direction: column;
  }

  .project-hero__card {
    width: 100%;
    min-width: 0;
  }

  .project-hero__slider {
    min-height: 280px;
  }

  .project-hero__slide-title {
    font-size: 1.75rem;
  }

  .project-hero__slide-content {
    padding: 1.5rem;
  }

  .project-hero__badge {
    width: 56px;
    height: 56px;
    font-size: 0.5rem;
    top: 0.75rem;
    right: 0.75rem;
  }

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

  .gallery__item--large {
    grid-column: span 1;
    grid-row: span 1;
  }

  .gallery__item--large img {
    aspect-ratio: 16 / 10;
  }

  .lightbox__prev { left: 0.75rem; }
  .lightbox__next { right: 0.75rem; }

  .specs__grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

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

  .location__map {
    height: 300px;
  }

  /* Units table — card layout on mobile */
  .units__table thead {
    display: none;
  }

  .units__table,
  .units__table tbody,
  .units__table tr,
  .units__table td {
    display: block;
  }

  .units__table tr {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border-light);
  }

  .units__table td {
    padding: 0.25rem 0;
    border-bottom: none;
    white-space: normal;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .units__table td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
    flex-shrink: 0;
    margin-right: 1rem;
  }

  /* Timeline: hide arrows on mobile, use 4:3 aspect ratio */
  .timeline__arrow {
    display: none;
  }
  .timeline__slide img {
    aspect-ratio: 4 / 3;
  }

  /* Hero — no header offset on mobile */
  .hero {
    min-height: 100svh;
  }

  .project-hero {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  /* Body padding for bottom nav + safe area background color */
  body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0));
  }

  /* Fill safe area below bottom nav — solid white to match the
     near-opaque bottom nav. Fixes color mismatch on iOS Safari where
     the home-indicator strip showed the beige page bg through the
     semi-transparent rgba value. */
  body::after {
    content: '';
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: env(safe-area-inset-bottom, 0);
    background: #ffffff;
    z-index: 999;
  }

  /* Hero accounts for bottom nav — center title, scroll indicator below it midway to bottom */
  .hero {
    height: calc(100dvh - 64px - env(safe-area-inset-bottom, 0));
    min-height: 500px;
    align-items: center;
    justify-content: center;
  }

  .hero__content {
    padding-bottom: 0;
    text-align: center;
    width: 100%;
  }
  .hero__title--logo { justify-content: center; }
  .hero__title--logo svg { height: clamp(120px, 28vh, 200px); }

  .hero__scroll-indicator {
    bottom: 18%;
    /* inherits left:0; right:0 from base rule — no transform needed */
  }

  /* ---- Bottom Nav ---- */
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: calc(64px + env(safe-area-inset-bottom, 0));
    /* Fully opaque white — fixes iOS Safari safe area beige bleed-through.
       Semi-transparent + backdrop-filter: blur looked nice but let the beige
       body background (#f5f4f0) peek through the 3% transparency in the safe
       area, where there's no scrollable content behind to justify frosted glass. */
    background: #ffffff;
    border-top: 1px solid var(--color-border-light);
    align-items: flex-start;
    justify-content: space-around;
    padding-top: 0;
    padding-bottom: env(safe-area-inset-bottom, 0);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
  }

  .bottom-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 10px 0 6px;
    background: none;
    border: none;
    color: var(--color-text-muted);
    text-decoration: none;
    font-family: inherit;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
    border-radius: 8px;
    margin: 4px 2px;
    position: relative;
  }

  .bottom-nav__item.is-active {
    background: rgba(0, 0, 0, 0.06);
    color: var(--color-text-primary);
  }

  .bottom-nav__item--spacer {
    pointer-events: none;
    visibility: hidden;
  }

  .bottom-nav__icon {
    width: 22px;
    height: 22px;
  }

  .bottom-nav__icon--close {
    display: none;
  }

  .bottom-nav__label {
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
  }

  /* Center contact button — protruding green circle */
  .bottom-nav__item--contact {
    position: relative;
  }

  .bottom-nav__contact-circle {
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--color-status-done);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(74, 140, 111, 0.35);
    transition: transform 0.2s ease;
  }

  .bottom-nav__item--contact .bottom-nav__label {
    margin-top: 28px;
  }

  .bottom-nav__item--contact:active .bottom-nav__contact-circle {
    transform: translateX(-50%) scale(0.95);
  }

  /* Menu button icon swap */
  .bottom-nav__item[data-tab="menu"].is-open .bottom-nav__icon--menu {
    display: none;
  }

  .bottom-nav__item[data-tab="menu"].is-open .bottom-nav__icon--close {
    display: block;
  }

  /* ---- Contact Overlay ---- */
  .contact-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: calc(64px + env(safe-area-inset-bottom, 0));
    z-index: 999;
    background: var(--color-bg-dark);
    transform: translateY(100%);
    transition: transform 0.4s var(--ease-out-expo);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .contact-overlay.is-open {
    transform: translateY(0);
  }

  .contact-overlay__close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease;
  }

  .contact-overlay__close:hover {
    color: #fff;
  }

  .contact-overlay__inner {
    padding: 3rem 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .contact-overlay__title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
  }

  .contact-overlay__details {
    display: flex;
    flex-direction: column;
  }

  .contact-overlay__link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.0625rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-decoration: none;
    transition: color 0.3s ease;
  }

  .contact-overlay__link:hover {
    color: #fff;
  }

  .contact-overlay__form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
  }

  .contact-overlay__form input,
  .contact-overlay__form textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: #fff;
    font-family: inherit;
    font-size: 0.9375rem;
    outline: none;
    transition: border-color 0.3s ease;
  }

  .contact-overlay__form input:focus,
  .contact-overlay__form textarea:focus {
    border-color: var(--color-accent);
  }

  .contact-overlay__form input::placeholder,
  .contact-overlay__form textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
  }

  .contact-overlay__submit {
    width: 100%;
    padding: 1rem;
    background: var(--color-accent);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.3s ease;
  }

  .contact-overlay__submit:hover {
    background: var(--color-accent-hover);
  }

  /* ---- Mobile Menu Overlay ---- */
  .mobile-menu-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: calc(64px + env(safe-area-inset-bottom, 0));
    z-index: 998;
    background: var(--color-bg-dark);
    transform: translateY(100%);
    transition: transform 0.4s var(--ease-out-expo);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-menu-overlay.is-open {
    transform: translateY(0);
  }

  .mobile-menu-overlay__inner {
    padding: 3rem 1.5rem 2rem;
  }

  .mobile-menu-overlay__nav {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 2.5rem;
  }

  .mobile-menu-overlay__link {
    font-size: 1.75rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-decoration: none;
    transition: color 0.3s ease;
  }

  .mobile-menu-overlay__link:hover {
    color: var(--color-accent);
  }

  .mobile-menu-overlay__lang {
    margin-bottom: 2rem;
  }

  .lang-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 0.75rem;
  }

  .lang-switcher {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .lang-switcher__btn {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s ease;
  }

  .lang-switcher__btn:hover {
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
  }

  .lang-switcher__btn.is-active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
  }

  .mobile-menu-overlay__contact {
    margin-top: 2rem;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.875rem;
    line-height: 1.8;
  }

  /* ---- Project Card Swipe (mobile) ---- */
  .project-card__swipe-track {
    display: flex;
    width: 200%;
    transition: transform 0.4s var(--ease-out-expo);
  }

  .project-card__swipe-track.is-dragging {
    transition: none;
  }

  .project-card__slide {
    flex: 0 0 50%;
    min-width: 0;
    overflow: hidden;
  }

  .project-card__slide--image {
    display: block;
  }

  .project-card__slide--map {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-light);
    overflow: hidden;
  }

  /* Map iframe: oversized + offset to push Google's UI controls
     (zoom buttons, fullscreen, logo, "view larger map") outside the
     visible clip area. pointer-events:none makes it fully static. */
  .project-card__slide--map iframe {
    position: absolute;
    top: -50px;
    left: -50px;
    width: calc(100% + 100px);
    height: calc(100% + 100px);
    border: 0;
    pointer-events: none;
  }

  .project-card__map-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-muted);
    font-size: 0.8125rem;
  }

  /* Dot indicators */
  .project-card__dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    position: absolute;
    bottom: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
  }

  .project-card__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
  }

  .project-card__dot.is-active {
    width: 8px;
    height: 8px;
    background: #fff;
  }

  /* ---- Hero Slider Dots (mobile) ---- */
  .project-hero__slider-counter {
    display: none;
  }

  .project-hero__slider-dots {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.5rem 0.875rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.3);
  }

  .project-hero__slider-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
  }

  .project-hero__slider-dot.is-active {
    width: 8px;
    height: 8px;
    background: #fff;
  }
}

/* ============================================
   13. MEDIA QUERIES — SMALL (max-width: 479px)
   ============================================ */
@media (max-width: 479px) {
  .hero__title {
    font-size: 3rem;
  }
  .hero__title--logo svg { height: clamp(100px, 24vh, 160px); }

  .about__stats {
    flex-direction: column;
    gap: 1.25rem;
  }

  .about__stat {
    flex-direction: row;
    align-items: baseline;
    gap: 0.75rem;
  }

  .about__stat-number {
    font-size: 2rem;
  }

  .project-card__badges {
    flex-direction: column;
    align-items: flex-end;
  }

  /* Project page small */
  .specs__grid {
    grid-template-columns: 1fr;
  }

}
