/* ==========================================================================
   LAMA — рекламно-производственная компания
   Design system v2: спокойная студийная эстетика вместо «жидкого стекла»
   ========================================================================== */

:root{
  /* -- palette: тёмный графит + глубокая бирюза + тёплый янтарь -- */
  --bg-1: #FBF9F4;
  --bg-2: #F4F1E8;
  --surface: #FFFFFF;

  --ink: #12242B;
  --ink-soft: #4B5A61;
  --ink-faint: #8B9599;

  --accent-teal: #0F9B99;
  --accent-teal-deep: #0B7674;
  --accent-teal-soft: #E4F3F2;

  --accent-amber: #F2A93B;
  --accent-amber-deep: #D98F1F;
  --accent-amber-soft: #FBEBD1;

  --accent-red: #D6432F;

  /* legacy aliases so nothing else in the sheet needs renaming */
  --accent-indigo: var(--accent-teal);
  --accent-indigo-soft: var(--accent-teal-soft);
  --accent-coral: var(--accent-amber-deep);
  --accent-mint: var(--accent-teal);

  --glass: rgba(255,255,255,0.86);
  --glass-strong: rgba(255,255,255,0.96);
  --glass-border: rgba(18,36,43,0.08);
  --glass-shadow: 0 8px 28px rgba(18,36,43,0.06);

  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;

  --font-display: 'Manrope', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin:0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg-1);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

a{ color: inherit; text-decoration: none; }
img{ max-width: 100%; display: block; }
button{ font-family: inherit; cursor: pointer; }
input, textarea, select{ font-family: inherit; }

::selection{ background: var(--accent-teal); color: #fff; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible{
  outline: 2px solid var(--accent-teal);
  outline-offset: 3px;
}

/* ==========================================================================
   Ambient background — one quiet gradient, no competing blobs
   ========================================================================== */

.mesh-bg{
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: linear-gradient(175deg, var(--bg-1) 0%, var(--bg-1) 55%, var(--bg-2) 100%);
}

.mesh-blob{
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .35;
  will-change: transform;
}
.mesh-blob.b1{
  width: 46vw; height: 46vw; max-width: 620px; max-height: 620px;
  top: -14%; right: -12%;
  background: radial-gradient(circle at 30% 30%, rgba(15,155,153,0.16), transparent 72%);
  animation: driftA 40s ease-in-out infinite;
}
.mesh-blob.b2{ display: none; }
.mesh-blob.b3{ display: none; }
@keyframes driftA{ 0%,100%{ transform: translate(0,0) scale(1); } 50%{ transform: translate(-3%, 4%) scale(1.05); } }

.grain{ display: none; }

/* ==========================================================================
   Surface primitives — flat cards instead of heavy glass/blur everywhere
   ========================================================================== */

.glass-panel{
  background: var(--surface);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius-lg);
}

.glass-chip{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-teal-soft);
  border: 1px solid rgba(15,155,153,0.16);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-teal-deep);
}

.mono-eyebrow{
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-teal-deep);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn:active{ transform: scale(0.97); }

.btn-primary{
  background: var(--accent-amber);
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(242,169,59,0.35);
}
.btn-primary:hover{ background: var(--accent-amber-deep); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(217,143,31,0.4); color: #fff; }

.btn-ghost{
  background: transparent;
  border: 1.5px solid rgba(18,36,43,0.16);
  color: var(--ink);
}
.btn-ghost:hover{ border-color: var(--accent-teal); color: var(--accent-teal-deep); transform: translateY(-2px); }

.btn-outline{
  background: transparent;
  border: 1.5px solid rgba(18,36,43,0.15);
  color: var(--ink);
}
.btn-outline:hover{ border-color: var(--accent-teal); color: var(--accent-teal-deep); }

.btn-sm{ padding: 9px 18px; font-size: 13px; }
.btn-block{ width: 100%; }

/* ==========================================================================
   Cookie bar
   ========================================================================== */

.cookie-bar{
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 20px;
  max-width: min(520px, calc(100vw - 32px));
  border-radius: var(--radius-md);
  transition: opacity .3s ease, transform .3s ease;
}
.cookie-bar p{ margin: 0; font-size: 13px; color: var(--ink-soft); }
.cookie-bar.hidden{ opacity: 0; pointer-events: none; transform: translate(-50%, 20px); }

/* ==========================================================================
   Navbar
   ========================================================================== */

.navbar{
  position: fixed;
  top: 18px;
  left: 0; right: 0;
  z-index: 400;
  display: flex;
  justify-content: center;
  padding: 0 20px;
  transition: top .3s ease;
}

.navbar-inner{
  width: 100%;
  max-width: 1180px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 10px 12px 10px 20px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid transparent;
  transition: padding .3s ease, background .3s ease, border-color .3s ease, box-shadow .3s ease;
}

.navbar.scrolled .navbar-inner{
  background: var(--glass-strong);
  border-color: var(--glass-border);
  box-shadow: var(--glass-shadow);
  padding-top: 8px;
  padding-bottom: 8px;
}

.logo{ display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 18px; margin-right: auto; }
.logo-mark-img{ height: 38px; width: auto; display: block; }
.footer-brand .logo-mark-img{ height: 32px; }
.logo-text{ letter-spacing: .01em; }
.logo-tagline{ display: block; font-family: var(--font-body); font-weight: 600; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); margin-top: 1px; }

.nav-links{ display: flex; align-items: center; gap: 28px; }
.nav-links a{ font-size: 14px; font-weight: 600; color: var(--ink-soft); transition: color .2s ease; position: relative; }
.nav-links a:hover{ color: var(--ink); }
.nav-links a::after{
  content:'';
  position: absolute; left: 0; right: 0; bottom: -6px;
  height: 2px; background: var(--accent-teal);
  transform: scaleX(0); transform-origin: left;
  transition: transform .25s ease;
}
.nav-links a:hover::after{ transform: scaleX(1); }

.nav-cta{ margin-left: 6px; }

.hamburger{
  display: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--surface);
  align-items: center; justify-content: center;
  flex-direction: column; gap: 4px;
}
.hamburger span{ width: 16px; height: 2px; background: var(--ink); border-radius: 2px; transition: all .25s ease; }
.hamburger.open span:nth-child(1){ transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2){ opacity: 0; }
.hamburger.open span:nth-child(3){ transform: translateY(-6px) rotate(-45deg); }

.mobile-overlay{
  position: fixed; inset: 0; z-index: 480;
  background: rgba(18,36,43,0.35);
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
}
.mobile-overlay.active{ opacity: 1; pointer-events: auto; }

.mobile-panel{
  position: fixed; top: 12px; right: 12px; bottom: 12px;
  width: min(320px, 82vw);
  z-index: 490;
  padding: 28px 24px;
  transform: translateX(calc(100% + 24px));
  transition: transform .35s cubic-bezier(.22,.9,.35,1);
  display: flex; flex-direction: column;
  background: var(--surface);
}
.mobile-panel.open{ transform: translateX(0); }
.mobile-close{ align-self: flex-end; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--glass-border); background: var(--surface); }
.mobile-nav{ display: flex; flex-direction: column; gap: 22px; margin-top: 40px; }
.mobile-nav-link{ font-family: var(--font-display); font-size: 20px; font-weight: 600; }
.mobile-cta{ margin-top: 12px; padding: 12px 20px; border-radius: 999px; background: var(--accent-amber); color: var(--ink); text-align: center; width: fit-content; font-weight: 700; }

/* ==========================================================================
   Hero — quieter, left-aligned copy with the 3D badge pushed to one side
   ========================================================================== */

.hero{
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(24px, 5vw, 72px);
  padding: 150px 20px 80px;
  overflow: hidden;
  max-width: 1280px;
  margin: 0 auto;
}

.hero3d-canvas{
  position: relative;
  flex: 1 1 560px;
  align-self: stretch;
  min-width: 260px;
  max-width: 820px;
  z-index: 0;
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
  opacity: 0.92;
}
.hero3d-canvas.dragging{ cursor: grabbing; }
.hero3d-canvas canvas{ display: block; width: 100% !important; height: 100% !important; }

.hero-content{
  position: relative;
  z-index: 2;
  flex: 1 1 480px;
  max-width: 560px;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
  /* The box can be wider than the text it holds; without this, the empty
     margin around short lines would sit on top of the 3D canvas and eat
     the clicks/drags meant for it. Children opt back in below. */
  pointer-events: none;
}
.hero-content > *{ pointer-events: auto; }

.hero-badge .dot{ width: 7px; height: 7px; border-radius: 50%; background: var(--accent-teal); box-shadow: 0 0 0 4px rgba(15,155,153,0.16); }

.hero-title{
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(36px, 4.6vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}
.hero-title .hl{ color: var(--accent-teal-deep); }

.hero-subtitle{
  font-size: clamp(16px, 1.6vw, 18px);
  color: var(--ink-soft);
  max-width: 460px;
  margin: 0;
  line-height: 1.6;
}

.hero-actions{ display: flex; gap: 14px; flex-wrap: wrap; justify-content: flex-start; margin-top: 6px; }

.hero-scroll-hint{
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--ink-faint);
  animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob{ 0%,100%{ transform: translate(-50%,0); } 50%{ transform: translate(-50%,6px); } }

@media (max-width: 980px){
  .hero3d-canvas{
    position: absolute;
    inset: 0;
    flex: none;
    max-width: none;
    min-width: 0;
    width: 100%;
    opacity: 0.32;
  }
  .hero-content{ max-width: 100%; align-items: flex-start; }
}

/* ==========================================================================
   Sections — shared
   ========================================================================== */

.section{ position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 90px 20px; }
.section-label{ margin-bottom: 20px; }
.section-title{ font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 3.2vw, 40px); line-height: 1.18; margin: 10px 0 18px; letter-spacing: -0.015em; color: var(--ink); }
.section-text{ color: var(--ink-soft); font-size: 16px; line-height: 1.7; max-width: 46ch; }
.section-head{ display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 40px; flex-wrap: wrap; }

/* ==========================================================================
   Services — static grid of cards (replaces the old ticker for clarity)
   ========================================================================== */

.services-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.service-card{
  padding: 26px 24px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.service-card:hover{ transform: translateY(-4px); border-color: rgba(15,155,153,0.3); box-shadow: 0 14px 30px rgba(18,36,43,0.07); }
.service-card .icon{
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-teal-soft);
  color: var(--accent-teal-deep);
  font-size: 18px;
}
.service-card .name{ font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--ink); }
.service-card .desc{ font-size: 13px; color: var(--ink-faint); line-height: 1.5; }

/* ==========================================================================
   Tickers (kept only for the partner-logo strip)
   ========================================================================== */

.ticker-wrap{ overflow: hidden; padding: 20px 0; }
.ticker-track{
  display: flex; align-items: center; gap: 14px; width: max-content; will-change: transform;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}
.ticker-track:active{ cursor: grabbing; }
.ticker-track.dragging{ cursor: grabbing; }
.ticker-track.dragging .ticker-item{ pointer-events: none; }
.ticker-item{
  display: flex; align-items: center; gap: 10px;
  padding: 12px 22px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-soft);
  flex: 0 0 auto;
}
.ticker-item .icon{ color: var(--accent-teal); }
.ticker-item .partner-logo{ height: 26px; width: auto; filter: grayscale(1) opacity(.7); }
.partners-section .ticker-item{ background: transparent; border: none; padding: 8px 26px; }

/* ==========================================================================
   About
   ========================================================================== */

.about-grid{ display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px; align-items: center; }

.about-stats{ display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.stat{ flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 20px; }
.stat strong{ font-family: var(--font-display); font-size: 22px; color: var(--ink); }
.stat span{ font-size: 12px; color: var(--ink-faint); }

.about-visual{ position: relative; display: flex; align-items: center; justify-content: center; min-height: 360px; }
.blob-svg{ width: 100%; max-width: 340px; filter: blur(0.2px); }
.visual-glass-card{
  position: absolute;
  bottom: 10%; left: 50%;
  transform: translateX(-50%);
  padding: 18px 26px;
  display: flex; align-items: center; gap: 12px;
  font-weight: 600; font-size: 14px;
}
.visual-glass-card i{ color: var(--accent-amber-deep); font-size: 18px; }

/* ==========================================================================
   Projects teaser — photo-style covers instead of flat gradients
   ========================================================================== */

.teaser-grid{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.teaser-card{ overflow: hidden; cursor: pointer; transition: transform .3s ease, box-shadow .3s ease; }
.teaser-card:hover{ transform: translateY(-6px); box-shadow: 0 16px 34px rgba(18,36,43,0.1); }
.teaser-cover{ height: 200px; background-size: cover; background-position: center; position: relative; }
.teaser-cover::after{ content:''; position:absolute; inset:0; background: linear-gradient(180deg, rgba(18,36,43,0) 55%, rgba(18,36,43,0.35) 100%); }
.teaser-cover-1{ background-image: linear-gradient(135deg, #cfa876 0%, #8a6a45 100%); filter: saturate(1.05) contrast(1.03); }
.teaser-cover-2{ background-image: linear-gradient(135deg, #1c3a3f 0%, #0f9b99 100%); filter: saturate(1.05) contrast(1.03); }
.teaser-cover-3{ background-image: linear-gradient(135deg, #b98a4e 0%, #4b3521 100%); filter: saturate(1.05) contrast(1.03); }
.teaser-body{ padding: 20px 22px 24px; }
.teaser-body h3{ margin: 0 0 4px; font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.teaser-body p{ margin: 0; font-size: 13px; color: var(--ink-faint); }

/* ==========================================================================
   Contact
   ========================================================================== */

.contact-grid{ display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 60px; }
.contact-list{ list-style: none; padding: 0; margin: 28px 0; display: flex; flex-direction: column; gap: 14px; }
.contact-list li{ display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--ink-soft); }
.contact-list i{ color: var(--accent-teal); width: 18px; }
.socials{ display: flex; gap: 12px; }
.socials a{ width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--glass-border); transition: transform .2s ease, color .2s ease; }
.socials a:hover{ transform: translateY(-3px); color: var(--accent-teal-deep); }

.contact-form{ padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.form-row{ display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form label{ display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.contact-form input, .contact-form select, .contact-form textarea{
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(18,36,43,0.14);
  background: var(--bg-1);
  font-size: 14px;
  color: var(--ink);
  resize: vertical;
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus{
  outline: none;
  border-color: var(--accent-teal);
  background: #fff;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer{ padding: 0 20px 40px; }
.footer-inner{ max-width: 1180px; margin: 0 auto; padding: 24px 30px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.footer-brand{ display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; }
.footer-copy{ margin: 0; font-size: 13px; color: var(--ink-faint); }
.footer-links{ display: flex; gap: 20px; font-size: 13px; color: var(--ink-soft); }

/* ==========================================================================
   Popups / modals
   ========================================================================== */

.popup-overlay{
  position: fixed; inset: 0; z-index: 600;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(18,36,43,0.4);
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
}
.popup-overlay.active{ opacity: 1; pointer-events: auto; }

.popup-window{
  position: relative;
  width: 100%; max-width: 560px;
  max-height: 82vh;
  padding: 44px 38px 34px;
  overflow: hidden;
  display: flex; flex-direction: column;
  transform: scale(.96) translateY(10px);
  transition: transform .3s cubic-bezier(.2,.85,.32,1.1), opacity .3s ease;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(18,36,43,0.22);
}
.popup-overlay.active .popup-window{ transform: scale(1) translateY(0); }
.popup-window-wide{ max-width: 920px; }

.popup-window::before, .popup-window::after{ display: none; }

.popup-window{ border-top: 3px solid var(--accent-teal); background-clip: padding-box; }
.popup-window > .mono-eyebrow{
  display: inline-flex; align-items: center; gap: 8px;
}
.popup-window > .mono-eyebrow::before{
  content:'';
  width: 8px; height: 8px; border-radius: 3px;
  background: var(--accent-amber);
  display: inline-block;
}

.popup-window h3{ font-family: var(--font-display); font-size: 24px; margin: 6px 0 18px; letter-spacing: -0.01em; font-weight: 700; }
.popup-close{
  position: absolute; top: 18px; right: 18px;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--glass-border); background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  transition: transform .25s ease, background .25s ease, color .25s ease;
  z-index: 2;
}
.popup-close:hover{ background: var(--accent-teal); color: #fff; border-color: var(--accent-teal); transform: rotate(90deg); }

.popup-scroll{ overflow-y: auto; padding-right: 10px; }
.popup-scroll p{ color: var(--ink-soft); line-height: 1.7; margin: 0 0 14px; }

.popup-scroll::-webkit-scrollbar{ width: 6px; }
.popup-scroll::-webkit-scrollbar-track{ background: transparent; }
.popup-scroll::-webkit-scrollbar-thumb{ background: rgba(15,155,153,0.35); border-radius: 10px; }
.popup-scroll::-webkit-scrollbar-thumb:hover{ background: rgba(15,155,153,0.6); }

.cases-grid{ display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.case-card{ border-radius: var(--radius-md); overflow: hidden; cursor: pointer; background: var(--surface); border: 1px solid var(--glass-border); transition: transform .25s ease; }
.case-card:hover{ transform: translateY(-4px); }
.case-card-cover{ width: 100%; height: 150px; object-fit: cover; }
.case-card-no-img{ display: flex; align-items: center; justify-content: center; background: var(--accent-teal-soft); color: var(--accent-teal-deep); font-size: 28px; }
.case-card-body{ padding: 14px 16px; }
.case-card-body h3{ margin: 0 0 4px; font-size: 15px; font-family: var(--font-display); }
.case-card-body p{ margin: 0; font-size: 12px; color: var(--ink-faint); }

.case-gallery{ display: flex; flex-direction: column; gap: 14px; }
.case-gallery-main .gallery-img{ width: 100%; border-radius: var(--radius-md); cursor: zoom-in; }
.case-gallery-collage{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.case-gallery-collage .gallery-img{ width: 100%; height: 110px; object-fit: cover; border-radius: var(--radius-sm); cursor: zoom-in; }

#lightbox-overlay{ position: fixed; inset: 0; z-index: 800; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .25s ease; }
#lightbox-overlay.active{ opacity: 1; }
.lightbox-backdrop{ position: absolute; inset: 0; background: rgba(10,10,25,0.6); backdrop-filter: blur(8px); }
.lightbox-content{ position: relative; max-width: 90vw; max-height: 88vh; }
.lightbox-img{ max-width: 90vw; max-height: 88vh; border-radius: var(--radius-md); box-shadow: 0 20px 60px rgba(0,0,0,0.4); }
.lightbox-close{ position: absolute; top: -44px; right: 0; width: 36px; height: 36px; border-radius: 50%; border: none; background: var(--glass-strong); }

/* ==========================================================================
   Chat widget
   ========================================================================== */

.chat-widget{ position: fixed; bottom: 24px; right: 24px; z-index: 700; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }

.chat-greeting{ display: none; max-width: 220px; font-size: 13px; }

.chat-fab{
  width: 58px; height: 58px; border-radius: 50%;
  border: none;
  background: var(--accent-teal-deep);
  color: #fff; font-size: 20px;
  box-shadow: 0 12px 28px rgba(15,155,153,0.35);
  display: flex; align-items: center; justify-content: center;
  transition: transform .25s ease;
}
.chat-fab:hover{ transform: scale(1.06); }

.chat-bubble{
  position: absolute; bottom: 74px; right: 0;
  width: min(340px, 86vw);
  height: 440px;
  display: flex; flex-direction: column;
  opacity: 0; transform: translateY(16px) scale(.97);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  overflow: hidden;
  background: #fff;
}
.chat-bubble.active{ opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.chat-header{ display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; font-weight: 700; font-size: 14px; border-bottom: 1px solid var(--glass-border); }
.chat-header button{ border: none; background: transparent; font-size: 16px; color: var(--ink-faint); }

.chat-messages{ flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-message{ max-width: 82%; padding: 9px 13px; border-radius: 14px; font-size: 13px; display: flex; align-items: baseline; gap: 6px; }
.chat-message.user{ align-self: flex-end; background: var(--accent-teal); color: #fff; border-bottom-right-radius: 4px; }
.chat-message.admin{ align-self: flex-start; background: var(--bg-2); border-bottom-left-radius: 4px; }

.chat-input-row{ display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--glass-border); }
.chat-input-row input{ flex: 1; border: 1px solid rgba(18,36,43,0.14); border-radius: 999px; padding: 10px 14px; font-size: 13px; background: var(--bg-1); }
.chat-input-row input:focus{ outline: none; border-color: var(--accent-teal); }
.chat-input-row button{ width: 38px; height: 38px; border-radius: 50%; border: none; background: var(--accent-teal); color: #fff; }

#star-trail-canvas{ position: fixed; inset: 0; z-index: 1; pointer-events: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 980px){
  .nav-links, .nav-cta{ display: none; }
  .hamburger{ display: flex; }
  .about-grid, .contact-grid{ grid-template-columns: 1fr; }
  .about-visual{ order: -1; }
  .teaser-grid{ grid-template-columns: 1fr; }
  .services-grid{ grid-template-columns: 1fr; }
  .form-row{ grid-template-columns: 1fr; }
  .cases-grid{ grid-template-columns: 1fr; }
}

@media (max-width: 560px){
  .navbar{ top: 10px; padding: 0 12px; }
  .navbar-inner{ padding: 8px 8px 8px 16px; }
  .section{ padding: 64px 18px; }
  .hero{ padding-top: 120px; min-height: auto; }
  .chat-bubble{ height: 60vh; }
}

/* ====================================================================
   Layout & UI overrides — full-screen hero, glass popups, ticker
   (merged from the page-level <style> block for a single source of truth)
   ==================================================================== */
        /* ======================================================================
           OVERRIDES — full-screen hero + soft background + large popups
           ====================================================================== */
        :root {
            --bg-1: #F7F4ED;
            --bg-2: #EDE9DF;
            --ink: #1A2E38;
            --ink-soft: #4F5F66;
            --ink-faint: #8E9A9E;
            --accent-teal: #0F9B99;
            --accent-teal-deep: #0B7674;
            --accent-teal-soft: #E4F3F2;
            --accent-amber: #F2A93B;
            --accent-amber-deep: #D98F1F;
            --glass: rgba(255, 255, 255, 0.92);
            --glass-strong: rgba(255, 255, 255, 0.98);
            --glass-border: rgba(26, 46, 56, 0.08);
            --glass-shadow: 0 12px 40px rgba(26, 46, 56, 0.08);
            --radius-lg: 28px;
            --radius-md: 18px;
            --radius-sm: 12px;
            --popup-max: 94vh;
            --popup-max-w: 92vw;
        }

        /* --- remove default section spacing --- */
        .section {
            padding: 0;
            margin: 0;
            max-width: none;
        }

        /* --- hero typography refinements (positioning itself lives in the
           single consolidated .hero / .hero-content / .hero3d-canvas rules
           above — intentionally not repeated here to avoid two conflicting
           sources of truth for the layout) --- */
        .hero-content {
            gap: 28px;
        }

        .hero-title {
            font-size: clamp(44px, 5.6vw, 72px);
            line-height: 1.04;
        }

        .hero-subtitle {
            font-size: clamp(18px, 1.8vw, 22px);
            max-width: 500px;
        }

        @media (max-width: 980px) {
            .hero-title {
                font-size: clamp(36px, 7vw, 52px);
            }
        }

        /* --- navbar stays crisp --- */
        .navbar {
            top: 20px;
        }
        .navbar-inner {
            padding: 10px 16px 10px 24px;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.78);
            backdrop-filter: blur(14px);
            -webkit-backdrop-filter: blur(14px);
            border: 1px solid rgba(255, 255, 255, 0.4);
            box-shadow: 0 8px 30px rgba(26, 46, 56, 0.06);
        }
        .navbar.scrolled .navbar-inner {
            background: rgba(255, 255, 255, 0.94);
            box-shadow: 0 12px 40px rgba(26, 46, 56, 0.10);
        }

        .nav-links a {
            font-size: 15px;
            font-weight: 600;
            letter-spacing: 0.01em;
        }

        /* --- popups: nearly full-screen --- */
        .popup-overlay {
            padding: 12px;
            background: rgba(18, 36, 43, 0.45);
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
        }

        .popup-window {
            max-width: var(--popup-max-w);
            max-height: var(--popup-max);
            width: 100%;
            height: 100%;
            padding: 52px 48px 40px;
            border-radius: 32px;
            background: rgba(255, 255, 255, 0.96);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            border: 1px solid rgba(255, 255, 255, 0.5);
            box-shadow: 0 40px 100px rgba(18, 36, 43, 0.25);
            transform: scale(0.94) translateY(12px);
            transition: transform 0.35s cubic-bezier(0.22, 0.90, 0.32, 1.08), opacity 0.3s ease;
            display: flex;
            flex-direction: column;
        }

        .popup-overlay.active .popup-window {
            transform: scale(1) translateY(0);
        }

        .popup-window-wide {
            max-width: var(--popup-max-w);
        }

        .popup-window>.mono-eyebrow {
            font-size: 14px;
            letter-spacing: 0.14em;
        }

        .popup-window h3 {
            font-size: 32px;
            margin: 8px 0 24px;
        }

        .popup-scroll {
            flex: 1;
            overflow-y: auto;
            padding-right: 12px;
            font-size: 17px;
            line-height: 1.8;
        }

        .popup-scroll p {
            font-size: 17px;
            line-height: 1.8;
            color: var(--ink-soft);
        }

        .popup-close {
            top: 20px;
            right: 20px;
            width: 44px;
            height: 44px;
            font-size: 20px;
            background: rgba(255, 255, 255, 0.85);
            border: 1px solid var(--glass-border);
            backdrop-filter: blur(4px);
        }
        .popup-close:hover {
            background: var(--accent-teal);
            color: #fff;
            border-color: var(--accent-teal);
        }

        /* --- services ticker inside popup --- */
        .services-ticker-wrap {
            overflow: hidden;
            padding: 18px 0;
            margin: 12px 0 8px;
            border-radius: var(--radius-md);
            background: var(--bg-1);
            border: 1px solid var(--glass-border);
        }

        .services-ticker-track {
            display: flex;
            align-items: center;
            gap: 18px;
            width: max-content;
            will-change: transform;
            cursor: grab;
            user-select: none;
            -webkit-user-select: none;
            touch-action: pan-y;
        }
        .services-ticker-track:active {
            cursor: grabbing;
        }
        .services-ticker-track.dragging {
            cursor: grabbing;
        }
        .services-ticker-track.dragging .service-ticker-item {
            pointer-events: none;
        }

        .service-ticker-item {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 16px 30px;
            background: var(--surface);
            border: 1px solid var(--glass-border);
            border-radius: 999px;
            font-weight: 700;
            font-size: 17px;
            color: var(--ink);
            flex: 0 0 auto;
            box-shadow: 0 2px 8px rgba(26, 46, 56, 0.04);
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
        }
        .service-ticker-item:hover {
            border-color: var(--accent-teal);
            box-shadow: 0 6px 18px rgba(15, 155, 153, 0.12);
        }
        .service-ticker-item .icon {
            color: var(--accent-teal-deep);
            font-size: 20px;
            width: 24px;
            text-align: center;
        }

        /* --- about popup content --- */
        .about-popup-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 40px;
            margin-top: 8px;
        }
        .about-popup-grid .stat-block {
            background: var(--bg-1);
            padding: 24px 28px;
            border-radius: var(--radius-md);
            border: 1px solid var(--glass-border);
        }
        .about-popup-grid .stat-block strong {
            font-family: var(--font-display);
            font-size: 34px;
            color: var(--accent-teal-deep);
            display: block;
        }
        .about-popup-grid .stat-block span {
            font-size: 15px;
            color: var(--ink-faint);
        }

        @media (max-width: 740px) {
            .popup-window {
                padding: 36px 20px 28px;
                border-radius: 22px;
            }
            .popup-window h3 {
                font-size: 26px;
            }
            .popup-scroll {
                font-size: 15px;
            }
            .popup-scroll p {
                font-size: 15px;
            }
            .about-popup-grid {
                grid-template-columns: 1fr;
                gap: 20px;
            }
            .service-ticker-item {
                font-size: 14px;
                padding: 12px 20px;
            }
            .hero-title {
                font-size: clamp(30px, 8vw, 42px);
            }
        }

        @media (max-width: 480px) {
            .popup-window {
                padding: 28px 14px 20px;
                border-radius: 18px;
            }
            .popup-window h3 {
                font-size: 22px;
                margin: 4px 0 16px;
            }
            .popup-scroll {
                font-size: 14px;
                padding-right: 6px;
            }
            .popup-scroll p {
                font-size: 14px;
            }
            .popup-close {
                width: 38px;
                height: 38px;
                font-size: 16px;
                top: 14px;
                right: 14px;
            }
            .service-ticker-item {
                font-size: 13px;
                padding: 10px 16px;
                gap: 10px;
            }
            .service-ticker-item .icon {
                font-size: 16px;
            }
            .navbar-inner {
                padding: 6px 8px 6px 16px;
            }
            .hero {
                min-height: 96vh;
                padding: 0 14px;
            }
            .hero-title {
                font-size: clamp(26px, 9vw, 34px);
            }
            .hero-subtitle {
                font-size: 15px;
            }
            .btn {
                padding: 12px 22px;
                font-size: 14px;
            }
        }

        /* --- soft mesh background enhancements --- */
        .mesh-bg {
            background: linear-gradient(165deg, #F7F4ED 0%, #F7F4ED 50%, #EDE9DF 100%);
        }

        .mesh-blob.b1 {
            width: 52vw;
            height: 52vw;
            max-width: 720px;
            max-height: 720px;
            top: -16%;
            right: -10%;
            background: radial-gradient(circle at 30% 30%, rgba(15, 155, 153, 0.13), transparent 74%);
            animation: driftA 48s ease-in-out infinite;
        }

        .mesh-blob.b2 {
            display: block;
            width: 38vw;
            height: 38vw;
            max-width: 540px;
            max-height: 540px;
            bottom: -10%;
            left: -8%;
            background: radial-gradient(circle at 70% 70%, rgba(242, 169, 59, 0.11), transparent 72%);
            animation: driftB 52s ease-in-out infinite;
        }

        .mesh-blob.b3 {
            display: block;
            width: 28vw;
            height: 28vw;
            max-width: 400px;
            max-height: 400px;
            top: 40%;
            left: 45%;
            background: radial-gradient(circle at 50% 50%, rgba(11, 118, 116, 0.06), transparent 70%);
            animation: driftC 36s ease-in-out infinite;
        }

        @keyframes driftA {
            0%,
            100% {
                transform: translate(0, 0) scale(1);
            }
            50% {
                transform: translate(-4%, 5%) scale(1.06);
            }
        }
        @keyframes driftB {
            0%,
            100% {
                transform: translate(0, 0) scale(1);
            }
            50% {
                transform: translate(5%, -4%) scale(1.08);
            }
        }
        @keyframes driftC {
            0%,
            100% {
                transform: translate(0, 0) scale(1);
            }
            50% {
                transform: translate(-3%, -3%) scale(1.12);
            }
        }

        /* --- grain overlay for extra texture --- */
        .grain {
            display: block;
            position: fixed;
            inset: 0;
            z-index: -1;
            pointer-events: none;
            opacity: 0.30;
            background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
            background-size: 240px 240px;
            mix-blend-mode: soft-light;
        }

        /* --- partners in popup --- */
        .partners-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
            gap: 18px;
            margin-top: 12px;
        }
        .partner-card {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 22px 14px;
            background: var(--bg-1);
            border: 1px solid var(--glass-border);
            border-radius: var(--radius-md);
            transition: border-color 0.2s ease, transform 0.2s ease;
            min-height: 80px;
        }
        .partner-card:hover {
            border-color: var(--accent-teal);
            transform: translateY(-2px);
        }
        .partner-card img {
            max-height: 44px;
            width: auto;
            filter: grayscale(0.3) opacity(0.8);
            transition: filter 0.3s ease;
        }
        .partner-card:hover img {
            filter: grayscale(0) opacity(1);
        }
        .partner-card .placeholder-name {
            font-weight: 600;
            color: var(--ink-soft);
            font-size: 15px;
        }

        /* --- contact in popup --- */
        .contact-popup-grid {
            display: grid;
            grid-template-columns: 1fr 1.2fr;
            gap: 40px;
            margin-top: 8px;
        }
        .contact-popup-grid .contact-list {
            margin: 16px 0 20px;
        }
        .contact-popup-grid .contact-list li {
            font-size: 17px;
            gap: 14px;
        }
        .contact-popup-grid .contact-list i {
            font-size: 18px;
        }
        .contact-popup-grid .socials a {
            width: 48px;
            height: 48px;
            font-size: 20px;
        }

        .contact-popup-grid .contact-form {
            padding: 0;
            background: transparent;
            border: none;
            box-shadow: none;
            gap: 18px;
        }
        .contact-popup-grid .contact-form label {
            font-size: 14px;
        }
        .contact-popup-grid .contact-form input,
        .contact-popup-grid .contact-form select,
        .contact-popup-grid .contact-form textarea {
            padding: 14px 16px;
            font-size: 15px;
            border-radius: var(--radius-sm);
            background: var(--bg-1);
            border: 1px solid var(--glass-border);
        }
        .contact-popup-grid .contact-form input:focus,
        .contact-popup-grid .contact-form select:focus,
        .contact-popup-grid .contact-form textarea:focus {
            background: #fff;
            border-color: var(--accent-teal);
        }

        @media (max-width: 820px) {
            .contact-popup-grid {
                grid-template-columns: 1fr;
                gap: 28px;
            }
            .partners-grid {
                grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
            }
        }

        /* --- projects in popup --- */
        .projects-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
            gap: 22px;
            margin-top: 8px;
        }
        .project-card {
            border-radius: var(--radius-md);
            overflow: hidden;
            cursor: pointer;
            background: var(--surface);
            border: 1px solid var(--glass-border);
            transition: transform 0.25s ease, box-shadow 0.25s ease;
        }
        .project-card:hover {
            transform: translateY(-6px);
            box-shadow: 0 16px 40px rgba(26, 46, 56, 0.10);
        }
        .project-card .cover {
            height: 180px;
            background-size: cover;
            background-position: center;
            position: relative;
        }
        .project-card .cover::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(180deg, rgba(26, 46, 56, 0) 50%, rgba(26, 46, 56, 0.30) 100%);
        }
        .project-card .body {
            padding: 18px 20px 22px;
        }
        .project-card .body h4 {
            margin: 0 0 4px;
            font-family: var(--font-display);
            font-size: 17px;
            font-weight: 700;
        }
        .project-card .body p {
            margin: 0;
            font-size: 14px;
            color: var(--ink-faint);
        }

        /* --- case modal inside popup --- */
        .case-gallery-main .gallery-img {
            width: 100%;
            max-height: 360px;
            object-fit: cover;
            border-radius: var(--radius-md);
            cursor: zoom-in;
        }
        .case-gallery-collage {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 12px;
            margin-top: 12px;
        }
        .case-gallery-collage .gallery-img {
            width: 100%;
            height: 120px;
            object-fit: cover;
            border-radius: var(--radius-sm);
            cursor: zoom-in;
        }

        /* --- scrollbar for popups --- */
        .popup-scroll::-webkit-scrollbar {
            width: 6px;
        }
        .popup-scroll::-webkit-scrollbar-track {
            background: transparent;
        }
        .popup-scroll::-webkit-scrollbar-thumb {
            background: rgba(15, 155, 153, 0.30);
            border-radius: 10px;
        }
        .popup-scroll::-webkit-scrollbar-thumb:hover {
            background: rgba(15, 155, 153, 0.55);
        }

        /* --- lightbox --- */
        #lightbox-overlay {
            position: fixed;
            inset: 0;
            z-index: 800;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transition: opacity 0.25s ease;
            pointer-events: none;
        }
        #lightbox-overlay.active {
            opacity: 1;
            pointer-events: auto;
        }
        .lightbox-backdrop {
            position: absolute;
            inset: 0;
            background: rgba(10, 10, 25, 0.55);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
        }
        .lightbox-content {
            position: relative;
            max-width: 90vw;
            max-height: 88vh;
        }
        .lightbox-img {
            max-width: 90vw;
            max-height: 88vh;
            border-radius: var(--radius-md);
            box-shadow: 0 24px 72px rgba(0, 0, 0, 0.35);
        }
        .lightbox-close {
            position: absolute;
            top: -48px;
            right: 0;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            border: none;
            background: rgba(255, 255, 255, 0.9);
            backdrop-filter: blur(4px);
            font-size: 18px;
            cursor: pointer;
            transition: transform 0.2s ease;
        }
        .lightbox-close:hover {
            transform: rotate(90deg);
        }

        /* --- chat widget adjustments --- */
        .chat-widget {
            bottom: 28px;
            right: 28px;
        }
        .chat-fab {
            width: 62px;
            height: 62px;
            font-size: 22px;
        }
        .chat-bubble {
            width: min(380px, 88vw);
            height: 480px;
            bottom: 78px;
            border-radius: var(--radius-lg);
            background: rgba(255, 255, 255, 0.96);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid rgba(255, 255, 255, 0.5);
            box-shadow: 0 20px 60px rgba(26, 46, 56, 0.15);
        }
        .chat-header {
            font-size: 15px;
            padding: 18px 20px;
        }
        .chat-messages {
            padding: 16px 18px;
            gap: 12px;
        }
        .chat-message {
            font-size: 14px;
            padding: 10px 16px;
            border-radius: 16px;
        }
        .chat-input-row {
            padding: 14px 16px;
        }
        .chat-input-row input {
            font-size: 14px;
            padding: 12px 16px;
        }
        .chat-input-row button {
            width: 44px;
            height: 44px;
            font-size: 16px;
        }

        /* --- footer --- */
        .footer {
            display: none;
        }

        /* --- cookie bar stays subtle --- */
        .cookie-bar {
            bottom: 28px;
            padding: 16px 24px;
            border-radius: var(--radius-md);
            background: rgba(255, 255, 255, 0.94);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid rgba(255, 255, 255, 0.4);
            box-shadow: 0 12px 40px rgba(26, 46, 56, 0.08);
        }
        .cookie-bar p {
            font-size: 14px;
        }

        /* --- mobile tweaks --- */
        .mobile-panel {
            width: min(340px, 84vw);
            border-radius: 28px;
            padding: 32px 28px;
            background: rgba(255, 255, 255, 0.96);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border: 1px solid rgba(255, 255, 255, 0.5);
        }
        .mobile-nav-link {
            font-size: 22px;
        }
        .mobile-cta {
            font-size: 17px;
            padding: 14px 24px;
        }

        /* --- fade-up for greeting --- */
        @keyframes fadeUp {
            0% {
                opacity: 0;
                transform: translateY(12px);
            }
            100% {
                opacity: 1;
                transform: translateY(0);
            }
        }
        .chat-greeting {
            animation: fadeUp 0.5s ease forwards;
        }


/* ===========================================================================
   VISUAL POLISH PASS — additive refinements only, doesn't touch the base
   system above. Kept small and scoped on purpose.
   =========================================================================== */

/* Smooth in-app scrolling everywhere, respecting reduced-motion (handled above) */
html { scroll-behavior: smooth; }

/* Slim, on-brand scrollbars for the popup content panes */
.popup-scroll {
  scrollbar-width: thin;
  scrollbar-color: var(--accent-teal) transparent;
}
.popup-scroll::-webkit-scrollbar { width: 8px; }
.popup-scroll::-webkit-scrollbar-track { background: transparent; }
.popup-scroll::-webkit-scrollbar-thumb {
  background: var(--accent-teal);
  border-radius: 999px;
  opacity: 0.6;
}
.popup-scroll::-webkit-scrollbar-thumb:hover { background: var(--accent-teal-deep); }

/* Primary CTA gets a soft light sweep on hover — a small, premium touch */
.btn-primary {
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg);
  transition: left 0.55s ease;
  pointer-events: none;
}
.btn-primary:hover::after { left: 130%; }

/* Slightly richer lift on interactive cards for a more tactile feel */
.service-ticker-item, .project-card, .partner-card {
  will-change: transform;
}
.project-card:hover, .partner-card:hover {
  box-shadow: 0 16px 36px rgba(26, 46, 56, 0.12);
}

/* Popup entrance feels a touch snappier / less "floaty" */
.popup-overlay {
  transition: opacity 0.28s ease;
}

/* Keep media honest on small screens inside popups */
.popup-window img { max-width: 100%; height: auto; }

/* ===========================================================================
   LOCKED VIEWPORT SHELL — hero sandwiched between two live edge tickers
   (services on top, partners on bottom). The whole home screen is exactly
   one viewport tall; nothing scrolls. Popups still overlay on top of this
   as fixed, full-screen panels, same as before.
   =========================================================================== */

:root{
  --edge-h: 56px;
  --edge-h-mobile: 46px;
}

html, body{
  height: 100%;
  overflow: hidden;
}

body{
  display: flex;
  flex-direction: column;
}

/* Hero becomes a flex child instead of a fixed 100vh block */
main{
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.hero{
  min-height: 0 !important;
  height: auto !important;
  flex: 1 1 auto;
}

.edge-ticker{
  position: relative;
  flex: 0 0 var(--edge-h);
  height: var(--edge-h);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--glass-strong, rgba(255,255,255,0.96));
  border-bottom: 1px solid var(--glass-border);
  z-index: 40;
}
.edge-ticker--bottom{
  border-bottom: none;
  border-top: 1px solid var(--glass-border);
}

.edge-ticker-label{
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 100%;
  padding: 0 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-teal-deep);
  background: var(--accent-teal-soft);
  border-right: 1px solid var(--glass-border);
  white-space: nowrap;
  position: relative;
  z-index: 2;
}
.edge-ticker-label i{ font-size: 12px; opacity: 0.8; }

.edge-ticker .ticker-track{
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 0;
  will-change: transform;
}

.edge-ticker .service-ticker-item{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 22px;
  height: var(--edge-h);
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  border-right: 1px solid var(--glass-border);
}
.edge-ticker .service-ticker-item .icon{ color: var(--accent-teal); font-size: 13px; }

.partner-ticker-item{
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 28px;
  height: var(--edge-h);
  border-right: 1px solid var(--glass-border);
}

.partner-ticker-item img{
  max-height: calc(var(--edge-h) - 22px);
  width: auto;
  max-width: 140px;
  object-fit: contain;
  padding: 6px 14px;
  border-radius: 8px;
  /* Single uniform, near-black dark-gray chip applied to every logo.
     No grayscale/opacity/blend filters — every logo renders in its
     real, original colors. */
  background: #5bd1d7;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.5), 0 1px 4px rgba(0,0,0,0.35);
  transition: box-shadow 0.25s ease, background 0.25s ease, transform 0.25s ease;
}
.edge-ticker--bottom:hover .partner-ticker-item img,
.partner-ticker-item:hover img{
  background: #5bd1d7;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.7), 0 2px 8px rgba(0,0,0,0.5);
  transform: translateY(-1px);
}

.partner-ticker-item .placeholder-name{
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-faint);
  white-space: nowrap;
}

/* Reposition floating chrome so it never collides with the edge tickers */
.navbar{ top: calc(var(--edge-h) + 14px) !important; }
.chat-widget{ bottom: calc(var(--edge-h) + 20px) !important; }
.cookie-bar{ bottom: calc(var(--edge-h) + 16px) !important; }

@media (max-width: 820px){
  :root{ --edge-h: var(--edge-h-mobile); }
  .edge-ticker-label{ padding: 0 12px; font-size: 10px; }
  .edge-ticker .service-ticker-item{ padding: 0 16px; font-size: 13px; }
  .partner-ticker-item{ padding: 0 18px; }
  .partner-ticker-item img{ padding: 4px 10px; max-width: 110px; }
  .navbar{ top: calc(var(--edge-h) + 8px) !important; }
  .chat-widget{ bottom: calc(var(--edge-h) + 14px) !important; }
  .cookie-bar{ bottom: calc(var(--edge-h) + 12px) !important; }
}


/* ===========================================================================
   PROJECT GALLERY MODAL — one photo at a time, ~60% of the modal's height,
   with prev/next arrows, dot indicators and touch-swipe (wired up in JS).
   =========================================================================== */

.gallery-window{
  padding: 0;
  max-height: 90vh;
  overflow: hidden;
}

.gallery-stage{
  position: relative;
  height: 60vh;
  max-height: 60vh;
  background: #0d1b20;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 26px 26px 0 0;
}

.gallery-stage-img{
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.25s ease;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

.gallery-arrow{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.14);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 3;
  transition: background 0.2s ease, transform 0.2s ease;
}
.gallery-arrow:hover{ background: rgba(255,255,255,0.3); transform: translateY(-50%) scale(1.06); }
.gallery-arrow:active{ transform: translateY(-50%) scale(0.94); }
.gallery-arrow--prev{ left: 16px; }
.gallery-arrow--next{ right: 16px; }

.gallery-counter{
  position: absolute;
  bottom: 14px;
  right: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255,255,255,0.9);
  background: rgba(0,0,0,0.38);
  padding: 4px 10px;
  border-radius: 999px;
  z-index: 3;
  letter-spacing: 0.02em;
}

.gallery-project-counter{
  position: absolute;
  top: 14px;
  left: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255,255,255,0.9);
  background: rgba(0,0,0,0.38);
  padding: 4px 10px;
  border-radius: 999px;
  z-index: 3;
  letter-spacing: 0.02em;
}
.gallery-project-counter:empty{ display: none; }

.gallery-dots{
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 14px 0 2px;
}
.gallery-dot{
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--glass-border);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.gallery-dot.active{ background: var(--accent-teal); transform: scale(1.35); }
.gallery-dot:hover{ background: var(--accent-teal-deep); }

.gallery-info{
  padding: 10px 34px 30px;
  overflow-y: auto;
}
.gallery-title{
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 4px 0 8px;
  color: var(--ink);
}
#galleryDesc{
  color: var(--ink-soft);
  line-height: 1.65;
  margin: 0;
  font-size: 14.5px;
}

@media (max-width: 820px){
  .gallery-stage{ height: 46vh; max-height: 46vh; }
  .gallery-arrow{ width: 38px; height: 38px; }
  .gallery-arrow--prev{ left: 10px; }
  .gallery-arrow--next{ right: 10px; }
  .gallery-info{ padding: 8px 20px 22px; }
  .gallery-title{ font-size: 19px; }
  .gallery-project-counter{ top: 10px; left: 10px; font-size: 10px; padding: 3px 8px; }
}


/* ===========================================================================
   Hero drag hint — a small always-on affordance so the 3D badge reads as
   interactive at a glance, not just decorative.
   =========================================================================== */

.hero-drag-hint{
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  background: rgba(255,255,255,0.75);
  border: 1px solid var(--glass-border);
  padding: 6px 12px;
  border-radius: 999px;
  pointer-events: none;
  white-space: nowrap;
  animation: dragHintPulse 3.6s ease-in-out infinite;
}
@keyframes dragHintPulse{
  0%, 100% { opacity: 0.55; transform: translateX(-50%) translateY(0); }
  50% { opacity: 1; transform: translateX(-50%) translateY(-3px); }
}
@media (prefers-reduced-motion: reduce){
  .hero-drag-hint{ animation: none; opacity: 0.8; }
}
@media (max-width: 980px){
  .hero-drag-hint{ bottom: 14px; font-size: 10px; padding: 5px 10px; }
}
