/* ============================================================
   chrome.css — nav (.nav-), hero (.hero-), footer (.foot-)
   All rules scoped under those prefixes
   (body.menu-open descendants allowed for the nav menu).
   ============================================================ */

/* ———————————————————— NAV ———————————————————— */

.nav-bar {
  --nav-inline-inset: clamp(40px, calc((100vw - 1600px) / 2), 160px);
  --nav-height: 84px;
  --nav-control-height: 48px;
  --nav-control-radius: 20px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  height: var(--nav-height);
  padding-block: 0;
  padding-left: max(var(--nav-inline-inset), env(safe-area-inset-left));
  padding-right: max(var(--nav-inline-inset), env(safe-area-inset-right));
  isolation: isolate;
}

/* Post-hero shell: one attached, translucent navigation surface. */
.nav-bar::before {
  content: "";
  position: absolute;
  top: 8px;
  right: max(8px, calc(var(--nav-inline-inset) * 0.5));
  left: max(8px, calc(var(--nav-inline-inset) * 0.5));
  height: 68px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  corner-shape: superellipse(1.2);
  background: rgba(13, 13, 13, 0.78);
  background: color-mix(in srgb, #0d0d0d 78%, transparent);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.2);
  backdrop-filter: saturate(140%) blur(18px);
  -webkit-backdrop-filter: saturate(140%) blur(18px);
  opacity: 0;
  transform: translateY(-10px) scale(0.985);
  transition:
    opacity 0.42s cubic-bezier(0.12, 0.23, 0.5, 1),
    transform 0.42s cubic-bezier(0.12, 0.23, 0.5, 1);
  pointer-events: none;
  z-index: -1;
}
.nav-bar.is-past-hero::before { opacity: 1; transform: none; }

/* left: logo */
.nav-logo {
  display: inline-flex;
  align-items: center;
}
.nav-logo-art {
  display: block;
  width: 143.086px;
  height: 22px;
  flex: 0 0 auto;
}

.nav-bar .nav-cta {
  height: var(--nav-control-height);
  min-height: var(--nav-control-height);
  border-radius: var(--nav-control-radius);
}

/* ——— center: fixed toggle with an independently revealing menu ——— */

.nav-center {
  position: fixed;
  left: 50vw;
  top: calc((var(--nav-height) - var(--nav-control-height)) / 2);
  transform: translateX(-50%);
  z-index: 95;
  pointer-events: none;
}
.nav-center .nav-menu { pointer-events: auto; }

.nav-menu {
  --menu-ease: cubic-bezier(0.44, 0, 0.56, 1);
  position: relative;
  width: 280px;
  height: var(--nav-control-height);
  overflow: visible;
}

.nav-menu-head {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 280px;
  height: var(--nav-control-height);
  flex: none;
  padding: 0 20px 0 14px;
  margin-inline: auto;
  border-radius: var(--nav-control-radius);
  corner-shape: superellipse(1.2);
  background: rgba(21, 21, 21, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
}

.nav-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 26px;
  margin: 0;
  padding: 3px 5px;
  border-radius: 4px;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.03em;
  position: static;
}
.nav-menu-btn::before {
  content: "";
  position: absolute;
  inset: 0;
}
.nav-menu-btn:focus-visible { outline: none; }
body.keyboard-nav .nav-menu-head:has(.nav-menu-btn:focus-visible) {
  outline: 2px solid #fff;
  outline-offset: -2px;
}

.nav-menu-btn svg {
  display: block;
  width: 10px;
  height: 10px;
  flex: none;
}
.nav-menu-btn svg rect {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.35s var(--menu-ease);
}
body.menu-open .nav-menu-btn svg rect { transform: rotate(45deg); }

.nav-menu-label {
  position: relative;
  display: block;
  width: 45px;
  height: 22px;
  flex: none;
  overflow: hidden;
  transition: width 0.35s var(--menu-ease);
}
.nav-label {
  position: absolute;
  left: 0;
  display: block;
  font-size: 18px;
  font-weight: 400;
  line-height: 21.6px;
  letter-spacing: -0.03em;
  white-space: nowrap;
  transform: translateY(-50%);
  transition: top 0.35s var(--menu-ease);
}
.nav-label-menu { top: 50%; }
.nav-label-close { top: 141%; }
body.menu-open .nav-menu-label { width: var(--nav-close-label-width, 45px); }
body.menu-open .nav-label-menu { top: -41%; }
body.menu-open .nav-label-close { top: 50%; }

.nav-slots {
  flex: none;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
}

.nav-menu-body {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  width: 450px;
  height: auto;
  max-height: calc(100svh - var(--nav-height) - 8px);
  display: block;
  border-radius: 20px;
  corner-shape: superellipse(1.2);
  background: rgba(21, 21, 21, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  opacity: 0;
  visibility: hidden;
  clip-path: inset(0 0 100% 0 round 20px);
  transform: translate(-50%, -10px) scale(0.985);
  transform-origin: 50% 0;
  transition:
    opacity 0.24s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    clip-path 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0.38s;
  pointer-events: none;
}
.nav-menu-body::-webkit-scrollbar { display: none; }
body.menu-open .nav-menu-body {
  opacity: 1;
  visibility: visible;
  clip-path: inset(0 round 20px);
  transform: translate(-50%, 0) scale(1);
  transition-delay: 0s;
  pointer-events: auto;
}

.nav-menu-list {
  width: 100%;
}

.nav-menu-link {
  display: flex;
  align-items: center;
  width: 100%;
  height: 99px;
  padding: 12px 20px;
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
  text-decoration: none;
  position: relative;
  isolation: isolate;
}
.nav-menu-link-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 75px;
  position: relative;
  z-index: 1;
  transition: padding-left 0.35s var(--menu-ease);
}
.nav-menu-link:focus-visible {
  outline: 2px solid #f1c75b;
  outline-offset: -2px;
}
@media (hover: hover) {
  .nav-menu-link:hover .nav-menu-link-content { padding-left: 8px; }
  .nav-menu-link:hover .nav-menu-item-gradient { opacity: 1; }
}

.nav-menu-word {
  display: block;
}

.nav-menu-item-gradient {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.03) 100%);
  opacity: 0;
  transition: opacity 0.35s var(--menu-ease);
}

/* ——— nav responsive ——— */

@media (max-width: 1279px) {
  .nav-bar {
    --nav-inline-inset: 40px;
    align-items: center;
    gap: 0.5rem;
  }
  .nav-bar .nav-cta { display: inline-flex; }
  .nav-center {
    left: 50vw;
    right: auto;
    width: auto;
    transform: translateX(-50%);
  }
  .nav-center .nav-menu { pointer-events: auto; }
  .nav-menu {
    width: 95px;
  }
  .nav-menu-body {
    width: min(450px, calc(100vw - 16px));
  }
  .nav-menu-head {
    width: 95px;
    padding-inline: 14px;
  }
  .nav-slots { display: none; }
}

@media (max-width: 600px) {
  .nav-bar {
    --nav-inline-inset: clamp(12px, 4vw, 20px);
    --nav-height: 76px;
    --nav-control-height: 44px;
    --nav-control-radius: 18px;
    gap: 0.25rem;
  }
  .nav-bar::before {
    right: max(6px, calc(var(--nav-inline-inset) * 0.5));
    left: max(6px, calc(var(--nav-inline-inset) * 0.5));
    height: 60px;
    border-radius: 19px;
  }
  .nav-logo-art { width: 114.069px; height: 18px; }
  .nav-center { left: calc(50vw - 8px); }
  .nav-menu { width: 88px; }
  .nav-menu-head { width: 88px; padding-inline: 12px; }
  .nav-menu-body { left: calc(50% + 8px); }
  .nav-menu-btn { padding-inline: 0; gap: 6px; }
  .nav-menu-btn,
  .nav-label { font-size: 16px; }
  .nav-bar .nav-cta {
    padding: 0.62rem 0.68rem;
    gap: 0.35rem;
    font-size: 0.72rem;
  }
  .nav-bar .nav-cta .spark { width: 0.7em; height: 0.7em; }
}

@media (max-width: 359px) {
  .nav-logo-art { width: 96.702px; height: 16px; }
  .nav-menu { width: 76px; }
  .nav-menu-head { width: 76px; padding-inline: 9px; }
  .nav-menu-btn,
  .nav-label { font-size: 14px; }
  .nav-menu-label { width: 39px; }
  .nav-bar .nav-cta { padding-inline: 0.48rem; font-size: 0.64rem; }
}

@media (prefers-reduced-motion: reduce) {
  .nav-bar::before,
  .nav-menu,
  .nav-menu-body,
  .nav-label,
  .nav-menu-link-content,
  .nav-menu-item-gradient { transition: none; }
}

/* ———————————————————— HERO ———————————————————— */

.hero-wrap {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
}

/* headline block in the upper-right quadrant; text stays left-aligned */
.hero-headline {
  align-self: flex-end;
  margin-top: max(18vh, 108px);
  margin-right: clamp(0rem, 15vw, 13rem);
  max-width: 24ch;
  font-size: clamp(1.5rem, 2.23vw, 2rem); /* 32px@1440 */
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-wrap: balance;
}
/* info row pinned above the giant word */
.hero-info {
  margin-top: auto;
  padding-block: clamp(1rem, 2.5vh, 1.75rem) clamp(0.75rem, 2vh, 1.5rem);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  font-size: 0.875rem; /* midu meta: 14px, -0.02em */
  letter-spacing: -0.02em;
  color: var(--muted);
}
.hero-info-center { text-align: center; }

/* ——— cycling word widget: AI/GEO/SEO swipe-blurs in place while
   "growth studio" glides with the animated slot width ——— */
/* fixed slot sized to the widest word, right-aligned so the words
   share their right edge and "growth studio" never moves:
     AI growth studio / GEO growth studio / SEO growth studio */
.cycle {
  position: relative;
  display: inline-grid;
  justify-items: end;
  white-space: nowrap;
  vertical-align: baseline;
  margin-right: 0.25em;
}
.cycle-word {
  grid-area: 1 / 1;
  width: max-content;
  color: var(--text);
  font-weight: 500;
  opacity: 0;
  filter: blur(6px);
  transform: translateX(16px);
  transition:
    opacity 0.4s ease,
    transform 0.55s cubic-bezier(0.25, 0.9, 0.3, 1),
    filter 0.45s ease;
  will-change: transform, filter;
}
.cycle-word.is-in { opacity: 1; filter: blur(0); transform: none; }
.cycle-word.is-out { opacity: 0; filter: blur(6px); transform: translateX(-18px); }

@media (prefers-reduced-motion: reduce) {
  .cycle, .cycle-word { transition: none; }
}
.hero-info-right { text-align: right; }
.hero-info .hero-arrow {
  display: inline-block;
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  translate: 0 0.05em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ——— hero: midu's verbatim layer stack ———
   fullscreen GrainGradient shader canvas (hero-shader.js) under two
   glyph-masked gradient layers; blending happens against the shader,
   so no ancestor between them may create a stacking context. The
   .hero-par wrapper carries the section parallax (speed 60), keeping
   shader + word in one context so the blends survive the transform. */

.hero-par {
  position: relative;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  will-change: transform;
}

.hero-shader {
  position: absolute;
  inset: 0;
  background: #000;
  pointer-events: none;
}
/* positioned (z-index auto → no stacking context) so the text paints
   above the canvas while blend layers keep compositing against it */
.hero-par .hero-inner { position: relative; }
.hero-shader canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}
/* WebGL unavailable → static frame of the same gradient */
.hero-shader.fallback {
  background: #000 url("../assets/img/red-wave.webp") center bottom / 100% auto no-repeat;
}

.hero-metapar { will-change: transform; margin-top: auto; }
.hero-metapar .hero-info { margin-top: 0; }

.hero-stage {
  position: relative;
  width: 100%;
  margin-bottom: 20px;
}

.hero-wordbox { position: relative; }

.hero-word {
  display: block;
  width: 100%;
  height: auto;
}

/* both word layers run the same appear (midu applies dd/fd to
   MiduLogoMain AND HeroLogoBlend): opacity .001→1, y 80→0 */
.hero-word--main {
  mix-blend-mode: darken;
  opacity: 0.001;
  transform: translateY(80px);
  transition:
    opacity 1s cubic-bezier(0.11, 0.06, 0.18, 1) 0.75s,
    transform 1s cubic-bezier(0.11, 0.06, 0.18, 1) 0.75s;
  will-change: transform, opacity;
}
.hero-word--main.on { opacity: 1; transform: none; }

/* their HeroLogoBlend: color-dodge wrapper with the load appear
   {opacity .001→1, y 80→0, 1s, ease [.11,.06,.18,1], delay .75s} */
.hero-dodge {
  position: absolute;
  inset: 0;
  mix-blend-mode: color-dodge;
  opacity: 0.001;
  transform: translateY(80px);
  transition:
    opacity 1s cubic-bezier(0.11, 0.06, 0.18, 1) 0.75s,
    transform 1s cubic-bezier(0.11, 0.06, 0.18, 1) 0.75s;
  will-change: transform, opacity;
}
.hero-dodge.on { opacity: 1; transform: none; }

.hero-word--blend { mix-blend-mode: darken; }

/* midu logotype metrics: box aspect 3.29 (1360×413), ultra-heavy
   letterforms filling the full box height, tight tracking */
.hero-word-text {
  font-family: var(--font);
  font-weight: 900;
  font-size: 414px;
  letter-spacing: -0.02em;
}

/* ——— ProgressiveBlur strip (midu's exact layer stack: 8 backdrop
   blurs 35/256→35/2 px, each masked to a 12.5%-step band, toBottom,
   bottom 100px of the hero) ——— */
.hero-fog {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100px;
  pointer-events: none;
}
.hero-fog i { position: absolute; inset: 0; }
.hero-fog i:nth-child(1) { backdrop-filter: blur(0.136719px); -webkit-backdrop-filter: blur(0.136719px); mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 0%, #000 12.5%, #000 25%, rgba(0,0,0,0) 37.5%); -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 0%, #000 12.5%, #000 25%, rgba(0,0,0,0) 37.5%); }
.hero-fog i:nth-child(2) { backdrop-filter: blur(0.273438px); -webkit-backdrop-filter: blur(0.273438px); mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 12.5%, #000 25%, #000 37.5%, rgba(0,0,0,0) 50%); -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 12.5%, #000 25%, #000 37.5%, rgba(0,0,0,0) 50%); }
.hero-fog i:nth-child(3) { backdrop-filter: blur(0.546875px); -webkit-backdrop-filter: blur(0.546875px); mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 25%, #000 37.5%, #000 50%, rgba(0,0,0,0) 62.5%); -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 25%, #000 37.5%, #000 50%, rgba(0,0,0,0) 62.5%); }
.hero-fog i:nth-child(4) { backdrop-filter: blur(1.09375px); -webkit-backdrop-filter: blur(1.09375px); mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 37.5%, #000 50%, #000 62.5%, rgba(0,0,0,0) 75%); -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 37.5%, #000 50%, #000 62.5%, rgba(0,0,0,0) 75%); }
.hero-fog i:nth-child(5) { backdrop-filter: blur(2.1875px); -webkit-backdrop-filter: blur(2.1875px); mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 50%, #000 62.5%, #000 75%, rgba(0,0,0,0) 87.5%); -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 50%, #000 62.5%, #000 75%, rgba(0,0,0,0) 87.5%); }
.hero-fog i:nth-child(6) { backdrop-filter: blur(4.375px); -webkit-backdrop-filter: blur(4.375px); mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 62.5%, #000 75%, #000 87.5%, rgba(0,0,0,0) 100%); -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 62.5%, #000 75%, #000 87.5%, rgba(0,0,0,0) 100%); }
.hero-fog i:nth-child(7) { backdrop-filter: blur(8.75px); -webkit-backdrop-filter: blur(8.75px); mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 75%, #000 87.5%, #000 100%); -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 75%, #000 87.5%, #000 100%); }
.hero-fog i:nth-child(8) { backdrop-filter: blur(17.5px); -webkit-backdrop-filter: blur(17.5px); mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 87.5%, #000 100%); -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 87.5%, #000 100%); }

@media (prefers-reduced-motion: reduce) {
  .hero-dodge,
  .hero-word--main { transition: none; opacity: 1; transform: none; }
}

/* ——— "Scroll to explore" text shimmer (midu: 67deg white streak,
       200% bg, 3s linear infinite, clipped to the text) ——— */

.shimmer { position: relative; display: inline-block; }
.shimmer-streak {
  position: absolute;
  inset: 0;
  color: transparent;
  background: linear-gradient(67deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0) 22.4%, #fff 50%, rgba(255,255,255,0) 77.6%, rgba(255,255,255,0) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shimmer-sweep 3s linear infinite;
  pointer-events: none;
}
@keyframes shimmer-sweep {
  from { background-position: 130% 0; }
  to   { background-position: -130% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .shimmer-streak { display: none; }
}

/* ——— day/night marker (midu's exact assets) ———
   day: their SunVector SVG rotating 360°/5s linear;
   night: their zZz Lottie (assets/zzz.json via lottie-light) ——— */

.wake {
  display: inline-flex;
  align-items: center;
  vertical-align: -2px;
  margin-right: 0.4rem;
  width: 14px;
  height: 14px;
  position: relative;
}

.wake-sun, .wake-zzz { position: absolute; inset: 0; display: none; }
.wake-sun svg { display: block; width: 14px; height: 14px; }

.wake.is-day .wake-sun { display: block; animation: wake-sun-spin 5s linear infinite; }
@keyframes wake-sun-spin { to { transform: rotate(360deg); } }

.wake.is-night .wake-zzz { display: block; }
.wake-zzz svg { display: block; width: 14px !important; height: 14px !important; }

@media (prefers-reduced-motion: reduce) {
  .wake.is-day .wake-sun { animation: none; }
}

/* ——— hero responsive ——— */

@media (max-width: 1024px) {
  .hero-headline { margin-right: clamp(0rem, 8vw, 8rem); }
}

@media (max-width: 720px) {
  .hero-headline {
    align-self: flex-start;
    margin-right: 0;
    margin-top: max(16vh, 104px);
    max-width: 22ch;
  }
  .hero-info { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 1rem; }
  .hero-info-center { display: none; }
  .hero-giant { height: clamp(150px, 26vh, 320px); }
}

/* ———————————————————— FOOTER ———————————————————— */

.foot-wrap {
  position: relative;
  overflow: hidden;
  background: var(--bg);
  padding-top: clamp(5rem, 9vw, 8rem);
}

/* top area */
.foot-grid {
  display: block;
}

.foot-main { text-align: center; }

.foot-clock {
  font-size: 0.92rem;
  color: var(--muted);
}
.foot-clock .foot-ast { font-size: 0.85em; }

.foot-tagline {
  margin: 1.1rem auto 0;
  max-width: 24ch;
  font-size: 1.5rem; /* midu footer tagline: 24px */
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.14;
  text-wrap: balance;
}
.foot-main .foot-cta { margin-top: clamp(2.75rem, 7vw, 5.5rem); }

/* fine print */
.foot-fine {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: clamp(4rem, 9vw, 7rem);
  font-size: 0.75rem; /* midu: 12px uppercase, -0.02em */
  letter-spacing: -0.02em;
  text-align: center;
  text-transform: uppercase;
  color: var(--muted-2);
}
.foot-fine-right a { transition: color 0.25s ease; }
.foot-fine-right a:hover { color: var(--text); }
.foot-fine-right a:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; }

/* footer word: shares .hero-word metrics; the crop wrapper shows only
   the top 78% of the glyph height (midu: 322px window of a 413px word),
   letters run past the page bottom */
.foot-giant { margin-top: clamp(2rem, 5vw, 3.5rem); }
.foot-giant-crop {
  overflow: hidden;
}
.foot-giant-crop .hero-word {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: -4.5%; /* hide ~15% of glyph height past the page edge */
}

/* ——— footer responsive ——— */

@media (max-width: 720px) {
  .foot-wrap { padding-top: clamp(5.5rem, 18vw, 8rem); }
  .foot-main .foot-cta { margin-top: clamp(2.25rem, 9vw, 3.5rem); }
  .foot-fine { margin-top: clamp(3rem, 12vw, 5rem); }
}
