/* ─────────────────────────────────────────────────────────────────────────────
   INTEGRABAU — light edition (white + minimal green accent)
   ───────────────────────────────────────────────────────────────────────────── */

@import url('fonts.css');

:root {
  /* Surfaces (light) */
  --navy:   #FFFFFF;   /* page / on-dark text  */
  --navy2:  #F5F6F3;   /* off-white surface    */
  --navy3:  #ECEEE9;   /* placeholder surface  */
  /* Ink + text */
  --cream:  #17211C;   /* primary ink          */
  --dim:    rgba(23,33,28,0.62);
  --muted:  rgba(23,33,28,0.42);
  --border: rgba(23,33,28,0.12);
  /* Accent — from logo, used ONLY in icons / lines / arrows */
  --green:  #2E7652;
  --green-soft: rgba(46,118,82,0.08);
  --green-line: rgba(46,118,82,0.32);

  --font:   'Stack Sans Headline', Arial, sans-serif;
  --ease:   cubic-bezier(0.19,1,0.22,1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --nav-h:  100px;
  --gutter: clamp(32px, 6.5vw, 120px);
  --sec-pad: clamp(140px, 18vh, 240px);
  --radius: 16px;

  /* Section backgrounds — white / off-white for quiet rhythm */
  --grad-diag-tl: #F5F6F3;
  --grad-diag-br: #F5F6F3;
  --grad-horiz:   #FFFFFF;
  --grad-vert:    #FFFFFF;
  --grad-rad-tl:  #FFFFFF;
  --grad-rad-tr:  #FFFFFF;
  --grad-rad-br:  #FFFFFF;
  --grad-rad-c:   #FFFFFF;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  color-scheme: light;
}
body { background: #FFFFFF; color: var(--cream); font-family: var(--font); overflow-x: hidden; }
img  { display: block; max-width: 100%; }
a    { text-decoration: none; color: inherit; }
button { cursor: pointer; background: none; border: none; font: inherit; color: inherit; touch-action: manipulation; }
input, textarea, select { font: inherit; }

::selection { background: rgba(46,118,82,.16); }
:focus-visible { outline: 1.5px solid var(--green); outline-offset: 3px; }

/* ── NAV ─────────────────────────────────────────────────────────────────── */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter);
}
#nav.scrolled {
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-logo { display: flex; align-items: center; height: 35px; transition: opacity .2s; }
.nav-logo img { height: 35px; width: auto; }
.nav-logo:hover { opacity: .7; }

.nav-burger {
  position: relative; z-index: 950;
  display: flex; flex-direction: column; gap: 7px;
  width: 34px; padding: 4px 0;
}
.nav-burger span {
  display: block; height: 1.5px; background: var(--cream); opacity: .6;
  transform-origin: center;
  transition: transform .4s var(--ease), opacity .3s, width .35s var(--ease);
}
/* Light burger over the hero image; ink once the nav bar turns white */
#nav:not(.scrolled) .nav-burger span { background: #fff; opacity: .9; }
/* Keep the X dark while the white drawer is open */
#nav:not(.scrolled) .nav-burger.open span { background: var(--cream); opacity: 1; }
.nav-burger span:nth-child(2) { width: 60%; align-self: flex-end; }
.nav-burger:hover span { opacity: .9; }
.nav-burger:hover span:nth-child(2) { width: 100%; }
.nav-burger.open span { opacity: 1; }
.nav-burger.open span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); width: 100%; }
.nav-burger.open span:nth-child(2) { opacity: 0; width: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); width: 100%; }

/* Backdrop behind side panel */
.nav-backdrop {
  position: fixed; inset: 0; z-index: 700;
  background: rgba(23,33,28,0.32);
  opacity: 0; pointer-events: none;
  transition: opacity .45s var(--ease);
}
.nav-backdrop.open { opacity: 1; pointer-events: all; }

/* Side-drawer overlay (slides from right, ~half width) */
.nav-overlay {
  position: fixed; top: 0; right: 0; bottom: 0; left: auto;
  width: clamp(320px, 50vw, 720px);
  z-index: 800;
  background: #FFFFFF;
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--nav-h) + 32px) clamp(40px, 6vw, 96px) 56px;
  transform: translateX(100%);
  transition: transform .55s var(--ease);
}
.nav-overlay.open { transform: translateX(0); }

.nav-overlay-links { list-style: none; }
.nav-overlay-links li {
  opacity: 0; transform: translateX(40px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.nav-overlay.open .nav-overlay-links li { opacity: 1; transform: none; }
.nav-overlay.open .nav-overlay-links li:nth-child(1) { transition-delay:.10s }
.nav-overlay.open .nav-overlay-links li:nth-child(2) { transition-delay:.16s }
.nav-overlay.open .nav-overlay-links li:nth-child(3) { transition-delay:.22s }
.nav-overlay.open .nav-overlay-links li:nth-child(4) { transition-delay:.28s }
.nav-overlay.open .nav-overlay-links li:nth-child(5) { transition-delay:.34s }
.nav-overlay.open .nav-overlay-links li:nth-child(6) { transition-delay:.40s }

.nav-overlay-links a {
  display: flex; align-items: center; gap: 0;
  padding: 12px 0;
  font-size: clamp(1.6rem, 3.6vw, 3rem);
  font-weight: 800; letter-spacing: -.03em;
  color: var(--muted);
  transition: color .25s;
  overflow: hidden;
}
.nav-overlay-links a:hover { color: var(--cream); }

.nl-arrow {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--green);
  width: 0; overflow: visible; flex-shrink: 0;
  opacity: 0; transform: translateX(-56px);
  transition: opacity .3s var(--ease), transform .35s var(--ease);
}
.nav-overlay-links a:hover .nl-arrow { opacity: 1; transform: translateX(0); }
.nl-arrow svg { width: clamp(20px,2.6vw,32px); height: clamp(20px,2.6vw,32px); flex-shrink: 0; }

.nl-text {
  display: inline-block; transform: translateX(0);
  transition: transform .35s var(--ease);
}
.nav-overlay-links a:hover .nl-text { transform: translateX(clamp(12px,1.6vw,18px)); }

/* ── HERO — full-screen parallax image ───────────────────────────────────── */
#hero {
  position: relative; height: 100svh; overflow: hidden;
  background: #0e1512;
}
/* Oversized so the image can travel without exposing edges */
.hero-bg {
  position: absolute; top: -12%; left: 0; right: 0; height: 124%;
  z-index: 0; will-change: transform;
}
.hero-bg img,
.hero-bg video { width: 100%; height: 100%; object-fit: cover; display: block; }

.hero-scrim {
  position: absolute; inset: 0; z-index: 5; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(10,15,12,.58) 0%, rgba(10,15,12,.30) 34%, rgba(10,15,12,.42) 72%, rgba(10,15,12,.66) 100%),
    radial-gradient(ellipse 74% 60% at 50% 52%, rgba(10,15,12,.34) 0%, transparent 78%);
}
/* Fade to white at the end so the next (white) section blends in */
.hero-whiteout {
  position: absolute; inset: 0; z-index: 8; pointer-events: none;
  background: #fff; opacity: 0;
}

.hero-content {
  position: absolute; inset: 0; z-index: 10;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: var(--nav-h) var(--gutter) clamp(64px,12vh,120px);
  max-width: none;
  pointer-events: none;
  opacity: 0; transform: translateY(32px);
  transition: opacity 1s .2s var(--ease), transform 1s .2s var(--ease);
  will-change: opacity, transform;
}
.hero-content > * { pointer-events: auto; }
.hero-content > .hero-h1,
.hero-content > .hero-sub { max-width: 760px; }
#hero.loaded .hero-content { opacity: 1; transform: none; }

.hero-h1 {
  font-size: clamp(2.4rem, 6vw, 5.6rem);
  font-weight: 600; line-height: .96; letter-spacing: -.035em;
  color: #fff; margin-bottom: 36px;
  text-wrap: balance;
  text-shadow: 0 1px 3px rgba(0,0,0,.32), 0 2px 30px rgba(0,0,0,.38);
}
.hero-sub {
  font-size: clamp(1rem,1.4vw,1.15rem); font-weight: 400; line-height: 1.75;
  color: rgba(255,255,255,.93); max-width: 560px; margin: 0 auto 60px;
  text-shadow: 0 1px 16px rgba(0,0,0,.45);
}
.hero-h1-grad { font-weight: 700; }
.hero-ctas { display: flex; gap: 32px; flex-wrap: wrap; justify-content: center; align-items: center; }
/* Light treatment over the dark hero image */
#hero .btn-s { color: #fff; }
#hero .btn-s:hover { color: #fff; opacity: .75; }
#hero .scroll-cue { color: rgba(255,255,255,.78); }
#hero .scroll-cue:hover { color: #fff; }

.btn-p {
  display: inline-block; padding: 17px 40px;
  background: var(--green); color: #fff;
  font-size: .92rem; font-weight: 500;
  border-radius: 100px;
  transition: background .2s;
}
.btn-p:hover { background: #25613f; }
.btn-s {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 17px 0;
  color: var(--cream);
  font-size: .92rem; font-weight: 400;
  transition: gap .25s var(--ease), color .2s;
}
.btn-s::after { content: '→'; transition: transform .25s var(--ease); display: inline-block; }
.btn-s:hover { color: var(--green); gap: 14px; }

.scroll-cue {
  position: absolute; bottom: clamp(24px, 5vh, 48px); left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: var(--muted); pointer-events: auto;
  transition: color .2s;
}
.scroll-cue:hover { color: var(--green); }
.scroll-cue-line { width: 1px; height: 36px; background: currentColor; opacity: .5; }
.scroll-cue svg { animation: scrollCue 2s var(--ease) infinite; }
@keyframes scrollCue {
  0%, 100% { transform: translateY(0); opacity: .55; }
  50%      { transform: translateY(5px); opacity: 1; }
}

/* ── SECTION UTIL ────────────────────────────────────────────────────────── */
.sec { padding: var(--sec-pad) var(--gutter); }
section[id] { scroll-margin-top: calc(var(--nav-h) + 8px); }

.sec-label {
  font-size: .72rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--muted); margin-bottom: 28px;
}
.sec-h2 {
  font-size: clamp(1.8rem,3.6vw,3.4rem);
  font-weight: 500; line-height: 1; letter-spacing: -.032em;
  color: var(--cream);
  text-wrap: balance;
}
/* Consistent green section marker line */
.sec-h2::before {
  content: ''; display: block;
  width: 40px; height: 2px;
  background: var(--green);
  margin-bottom: clamp(24px, 3vh, 36px);
}
.sec-body {
  font-size: clamp(.9rem,1.2vw,1.05rem); font-weight: 300;
  line-height: 1.8; color: var(--dim); max-width: 580px;
}

/* ── ABOUT ───────────────────────────────────────────────────────────────── */
#about {
  padding: clamp(40px, 6vh, 72px) var(--gutter) var(--sec-pad);
  background: #FFFFFF;
}
#about .sec-label,
#about .sec-h2,
#about .about-lead,
#about .sec-body { max-width: 720px; }
#about-title { max-width: none; white-space: nowrap; }

.about-lead {
  font-size: clamp(1.1rem,2vw,1.45rem); font-weight: 400;
  line-height: 1.5; color: var(--cream); margin: 32px 0;
}
/* Lead na jeden riadok (kde je dosť miesta) */
#about .about-lead { max-width: none; }
@media (min-width: 1080px) { .about-lead { white-space: nowrap; } }
/* Hodnoty — len ikony + text (bez fotiek) */
.about-cards {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 0; margin-top: 88px;
  border-top: 1px solid var(--border);
}
.about-card {
  padding: clamp(30px,3.6vh,44px) clamp(28px,3vw,44px);
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
}
.about-card:nth-child(3n) { border-right: none; }
.about-card:first-child { padding-left: 0; }
.about-card:last-child  { padding-right: 0; }
.about-card-icon {
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--green-line); background: var(--green-soft);
  color: var(--green); margin-bottom: 22px;
}
.about-card-t {
  font-size: clamp(1.1rem,1.5vw,1.35rem); font-weight: 600;
  letter-spacing: -.02em; line-height: 1.2;
  color: var(--cream); margin-bottom: 14px;
}
.about-card-b { font-size: .9rem; line-height: 1.8; font-weight: 300; color: var(--dim); }

/* ── AKO PRACUJEME — časová os ───────────────────────────────────────────── */
#preco { background: var(--navy2); }
.preco-cta { margin-top: clamp(56px, 8vh, 96px); }

.timeline { position: relative; margin-top: clamp(56px,8vh,88px); }
/* Central axis */
.timeline::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 50%;
  width: 1px; background: var(--green-line); transform: translateX(-50%);
}
.tl-heads {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(40px,6vw,96px); margin-bottom: 36px;
}
.tl-head {
  font-size: .68rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .16em;
  color: var(--green);
}
.tl-heads .tl-head:first-child { text-align: right; }

/* Green line that fills as you scroll through the timeline */
.tl-progress {
  position: absolute; top: 0; left: 50%; width: 1px; height: 0;
  background: var(--green); transform: translateX(-50%);
  z-index: 1; will-change: height;
}

.tl-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(40px,6vw,96px);
  position: relative;
  padding: 14px 0;
}
/* Dot on the axis — activates when the step scrolls in */
.tl-row::before {
  content: ''; position: absolute; top: 26px; left: 50%;
  width: 9px; height: 9px; border-radius: 50%;
  background: #fff; border: 1.5px solid var(--green-line);
  transform: translateX(-50%); z-index: 2;
  transition: background .45s var(--ease), border-color .45s var(--ease), box-shadow .45s var(--ease);
}
.tl-row.in-view::before {
  background: var(--green); border-color: var(--green);
  box-shadow: 0 0 0 5px rgba(46,118,82,.12);
}

/* Steps slide in from their own side */
.tl-row.reveal.tl-l { transform: translateX(-30px); }
.tl-row.reveal.tl-r { transform: translateX(30px); }
.tl-row.reveal.in-view { transform: none; }
.tl-l .tl-item { grid-column: 1; text-align: right; }
.tl-r .tl-item { grid-column: 2; }
.tl-t {
  font-size: clamp(1rem,1.3vw,1.15rem); font-weight: 600;
  letter-spacing: -.015em; color: var(--cream); margin-bottom: 8px;
}
.tl-b { font-size: .86rem; line-height: 1.75; font-weight: 300; color: var(--dim); max-width: 42ch; }
.tl-l .tl-b { margin-left: auto; }   /* pravé zarovnanie ľavého stĺpca */

/* Phase headings used only on mobile (grouped lists) */
.tl-phase { display: none; }

@media (max-width: 760px) {
  /* Single column with the axis on the left; steps grouped by phase */
  .timeline { display: flex; flex-direction: column; }
  .timeline::before { left: 5px; transform: none; }
  .tl-progress { left: 5px; transform: none; }
  /* Both columns enter from the same side on mobile */
  .tl-row.reveal.tl-l, .tl-row.reveal.tl-r { transform: translateX(-20px); }
  .tl-row.reveal.in-view { transform: none; }
  .tl-heads { display: none; }
  .tl-phase {
    display: block; order: 0;
    font-size: .66rem; font-weight: 500;
    text-transform: uppercase; letter-spacing: .16em;
    color: var(--green); padding-left: 30px; margin-bottom: 10px;
  }
  .tl-phase-r { order: 2; margin-top: 34px; }
  .tl-l { order: 1; }
  .tl-r { order: 3; }
  .tl-row { grid-template-columns: 1fr; gap: 0; padding: 12px 0 12px 30px; }
  .tl-row::before { left: 5px; top: 20px; }
  .tl-l .tl-item, .tl-r .tl-item { grid-column: 1; text-align: left; }
}

/* ── PROJEKTY — gallery carousel (bleeds off the right edge) ─────────────── */
#projects {
  background: #FFFFFF;
  padding-bottom: var(--sec-pad);
}

.proj-header {
  padding: var(--sec-pad) var(--gutter) 0;
  display: flex; justify-content: space-between; align-items: flex-end;
  flex-wrap: wrap; gap: 32px; margin-bottom: 48px;
}
.proj-intro {
  padding: 0 var(--gutter) 64px;
  font-size: clamp(1rem,1.4vw,1.2rem); font-weight: 300;
  line-height: 1.6; color: var(--cream); max-width: none;
}
.proj-nav {
  display: flex; gap: 14px; justify-content: center;
  padding: 48px var(--gutter) 0;
}
.proj-nav-btn {
  width: 56px; height: 56px; border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--green);
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.proj-nav-btn svg { width: 20px; height: 20px; }
.proj-nav-btn:hover:not(:disabled) {
  background: var(--cream); color: var(--navy);
  border-color: var(--cream);
  transform: scale(1.05);
}
.proj-nav-btn:disabled { opacity: .25; cursor: not-allowed; }

.gallery-outer { overflow: hidden; }
.gallery-track {
  display: flex; gap: 32px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 0 var(--gutter) 6px;
  scroll-padding-left: var(--gutter);
  scrollbar-width: none; -ms-overflow-style: none;
}
.gallery-track::-webkit-scrollbar { display: none; }

.gallery-slide {
  flex: 0 0 min(620px, 78vw);
  scroll-snap-align: start;
  cursor: pointer;
}

.gallery-card {
  position: relative; overflow: hidden;
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  background: var(--navy3);
}
.gallery-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .65s var(--ease); }
.gallery-slide:hover .gallery-card img { transform: scale(1.03); }
.gallery-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(12,18,15,.88) 0%, rgba(12,18,15,.42) 42%, transparent 76%);
}
.gallery-card-body { position: absolute; bottom: 0; left: 0; right: 0; padding: 32px clamp(28px,3vw,40px); }
/* BEEF logo — small, above the project name (fixed width, ratio preserved) */
.gallery-card-beef {
  display: block; width: 78px; max-width: 40%; height: auto;
  margin-bottom: 12px; opacity: .92;
}
.gallery-card-cat {
  font-size: .72rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .14em;
  color: rgba(255,255,255,.7); margin-bottom: 12px;
}
.gallery-card-title {
  font-size: clamp(1.5rem, 2.4vw, 2.2rem);
  font-weight: 600; letter-spacing: -.025em;
  color: #fff; line-height: 1.1;
}
.gallery-card-badge {
  position: absolute; top: 24px; left: clamp(28px,3vw,40px);
  font-size: .68rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .14em;
  background: transparent; border: none; padding: 0;
  color: rgba(255,255,255,.85);
}

.proj-more { padding: 44px var(--gutter) 0; text-align: center; }

.proj-cta { padding: 56px var(--gutter) 0; font-size: .9rem; color: var(--dim); }
.proj-cta a { color: var(--cream); }
.proj-cta a:hover { color: var(--green); }

/* ── PROCES ──────────────────────────────────────────────────────────────── */
#process { background: var(--navy2); }
.process-steps {
  display: grid; grid-template-columns: repeat(4,1fr);
  column-gap: clamp(40px,5vw,80px);
  row-gap: clamp(56px, 7vh, 80px);
  margin-top: 96px;
}
.process-icon {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--green-line);
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  margin-bottom: 24px;
}
.process-title {
  font-size: clamp(1.05rem,1.4vw,1.25rem); font-weight: 600;
  letter-spacing: -.015em;
  color: var(--cream); margin-bottom: 14px;
}
.process-body { font-size: .88rem; line-height: 1.85; font-weight: 300; color: var(--dim); }

/* ── REFERENCIE ──────────────────────────────────────────────────────────── */
#referencie { background: #FFFFFF; position: relative; }
.ref-head {
  display: grid; grid-template-columns: 1fr 1fr;
  align-items: end; gap: 56px; margin-bottom: 80px;
}
.ref-note { font-size: clamp(.9rem,1.2vw,1.05rem); font-weight: 300; line-height: 1.8; color: var(--dim); }

.ref-rows {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--border);
}
.ref-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding: clamp(20px, 3.2vh, 36px) 4px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: padding-left .35s var(--ease);
}
.ref-row:hover { padding-left: 24px; }
.ref-row-name {
  font-size: clamp(1.1rem, 1.8vw, 1.6rem);
  font-weight: 500; letter-spacing: -.02em; line-height: 1.15;
  color: var(--muted);
  transition: color .3s var(--ease);
}
.ref-row:hover .ref-row-name { color: var(--cream); }
.ref-row-main { display: flex; flex-direction: column; align-items: flex-start; }
/* Fixed icon size — identical on every reference regardless of text length */
.ref-row-beef { height: 8px; width: auto; display: block; margin-bottom: 9px; opacity: .55; flex: none; }
.ref-row:hover .ref-row-beef { opacity: .8; }
.ref-row-right {
  display: flex; align-items: center; gap: clamp(14px, 2vw, 28px);
  flex-shrink: 0;
}
.ref-row-meta {
  font-size: .82rem; font-weight: 400;
  color: var(--dim);
  text-align: right;
  transition: color .3s var(--ease);
}
.ref-row:hover .ref-row-meta { color: var(--cream); }
.ref-row-detail {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); flex-shrink: 0;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.ref-row:hover .ref-row-detail { background: var(--green); color: #fff; border-color: var(--green); }
@media (max-width: 560px) { .ref-row-meta { display: none; } }

.ref-preview {
  position: fixed;
  top: 0; left: 0;
  width: clamp(260px, 24vw, 380px);
  aspect-ratio: 4/3;
  pointer-events: none;
  z-index: 50;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.92);
  transition: opacity .35s var(--ease), transform .5s var(--ease);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 70px -24px rgba(23,33,28,.4);
  will-change: transform, opacity;
}
.ref-preview.active { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.ref-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (hover: none) { .ref-preview { display: none !important; } .ref-row:hover { padding-left: 4px; } }

.ref-cta { margin-top: 64px; font-size: .9rem; color: var(--dim); }
.ref-cta a { color: var(--cream); }
.ref-cta a:hover { color: var(--green); }

/* ── SUBBRAND — INTEGRA DEVELOPMENT ──────────────────────────────────────── */
#development {
  position: relative;
  overflow: hidden;
  background: var(--navy2);
  border-top: 1px solid var(--border);
}
#development::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background: url('../assets/projects/01-rezidencia-lamac.png') center right / cover no-repeat;
  opacity: .12;
  pointer-events: none;
}
#development::after {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(90deg, var(--navy2) 0%, rgba(245,246,243,0.55) 42%, rgba(245,246,243,0) 100%);
}
#development > * { position: relative; z-index: 1; }
.dev-inner { max-width: 760px; }
.dev-h2 { line-height: 0; }
.dev-logo { height: clamp(48px, 7vw, 88px); width: auto; display: block; }
.dev-eyebrow {
  font-size: .72rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .18em;
  color: var(--muted); margin-bottom: 24px;
}
.dev-accent { font-weight: 300; color: var(--muted); }
.dev-body {
  font-size: clamp(.95rem,1.25vw,1.1rem); font-weight: 300;
  line-height: 1.85; color: var(--dim); max-width: 620px;
}
.dev-body:first-of-type { margin-top: 32px; }
.dev-contact { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--border); }
.dev-contact .c-val a { color: var(--green); }

/* ── KONTAKT ─────────────────────────────────────────────────────────────── */
#contact {
  padding: var(--sec-pad) var(--gutter);
  background: #FFFFFF;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(80px, 12vw, 180px);
  align-items: start;
}
.contact-left { max-width: 540px; }
.contact-right { padding-top: 12px; }

.contact-details {
  margin-top: 48px; padding-top: 36px;
  border-top: 1px solid var(--border);
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px 32px;
}
.contact-details .contact-legal { grid-column: 1 / -1; margin-top: 4px; }

.contact-info-line { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 24px; }
.c-icon { display: none; }
.c-label {
  font-size: .68rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--muted);
}
.c-val { font-size: .92rem; color: var(--cream); margin-top: 6px; font-weight: 300; line-height: 1.5; }
.contact-legal { margin-top: 40px; font-size: .74rem; line-height: 1.9; color: var(--muted); }

/* Animated letter-by-letter form */
.anim-input {
  position: relative;
  padding-top: 22px;
  border-bottom: 1.5px solid var(--border);
  margin-bottom: 14px;
  transition: border-color .3s;
}
.anim-input.is-active,
.anim-input:focus-within {
  border-bottom-color: var(--green);
}
.anim-label {
  position: absolute; left: 0; bottom: 12px;
  pointer-events: none;
  font-size: 1rem; font-weight: 400;
  color: var(--cream);
  white-space: nowrap;
  user-select: none;
}
.anim-label-letter {
  display: inline-block;
  transition: transform .55s var(--spring), color .35s ease;
  transition-delay: calc(var(--i, 0) * 28ms);
  will-change: transform;
}
.anim-input.is-active .anim-label-letter {
  transform: translateY(-130%);
  color: var(--muted);
}

.anim-input input,
.anim-input textarea,
.anim-input select {
  width: 100%;
  background: transparent;
  border: none;
  padding: 8px 0 12px;
  color: var(--cream); font-size: 1rem; font-weight: 400;
  outline: none; border-radius: 0;
  font-family: inherit;
  -webkit-appearance: none; appearance: none;
}
.anim-input textarea { resize: vertical; min-height: 90px; padding-top: 4px; }
.anim-input select { cursor: pointer; }
.anim-input select option { background: #FFFFFF; color: var(--cream); }

.anim-row { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }

.form-submit {
  width: 100%; margin-top: 40px; padding: 18px;
  background: var(--green); color: #fff;
  font-size: .94rem; font-weight: 500;
  border-radius: 100px;
  transition: background .2s;
}
.form-submit:hover { background: #25613f; }
.form-success {
  display: none; padding: 28px; text-align: center;
  font-size: 1rem; font-weight: 600; color: var(--cream);
}

/* ── FOOTER ──────────────────────────────────────────────────────────────── */
footer {
  background: #EEEFEB;
  padding: clamp(80px,10vh,120px) var(--gutter) 48px;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: grid; grid-template-columns: 260px 1fr;
  gap: 80px; align-items: start; margin-bottom: 72px;
}
.footer-brand { display: flex; flex-direction: column; gap: 20px; }
.footer-logo { display: inline-block; height: 37px; }
.footer-logo img { height: 37px; width: auto; }
.footer-tagline { font-size: .82rem; font-weight: 300; color: var(--muted); line-height: 1.7; max-width: 220px; }
.footer-cols { display: grid; grid-template-columns: repeat(3,1fr); gap: 56px; }
.footer-col-label {
  font-size: .68rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--muted); margin-bottom: 24px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 13px; }
.footer-col a,
.footer-col span { font-size: .82rem; font-weight: 300; color: var(--dim); transition: color .2s; }
.footer-col a:hover { color: var(--green); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
  padding-top: 32px; border-top: 1px solid var(--border);
}
.footer-copy { font-size: .74rem; color: var(--muted); }
.footer-admin {
  font-size: .74rem; color: var(--muted);
  transition: color .2s;
}
.footer-admin:hover { color: var(--green); }

/* ── PROJECT DETAIL PAGE (projekt.html) — full width ─────────────────────── */
.pd {
  max-width: none; margin: 0;
  padding: calc(var(--nav-h) + clamp(36px,6vh,72px)) var(--gutter) var(--sec-pad);
}
.pd-back {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: .85rem; font-weight: 500; color: var(--dim);
  transition: color .2s;
}
.pd-back svg { transition: transform .25s var(--ease); }
.pd-back:hover { color: var(--green); }
.pd-back:hover svg { transform: translateX(-4px); }
.pd-head { margin: clamp(28px,5vh,52px) 0 clamp(28px,4vh,44px); }
.pd-beef { height: 8px; width: auto; display: block; margin-bottom: 18px; opacity: .6; }
.pd-cat {
  font-size: .72rem; font-weight: 500; text-transform: uppercase; letter-spacing: .14em;
  color: var(--muted); margin-bottom: 16px;
}
.pd-title {
  font-size: clamp(2rem, 4.6vw, 3.6rem); font-weight: 600;
  letter-spacing: -.03em; line-height: 1.02; color: var(--cream);
  text-wrap: balance; margin-bottom: 14px;
}
.pd-sub { font-size: .95rem; font-weight: 300; color: var(--dim); }
/* Single full-width carousel */
.pd-carousel {
  position: relative; width: 100%;
  aspect-ratio: 21/9; overflow: hidden;
  border-radius: var(--radius); background: var(--navy3);
  margin-bottom: clamp(40px,6vh,72px);
}
.pd-carousel-track { display: flex; height: 100%; transition: transform .55s var(--ease); }
.pd-cslide { flex: 0 0 100%; height: 100%; cursor: zoom-in; }
.pd-cslide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-cbtn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(255,255,255,.86); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  color: var(--cream); z-index: 2;
  transition: background .2s, transform .2s;
}
.pd-cbtn:hover { background: #fff; transform: translateY(-50%) scale(1.06); }
.pd-cprev { left: 20px; }
.pd-cnext { right: 20px; }
.pd-zoom-hint {
  position: absolute; top: 18px; right: 18px; z-index: 2;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 100px;
  background: rgba(23,33,28,.55); backdrop-filter: blur(6px);
  color: #fff; font-size: .72rem; font-weight: 500; letter-spacing: .04em;
  pointer-events: none;
}
.pd-dots { position: absolute; bottom: 18px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; z-index: 2; }
.pd-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.5); border: none; cursor: pointer; padding: 0; transition: background .2s, width .3s; }
.pd-dot.active { background: #fff; width: 20px; border-radius: 3px; }

.pd-body {
  display: grid; grid-template-columns: 1.7fr 1fr;
  gap: clamp(40px,5vw,90px); align-items: start;
}
.pd-desc { max-width: 760px; }
.pd-desc span { display: block; font-size: 1.02rem; line-height: 1.9; font-weight: 300; color: rgba(23,33,28,.85); }
.pd-desc span + span { margin-top: 18px; }
.pd-card {
  position: sticky; top: calc(var(--nav-h) + 20px);
  background: var(--navy2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: clamp(24px,3vw,36px);
}
.pd-card-label {
  font-size: .66rem; font-weight: 500; text-transform: uppercase; letter-spacing: .14em;
  color: var(--muted); margin-bottom: 18px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.pd-facts { display: flex; flex-direction: column; gap: 14px; }
.pd-fact dt { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 4px; }
.pd-fact dd { font-size: .9rem; font-weight: 300; line-height: 1.5; color: var(--cream); }
.pd-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.pd-tag {
  font-size: .72rem; font-weight: 500; padding: 6px 13px; border-radius: 100px;
  border: 1px solid var(--green-line); color: var(--green);
}
#pdArticle { margin-top: 24px; }
.pd-card-cta { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--border); }
.pd-card-cta p { font-size: .9rem; font-weight: 300; color: var(--dim); margin-bottom: 16px; line-height: 1.5; }
.pd-foot-cta { margin-top: clamp(48px,7vh,80px); padding-top: 32px; border-top: 1px solid var(--border); }

/* Lightbox */
.pd-lightbox {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(20,28,24,.95); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .3s var(--ease);
}
.pd-lightbox.open { opacity: 1; pointer-events: all; }
.pd-lightbox img {
  max-width: 92vw; max-height: 86vh; object-fit: contain;
  border-radius: 8px; box-shadow: 0 30px 90px -20px rgba(0,0,0,.6);
}
.pd-lb-close {
  position: absolute; top: 24px; right: 24px; z-index: 2;
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center; color: #fff;
  transition: background .2s;
}
.pd-lb-close:hover { background: rgba(255,255,255,.25); }
.pd-lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 54px; height: 54px; border-radius: 50%;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center; color: #fff;
  transition: background .2s;
}
.pd-lb-nav:hover { background: rgba(255,255,255,.25); }
.pd-lb-prev { left: clamp(12px,3vw,40px); }
.pd-lb-next { right: clamp(12px,3vw,40px); }
.pd-lb-count {
  position: absolute; bottom: 26px; left: 0; right: 0; text-align: center;
  color: rgba(255,255,255,.7); font-size: .8rem; letter-spacing: .06em;
}

@media (max-width: 860px) {
  .pd-body { grid-template-columns: 1fr; gap: 36px; }
  .pd-card { position: static; }
  .pd-carousel { aspect-ratio: 4/3; }
  .pd-cbtn { width: 46px; height: 46px; }
  .pd-cprev { left: 12px; } .pd-cnext { right: 12px; }
}

/* ── MODAL ───────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(23,33,28,0.5);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; opacity: 0; pointer-events: none; transition: opacity .3s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--navy2); width: min(940px,100%); max-height: 90vh;
  overflow-y: auto; display: grid; grid-template-columns: 1fr 1fr;
  border-radius: var(--radius); overflow: hidden;
  transform: translateY(20px) scale(.98); transition: transform .4s var(--ease);
}
.modal-overlay.open .modal { transform: none; }
.modal--no-media { grid-template-columns: 1fr; max-width: 640px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.modal--no-media .modal-gallery { display: none; }
.modal--no-media .modal-info { padding: clamp(28px,4vw,56px) clamp(24px,4vw,56px); }
.modal--no-media .modal-desc { max-width: 60ch; }
.modal--no-media .modal-close { position: sticky; top: 0; z-index: 3; }
.modal-article { margin-top: 28px; }
.modal-article-link {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 24px; border-radius: 100px;
  border: 1px solid var(--green); color: var(--green);
  font-size: .86rem; font-weight: 500;
  transition: background .2s, color .2s;
}
.modal-article-link:hover { background: var(--green); color: #fff; }
.modal-gallery { position: sticky; top: 0; height: 90vh; overflow: hidden; }
.carousel { position: relative; height: 100%; }
.carousel-track { display: flex; height: 100%; transition: transform .5s var(--ease); }
.carousel-slide { flex: 0 0 100%; height: 100%; overflow: hidden; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.carousel-btn {
  position: absolute; bottom: 16px; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(23,33,28,.62); display: flex; align-items: center; justify-content: center;
  color: #fff; z-index: 2; transition: background .2s;
}
.carousel-btn:hover { background: var(--green); }
.carousel-prev { right: 64px; }
.carousel-next { right: 16px; }
.carousel-dots { position: absolute; bottom: 26px; left: 18px; display: flex; gap: 5px; }
.carousel-dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.45); transition: background .2s, width .3s; }
.carousel-dot.active { background: #fff; width: 16px; border-radius: 3px; }
.modal-info { padding: 52px 44px; display: flex; flex-direction: column; }
.modal-close {
  align-self: flex-end; width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--border); display: flex; align-items: center; justify-content: center;
  color: var(--dim); transition: background .2s, color .2s; margin-bottom: 28px;
}
.modal-close:hover { background: var(--cream); color: var(--navy); }
.modal-cat {
  font-size: .68rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--muted); margin-bottom: 12px;
}
.modal-title {
  font-size: clamp(1.4rem,2.8vw,2rem); font-weight: 600;
  letter-spacing: -.025em; line-height: 1.1;
  color: var(--cream); margin-bottom: 20px;
}
.modal-desc { font-size: .88rem; line-height: 1.8; color: var(--dim); margin-bottom: 32px; }
.modal-desc span { display: block; }
.modal-desc span + span { margin-top: 14px; }
.modal-facts-wrap { margin-bottom: 28px; }
.modal-facts-label {
  font-size: .66rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--muted); margin-bottom: 16px;
  padding-bottom: 14px; border-bottom: 1px solid var(--border);
}
.modal-facts { display: flex; flex-direction: column; gap: 12px; }
.modal-fact {
  display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: 8px 20px;
  font-size: .84rem; line-height: 1.55;
}
.modal-fact dt { color: var(--muted); font-weight: 400; }
.modal-fact dd { color: var(--cream); font-weight: 300; }
.modal-fact:only-child dd, .modal-fact dd:only-child { grid-column: 1 / -1; }
.modal-tags { display: flex; flex-wrap: wrap; gap: 0; font-size: .78rem; color: var(--dim); }
.modal-tag {
  font-size: .78rem; font-weight: 300; padding: 0;
  background: transparent; color: var(--dim);
}
.modal-tag:not(:last-child)::after { content: ' · '; color: var(--muted); }

/* ── FLIP WORD ───────────────────────────────────────────────────────────── */
.flip-word { display: inline-block; position: relative; }
@keyframes flipExit {
  0%   { opacity: 1; filter: blur(0); transform: translateY(0) scale(1); }
  100% { opacity: 0; filter: blur(6px); transform: translateY(-18px) scale(1.2); }
}
@keyframes flipEnter {
  0%   { opacity: 0; filter: blur(6px); transform: translateY(18px); }
  100% { opacity: 1; filter: blur(0); transform: translateY(0); }
}
.flip-word.flip-exit { animation: flipExit .28s ease forwards; }
.flip-word.flip-enter { animation: flipEnter .38s ease forwards; }

/* ── REVEAL ──────────────────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .65s var(--ease), transform .65s var(--ease); }
.reveal.in-view { opacity: 1; transform: none; }
.d1 { transition-delay: .08s; }
.d2 { transition-delay: .16s; }
.d3 { transition-delay: .24s; }

/* ── REDUCED MOTION ──────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-inner { grid-template-columns: 1fr; gap: 40px; }
  .process-steps { grid-template-columns: 1fr 1fr; }
  .ref-head { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 56px; }
  .nav-overlay { width: 72vw; }
}
@media (max-width: 768px) {
  /* Tighter rhythm + narrower gutters on mobile */
  :root { --sec-pad: clamp(56px, 8vh, 88px); --gutter: clamp(20px, 5vw, 40px); }
  #about-title { white-space: normal; }
  .about-cards { grid-template-columns: 1fr; gap: 0; margin-top: 48px; }
  .about-card { border-right: none !important; padding-left: 0 !important; padding-right: 0 !important; }
  .gallery-slide { flex: 0 0 86vw; }
  .gallery-card { aspect-ratio: 4/5; border-radius: 22px; }
  .gallery-card-title { font-size: clamp(1.4rem, 5vw, 1.8rem); }
  .process-steps { grid-template-columns: 1fr; margin-top: 48px; row-gap: clamp(36px, 5vh, 52px); }
  .ref-head { margin-bottom: 40px; }
  .contact-grid { gap: 36px; }
  .contact-details { grid-template-columns: 1fr; gap: 18px; margin-top: 36px; padding-top: 28px; }
  .anim-row { grid-template-columns: 1fr; gap: 0; }
  .modal { grid-template-columns: 1fr; }
  .modal-gallery { position: relative; height: 260px; }
  .modal-info { padding: 28px 20px; }
  .footer-inner { gap: 32px; margin-bottom: 40px; }
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 28px; }
  .proj-nav-btn { width: 52px; height: 52px; }
  .nav-overlay { width: 88vw; }
}
@media (max-width: 480px) {
  .hero-ctas { flex-direction: column; align-items: center; }
  .footer-cols { grid-template-columns: 1fr; }
  .proj-header { flex-direction: column; align-items: flex-start; }
}
