/* =====================================================
   style.css — Madina Bekassyl Interior Design
   fromanother.love inspired — editorial, cinematic
   ===================================================== */

/* === TOKENS ========================================= */
:root {
  --bg:       #F2EDE3;
  --bg-dark:  #0C0B08;
  --bg-mid:   #141209;
  --bg-warm:  #E8E0D0;
  --text:     #18160F;
  --gold:     #B8883A;
  --gold-dim: #9A7030;
  --gold-lt:  #D4A85A;
  --muted:    #7A7060;
  --border:   rgba(255,255,255,0.07);
  --border-l: #D5CCB8;

  --serif:         'Cormorant Garamond', Georgia, serif;
  --serif-display: 'Cormorant', 'Cormorant Garamond', Georgia, serif;
  --sans:          'Inter', system-ui, sans-serif;

  --ease:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in: cubic-bezier(0.55, 0, 1, 0.45);

  --pad:   clamp(1.5rem, 5vw, 5rem);
  --max:   1440px;
  --nav-h: 72px;
}

/* === RESET =========================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.lenis-smooth { overflow: hidden; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { background: none; border: none; cursor: pointer; font: inherit; color: inherit; }

/* === NOISE =========================================== */
.noise {
  position: fixed; inset: 0; z-index: 9000;
  pointer-events: none; opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='250' height='250' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* === PRELOADER ======================================= */
.preloader {
  position: fixed; inset: 0; z-index: 9500;
  background: var(--bg-dark);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  transition: opacity 0.9s var(--ease), visibility 0.9s;
}
.preloader.out { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader__count {
  font-family: var(--serif-display);
  font-size: clamp(5rem, 14vw, 12rem);
  font-weight: 300; color: var(--bg);
  line-height: 1; letter-spacing: -0.02em;
}
.preloader__bar {
  margin-top: 1.5rem;
  width: clamp(200px, 30vw, 360px); height: 1px;
  background: rgba(255,255,255,0.08); position: relative; overflow: hidden;
}
.preloader__bar-fill {
  position: absolute; inset: 0 100% 0 0;
  background: var(--gold);
  transition: right 0.04s linear;
}

/* === CURSOR ========================================== */
.cur-dot {
  position: fixed; top: 0; left: 0; z-index: 8998;
  width: 6px; height: 6px;
  background: var(--gold); border-radius: 50%;
  pointer-events: none; transform: translate(-50%, -50%);
  opacity: 0; transition: opacity 0.3s; will-change: left, top;
}
.cur-ring {
  position: fixed; top: 0; left: 0; z-index: 8997;
  width: 38px; height: 38px;
  border: 1px solid rgba(184,136,58,0.45); border-radius: 50%;
  pointer-events: none; transform: translate(-50%, -50%);
  opacity: 0; transition: opacity 0.3s, width 0.35s var(--ease), height 0.35s var(--ease), border-color 0.3s;
  will-change: left, top;
}
.has-cursor .cur-dot,
.has-cursor .cur-ring { opacity: 1; }
.cur-hover .cur-ring { width: 56px; height: 56px; border-color: rgba(184,136,58,0.65); }

/* === NAV ============================================= */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 500;
  height: var(--nav-h);
  transition: background 0.4s var(--ease), box-shadow 0.4s;
}
.nav.scrolled {
  background: rgba(12,11,8,0.92);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border);
}
.nav__i {
  max-width: var(--max); margin: auto; padding: 0 var(--pad);
  height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.nav__logo { height: 28px; }
.nav__logo img { height: 100%; width: auto; }
.nav__links { display: flex; gap: 2.5rem; }
.nav__lk {
  font-size: 11px; letter-spacing: 0.1em;
  color: rgba(242,237,227,0.6); position: relative; transition: color 0.2s;
}
.nav__lk::after {
  content: ''; position: absolute; bottom: -3px; left: 0; right: 0; height: 1px;
  background: var(--gold); transform: scaleX(0); transform-origin: right;
  transition: transform 0.3s var(--ease);
}
.nav__lk:hover { color: rgba(242,237,227,1); }
.nav__lk:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__cta {
  font-size: 10px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  border: 1px solid rgba(184,136,58,0.5); color: var(--gold); padding: 0.5rem 1.4rem;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.nav__cta:hover { background: var(--gold); border-color: var(--gold); color: var(--bg-dark); }
.nav__burger { display: none; flex-direction: column; gap: 5px; width: 26px; }
.nav__burger span { display: block; height: 1px; background: rgba(242,237,227,0.7); transition: transform 0.3s, opacity 0.3s; }
.nav__burger.open span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.nav__burger.open span:nth-child(2) { opacity: 0; }
.nav__burger.open span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

/* === MOBILE MENU ===================================== */
.mob {
  position: fixed; inset: 0; z-index: 490;
  background: var(--bg-dark);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2rem;
  transform: translateX(100%); transition: transform 0.5s var(--ease);
}
.mob.open { transform: none; }
.mob__lk {
  font-family: var(--serif-display);
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 300; color: var(--bg); transition: color 0.2s;
}
.mob__lk:hover { color: var(--gold); }

/* === HERO ============================================ */
.hero {
  position: relative;
  height: 100vh;
  height: 100dvh; /* dynamic viewport height — fixes mobile browser chrome + Telegram WebView */
  min-height: 600px;
  background: var(--bg-dark);
  overflow: hidden;
  display: flex; flex-direction: column;
}

.hero__canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%; z-index: 0;
  opacity: 0; transition: opacity 1.5s ease;
}
.hero__canvas.ready { opacity: 1; }

/* Vignette overlay: darker bottom + subtle left bias for text legibility */
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(to bottom, rgba(12,11,8,0.1) 0%, rgba(12,11,8,0.6) 100%),
    linear-gradient(to right,  rgba(12,11,8,0.65) 0%, rgba(12,11,8,0.15) 60%, transparent 100%);
  pointer-events: none;
}

/* Main layout wrapper */
.hero__wrap {
  position: relative; z-index: 2;
  flex: 1; display: flex; flex-direction: column;
  padding: calc(var(--nav-h) + 2.5rem) var(--pad) 3.5rem;
  /* Safe area insets for iPhone notch / home indicator */
  padding-bottom: max(3.5rem, env(safe-area-inset-bottom, 3.5rem));
  max-width: var(--max); width: 100%; margin: 0 auto;
}

/* Top row: tag left, signature right */
.hero__eyebrow {
  display: flex; justify-content: space-between; align-items: flex-start;
}
.hero__tag {
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--gold); display: block; opacity: 0;
}

/* Center: huge name + floating project image */
.hero__center {
  flex: 1; display: flex; align-items: center;
  position: relative; margin: 1.5rem 0;
}

.hero__title {
  font-family: var(--serif-display);
  font-size: clamp(4.5rem, 12.5vw, 16rem);
  font-weight: 300; line-height: 0.88;
  letter-spacing: -0.02em; color: var(--bg);
}
.hero__title-line { display: block; overflow: hidden; }
.hero__title-line span { display: block; }
.hero__title-line.italic {
  font-style: italic; color: var(--gold);
  padding-left: 0.08em;
}

/* === HERO FEAT: DYNAMIC SLIDESHOW =================== */
.hero__feat {
  position: absolute; right: 0; top: 50%;
  transform: translateY(-50%);
  width: clamp(200px, 26vw, 420px);
  height: clamp(260px, 34vw, 540px);
  opacity: 0; /* fades in via GSAP */
}

/* Image slides stack on top of each other */
.hero__feat-slides {
  position: relative; width: 100%; height: 100%;
  overflow: hidden;
}
.hero__feat-slide {
  position: absolute; inset: 0;
  opacity: 0;
  clip-path: inset(0 0 0 100%);
}
.hero__feat-slide.is-active {
  opacity: 1;
  clip-path: inset(0 0% 0 0);
}
.hero__feat-slide img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transform: scale(1.08);
  transform-origin: center;
}

/* Decorative gold frames offset from the image */
.hero__feat-frame {
  position: absolute;
  border: 1px solid;
  pointer-events: none;
}
.hero__feat-frame--back {
  inset: -14px auto auto -14px;
  width: calc(100% - 14px);
  height: calc(100% - 14px);
  border-color: rgba(184,136,58,0.25);
  z-index: -1;
}
.hero__feat-frame--front {
  inset: auto -14px -14px auto;
  width: calc(100% - 14px);
  height: calc(100% - 14px);
  border-color: rgba(184,136,58,0.10);
  z-index: -1;
}

/* Bottom meta: project name + dot indicators */
.hero__feat-meta {
  position: absolute;
  bottom: -2rem; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
}
.hero__feat-lbl {
  font-size: 9px; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(242,237,227,0.32);
  transition: opacity 0.4s;
}
.hero__feat-dots { display: flex; gap: 6px; align-items: center; }
.hero__feat-dot {
  height: 1px; width: 16px;
  background: rgba(184,136,58,0.28);
  transition: background 0.4s, width 0.4s;
  cursor: pointer;
}
.hero__feat-dot.is-active { background: var(--gold); width: 28px; }

/* Bottom row: tagline + meta + scroll */
.hero__foot {
  display: flex; align-items: flex-end; gap: 2.5rem; flex-wrap: wrap;
}
.hero__tagline {
  font-family: var(--serif-display);
  font-size: clamp(0.9rem, 1.25vw, 1.2rem);
  font-style: italic; color: rgba(242,237,227,0.42);
  opacity: 0; flex: 1; min-width: 180px;
}
.hero__meta {
  display: flex; align-items: center; gap: 0.75rem;
  font-size: 10px; letter-spacing: 0.1em; color: rgba(242,237,227,0.28);
  opacity: 0;
}
.hero__sep { width: 3px; height: 3px; border-radius: 50%; background: var(--gold); flex-shrink: 0; }
.hero__scroll {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.6rem;
  font-size: 9px; font-weight: 500; letter-spacing: 0.25em; text-transform: uppercase;
  color: rgba(242,237,227,0.28); opacity: 0;
}
.hero__scroll-line {
  width: 1px; height: 52px;
  background: rgba(255,255,255,0.12);
}

/* === MARQUEE ========================================= */
.marquee {
  background: var(--gold);
  overflow: hidden;
  padding: 0;
}
.marquee__track {
  display: flex; white-space: nowrap;
  will-change: transform;
}
.marquee__track--fwd {
  animation: marqueeLeft  26s linear infinite;
  padding: 1rem 0 0.5rem;
}
.marquee__track--rev {
  animation: marqueeRight 26s linear infinite;
  padding: 0.5rem 0 1rem;
}
.marquee__item {
  display: flex; align-items: center; gap: 2rem; padding-right: 2rem;
  font-size: 11px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--bg-dark); flex-shrink: 0;
}
.marquee__dot { width: 4px; height: 4px; border-radius: 50%; background: rgba(12,11,8,0.3); flex-shrink: 0; }
@keyframes marqueeLeft  { 0% { transform: translateX(0); }    100% { transform: translateX(-50%); } }
@keyframes marqueeRight { 0% { transform: translateX(-50%); } 100% { transform: translateX(0); } }

/* === STATS =========================================== */
.stats { background: var(--bg-dark); padding: 4rem var(--pad); }
.stats__i {
  max-width: var(--max); margin: auto;
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.stats__cell { text-align: center; padding: 0 1.5rem; border-left: 1px solid var(--border); }
.stats__cell:first-child { border-left: none; }
.stats__n {
  display: block; font-family: var(--serif-display);
  font-size: clamp(1.8rem, 3.2vw, 3.2rem);
  font-weight: 300; color: var(--gold); line-height: 1; margin-bottom: 0.5rem;
}
.stats__l { display: block; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(242,237,227,0.3); }

/* === STATEMENT ======================================= */
.statement { background: var(--bg-dark); padding: 8rem var(--pad); border-top: 1px solid var(--border); }
.statement__i { max-width: 860px; margin: auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2.5rem; }
.statement__text {
  font-family: var(--serif-display);
  font-size: clamp(1.35rem, 2.4vw, 2.2rem);
  font-weight: 300; font-style: italic;
  color: rgba(242,237,227,0.7); line-height: 1.65;
}
.statement__line { width: 48px; height: 1px; background: var(--gold); }
.statement__sub { font-size: 10px; font-weight: 500; letter-spacing: 0.26em; text-transform: uppercase; color: rgba(242,237,227,0.22); }

/* === ABOUT =========================================== */
.about-wrap { background: var(--bg); }
.about {
  padding: 10rem var(--pad);
  max-width: var(--max); margin: auto;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(4rem, 8vw, 9rem); align-items: center;
}
.about__visual { position: relative; }
.about__img { aspect-ratio: 3/4; overflow: hidden; position: relative; }
.about__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); will-change: transform; }
.about__img:hover img { transform: scale(1.05); }
.about__frame { position: absolute; top: 1.25rem; right: -1.25rem; bottom: -1.25rem; left: 1.25rem; border: 1px solid var(--border-l); pointer-events: none; z-index: -1; }
.about__num { position: absolute; top: -1.5rem; right: -2rem; font-family: var(--serif-display); font-size: clamp(5rem, 10vw, 10rem); font-weight: 300; line-height: 1; color: rgba(26,24,15,0.055); letter-spacing: -0.04em; pointer-events: none; user-select: none; }
.about__tag { font-size: 9px; font-weight: 600; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold); margin-bottom: 1.5rem; display: block; }
.about__h { font-family: var(--serif-display); font-size: clamp(2.5rem, 4vw, 4rem); font-weight: 300; line-height: 1.1; margin-bottom: 2rem; }
.about__h em { font-style: italic; color: var(--gold); }
.about__text { margin-bottom: 2rem; }
.about__text p { font-size: 14px; color: var(--muted); line-height: 1.9; margin-bottom: 1rem; }
.about__creds { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 2.5rem; }
.about__cred { display: flex; align-items: center; gap: 0.8rem; font-size: 12px; color: var(--muted); }
.about__cred::before { content: ''; width: 20px; height: 1px; background: var(--gold); flex-shrink: 0; }

/* === BUTTONS ========================================= */
.btn {
  display: inline-flex; align-items: center; gap: 0.65rem;
  font-size: 10px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase;
  transition: all 0.25s var(--ease);
}
.btn::after { content: '→'; transition: transform 0.25s; }
.btn:hover::after { transform: translateX(5px); }
.btn--gold { padding: 0.9rem 2rem; background: var(--gold); border: 1px solid var(--gold); color: var(--bg-dark); }
.btn--gold:hover { background: var(--gold-dim); border-color: var(--gold-dim); }
.btn--outline { padding: 0.9rem 2rem; border: 1px solid var(--gold); color: var(--gold); }
.btn--outline:hover { background: var(--gold); color: var(--bg-dark); }

/* === PORTFOLIO ======================================= */
.folio { background: var(--bg-dark); padding: 8rem var(--pad) 10rem; }
.folio__i { max-width: var(--max); margin: auto; }
.folio__hd { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 1px solid var(--border); padding-bottom: 2rem; margin-bottom: 0; }
.folio__tag { font-size: 9px; font-weight: 600; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; display: block; }
.folio__h { font-family: var(--serif-display); font-size: clamp(2.5rem, 4vw, 4rem); font-weight: 300; color: var(--bg); line-height: 1.1; }
.folio__count { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(242,237,227,0.28); padding-bottom: 0.3rem; }

/* Project image grid */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
  margin-top: 4px;
}

.proj-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: #0a0908;
}

/* Span variants */
.proj-card--full   { grid-column: 1 / -1; height: clamp(320px, 36vw, 540px); }
.proj-card--half   { grid-column: span 6; height: clamp(300px, 35vw, 520px); }
.proj-card--wide   { grid-column: span 7; height: clamp(280px, 32vw, 480px); }
.proj-card--narrow { grid-column: span 5; height: clamp(280px, 32vw, 480px); }

/* Image fills the card */
.proj-card__img {
  position: absolute; inset: 0;
  overflow: hidden;
}
.proj-card__img img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transform: scale(1.07);
  transition: transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.proj-card:hover .proj-card__img img { transform: scale(1); }

/* Gradient overlay */
.proj-card__img::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(
    to top,
    rgba(12,11,8,0.92) 0%,
    rgba(12,11,8,0.45) 35%,
    rgba(12,11,8,0.08) 65%,
    transparent 100%
  );
  transition: opacity 0.45s;
}
.proj-card:hover .proj-card__img::after { opacity: 0.7; }

/* Info overlay */
.proj-card__body {
  position: absolute; inset: 0; z-index: 2;
  padding: 1.75rem 2rem;
  display: flex; flex-direction: column;
  pointer-events: none;
}
.proj-card__num {
  font-family: var(--serif-display);
  font-size: 0.82rem; font-weight: 300;
  color: rgba(255,255,255,0.22);
  letter-spacing: 0.06em;
}
.proj-card__info {
  margin-top: auto;
  transform: translateY(6px);
  transition: transform 0.42s var(--ease);
}
.proj-card:hover .proj-card__info { transform: none; }
.proj-card__name {
  font-family: var(--serif-display);
  font-size: clamp(1.4rem, 2.2vw, 2.6rem);
  font-weight: 300; color: var(--bg); line-height: 1.1;
}
.proj-card__sub {
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(242,237,227,0.35); margin-top: 0.4rem;
}

/* Arrow — top right, reveals on hover */
.proj-card__arr {
  position: absolute; top: 1.75rem; right: 2rem; z-index: 3;
  width: 44px; height: 44px;
  border: 1px solid rgba(255,255,255,0.12); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.3); font-size: 1.05rem;
  transform: scale(0.75) rotate(-45deg);
  opacity: 0;
  transition: opacity 0.34s var(--ease), transform 0.34s var(--ease), border-color 0.34s, color 0.34s;
}
.proj-card:hover .proj-card__arr {
  opacity: 1; transform: scale(1) rotate(0deg);
  border-color: var(--gold); color: var(--gold);
}

/* === SERVICES ======================================== */
.svcs { padding: 9rem var(--pad); background: var(--bg-warm); }
.svcs__i { max-width: var(--max); margin: auto; }
.svcs__hd { margin-bottom: 5rem; }
.svcs__tag { font-size: 9px; font-weight: 600; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; display: block; }
.svcs__h { font-family: var(--serif-display); font-size: clamp(2.5rem, 4vw, 4rem); font-weight: 300; line-height: 1.1; }
.svcs__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; }
.svc { background: rgba(255,255,255,0.5); padding: 3rem; display: flex; flex-direction: column; transition: background 0.35s, color 0.35s; }
.svc:hover { background: var(--bg-dark); color: var(--bg); }
.svc__n { font-family: var(--serif-display); font-size: 5rem; font-weight: 300; color: var(--border-l); line-height: 1; margin-bottom: 1.5rem; transition: color 0.35s; }
.svc:hover .svc__n { color: rgba(255,255,255,0.05); }
.svc__title { font-family: var(--serif-display); font-size: 1.6rem; font-weight: 400; margin-bottom: 0.9rem; line-height: 1.2; }
.svc__desc { font-size: 13px; line-height: 1.85; color: var(--muted); flex: 1; margin-bottom: 1.75rem; transition: color 0.35s; }
.svc:hover .svc__desc { color: rgba(242,237,227,0.4); }
.svc__price { font-family: var(--serif-display); font-size: 1.15rem; font-weight: 500; color: var(--gold); }
.svc__example { display: block; font-family: var(--sans); font-size: 11px; font-weight: 300; color: rgba(122,112,96,0.7); margin-top: 0.3rem; transition: color 0.35s; }
.svc:hover .svc__example { color: rgba(242,237,227,0.3); }

/* === PROCESS ========================================= */
.proc { padding: 9rem var(--pad); background: var(--bg-dark); }
.proc__i { max-width: var(--max); margin: auto; }
.proc__hd { margin-bottom: 6rem; }
.proc__tag { font-size: 9px; font-weight: 600; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; display: block; }
.proc__h { font-family: var(--serif-display); font-size: clamp(2.5rem, 4vw, 4rem); font-weight: 300; color: var(--bg); line-height: 1.1; margin-bottom: 1.25rem; }
.proc__h em { font-style: italic; color: var(--gold); }
.proc__lead { font-size: 14px; color: rgba(242,237,227,0.38); max-width: 520px; line-height: 1.8; }
.proc__steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4rem; }
.pstep { border-top: 1px solid var(--border); padding-top: 2rem; }
.pstep__n { font-family: var(--serif-display); font-size: 4rem; font-weight: 300; color: var(--gold); line-height: 1; margin-bottom: 1.25rem; }
.pstep__t { font-size: 0.9rem; font-weight: 500; letter-spacing: 0.05em; color: var(--bg); margin-bottom: 0.75rem; }
.pstep__d { font-size: 13px; line-height: 1.85; color: rgba(242,237,227,0.38); }
.pstep__free { display: inline-block; font-family: var(--sans); font-size: 9px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); border: 1px solid rgba(184,136,58,0.4); padding: 0.15rem 0.5rem; vertical-align: middle; margin-left: 0.5rem; }

/* === CONTACT ========================================= */
.contact { position: relative; padding: 10rem var(--pad); background: var(--bg-dark); overflow: hidden; }
.contact__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: 0.6; }
.contact__i { position: relative; z-index: 1; max-width: var(--max); margin: auto; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(4rem, 8vw, 9rem); align-items: start; }
.contact__tag { font-size: 9px; font-weight: 600; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold); margin-bottom: 1.5rem; display: block; }
.contact__h { font-family: var(--serif-display); font-size: clamp(2.5rem, 5vw, 5rem); font-weight: 300; color: var(--bg); line-height: 1.05; margin-bottom: 1.75rem; }
.contact__h em { font-style: italic; color: var(--gold); }
.contact__p { font-size: 14px; color: rgba(242,237,227,0.4); line-height: 1.85; margin-bottom: 1.5rem; }
.contact__usp { font-size: 12px; font-weight: 500; letter-spacing: 0.03em; color: var(--gold); border-left: 2px solid var(--gold); padding-left: 1rem; margin-bottom: 2.5rem; line-height: 1.7; }
.contact__r { padding-top: 3rem; }
.contact__items { display: flex; flex-direction: column; gap: 2.5rem; }
.ci__label { font-size: 9px; font-weight: 600; letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.4rem; }
.ci__val { font-family: var(--serif-display); font-size: 1.3rem; font-weight: 400; color: rgba(242,237,227,0.72); }
.ci__val a { transition: color 0.2s; }
.ci__val a:hover { color: var(--gold); }

/* === FOOTER ========================================== */
.footer { background: var(--bg-mid); padding: 2.5rem var(--pad); }
.footer__i { max-width: var(--max); margin: auto; display: flex; align-items: center; justify-content: space-between; }
.footer__logo img { height: 24px; width: auto; opacity: 0.35; }
.footer__copy { font-size: 11px; letter-spacing: 0.05em; color: rgba(242,237,227,0.22); }
.footer__links { display: flex; gap: 2rem; }
.footer__lk { font-size: 11px; letter-spacing: 0.05em; color: rgba(242,237,227,0.22); transition: color 0.2s; }
.footer__lk:hover { color: var(--gold); }

/* === GSAP REVEAL ===================================== */
.js-reveal { opacity: 0; transform: translateY(40px); will-change: opacity, transform; }

/* === PERFORMANCE ===================================== */
.about-wrap, .svcs, .proc, .contact { content-visibility: auto; contain-intrinsic-size: 0 900px; }

/* === GALLERY ========================================= */
.gal { position: fixed; inset: 0; z-index: 600; background: var(--bg-dark); transform: translateY(100%); transition: transform 0.65s var(--ease); display: flex; flex-direction: column; overflow: hidden; }
.gal.open { transform: none; }
.gal__head { flex-shrink: 0; background: rgba(12,11,8,0.92); backdrop-filter: blur(20px); padding: 1.25rem 2rem; display: flex; align-items: center; justify-content: space-between; gap: 2rem; border-bottom: 1px solid var(--border); }
.gal__name { font-family: var(--serif-display); font-size: 1.7rem; font-weight: 300; color: var(--bg); line-height: 1.1; }
.gal__meta { font-size: 11px; color: rgba(242,237,227,0.3); margin-top: 0.2rem; }
.gal__close { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: rgba(242,237,227,0.4); font-size: 1.2rem; transition: color 0.2s, transform 0.35s var(--ease); }
.gal__close:hover { color: var(--bg); transform: rotate(90deg); }
.gal__body { flex: 1; overflow-y: auto; padding: 1.5rem 2rem 3rem; }
.gal__grid { columns: 3; column-gap: 8px; }
.gal__item { break-inside: avoid; margin-bottom: 8px; overflow: hidden; cursor: zoom-in; position: relative; opacity: 0; transform: translateY(14px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.gal__item.vis { opacity: 1; transform: none; }
.gal__item img { width: 100%; height: auto; display: block; transition: transform 0.65s var(--ease); }
.gal__item:hover img { transform: scale(1.04); }
.gal__item::after { content: ''; position: absolute; inset: 0; background: rgba(184,136,58,0.05); opacity: 0; transition: opacity 0.25s; }
.gal__item:hover::after { opacity: 1; }

/* === LIGHTBOX ======================================== */
.lb { position: fixed; inset: 0; z-index: 700; background: rgba(8,7,5,0.97); opacity: 0; visibility: hidden; transition: opacity 0.28s, visibility 0.28s; display: flex; flex-direction: column; }
.lb.open { opacity: 1; visibility: visible; }
.lb__head { flex-shrink: 0; padding: 1.25rem 1.5rem; display: flex; align-items: center; justify-content: space-between; }
.lb__counter { font-size: 12px; letter-spacing: 0.12em; color: rgba(255,255,255,0.28); }
.lb__close { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.35); font-size: 1.1rem; transition: color 0.2s, transform 0.35s var(--ease); }
.lb__close:hover { color: #fff; transform: rotate(90deg); }
.lb__stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; padding: 0 5rem; min-height: 0; }
.lb__img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; transition: opacity 0.18s; }
.lb__img.fade { opacity: 0; }
.lb__btn { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,0.1); color: rgba(255,255,255,0.38); font-size: 1.3rem; transition: border-color 0.2s, color 0.2s, background 0.2s; }
.lb__btn:hover { border-color: rgba(255,255,255,0.32); color: #fff; background: rgba(255,255,255,0.04); }
.lb__prev { left: 1rem; }
.lb__next { right: 1rem; }
.lb__thumbs { flex-shrink: 0; height: 84px; display: flex; align-items: center; gap: 5px; padding: 0 1.5rem; overflow-x: auto; scrollbar-width: none; }
.lb__thumbs::-webkit-scrollbar { display: none; }
.lb__thumb { flex-shrink: 0; width: 62px; height: 56px; overflow: hidden; opacity: 0.28; border: 1px solid transparent; cursor: pointer; transition: opacity 0.22s, border-color 0.22s; }
.lb__thumb.active { opacity: 1; border-color: var(--gold); }
.lb__thumb img { width: 100%; height: 100%; object-fit: cover; }

/* === TOUCH / HOVER NONE ============================== */
/* On touch devices hover never fires — show info always visible */
@media (hover: none) {
  .proj-card__info { transform: none; }
  .proj-card__arr {
    opacity: 0.55;
    transform: scale(0.9) rotate(0deg);
    border-color: rgba(184,136,58,0.45);
    color: rgba(184,136,58,0.7);
  }
}

/* === REDUCED MOTION ================================== */
@media (prefers-reduced-motion: reduce) {
  .marquee__track--fwd,
  .marquee__track--rev { animation: none; }
  .hero__canvas { transition: none; }
  .hero__feat { clip-path: inset(0%) !important; }
  .js-reveal { opacity: 1; transform: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* === BACKDROP-FILTER FALLBACK ======================== */
/* Telegram WebView and some Android browsers may not support it */
@supports not (backdrop-filter: blur(1px)) {
  .nav.scrolled { background: rgba(12,11,8,0.97); }
  .gal__head    { background: rgba(12,11,8,0.99); }
}

/* === RESPONSIVE ====================================== */
@media (max-width: 1100px) {
  .about { grid-template-columns: 1fr; }
  .about__num { display: none; }
  .stats__i { grid-template-columns: repeat(2, 1fr); }
  .stats__cell:nth-child(2n+1) { border-left: none; }
  .stats__cell:nth-child(n+3) { border-top: 1px solid var(--border); padding-top: 1.5rem; margin-top: 1.5rem; }
  .proc__steps { grid-template-columns: repeat(2, 1fr); }
  .contact__i { grid-template-columns: 1fr; }
  .contact__r { padding-top: 0; }
  .gal__grid { columns: 2; }
  /* Portfolio: 2-col at medium screens */
  .proj-grid { grid-template-columns: 1fr 1fr; }
  .proj-card--full   { grid-column: 1 / -1; }
  .proj-card--half,
  .proj-card--wide,
  .proj-card--narrow { grid-column: span 1; height: clamp(240px, 30vw, 400px); }
}
@media (max-width: 768px) {
  :root { --pad: 1.25rem; }
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: flex; }
  .cur-dot, .cur-ring { display: none !important; }
  .svcs__grid { grid-template-columns: 1fr; }
  .svc { padding: 2rem; }
  .proc__steps { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer__i { flex-direction: column; gap: 1.25rem; text-align: center; }
  .footer__links { justify-content: center; }
  .gal__grid { columns: 1; }
  .gal__body { padding: 1rem 1rem 2rem; }
  .lb__stage { padding: 0 3rem; }
  .lb__btn { width: 40px; height: 40px; font-size: 1rem; }
  .lb__prev { left: 0.25rem; }
  .lb__next { right: 0.25rem; }
  /* Hero mobile — feat reflows below title instead of absolute */
  .hero__center { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
  .hero__feat {
    position: relative; top: auto; right: auto;
    transform: none;
    width: 62vw;
    height: 42vw;
    min-height: 160px;
    align-self: flex-end;
    margin-right: -1.25rem;
  }
  .hero__feat-frame--back,
  .hero__feat-frame--front { display: none; }
  .hero__feat-meta { bottom: -1.5rem; }
  .hero__foot { gap: 1.5rem; }
  /* Portfolio mobile: single column */
  .proj-grid { grid-template-columns: 1fr; gap: 3px; }
  .proj-card--full,
  .proj-card--half,
  .proj-card--wide,
  .proj-card--narrow { grid-column: 1; height: clamp(220px, 60vw, 360px); }
  .proj-card__arr { display: none; }
  .proj-card__body { padding: 1.25rem 1.5rem; }
  /* About mobile */
  .about { padding: 5rem var(--pad); }
}
