/* =====================================================
   Chiruka — full-screen popup menu
   ===================================================== */

:root {
  --bg-deep:      #0a0d10;
  --bg-panel-1:   #2b3338;
  --bg-panel-2:   #4a5a62;
  --ink:          #f3f5f6;
  --ink-dim:      #aab4b8;
  --ink-faint:    #6f7a7e;
  --accent:       #ffffff;
  --line:         rgba(255,255,255,0.14);

  --font-display: "Archivo Black", "Arial Black", Helvetica, sans-serif;
  --font-body:    "Inter", "Helvetica Neue", Arial, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-deep);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- Page behind the popup (just for context/demo) ---------- */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 40px;
  z-index: 200;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.logo-mark { width: 16px; height: 16px; color: var(--ink); }

.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--ink);
  padding: 8px 4px;
}

.menu-toggle-text { display: inline-block; min-width: 46px; text-align: right; }

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
  background:
    radial-gradient(ellipse at 70% 20%, rgba(90,110,118,0.35), transparent 55%),
    radial-gradient(ellipse at 10% 90%, rgba(40,48,52,0.5), transparent 60%),
    var(--bg-deep);
}

.hero-eyebrow {
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--ink-dim);
  margin: 0 0 18px;
  text-transform: uppercase;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 12vw, 140px);
  line-height: 0.9;
  margin: 0 0 22px;
  letter-spacing: -0.01em;
}

.hero-sub { color: var(--ink-dim); font-size: 15px; margin: 0; }
.hero-sub strong { color: var(--ink); }

/* ---------- Scroll-trigger demo section ---------- */

.scroll-demo {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
  background: var(--bg-deep);
}

.scroll-demo-eyebrow {
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--ink-dim);
  text-transform: uppercase;
  margin: 0 0 18px;
}

.scroll-demo-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(22px, 4vw, 38px);
  line-height: 1.3;
  max-width: 720px;
  margin: 0 0 48px;
}

.scroll-demo-img-wrap {
  width: min(700px, 90vw);
  aspect-ratio: 16/9;
  border-radius: 4px;
  overflow: hidden;
  background: linear-gradient(160deg, #1a1d20, #050607);
}

.scroll-demo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(1) contrast(1.1) brightness(0.85);
}

/* ---------- Full-screen popup menu ---------- */

.site-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s var(--ease), visibility 0.45s var(--ease);

  background:
    radial-gradient(ellipse 900px 700px at 78% 30%, rgba(120,140,148,0.45), transparent 60%),
    radial-gradient(ellipse 700px 600px at 95% 80%, rgba(80,98,106,0.35), transparent 60%),
    linear-gradient(135deg, #11151a 0%, #1b2226 35%, #3a4750 70%, #5c6e76 100%);
}

.site-menu.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.site-menu-inner {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 100px 40px 40px;
  display: flex;
  flex-direction: column;
}

.site-menu-grid {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}

/* ---- Stacked photo (signature element) ---- */

.photo-stack {
  position: relative;
  width: 100%;
  max-width: 880px;
  aspect-ratio: 16 / 11.2;
}

.photo-stack-layer {
  position: absolute;
  inset: 0;
  border-radius: 2px;
  background: linear-gradient(160deg, rgba(220,230,234,0.5), rgba(140,158,166,0.25));
  filter: blur(0.5px);
}

.layer-3 {
  transform: translate(28px, -38px) scale(0.97);
  opacity: 0.35;
}

.layer-2 {
  transform: translate(14px, -19px) scale(0.985);
  opacity: 0.55;
}

.photo-frame {
  position: absolute;
  inset: 0;
  border-radius: 2px;
  overflow: hidden;
  /*background: #060708 linear-gradient(160deg, #1a1d20, #050607);*/
  /*box-shadow: 0 30px 80px -20px rgba(0,0,0,0.7);*/
}

.photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(1) contrast(1.15) brightness(0.85);
}

.photo-scan {
  position: absolute;
  top: 38%;
  left: 0;
  right: 8%;
  height: 1px;
  background: rgba(255,255,255,0.18);
}

.photo-dots {
  position: absolute;
  top: 18%;
  right: 6%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.photo-dots span {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  display: block;
}

.photo-target {
  position: absolute;
  bottom: 12%;
  right: 8%;
  width: 40px;
  height: 40px;
  color: rgba(255,255,255,0.45);
}

/* ---- Right-hand nav panel ---- */

.menu-panel {
  display: flex;
  flex-direction: column;
  gap: 25px;
  max-width: 460px;
}

.primary-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.primary-nav a {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  display: inline-block;
  position: relative;
  transition: opacity 0.25s var(--ease);
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
  opacity: 0.7;
}

.menu-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.menu-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.menu-label {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  font-weight: 600;
  line-height: 1.5;
}

.menu-link {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  font-weight: 600;
  transition: color 0.2s var(--ease);
}

.menu-link:hover,
.menu-link:focus-visible { color: var(--ink); }

.menu-contact {
  display: flex;
  align-items: center;
  gap: 14px;
}

.contact-tick {
  width: 3px;
  height: 14px;
  background: var(--ink);
  display: inline-block;
  flex-shrink: 0;
}

.menu-contact .menu-label { margin-right: auto; }

.email-btn {
  background: #fff;
  color: #0a0d10;
  font-size: 10px;
  letter-spacing: 0.14em;
  font-weight: 700;
  text-transform: uppercase;
  padding: 7px 14px;
  border-radius: 2px;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}

.email-btn:hover { background: #e8e8e8; }
.email-btn:active { transform: scale(0.97); }

.menu-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding-top: 8px;
  /*border-top: 1px solid var(--line);*/
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
}

.footer-col p { margin: 0; }
.footer-col p:first-child { color: var(--ink); font-weight: 600; }
.footer-col a { color: var(--ink-dim); margin-top: 4px; transition: color 0.2s var(--ease); }
.footer-col a:hover { color: var(--ink); }

/* ---- Entrance choreography ----
   Photo stack still fades in as a block (its image has its own
   blur-in via the .ta-img class). The text panel no longer fades in
   as a block — each word/character now reveals itself individually
   via the text-animate engine, so we just let it sit at full opacity
   and rely on its own per-segment transitions. */

.site-menu .photo-stack {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease) 0.08s, transform 0.5s var(--ease) 0.08s;
}

.site-menu.is-open .photo-stack {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Focus visibility (a11y floor) ---- */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* ---- Responsive ---- */

@media (max-width: 980px) {
  .site-menu-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 16px;
    overflow-y: auto;
  }
  .photo-stack { max-width: 100%; aspect-ratio: 16/10; }
  .menu-panel { max-width: 100%; gap: 28px; }
  .primary-nav a { font-size: 32px; }
}

@media (max-width: 560px) {
  .site-header { padding: 20px; }
  .site-menu-inner { padding: 20px 18px 24px; }
  .menu-columns { grid-template-columns: 1fr; gap: 14px; }
  .menu-footer { grid-template-columns: 1fr; gap: 16px; }
  .photo-stack { aspect-ratio: 4/3; }
  .layer-3, .layer-2 { display: none; }
}

/* ---- Reduced motion ---- */

@media (prefers-reduced-motion: reduce) {
  .site-menu,
  .site-menu .photo-stack,
  .site-menu .menu-panel {
    transition: opacity 0.2s linear !important;
    transform: none !important;
  }
}

/* =====================================================
   Text / Image animate-in (vanilla equivalent of
   MagicUI's <TextAnimate animation="blurInUp" by="word" />)
   ===================================================== */

/* Each split unit starts blurred, offset down, and invisible */
.ta-root .ta-segment {
  display: inline-block;
  opacity: 0;
  filter: blur(10px);
  transform: translateY(0.35em);
  transition:
    opacity 0.55s var(--ease),
    filter 0.55s var(--ease),
    transform 0.55s var(--ease);
  will-change: opacity, filter, transform;
}

/* Character split needs no inter-word gap quirks; same animation applies */
.ta-root.ta-by-character .ta-segment { display: inline-block; }

/* Played state: revealed */
.ta-root.ta-in .ta-segment {
  opacity: 1;
  filter: blur(0px);
  transform: translateY(0);
}

/* Images: start blurred + slightly scaled + invisible */
.ta-img {
  opacity: 0;
  filter: blur(16px);
  transform: scale(1.04);
  transition:
    opacity 0.7s var(--ease),
    filter 0.7s var(--ease),
    transform 0.7s var(--ease);
  will-change: opacity, filter, transform;
}

.ta-img.ta-img-in {
  opacity: 1;
  filter: blur(0px);
  transform: scale(1);
}

/* Respect reduced motion globally for the animate engine too */
@media (prefers-reduced-motion: reduce) {
  .ta-root .ta-segment,
  .ta-img {
    transition: none !important;
    filter: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

