/* ─── FONTI ──────────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Founders Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('FoundersGrotesk-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'PPMuseum';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('PPMuseum-Light.woff2') format('woff2');
}

/* ─── DIZAINA TOKENI (no Figma Frame 2120) ──────────────────────────────────
   PP Museum Light — virsraksti; Founders Grotesk — teksts.
   Siltā palete: brūns hero teksts, smilšu virsraksti, silti balts pamatteksts. */
   :root {
    --font-display: 'PPMuseum', Georgia, serif;
    --font-body: 'Founders Grotesk', Helvetica, sans-serif;

    --color-bg: #0c0a09;          /* tumšs silts fons */
    --color-text: #efe7df;        /* pamatteksts */
    --color-heading: #d0bda6;     /* sekciju virsraksti */
    --color-hero: #6e543f;        /* hero teksts / virsraksti uz gaiša */
    --color-line: rgba(208, 189, 166, .22);

    /* Gaišā (krēmkrāsas) sekcija — lokācija */
    --color-cream: #efe7df;
    --color-stroke: #8F6B45;
    --color-dark-brown: #6E543F;
  }

/* ─── BĀZE ───────────────────────────────────────────────────────────────── */

* {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  vertical-align: middle;
  display: inline-block;
}

.grecaptcha-badge {
  visibility: hidden;
}

/* ─── NAV ────────────────────────────────────────────────────────────────── */

.nav {
  z-index: 5;
  position: absolute;
  inset: 0% 0% auto;
}

.nav_top-wrapper {
  width: 100%;
  padding: 1.25rem 4vw 2.5rem;
  position: relative;
}

.nav--static .nav_top-wrapper {
  padding: 3.25rem 4vw 2.5rem;
}

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

/* Logo centrēts neatkarīgi no malu blokiem */
.nav_logo {
  position: absolute;
  left: 50%;
  top: 60%;
  transform: translate(-50%, -50%);
}

.nav_logo img {
  height: 1.75rem;
  width: auto;
}

.nav_left,
.nav_right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav_langs {
  position: relative;
  display: flex;
  align-items: center;
}

/* Desktopā valodas rindā (LV EN RU); dropdown trigeris paslēpts */
.nav_lang-list {
  display: flex;
  gap: .75rem;
}

.nav_lang-toggle {
  display: none;
}

.nav_lang-arrow {
  display: block;
  width: .5rem;
  height: auto;
  margin-top: -3px;
}

/* Register pogas ikonas (telefons/bultiņa) + FAB darbības — tikai mobilajā */
.nav_button-icons,
.nav_action {
  display: none;
}

.nav_lang {
  color: var(--color-hero);
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: .5;
  transition: opacity .25s ease;
}

.nav_lang:hover,
.nav_lang.is-active {
  opacity: 1;
}

.nav_link {
  color: var(--color-text);
  font-size: .9rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: .8;
  transition: opacity .25s ease;
}

.nav_link:hover {
  opacity: 1;
}

/* "Reģistrēt interesi" poga */
.nav_button {
  color: var(--color-hero);
  border: 2px solid var(--color-stroke);
  background-color: transparent;
  cursor: pointer;
  outline: 0;
  border-radius: 2rem;
  /* padding: 1.25rem 1.75rem; */
  padding: 1.45rem 1.75rem 1.10rem;
  font-size: .8125rem;
  letter-spacing: .11em;
  text-transform: uppercase;
  font-family: var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  transition: all .25s ease, color .25s ease;
}

.nav_button:hover {
  /* background-color: var(--color-heading); */
  /* color: var(--color-bg); */
  border-color: var(--color-hero);
}

.nav_top-line {
  width: calc(100% - 2rem);
  height: 1px;
  background-color: var(--color-line);
  position: absolute;
  inset: auto 0% -0.5rem 50%;
  transform: translate(-50%);
}

/* ─── HERO ───────────────────────────────────────────────────────────────── */

.sticky {
  position: sticky;
}

.hero_section.sticky {
  background-color: var(--color-bg);
  top: 0;
}

.hero_container {
  height: 100dvh;
  position: relative;
  overflow: hidden; /* intro nosēšanās mērogs (1.06 → 1) nedrīkst pārkāpt malas */
}

.hero_image-wrapper {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}

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

/* Hero teksts — centrēts augšējā trešdaļā, kā Figma */
.hero_content {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  /* Mazāks uz maziem ekrāniem, lielāks uz lieliem (vw-mērogs ar robežām).
     ~480px:4.5rem · ~1280px:12rem · ≥1707px:16rem (desktop sajūta saglabāta). */
     padding-top: clamp(4.5rem, 20vh, 19rem);
     padding-left: 4vw;
     padding-right: 4vw;
   }

   .hero_headline {
    max-width: 32rem;
    margin: 0;
    color: var(--color-hero);
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(1.5rem, 2.2vw, 1.875rem);
    line-height: 1.2;
    text-align: center;
    /* Slīdošais zelta gradients (no baurum.lv hero teksta) */
    background-image: linear-gradient(1deg, #6e543f -5%, #9c7a45 52%, #54402c 86%, #6e543f 110%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientAnimation 6s infinite alternate;
  }

  @keyframes gradientAnimation {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }

  @media (prefers-reduced-motion: reduce) {
    .hero_headline { animation: none; }
  }

  .hero_scroll-hint {
    position: absolute;
    left: 4vw;
    bottom: 3vw;
    font-size: .8rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: .7;
  }

/* ─── WORK / SEKCIJAS ───────────────────────────────────────────────────── */

.work_section {
  position: relative;
}

/* Ghost bloki — tos pievieno app.js; tie dod scroll garumu fiksētajām sekcijām */
.ghost_work-item {
  width: 100%;
  height: 300dvh;
}

/* Pēdējais īsāks — lai pēc pēdējās sekcijas footeris atnāk bez tukša skrolla */
.ghost_work-item--last {
  height: 200dvh;
}

.work_item {
  background-color: var(--color-bg);
  align-items: stretch;
  width: 100%;
  height: 100dvh;
  display: flex;
  position: relative;
  overflow: hidden;
}

.work_image-wrapper {
  width: 100%;
  height: 100%;
  position: absolute;
}

.work_image {
  object-fit: cover;
  width: 100%;
  height: 100%;
  position: relative;
}

/* Malu gradienti (kā Figma) — apakšā stiprāks (tur teksts), augšā vieglāks.
   Vienmērīgo aptumšošanu pa VISU bildi dod brightness filtrs JS-ā, sinhroni ar
   blur (skat. app.js bgImage tween) — tāpēc kā statisks slānis šeit tās NAV. */
   .work_image-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
    linear-gradient(to bottom, rgba(12, 10, 9, .60) 0%, rgba(12, 10, 9, 0) 32%),
    linear-gradient(to top,    rgba(12, 10, 9, .92) 0%, rgba(12, 10, 9, 0) 44%);
  }

  .work_item-wrapper {
    flex-flow: column;
    justify-content: space-between;
    width: 100%;
    padding: clamp(2.5rem, calc(18vh - 4rem), 13rem) 4vw 7rem;
    display: flex;
    position: relative;
  }

/* Mediju flīzes — portreta proporcija, novietotas pa labi (Figma) */
.work_media-wrapper {
  z-index: 1;
  grid-column-gap: 1.5vw;
  grid-row-gap: 1.5vw;
  justify-content: flex-end;
  align-items: flex-start;
  display: flex;
  position: relative;
}

.work_media-container {
  aspect-ratio: 279 / 398;
  flex: 0 1 19rem;
  flex-basis: clamp(19rem, calc(13rem + 6.5vw), 24rem);
  border-radius: .25rem;
  overflow: hidden;
}

.work_media {
  object-fit: cover;
  width: 100%;
  height: 100%;
  display: block;
}

/* Virsraksts pa kreisi, teksts pa labi (Figma izkārtojums) */
.work_text {
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
  grid-column-gap: 3vw;
  display: flex;
  position: relative;
}

.work_text-title {
  color: var(--color-heading);
  text-transform: uppercase;
  flex-flow: column;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6.5vw, 6.25rem);
  font-weight: 300;
  line-height: 1;
  display: flex;
  position: relative;
}

.work_text-subtitle {
  max-width: 26rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-text);
}

.line {
  will-change: transform;
}

.work_text-title .line {
  line-height: 1;
}

.line-wrapper {
  overflow: hidden;
}

.work_item-overlay {
  z-index: 2;
  pointer-events: none;
  background-color: var(--color-bg);
  display: none;
  position: absolute;
  inset: 0%;
}

/* ─── LOKĀCIJA (3. sekcija — gaišā krēmkrāsā, karte pa labi) ────────────── */

.work_item--location {
  background-color: var(--color-cream);
}

.work_item--location .work_text-title {
  color: var(--color-heading);
  /* Garākā rinda "& AMENITIES" (EN) / "& ĒRTĪBAS" (LV) ietilpst location_text
     platumā (32rem) 1 rindā arī uz lieliem ekrāniem → max samazināts (base 6.25rem). */
  font-size: clamp(2.5rem, 6.5vw, 5rem);
}

/* Virsraksta otrā rinda nelūzt starp "&" un vārdu — "& AMENITIES" paliek vienā rindā */
.work_item--location .work_text-title .line {
  white-space: nowrap;
}

/* Krievu "Расположение" ir garš viens vārds (~8.9em) — pie pilna titula izmēra tas
   pārsniedz location_text (32rem) un .line-wrapper overflow:hidden to nogriež.
   Tāpēc ru lokācijas titulam mazāks izmērs, lai ietilpst jebkurā platumā
   (LV/EN vārdi īsi — tos neaiztiekam). */
   html[lang="ru"] .work_item--location .work_text-title {
    font-size: clamp(1.6rem, 4vw, 3.25rem);
  }

/* location_text saraujas tieši līdz teksta platumam, tāpēc pēdējā burta glifa
   labās malas pārkare (~1px) iziet ārpus .line-wrapper un overflow:hidden to
   nogriež — mazs labās puses buferis to novērš (vertikālo reveal neietekmē). */
   html[lang="ru"] .work_item--location .work_text-title .line-wrapper {
    padding-right: 0.12em;
  }

  .work_item--location .work_text-subtitle {
    color: var(--color-dark-brown);
    opacity: .9;
  }

/* Gaišai sekcijai arī noslēguma pārklājs ir gaišs */
.work_item--location .work_item-overlay {
  background-color: var(--color-cream);
}

.work_item--location .work_item-wrapper {
  justify-content: center;
  padding-top: clamp(3rem, 12vh, 8rem);
}

.location_layout {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  grid-column-gap: 4vw;
  width: 100%;
}

.location_text {
  display: flex;
  flex-flow: column;
  grid-row-gap: 2.5rem;
  max-width: 32rem;
}

.location_body {
  max-width: 28rem;
}

/* Lokācijas ērtības — ikona + teksts, smalka atdaloša līnija zem katras */
.location_amenities {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-flow: column;
  max-width: 28rem;
}

.amenity {
  display: flex;
  align-items: center;
  grid-column-gap: 1.5rem;
  padding: 1.05rem 0;
  position: relative;          /* amenity_line atskaitei */
}

.amenity_icon {
  width: 2.1rem;
  height: 2.1rem;
  flex-shrink: 0;
  display: block;
}
.amenity_icon svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;           /* DrawSVG stroke ārpus viewBox nenogriežas */
}

.amenity_label {
  display: inline-block;
  overflow: hidden;            /* maska teksta slīdei no apakšas */
  color: var(--color-dark-brown);
  font-family: var(--font-body);
  font-size: 1rem;
  margin-bottom: -0.4rem;
}
.amenity_label-inner {
  display: inline-block;
  will-change: transform;
}

/* Atdaloša līnija (animējama — izaug no kreisās ar scaleX).
   Sākuma scaleX:0 uzliek JS (ne CSS) — tā bez JS / reduceMotion līnija paliek redzama. */
   .amenity_line {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background-color: rgba(110, 84, 63, .15);
    transform-origin: left center;
  }

  .location_map {
    flex: 0 1 46vw;
    display: flex;
    justify-content: flex-end;
  }

/* Inline SVG (injicē app.js) un noscript fallback img */
.location_map svg,
.location_map-svg {
  width: 100%;
  max-height: 78dvh;
  height: auto;
}

/* ─── THE VISION (flīžu bloks zem hero — flīzēs teksts, ne attēls) ───────── */

/* Flīze = tas pats rāmis/izmērs un animācija kā mediju flīzēm (work_media-container),
   bet caurspīdīga ar smalku apmali; saturs: skaitlis augšā, paskaidrojums apakšā. */
   .work_tile {
    display: flex;
    flex-flow: column;
    justify-content: space-between;
    padding: clamp(1.25rem, 1.6vw, 1.75rem);
    border: 1px solid rgba(208, 189, 166, .32);
    border-radius: 0;          /* asi stūri — override mantoto .work_media-container radius */
    background-color: transparent;  /* pilnīgi caurspīdīgs — fons redzams cauri */
  }

  .work_tile-num {
    color: var(--color-text);
    font-family: var(--font-display);
    font-weight: 300;
    line-height: 1;
    font-size: clamp(3.25rem, 6.5vw, 5.5rem);
    letter-spacing: -.01em;
  }

/* "M" — mazāks par skaitli, sēž uz skaitļa baseline (nolīdzināts ar 18 apakšu) */
.work_tile-unit {
  font-size: .36em;
  vertical-align: baseline;
  margin-left: .1em;
  text-transform: uppercase;
}

/* "2" — augšindekss virs M (m²) */
.work_tile-unit sup {
  font-size: .62em;
  vertical-align: super;
}

.work_tile-label {
  color: var(--color-text);
  text-transform: uppercase;
  font-size: .8rem;
  letter-spacing: .1em;
  line-height: 1.4;
  opacity: .82;
}

/* ─── KONTAKTU BLOKS / FOOTER ───────────────────────────────────────────── */

.footer_section {
  z-index: 1;
  background-color: var(--color-hero);
  position: relative;
}

.footer_container {
  position: relative;
}

.footer_content {
  flex-flow: column;
  justify-content: space-between;
  min-height: 60dvh;
  padding: 6rem 4vw 4rem;
  display: flex;
  position: relative;
}

.footer_main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer_contacts {
  display: flex;
  flex-flow: column;
  grid-row-gap: .5rem;
}

.footer_contacts .line-wrapper {
  width: fit-content;
}

.footer_contact-line {
  display: block;
  color: var(--color-heading);
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2rem, 4.5vw, 4.25rem);
  line-height: 1.1;
  text-decoration: none;
  transition: opacity .25s ease;
}

.footer_contact-line:hover {
  opacity: .7;
}

/* Soc tīklu ikonas — apļveida kontūra zem kontaktiem (kreisā puse) */
.footer_social {
  display: flex;
  gap: .6rem;
  margin-top: 2.75rem;
}

.footer_social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid color-mix(in srgb, var(--color-heading) 32%, transparent);
  border-radius: 50%;
  color: var(--color-heading);
  transition: background-color .25s ease, border-color .25s ease, color .25s ease;
}

.footer_social-link svg {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
}

.footer_social-link:hover {
  background-color: var(--color-heading);
  border-color: var(--color-heading);
  color: var(--color-hero);
}

.footer_cta {
  border: none;
  cursor: pointer;
  background-color: var(--color-text);
  /* color: var(--color-text); */
  font-family: var(--font-body);
  /* Founders Grotesk lielie burti seede augstu — optiski centrejam:
     line-height:1 + augsa nedaudz vairak padding neka apaksa. */
     line-height: 1;
     padding: 1.35rem 1.75rem 1.15rem;
   }

   /* CTA poga + paskaidrojošs tekstiņš zem tās — kolonna, līdzināta pa labi */
   .footer_cta-wrap {
    display: flex;
    flex-flow: column;
    align-items: flex-end;
    gap: 1.1rem;
  }

  .footer_note {
    max-width: 22rem;
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: .9375rem;
    line-height: 1.5;
    text-align: right;
    letter-spacing: 0.02em;
  }

  .footer_meta {
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
    margin-top: 4rem;
    margin-bottom: 0.5rem;
    color: var(--color-heading);
    font-size: .75rem;
    letter-spacing: .04em;
    /* text-transform: uppercase; */
    /* opacity: .7; */
    display: flex;
  }

  .footer_developed {
    display: flex;
    flex-flow: column;
    grid-row-gap: .6rem;
  }

  .footer_baurum img {
    height: 1.1rem;
    width: auto;
    opacity: .9;
  }

/* ─── POPUP — Reģistrē interesi ─────────────────────────────────────────── */

.popup {
  position: fixed;
  inset: 0;
  z-index: 50;
  visibility: hidden;
}

.popup.is-open {
  visibility: visible;
}

.popup_backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(12, 10, 9, .6);
  opacity: 0;
}

.popup_panel {
  position: absolute;
  inset: 0;
  display: flex;
  background-color: var(--color-cream);
  /* Atklāšanu ar clip-path vada JS — tas pats efekts kā sekcijām */
  clip-path: inset(100% 0 0 0);
}

.popup_image {
  flex: 1 1 50%;
  overflow: hidden;
}

.popup_image-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .85;
}

.popup_form-side {
  flex: 1 1 50%;
  position: relative;
  display: flex;
  align-items: center;
  overflow-y: auto;
}

.popup_close {
  position: absolute;
  top: 1.6rem;
  right: 1.6rem;
  width: 2.65rem;
  height: 2.65rem;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 2;
}

.popup_close span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2.4rem;
  height: 1px;
  background-color: var(--color-hero);
  transition: opacity .25s ease;
}

.popup_close span:first-child { transform: translate(-50%, -50%) rotate(45deg); }
.popup_close span:last-child  { transform: translate(-50%, -50%) rotate(-45deg); }

.popup_close:hover span {
  opacity: .6;
}

.popup_content {
  width: 100%;
  max-width: 33rem; /* 528px — ka Figma (720px puse, 96px atstatums) */
  margin: auto;          /* centrē, kad ietilpst; ļauj noskrollēt augšu, kad nē */
  padding: 2rem 0;
}

.popup_title {
  margin: 0 0 1.5rem;
  color: var(--color-hero);
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.5rem, 4.5vw, 4.375rem);
  line-height: 1.05;
  text-transform: uppercase;
}

.popup_subtitle {
  max-width: 20.5rem; /* ~325px */
  margin: 0 0 4rem;   /* 64px atstarpe lidz formai */
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-hero);
  opacity: .8;
}

.popup_head .line-wrapper { display: block; overflow: hidden; }
.popup_head .line { display: block; }

.popup_form {
  display: flex;
  flex-flow: column;
  grid-row-gap: 2rem; /* 32px starp laukiem */
}

.popup_label {
  display: block;
  margin-bottom: 1.25rem; /* ~24px lidz input */
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-hero);
  opacity: .7;
}

.popup_input {
  width: 100%;
  padding: 0 0 1rem;
  background: none;
  border: none;
  border-bottom: 1px solid var(--color-stroke);
  border-radius: 0;
  color: var(--color-hero);
  font-family: var(--font-display);
  font-size: 1.25rem;
  outline: none;
  transition: border-color .25s ease;
}

.popup_input::placeholder {
  color: var(--color-hero);
  opacity: .35;
}

.popup_input:focus {
  border-bottom-color: var(--color-hero);
}

/* Telefons — "+371" ar atsevisku apakssvitru, atstarpe, tad input (ka Figma) */

.popup_consent {
  display: flex;
  align-items: center;
  grid-column-gap: 1rem; /* 16px checkbox->teksts */
  cursor: pointer;
  font-size: .85rem;
  color: var(--color-hero);
}

.popup_consent input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.popup_checkbox {
  flex: 0 0 auto;
  width: 1.5rem;  /* 24px */
  height: 1.5rem;
  border: 1px solid var(--color-stroke);
  position: relative;
  transition: border-color .25s ease;
}

.popup_consent input:checked + .popup_checkbox {
  border-color: var(--color-hero);
}

.popup_consent input:checked + .popup_checkbox::after {
  content: '';
  position: absolute;
  inset: .35rem;
  background-color: var(--color-hero);
}

.popup_consent-link {
  color: var(--color-hero);
  text-decoration: underline;
}

.popup_submit {
  margin-top: .5rem;
  align-self: flex-start; /* poga ~201px, pa kreisi (ne pilna platuma) */
  cursor: pointer;
  background: none;
  font-family: var(--font-body);
  color: var(--color-heading);
  background-color: var(--color-hero);
  border: none;
}

.form-thankyou {
  display: none; /* tiek paradits pec veiksmigas iesniegsanas (app.js) */
}

.popup_success-title {
  margin: 0 0 .75rem;
  color: var(--color-hero);
  text-transform: uppercase;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 2.25rem;
}

.popup_success-text {
  margin: 0;
  color: var(--color-hero);
  opacity: .85;
}

/* ─── LOADING INTRO ──────────────────────────────────────────────────────── */

.intro {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* Vienkrāsas krēmkrāsas fons */
  background-color: #EFE7DF;
}

.intro_logo {
  /* Platums pieskaņots ēkas REDZAMAJAM saturam: building.svg saturs aizņem ~77%
     no sava viewBox (≈11% tukšums katrā pusē), logo-flat.svg ~97.6%. Lai logo
     vārds vizuāli sakristu ar fasādes platumu: building_w × (77.17/97.6) ≈ ×0.79.
     building = min(56vw, 520px) → logo = min(44.28vw, 411px). */
     width: min(44.28vw, 411px);
   }

   .intro_logo svg {
    width: 100%;
    height: auto;
    display: block;
    overflow: visible;
    opacity: 0; /* parāda JS pēc drawSVG sagatavošanas — nav burtu uzplaiksnījuma */
  }

/* Burtu kontūra = aizpildījuma krāsa, lai uzzīmētā līnija saplūst ar gatavo logo */
.intro_logo svg path {
  stroke-width: .8px;
  vector-effect: non-scaling-stroke;
}

/* Intro vertikālā kolonna: ēka → logo → adrese */
.intro_inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* gap: clamp(3.1rem, 3.2dvh, 3.4rem); */
}

/* Ēkas vektors — piepildās no apakšas augšup ar mīkstu malu (mask reveal).
   --t (0→1) ar GSAP pārbīda mīksto joslu cauri visam augstumam. Statisks
   zelta fill + animēts mask = gluds (nav 61 path pārzīmēšanas katru kadru). */
   .intro_building {
    --t: 0;
    width: min(56vw, 520px);
    -webkit-mask-image: linear-gradient(to top, #000 calc(-30% + var(--t) * 132%), rgba(0,0,0,0.1) calc(-2% + var(--t) * 132%));
    mask-image: linear-gradient(to top, #000 calc(-30% + var(--t) * 132%), rgba(0,0,0,0.1) calc(-2% + var(--t) * 132%));
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    margin-bottom: 5rem;
  }

  .intro_building svg {
    width: 100%;
    height: auto;
    display: block;
  }

  .intro_address {
    margin: 1.5rem 0 0 0;
    overflow: hidden;
    font-family: var(--font-display);
    font-size: clamp(.72rem, 1.4vw, .86rem);
    font-size: 1.125rem;
    /* font-weight: 400; */
    /* text-transform: uppercase; */
    color: var(--color-hero);
  }

  .intro_address .line {
    display: block;
  }

  /* Paslēpj adresi jau ar CSS PIRMS JS palaišanas — citādi tā uz mirkli
     nozibsnī (natural pozīcija) pirms gsap.set to noliek yPercent:125.
     (Tas pats princips kā logo .intro_logo svg { opacity: 0 }.)
     Tikai ja kustība atļauta — reduceMotion gadījumā adrese redzama uzreiz. */
     @media (prefers-reduced-motion: no-preference) {
      .intro_address .line { transform: translateY(125%); }
    }

    .intro_logo svg path.st0 { fill: #8F6B45; stroke: #8F6B45; }
    .intro_logo svg path.st1 { fill: #2E1D10; stroke: #2E1D10; }

/* Desktop: flīžu izlīdzinājums pēc ienākšanas virziena (data-work-from), nevis
   pēc nth-of-type — citādi jauna bloka ievietošana apgrieztu pārējos. JS un CSS
   lasa to pašu atribūtu. no labās ienāk → nosēžas pa KREISI; no kreisās → pa LABI. */
   @media (min-width: 768px) {
    [data-work-from="right"] .work_media-wrapper { justify-content: flex-start; }
    [data-work-from="left"]  .work_media-wrapper { justify-content: flex-end; }
  }

/* ─── RESPONSĪVS ─────────────────────────────────────────────────────────── */

@media screen and (max-width: 991px) {
  .work_media-container {
    flex-basis: 14rem;
  }
}

/* Zemākiem ekrāniem (piem. MacBook 13" ~800px) — mazākas flīzes, lai tās
   nebrauc virsū tekstam. Augšējā atstarpe paliek liela; tiek mazināts tikai
   bilžu izmērs (proporcija saglabājas, jo aspect-ratio fiksēts). */
   @media screen and (min-width: 768px) and (max-height: 900px) {
    .work_media-container {
      flex-basis: 16rem;
    }
  }

  @media screen and (min-width: 768px) and (max-height: 820px) {
    .work_media-container {
      flex-basis: 13.5rem;
    }
  }

  @media screen and (min-width: 768px) and (max-height: 720px) {
    .work_media-container {
      flex-basis: 11.5rem;
    }
  }

  @media screen and (max-width: 767px) {
  /* ── Mobilā nav (Frame 2553): lang dropdown + register ikona; josla NAV
     fiksēta (lang+logo skrollējas prom) — fiksēta TIKAI register poga. ── */

     /* Valodu dropdown (LV + bultiņa; saraksts atveras zem) */
     .nav_lang-toggle {
      display: inline-flex;
      align-items: center;
      gap: .35rem;
      padding: 0;
      background: none;
      border: 0;
      cursor: pointer;
      color: var(--color-hero);
      font-family: var(--font-body);
      font-size: .75rem;
      letter-spacing: .08em;
      text-transform: uppercase;
    }
    .nav_lang-arrow { transition: transform .25s ease; }
    .nav_langs.is-open .nav_lang-arrow { transform: rotate(180deg); }
    .nav_lang-list {
      /* Bez lodziņa (kā baurum) — valodas zem aktīvās; display vada JS */
      position: absolute;
      top: calc(100% + .55rem);
      left: 0;
      display: flex;
      flex-direction: column;
      gap: .5rem;
    }
    /* Aktīvo valodu sarakstā paslēpj — to rāda trigeris (LV + bultiņa) */
    .nav_lang-list .nav_lang.is-active { display: none; }
    
    /* ── Register poga → FAB (izvēršams zvanīt / rakstīt) ───────────────────
       Sakļauts: viens aplis ar tālruņa ikonu. Tap → zem tā izslīd divi apļi
       (zvanīt, rakstīt), galvenās pogas telefons pārtop par bultiņu (sakļaut).
       rakstīt → register popup; zvanīt → tel: saite. */
       .nav_button-label { display: none; }

       /* nav_right kļūst par fixed FAB konteineri (galvenā poga + darbības zem tās) */
       .nav_right {
        position: fixed;
        top: .85rem;
        right: 4vw;
        z-index: 6;
        flex-direction: column;
        align-items: center;
      }

      /* Kopīgs apļa stils — galvenā poga + darbības */
      .nav_right .nav_button,
      .nav_action {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 2.7rem;
        height: 2.7rem;
        padding: 0;
        border-radius: 50%;
        border: 1px solid var(--color-heading);
      }

      /* Galvenā poga — konteinera augšā; caurspīdīga, pildās skrollējot vai izvēršot */
      .nav_right .nav_button {
        position: relative;
        background-color: transparent;
        transition: background-color .4s ease;
      }
      .nav_right .nav_button.is-scrolled,
      .nav_right.is-fab-open .nav_button {
        background-color: var(--color-heading);
      }

      /* Galvenās pogas ikonas — telefons (sakļauts) ↔ bultiņa (izvērsts), crossfade */
      .nav_button-icons {
        display: block;
        position: relative;
        width: 1.05rem;
        height: 1.05rem;
      }
      .nav_button-icon {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: contain;
        transition: opacity .3s ease;
      }
      .nav_button-icon--arrow { opacity: 0; }
      .nav_right.is-fab-open .nav_button-icon--phone { opacity: 0; }
      .nav_right.is-fab-open .nav_button-icon--arrow { opacity: 1; }

      /* Darbības — pildīti apļi, absolute aiz galvenās pogas; izslīd uz leju izvēršot */
      .nav_action {
        position: absolute;
        top: 0;
        left: 0;
        background-color: var(--color-heading);
        opacity: 0;
        transform: scale(.85);
        pointer-events: none;
        transition: transform .35s cubic-bezier(.22, 1, .36, 1), opacity .3s ease;
      }
      .nav_action img {
        display: block;
        width: 1.05rem;
        height: auto;
      }
      .nav_right.is-fab-open .nav_action {
        opacity: 1;
        pointer-events: auto;
      }
      /* Stagger: zvanīt 1. pozīcijā, rakstīt 2. (nedaudz vēlāk) */
      .nav_right.is-fab-open .nav_action--call {
        transform: translateY(calc(2.7rem + .55rem));
        transition-delay: .04s;
      }
      .nav_right.is-fab-open .nav_action--write {
        transform: translateY(calc((2.7rem + .55rem) * 2));
        transition-delay: .1s;
      }

      /* Intro — mazākas atstarpes starp elementiem mobilajā (ēka↓logo↓adrese) */
      .intro_building { margin-bottom: 2rem; }
      .intro_address  { margin-top: .75rem; }

  /* Lielo fona attēlu (flīžu sekcijās) izlīdzina pa kreiso malu — object-fit:cover
     citādi centrē un nogriež abas malas; mobilajā gribam redzēt kreiso pusi. */
     .work_image {
      object-position: left center;
    }

  /* 1. bloka fasādes attēlu nobīda nedaudz pa kreisi (ārā no ekrāna), lai mob
     platumā ietilpst "CON(S)" burti (citādi pie kreisās malas redzams tikai "C"). */
     .work_item:nth-of-type(1) .work_image {
      object-position: 20% center;
    }

  /* Mobilajā logo prom TIKAI index navā (langs + CTA citādi nesader);
     privātuma lapā (.nav--static) logo paliek — tas ir vienīgais nav elements */
     .nav:not(.nav--static) .nav_logo {
      /* display: none; */
    }

    .nav_logo img {
      height:auto;
      width: auto;
    }

    .nav_top-wrapper {
      padding: 1.75rem 5vw 1.25rem;
    }

    .nav_left,
    .nav_right {
      gap: .75rem;
    }

    .nav_langs {
      gap: .5rem;
    }

    .work_item-wrapper {
      /* Proporcionāli ekrāna augstumam — uz maziem ekrāniem mazāks, lai
         flīzes nebrauc virsū tekstam un atstarpe augšā≈apakšā ap flīžu rindu */
         padding-top: clamp(0.5rem, 4vh, 3.25rem);
         padding-bottom: clamp(1.5rem, 6vh, 4rem);
         justify-content: center;
         grid-row-gap: clamp(1rem, 3.5vh, 2rem);
       }

      /* Fiksētie bloki (1,2) sākas AIZ piespraustās adreses joslas → saturs aizietu
         aiz tās. (100lvh − 100svh) = joslas augstums (pārlūks pats aprēķina: liels
         viewport mīnus mazais). Pieliek to augšējam padding → flīzes zem joslas ar
         atstarpi. flex-start = flīzes noenkurotas augšā (arī ja saturs garš).
         Pirmais padding-top = fallback bez lvh/svh atbalsta. Location (flow) nevajag. */
         .work_item:not(.work_item--location) .work_item-wrapper {
          justify-content: flex-start;
          padding-top: clamp(1.5rem, 5vh, 3.5rem);
          padding-top: calc(100lvh - 100svh + clamp(1.5rem, 5vh, 3.5rem));
        }

        .work_media-wrapper {
          justify-content: flex-start;
          flex-wrap: nowrap;
          overflow: visible;
          width: 100vw;
          margin-left: -4vw;
          grid-column-gap: 1.5vw;     /* atstarpe starp flīzēm (mob, /2) */
          will-change: transform;
        }

        .work_media-container {
          flex: 0 0 60vw;
        }

        .work_text {
          flex-flow: column;
          align-items: flex-start;
          grid-row-gap: 1.5rem;
        }

        .work_text-subtitle {
          font-size: .9rem;
        }

      /* Telefonā location ir plūsmas bloks (nav hijack); relative — DOM secībā
         tas ir aiz fiksētajiem blokiem 1,2, tāpēc tos aizsedz, kad ieslīd. */
         .work_item--location {
          position: relative;
        /* Auto augstums (min 100vh): uz maza ekrāna (SE) saturs+padding pārsniedz
           100vh — bez šī tas apgrieztos un padding pazustu. Bloks aug + skrollē. */
           height: auto;
           min-height: 100vh;
         }
      /* Padding augšā = apakšā (mazāks), lai saturs ir balansēti centrēts
         (citādi base 12vh augšā pret 6vh apakšā = saturs nobīdīts uz leju). */
         .work_item--location .work_item-wrapper {
          padding-top: clamp(1.5rem, 6vh, 4rem);
          padding-bottom: clamp(1.5rem, 6vh, 4rem);
        }

        .location_layout {
          flex-flow: column;
          align-items: flex-start;
          grid-row-gap: 2rem;
        }

        .location_text {
          grid-row-gap: 1.25rem;
        }

        .location_map {
          flex-basis: auto;
          width: 100%;
          justify-content: center;
        }

        .location_map-svg {
          max-height: 44dvh;
        }

        .footer_content {
          min-height: 70dvh;
        }

        .footer_main {
          flex-flow: column;
        }

        .footer_cta-wrap {
          align-items: flex-start;
        }

        .footer_note {
          text-align: left;
        }

        .footer_meta {
          flex-flow: column;
          align-items: flex-start;
          gap: 1rem;
          margin-top: 3rem;
        }

        /* Popup mobilajā — bez attēla puses, forma pa visu ekrānu */
        .popup_image {
          display: none;
        }

  /* Necentrē vertikāli — citādi gara forma tiek nogriezta augšā;
     augšā līdzināts + ritina (overflow-y jau ir) */
     .popup_form-side {
      display: block;
    }

    .popup_content {
      max-width: 30rem;
      padding: 5rem 1.5rem 3rem;
    }

    .popup_title {
      font-size: 2.25rem;
    }

    .popup_form {
      grid-row-gap: 1.5rem;
    }
    .popup_label { margin-bottom: .5rem; }   /* mazāka atstarpe lidz input portreta telefonā */
  }

  @media screen and (max-width: 479px) {
    .nav_button {
      /* padding: .5rem 1rem; */
      font-size: .75rem;
    }

    .nav_right .nav_button {
      display: inline-flex;
    }
  }

/* ─── PRIVĀTUMA LAPA (atsevišķa lapa, krēmkrāsas tēma kā popup) ──────────── */

body.is-page {
  background-color: var(--color-cream);
  color: var(--color-hero);
}

/* Šajā lapā nav hero — nav ir statisks (nevis absolute virs hero) */
.nav--static {
  position: relative;
  inset: auto;

}

.is-page .nav_top-line {
  background-color: var(--color-stroke);
  opacity: .5;
}

.is-page .nav_link {
  color: var(--color-hero);
}

/* Privātuma nav — tikai centrēts logo (statisks, nevis absolūti pozicionēts) */
.nav--static .nav_top {
  justify-content: center;
}

.nav--static .nav_logo {
  position: static;
  transform: none;
}

.privacy {
  max-width: 48rem;          /* ~636px satura bloks, centrēts (kā Figma) */
  margin: 0 auto;
  padding: 7rem 2vw 6rem;
}

.privacy_title {
  margin: 0 0 2.75rem;
  color: var(--color-hero);
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
}

.privacy_body {
  color: var(--color-hero);
  font-size: 1rem;
  line-height: 1.7;
}

.privacy_body p {
  margin: 0 0 1.25rem;
}

.privacy_body p:last-child {
  margin-bottom: 0;
}

.privacy_body a {
  color: var(--color-hero);
  text-decoration: underline;
  text-underline-offset: .15em;
}

@media screen and (max-width: 767px) {
  .privacy {
    padding: 5rem 1.5rem 4rem;
  }
}

/* ─── Landscape telefoni / ļoti zemi ekrāni (≥768 plati, ≤500 augsti) ───────
   Šeit desktop layout, bet augstums par zemu — viss jāsasamazina, lai nekas
   neiziet no ekrāna un flīzes nepārklājas ar tekstu. */
   @media screen and (min-width: 768px) and (max-height: 500px) {
    /* Flīžu bloki — mazs padding + mazākas flīzes, lai flīžu rinda + teksts ietilpst */
    .work_item-wrapper {
      padding-top: 1rem;
      padding-bottom: 1.25rem;
      justify-content: space-between;
    }
    .work_media-container {
      flex-basis: 8rem;
    }

    /* Footer — proporcionāli mazāks padding augšā/apakšā uz zema landscape ekrāna */
    .footer_content {
      padding-top: 2rem;
      padding-bottom: 1.75rem;
      min-height: auto;
    }
  }

/* ─── Lokācija uz zema ekrāna (11" dators, landscape telefoni) ──────────────
   Virsraksts (2 rindas) + teksts + 4 ērtības pārsniedz 100vh → ērtības 2 kolonnās
   (2×2) un ciešākas atstarpes, lai viss ietilpst 1 ekrānā bez nogriešanas. */
@media screen and (min-width: 768px) and (max-height: 800px) {
  .work_item--location .work_item-wrapper {
    padding-top: clamp(2rem, 6vh, 4rem);
  }
  .location_text {
    grid-row-gap: 1.5rem;
  }
  .location_amenities {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 2.5rem;
    max-width: none;       /* 2 kolonnas izmanto location_text pilno platumu */
  }
  .amenity {
    padding: 0.85rem 0;
  }
}

/* Vēl zemāks (iPhone landscape ~430px) — papildu sašaurinājums lokācijai */
@media screen and (min-width: 768px) and (max-height: 500px) {
  .work_item--location .work_text-title {
    font-size: clamp(1.9rem, 4.5vw, 3rem);
  }
  .work_item--location .work_item-wrapper {
    padding-top: 1.25rem;
  }
  .location_text {
    grid-row-gap: 0.9rem;
  }
  .amenity {
    padding: 0.5rem 0;
  }
  .amenity_icon {
    width: 1.7rem;
    height: 1.7rem;
  }
}


/* ─── Register popup uz zemiem ekrāniem (11" laptop, landscape telefoni) ─────
   >767 (desktop popup layout), bet zems — sašaurinam formu un dodam X atstatumu,
   lai ietilpst vertikāli; ja tomēr garāks (piem. 430px), .popup_content scrollē. */
   @media screen and (min-width: 768px) and (max-height: 820px) {
    .popup_content {
      padding-top: 4.5rem;   /* atstatums no aizvēršanas pogas, kad augšā līdzināts */
      padding-bottom: 2rem;
    }
    .popup_title {
      font-size: clamp(2rem, 3.4vw, 2.75rem);
      margin-bottom: 1rem;
    }
    .popup_subtitle {
      margin-bottom: 1.75rem;
    }
    .popup_form {
      grid-row-gap: 1.25rem;
    }
  }

/* ─── Loading intro uz zemiem ekrāniem (landscape telefoni) ─────────────────
   Ēka+logo+adrese kolonna nedrīkst pārsniegt ekrāna augstumu — tāpēc izmēru
   pēc augstuma (dvh), nevis platuma, un samazinu atstarpes. Logo platums
   saglabā ~0.79 attiecību pret ēku (redzamā satura platums sakrīt). */
   @media screen and (max-height: 500px) {
    .intro_building {
      width: min(64dvh, 50vw);
      margin-bottom: 1.25rem;
    }
    .intro_logo {
      width: min(50.5dvh, 39.5vw);
    }
    .intro_address {
      margin-top: 0.6rem;
    }
  }

/* ─── Register popup uz zema landscape ekrāna (telefons horizontāli) ─────────
   Portreta attēls 50/50 squished izskatās slikti, un forma šķiet "pilna platuma".
   Paslēpjam attēlu, formu centrējam šaurā kolonnā; scroll strādā ar
   data-lenis-prevent (markup) + overflow-y:auto. */
   @media screen and (max-height: 500px) {
    .popup_image { display: none; }
    .popup_content { max-width: 26rem; }
  }

/* ─── Lightbox — flīžu bilžu zoom (GSAP FLIP) ───────────────────────────────
   Klikšķis uz 2./3. bloka flīzes → bilde "izaug" no savas vietas līdz pilnam
   ekrānam; pa bloka 3 bildēm var iet cauri (prev/next). Animāciju vada app.js. */
   .work_media { cursor: zoom-in; }

   .lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
  }
  .lightbox.is-open { visibility: visible; }

  .lightbox_backdrop {
    position: absolute;
    inset: 0;
    background-color: var(--color-bg);
    opacity: 0;
    cursor: zoom-out;
  }

  .lightbox_figure {
    margin: 0;
    position: relative;
    display: flex;
    pointer-events: none;   /* klikšķis blakus bildei → backdrop (aizver) */
  }
  .lightbox_img {
    display: block;
    max-width: 92vw;
    max-height: 88vh;
    width: auto;
    height: auto;
    object-fit: contain;
    cursor: zoom-out;
    pointer-events: auto;
    will-change: transform;
    box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, .45);
  }

  .lightbox_btn {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 50%;
    background-color: transparent;
    color: var(--color-text);
    cursor: pointer;
    opacity: 0;
    transition: background-color .25s ease, border-color .25s ease;
  }
  .lightbox_btn:hover {
    background-color: rgba(239, 231, 223, .1);
    border-color: rgba(239, 231, 223, .35);
  }
  .lightbox_close { top: 1.4rem; right: 1.4rem; width: 3rem; height: 3rem; }
  .lightbox_close svg { width: 1.15rem; height: 1.15rem; }
  .lightbox_prev,
  .lightbox_next { top: 50%; transform: translateY(-50%); width: 3.5rem; height: 3.5rem; }
  .lightbox_prev { left: 1.6rem; }
  .lightbox_next { right: 1.6rem; }
  .lightbox_prev svg,
  .lightbox_next svg { width: .8rem; height: 1.35rem; }

  .lightbox_counter {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--color-text);
    font-size: .75rem;
    letter-spacing: .15em;
    opacity: 0;
  }

  @media screen and (max-width: 767px) {
    .lightbox_close { top: 1rem; right: 1rem; width: 2.6rem; height: 2.6rem; }
    .lightbox_prev { left: .4rem; }
    .lightbox_next { right: .4rem; }
    .lightbox_prev,
    .lightbox_next { width: 2.8rem; height: 2.8rem; }
    .lightbox_prev svg,
    .lightbox_next svg { width: .7rem; height: 1.2rem; }
    .lightbox_img { max-width: 94vw; max-height: 84vh; }
  }
