:root {
  --black: #000f15;
  --cards-bg: #132025;
  --gray-main: #8b9093;
  --white: #ffffff;
  --flip: .78s;
  --ease: cubic-bezier(.72, 0, .18, 1);
}

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

/* scroll smoothing is handled by Lenis (js/script.js) instead of native
   CSS scroll-behavior, which would fight it on anchor-link jumps. */

body {
  background: var(--black);
  color: var(--white);
  font-family: 'Noto Sans Armenian', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
}

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

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

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

.btn-pill {
  display: flex;
  align-items: center;
  padding: 16px 24px;
  border-radius: 32px;
  font-weight: 300;
  font-size: 18px;
  line-height: 26px;
  letter-spacing: 0.36px;
  color: var(--white);
  white-space: nowrap;
}

.btn-contact { background: var(--cards-bg); }

/* ── Header (fixed) ──────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
}
/* The contact block carries its own Logo/Կապ/ENG row — the fixed header
   would just duplicate it while the block is open. */
body.contact-open .site-header {
  display: none;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 80px;
  position: relative;
}

.logo { width: 102px; height: 56px; flex-shrink: 0; }
.logo img { width: 100%; height: 100%; }

.header-actions { display: flex; align-items: center; gap: 24px; flex-shrink: 0; }

.header-icons-sticky {
  position: absolute;
  left: 50%;
  top: 25px;
  transform: translateX(-50%) scaleX(0) scaleY(0.04);
  transform-origin: center;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 56px;
  opacity: 0;
  border-radius: 100px;
  overflow: hidden;
  pointer-events: none;
}

/* Reveal: a thin centered bar expands sideways, then unfurls vertically —
   matches the nav-bar entrance on nudot.com.tw (#nav_scroll_container /
   its "nsBarIn" keyframes). Hiding runs the exact same motion in reverse. */
.header-icons-sticky.visible {
  opacity: 1;
  pointer-events: auto;
  animation: headerIconsBarIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.header-icons-sticky.leaving {
  opacity: 1;
  pointer-events: none;
  animation: headerIconsBarOut 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes headerIconsBarIn {
  0%   { transform: translateX(-50%) scaleX(0) scaleY(0.04); border-radius: 100px; opacity: 1; }
  55%  { transform: translateX(-50%) scaleX(1) scaleY(0.04); border-radius: 100px; opacity: 1; }
  100% { transform: translateX(-50%) scaleX(1) scaleY(1); border-radius: 24px; opacity: 1; }
}
@keyframes headerIconsBarOut {
  0%   { transform: translateX(-50%) scaleX(1) scaleY(1); border-radius: 24px; opacity: 1; }
  45%  { transform: translateX(-50%) scaleX(1) scaleY(0.04); border-radius: 100px; opacity: 1; }
  100% { transform: translateX(-50%) scaleX(0) scaleY(0.04); border-radius: 100px; opacity: 1; }
}

.hicon { position: relative; width: 56px; height: 56px; cursor: pointer; }
.hicon-bg {
  position: absolute;
  inset: 0;
  background: var(--black);
  border-radius: 25.594px;
  transition: background 0.25s ease;
}
.hicon img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; padding: 13px; box-sizing: border-box; }
.hicon-flat img { padding: 0; }

/* ── def / hover / selected states (Figma icon set) — background swap
   is pure CSS; the glyph itself swaps to a differently-colored asset
   via js/script.js (initIconStates), since these aren't recolorable
   with a filter — hover/selected use distinct brand-colored artwork. */
.hicon:hover .hicon-bg, .icon264:hover .icon264-bg { background: #ffffff; }
.hicon.selected .hicon-bg, .icon264.selected .icon264-bg { background: #ececec; }
.hicon[data-icon="factory"]:hover .hicon-bg, .icon264[data-icon="factory"]:hover .icon264-bg { background: #efefef; }
.hicon[data-icon="factory"].selected .hicon-bg, .icon264[data-icon="factory"].selected .icon264-bg { background: #dbdbdb; }

.hicon .syu-p { position: absolute !important; z-index: 1; padding: 0 !important; object-fit: fill; }
.hicon .syu-p1 { top: 27.9px; left: 27.2px; width: 16.8px; height: 14.4px; }
.hicon .syu-p2 { top: 14.8px; left: 28.4px; width: 14.5px; height: 11.2px; }
.hicon .syu-p3 { top: 28.1px; left: 12.3px; width: 13.8px; height: 13.8px; }
.hicon .syu-p4 { top: 13.7px; left: 12.1px; width: 13.9px; height: 12.3px; }

/* ── Kinetic dot-grid background — fixed to the viewport, reacts to the
   cursor everywhere on the page (js/kinetic-grid.js). Sits behind all
   content; z-index:-1 keeps it clear of the header/overlay's stacking
   without requiring every section to opt into a higher z-index. ───── */
#kineticGrid {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 80px 190px;
  overflow: hidden;
  perspective: 1400px;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 73px;
  width: 100%;
  max-width: 1760px;
  transform-origin: center bottom;
  will-change: transform, opacity;
}

/* One-shot "fly forward" transition on the hero → About scroll step
   (js/script.js): the hero content rushes toward the camera and fades
   as the destination content grows in from a distance to meet it —
   same depth-scroll idea as the reference, in the site's own palette. */
.hero-content.fly-out {
  animation: heroFlyOut 0.55s cubic-bezier(.55, 0, 1, .45) forwards;
}
@keyframes heroFlyOut {
  0%   { transform: scale(1) translateZ(0); opacity: 1; }
  100% { transform: scale(0.35) translateZ(-400px); opacity: 0; }
}

.top-container, .icons-row { transform-origin: center center; will-change: transform, opacity; }
.main-container.fly-in .top-container {
  animation: sectionFlyIn 0.6s cubic-bezier(0, .55, .45, 1) both;
}
.main-container.fly-in .icons-row {
  animation: sectionFlyIn 0.6s cubic-bezier(0, .55, .45, 1) 0.08s both;
}
@keyframes sectionFlyIn {
  0%   { transform: scale(1.35) translateZ(300px); opacity: 0; }
  100% { transform: scale(1) translateZ(0); opacity: 1; }
}

/* Reverse: About → hero scroll-up step — the same motion played backwards. */
.main-container.fly-out-up .top-container {
  animation: sectionFlyOut 0.55s cubic-bezier(.55, 0, 1, .45) forwards;
}
.main-container.fly-out-up .icons-row {
  animation: sectionFlyOut 0.55s cubic-bezier(.55, 0, 1, .45) 0.08s forwards;
}
@keyframes sectionFlyOut {
  0%   { transform: scale(1) translateZ(0); opacity: 1; }
  100% { transform: scale(1.35) translateZ(300px); opacity: 0; }
}

/* About → Anahit: same fly-through step, one section further down. */
.main-container.fly-out .top-container,
.main-container.fly-out .icons-row {
  animation: heroFlyOut 0.55s cubic-bezier(.55, 0, 1, .45) forwards;
}
.anahit-head, .anahit-grid { transform-origin: center center; will-change: transform, opacity; }
.anahit-section.fly-in .anahit-head {
  animation: sectionFlyIn 0.6s cubic-bezier(0, .55, .45, 1) both;
}
.anahit-section.fly-in .anahit-grid {
  animation: sectionFlyIn 0.6s cubic-bezier(0, .55, .45, 1) 0.08s both;
}
.anahit-section.fly-out-up .anahit-head,
.anahit-section.fly-out-up .anahit-grid {
  animation: sectionFlyOut 0.55s cubic-bezier(.55, 0, 1, .45) forwards;
}

@media (prefers-reduced-motion: reduce) {
  .hero-content.fly-out, .main-container.fly-in .top-container,
  .main-container.fly-out-up .top-container,
  .main-container.fly-out .top-container, .anahit-section.fly-in .anahit-head,
  .anahit-section.fly-out-up .anahit-head { animation: none; }
}

/* Load-in reveal (sileent.com reference): both the wordmark and tagline
   are drawn vector logotypes, each letter its own <path> — staggered
   left to right, every letter rising from below into place like
   ascending stair steps. */
.hero-wordmark {
  width: 100%;
  height: auto;
  overflow: visible;
}
.hero-tagline {
  width: auto;
  max-width: 60%;
  height: auto;
  overflow: visible;
}
.hero-wordmark .stair-p,
.hero-tagline .stair-p {
  opacity: 0;
  transform: translateY(36px);
  animation: stairUp 0.7s cubic-bezier(.16, 1, .3, 1) forwards;
}
@keyframes stairUp {
  0%   { opacity: 0; transform: translateY(36px); }
  100% { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-wordmark .stair-p, .hero-tagline .stair-p { animation: none; opacity: 1; transform: none; }
}

/* ── Main container (About + logos) ─────────────────────────── */
.main-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 200px;
  padding: 80px 80px 0;
}

.top-container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 24px;
}

.about-card, .logo-card {
  background: var(--cards-bg);
  border-radius: 32px;
  padding: 48px;
}

.about-card { width: 1022px; display: flex; flex-direction: column; gap: 32px; }
.about-card h2 {
  font-weight: 600;
  font-size: 56px;
  line-height: 64px;
  letter-spacing: 1.12px;
  color: var(--white);
}
.about-text { display: flex; flex-direction: column; gap: 16px; }
.about-text p {
  font-weight: 300;
  font-size: 18px;
  line-height: 26px;
  letter-spacing: 0.36px;
  color: rgba(255, 255, 255, 0.92);
}

.v-divider { width: 1px; height: 100px; background: rgba(255, 255, 255, 0.16); flex-shrink: 0; }

.logo-card { width: 607px; display: flex; flex-direction: column; gap: 24px; }
.hab-logo { width: 269px; height: 50px; }
.logo-card p {
  font-weight: 300;
  font-size: 18px;
  line-height: 26px;
  letter-spacing: 0.36px;
  color: rgba(255, 255, 255, 0.92);
}

.icons-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  cursor: pointer;
}

.icon264 { position: relative; width: 264px; height: 264px; flex-shrink: 0; }
.icon264-bg {
  position: absolute;
  inset: 0;
  background: var(--black);
  border-radius: 103.03px;
  transition: background 0.25s ease;
}
.icon264 > img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; padding: 62px; box-sizing: border-box; }
.icon264-flat > img { padding: 0; }

.icon264-syunar .syu-p { position: absolute !important; z-index: 1; padding: 0 !important; object-fit: fill; }
.icon264-syunar .syu-p1 { top: 131.6px; left: 128.2px; width: 79.4px; height: 67.7px; }
.icon264-syunar .syu-p2 { top: 69.7px; left: 133.7px; width: 68.4px; height: 52.9px; }
.icon264-syunar .syu-p3 { top: 132.5px; left: 58.2px; width: 65.2px; height: 65.2px; }
.icon264-syunar .syu-p4 { top: 64.7px; left: 57.1px; width: 65.6px; height: 58.2px; }

/* ── Anahit showcase section ────────────────────────────────── */
.anahit-section {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 64px;
  padding: 96px 80px 32px;
  /* visible, not hidden — height below is deliberately smaller than the
     natural content (for correct document flow/scroll height); hidden
     would clip that content in its own pre-transform coordinate space
     before the shrink below ever gets applied. */
  overflow: visible;
  transform-origin: top center;
  box-sizing: border-box;
}

.anahit-head { display: flex; align-items: flex-end; gap: 269px; width: 100%; }

.anahit-title {
  font-weight: 400;
  font-size: 32px;
  line-height: 40px;
  letter-spacing: 0.64px;
  color: var(--white);
  width: 280px;
  flex-shrink: 0;
}

.anahit-lead {
  font-weight: 300;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0.32px;
  color: var(--white);
  width: 183px;
  flex-shrink: 0;
}

.anahit-desc {
  font-weight: 300;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0.32px;
  color: var(--white);
  width: 277px;
  flex-shrink: 0;
}

.anahit-visit {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}
.av-text {
  display: flex;
  align-items: center;
  height: 32px;
  padding: 4px 24px;
  border-radius: 24px;
  background: var(--gray-main);
  font-weight: 600;
  font-size: 14px;
  line-height: 22px;
  letter-spacing: 0.28px;
  color: rgba(0, 15, 21, 0.85);
  white-space: nowrap;
}
.av-arrow {
  display: flex;
  align-items: center;
  padding: 4px 24px;
  border-radius: 24px;
  background: var(--gray-main);
}
.av-arrow img { width: 24px; height: 24px; }

.anahit-grid { display: flex; align-items: stretch; justify-content: space-between; width: 100%; gap: 8px; }

/* ── Interactive flip gallery — replaces the flat masked photo.
   Each tile flips in 3D on hover to reveal its own portfolio photo;
   clicking one makes that photo the grid's new "selected" backdrop,
   with a ripple of flips fanning out from the clicked tile. ──── */
.gallery-grid {
  --selected: url('../images/anahit-photo.png');
  --gap: 4px;
  width: 1526px;
  height: 852px;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: var(--gap);
  border-radius: 32px;
  overflow: hidden;
  perspective: 2400px;
}

.g-tile {
  position: relative;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  perspective: 1800px;
}
.g-tile:nth-child(1) { --x: 0%; --y: 0%; }
.g-tile:nth-child(2) { --x: 50%; --y: 0%; }
.g-tile:nth-child(3) { --x: 100%; --y: 0%; }
.g-tile:nth-child(4) { --x: 0%; --y: 50%; }
.g-tile:nth-child(5) { --x: 50%; --y: 50%; }
.g-tile:nth-child(6) { --x: 100%; --y: 50%; }
.g-tile:nth-child(7) { --x: 0%; --y: 100%; }
.g-tile:nth-child(8) { --x: 50%; --y: 100%; }
.g-tile:nth-child(9) { --x: 100%; --y: 100%; }

.g-inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(0);
  will-change: transform;
}
.g-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background-repeat: no-repeat;
  border-radius: 30px;
}
.g-front {
  background-image: var(--selected);
  background-size: 300% 300%;
  background-position: var(--x) var(--y);
}
.g-back {
  transform: rotateX(-180deg);
  background-size: cover;
  background-position: center;
}

.anahit-highlights { display: flex; flex-direction: column; gap: 6px; width: 226px; flex-shrink: 0; text-align: right; }

.hl-card {
  background: var(--cards-bg);
  border-radius: 32px;
  flex: 1;
  min-height: 0;
  width: 100%;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 16px;
}
.hl-num { font-weight: 300; font-size: 56px; line-height: 64px; letter-spacing: 1.12px; }
.hl-info { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; width: 100%; }
.hl-title { font-family: 'Noto Sans Armenian', sans-serif; font-weight: 600; font-size: 16px; line-height: 24px; letter-spacing: 0.32px; }
.hl-desc { font-family: 'Montserrat', sans-serif; font-weight: 300; font-size: 12px; line-height: 20px; letter-spacing: 0.24px; }

/* ── Contact overlay ─────────────────────────────────────────── */
/* A normal in-flow block, not a fixed overlay — closed it takes no space,
   open it pushes <main> (hero and everything after it) down the page
   rather than floating on top of it. grid-template-rows 0fr → 1fr is the
   standard trick for animating to an unknown content height (plain
   `height` can't transition to/from `auto`). */
.contact-overlay {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s cubic-bezier(.65, 0, .35, 1);
}
.contact-overlay.open {
  grid-template-rows: 1fr;
}
.contact-overlay-inner {
  overflow: hidden;
  min-height: 0;
  display: flex;
  flex-direction: column;
  /* Matches the Figma frame (96:3002) — the fixed site header is hidden
     while this block is open (its own Logo/Կապ/ENG row replaces it), so
     there's no need to clear extra space for it here. */
  padding-top: 48px;
  padding-bottom: 24px;
}
.contact-body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 80px;
  /* The card row is a fixed 1756px wide (four cards, no wrap) — on a
     narrower window it no longer fits. Let this row scroll sideways
     instead of just clipping the last card off-screen. */
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.contact-body::-webkit-scrollbar { display: none; }

.contact-cards { display: flex; align-items: stretch; gap: 8px; flex-shrink: 0; }

.cc-map {
  width: 510px;
  height: 290px;
  flex-shrink: 0;
  border-radius: 28px;
  overflow: hidden;
  position: relative;
}
.cc-map::after { content: ''; position: absolute; inset: 0; background: rgba(0, 15, 21, 0.41); }
.cc-map img { width: 100%; height: 100%; object-fit: cover; }

.cc-info {
  width: 510px;
  height: 290px;
  flex-shrink: 0;
  background: var(--cards-bg);
  border-radius: 32px;
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cc-heading { font-weight: 500; font-size: 28px; line-height: 36px; letter-spacing: 0.56px; color: var(--white); }

.cc-items { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.cc-item { display: flex; align-items: center; gap: 8px; }
.cc-icon { width: 32px; height: 32px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.cc-icon img { width: auto; height: auto; max-width: 100%; max-height: 100%; }
.cc-item a, .cc-item span { font-weight: 300; font-size: 18px; line-height: 26px; letter-spacing: 0.36px; color: var(--white); }

.cc-linkedin-wrap { display: flex; flex-direction: column; gap: 12px; }
.cc-divider { height: 1px; width: 100%; background: rgba(255, 255, 255, 0.16); }

.cc-form {
  width: 510px;
  height: 290px;
  flex-shrink: 0;
  background: var(--cards-bg);
  border-radius: 32px;
  padding: 24px 32px;
  display: flex;
  align-items: center;
}
.cc-form form { width: 100%; display: flex; flex-direction: column; gap: 24px; }
.cc-form-fields-wrap { display: flex; flex-direction: column; gap: 16px; align-items: flex-end; width: 100%; }
.cc-form-fields { display: flex; gap: 12px; align-items: stretch; width: 100%; }
.cc-form-left { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cc-form input, .cc-form textarea {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 12px;
  padding: 16px;
  font-family: 'Noto Sans Armenian', sans-serif;
  font-weight: 300;
  font-size: 14px;
  line-height: 22px;
  letter-spacing: 0.28px;
  color: var(--white);
  width: 100%;
}
.cc-form input::placeholder, .cc-form textarea::placeholder { color: rgba(255, 255, 255, 0.42); }
.cc-form textarea { width: 254px; flex-shrink: 0; resize: none; height: auto; min-height: 100%; }
.cc-send {
  align-self: flex-end;
  text-align: center;
  background: var(--black);
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 300;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0.32px;
  color: var(--white);
}

.cc-collab {
  width: 226px;
  flex-shrink: 0;
  background: var(--cards-bg);
  border-radius: 32px;
  height: 290px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 32px 24px;
}
.cc-collab p {
  font-weight: 400;
  font-size: 16px;
  line-height: 22px;
  letter-spacing: 0.32px;
  color: var(--white);
  text-align: left;
}


/* ── Responsive fallback (design is desktop-first, 1920 canvas) ── */
@media (max-width: 1900px) {
  .site-header-inner,
  .hero,
  .main-container,
  .anahit-section {
    padding-left: 40px;
    padding-right: 40px;
  }
}
