/* ==========================================================================
   Vamora Ventures — components.css
   Header, navigation, buttons, footer, shared components & motion.
   ========================================================================== */

/* ---------- Logo lockup ---------- */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: inherit;
  line-height: 1;
}
.logo__mark { width: 34px; height: auto; flex: none; aspect-ratio: 1702 / 1410; }
.logo__word { display: flex; flex-direction: column; gap: 0.38rem; }
.logo__name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.06rem;
  letter-spacing: 0.3em;
  margin-right: -0.3em;
}
.logo__sub {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 0.52rem;
  letter-spacing: 0.52em;
  opacity: 0.8;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  color: var(--ink);
  background: transparent;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease), box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
}
.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
/* Home: header sits over the dark hero until scrolled */
.site-header[data-tone="dark"]:not(.is-scrolled) { color: var(--ivory); }
.site-header.is-scrolled {
  background: rgba(248, 246, 242, 0.97);
  -webkit-backdrop-filter: saturate(1.2) blur(14px);
  backdrop-filter: saturate(1.2) blur(14px);
  box-shadow: 0 1px 0 var(--line);
  color: var(--ink);
}
.site-header[data-tone="dark"]:not(.is-scrolled) :focus-visible { outline-color: var(--ivory); }

.nav { display: flex; align-items: center; gap: clamp(1.5rem, 1rem + 1.5vw, 2.75rem); }
.nav__list { display: flex; gap: clamp(1.5rem, 1rem + 1.2vw, 2.5rem); list-style: none; margin: 0; padding: 0; }
.nav__link {
  position: relative;
  font-size: 0.875rem;
  font-weight: 450;
  letter-spacing: 0.01em;
  padding-block: 0.4rem;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease-out);
}
.nav__link:hover::after,
.nav__link[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.7rem;
  height: 44px;
  padding-inline: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.menu-toggle__icon { width: 22px; height: 10px; position: relative; }
.menu-toggle__icon::before,
.menu-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1.5px;
  background: currentColor;
}
.menu-toggle__icon::before { top: 0; }
.menu-toggle__icon::after { bottom: 0; width: 70%; left: auto; }

@media (max-width: 860px) {
  .nav { display: none; }
  .menu-toggle { display: inline-flex; }
}

/* ---------- Mobile menu (native <dialog>: focus trap + Esc for free) ---------- */
.menu {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--charcoal);
  color: var(--ivory);
  overflow-y: auto;
}
.menu::backdrop { background: transparent; }
.menu[open] { animation: menu-in 0.5s var(--ease-out) both; }
.menu.is-closing { animation: menu-out 0.3s var(--ease) both; }
@keyframes menu-in { from { opacity: 0; clip-path: inset(0 0 100% 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }
@keyframes menu-out { to { opacity: 0; } }
.menu__inner {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding-bottom: 2rem;
}
.menu__top {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.menu__close {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  height: 44px;
  padding-inline: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.menu__close-icon { width: 18px; height: 18px; position: relative; }
.menu__close-icon::before, .menu__close-icon::after {
  content: ""; position: absolute; top: 50%; left: 0; right: 0; height: 1.5px; background: currentColor;
}
.menu__close-icon::before { transform: rotate(45deg); }
.menu__close-icon::after { transform: rotate(-45deg); }
.menu__list { list-style: none; margin: 0; padding: 2.5rem 0 0; border-top: 1px solid var(--line-dark); margin-top: 1rem; }
.menu__item { border-bottom: 1px solid var(--line-dark); }
.menu__link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-block: 1.1rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.2rem + 5vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.menu__link span { font-family: var(--font-body); font-size: var(--fs-micro); letter-spacing: 0.2em; color: var(--paper-3); }
.menu__link[aria-current="page"] { color: var(--taupe); }
.menu[open] .menu__item { animation: menu-item 0.7s var(--ease-out) both; animation-delay: calc(0.12s + var(--i, 0) * 0.06s); }
@keyframes menu-item { from { opacity: 0; transform: translateY(14px); } }
.menu__foot { margin-top: auto; padding-top: 3rem; display: grid; gap: 1.5rem; }
.menu__tagline { color: var(--paper-3); font-size: var(--fs-small); }

/* ---------- Buttons & links ---------- */
.btn {
  --btn-bg: var(--charcoal);
  --btn-fg: var(--ivory);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  min-height: 52px;
  padding: 0.9rem 1.6rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid var(--btn-bg);
  border-radius: 0;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.5s var(--ease-out), border-color 0.5s var(--ease-out);
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--btn-fg);
  transform: translateY(110%);
  transition: transform 0.55s var(--ease-out);
}
.btn:hover { color: var(--btn-bg); }
.btn:hover::before { transform: translateY(0); }
.btn--light { --btn-bg: var(--ivory); --btn-fg: var(--charcoal); }
.btn--small { min-height: 40px; padding: 0.55rem 1.05rem; font-size: 0.8125rem; }
.btn--outline { background: transparent; color: currentColor; border-color: currentColor; }
.btn--outline::before { background: currentColor; }
.btn .arrow { transition: transform 0.5s var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }

/* Header CTA — quiet outlined button that adapts to header tone */
.btn-header {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(15, 15, 16, 0.28);
  border-radius: 0;
  color: var(--charcoal);
  font-size: 0.78125rem;          /* 12.5px */
  font-weight: 500;
  letter-spacing: 0.035em;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.btn-header:hover { background: var(--charcoal); border-color: var(--charcoal); color: var(--ivory); }
.site-header[data-tone="dark"]:not(.is-scrolled) .btn-header { color: var(--ivory); border-color: rgba(248, 246, 242, 0.42); }
.site-header[data-tone="dark"]:not(.is-scrolled) .btn-header:hover { background: var(--ivory); border-color: var(--ivory); color: var(--charcoal); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 44px;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.35em;
  text-decoration-color: currentColor;
  transition: text-decoration-color 0.35s var(--ease-out);
}
/* Underline lives on the label only — flex items (the arrow icon) never
   inherit a painted text-decoration, so this stays correct when the
   label text wraps onto two lines (background-position hacks broke here). */
.link-arrow:hover { text-decoration-color: transparent; }
.link-arrow .arrow { transition: transform 0.5s var(--ease-out); }
.link-arrow:hover .arrow { transform: translateX(4px); }

.arrow { width: 14px; height: 10px; flex: none; }

.text-link {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: var(--line-strong);
  transition: text-decoration-color 0.3s var(--ease);
}
.text-link:hover { text-decoration-color: currentColor; }

/* ---------- Status tag ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tag::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  border: 1px solid currentColor;
}
.tag--live::before { background: currentColor; }

/* ---------- Section header (asymmetric editorial) ---------- */
.section-head { row-gap: 1.75rem; align-items: end; }
.section-head__label { grid-column: 1 / span 3; align-self: start; padding-top: 0.9em; }
.section-head__title { grid-column: 4 / span 8; }
.section-head__text { grid-column: 4 / span 6; }
@media (max-width: 900px) {
  .section-head__label, .section-head__title, .section-head__text { grid-column: 1 / -1; }
  .section-head__label { padding-top: 0; }
}

/* ---------- Marquee (Magic UI pattern, CSS only) ---------- */
.marquee {
  --gap: clamp(2rem, 1rem + 3vw, 4rem);
  --speed: 48s;
  display: flex;
  overflow: hidden;
  gap: var(--gap);
  user-select: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex;
  flex: none;
  align-items: center;
  gap: var(--gap);
  min-width: 100%;
  justify-content: space-around;
  list-style: none;
  margin: 0;
  padding: 0;
  animation: marquee var(--speed) linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-100% - var(--gap))); } }
.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: var(--gap);
  font-family: var(--font-display);
  font-size: clamp(0.8rem, 0.7rem + 0.4vw, 1rem);
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--taupe);
}
.marquee__item::after {
  content: "";
  width: 5px; height: 5px;
  transform: rotate(45deg);
  border: 1px solid var(--line-dark-strong);
}

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  padding-top: calc(var(--header-h) + clamp(3rem, 1.5rem + 6vw, 6.5rem));
  padding-bottom: clamp(2.5rem, 1.5rem + 3.5vw, 5rem);
}
.page-hero__label { grid-column: 1 / span 3; padding-top: 1.1em; }
.page-hero__title { grid-column: 4 / -1; }
.page-hero__text { grid-column: 4 / span 6; margin-top: clamp(1.75rem, 1rem + 2vw, 2.75rem); }
@media (max-width: 900px) {
  .page-hero__label, .page-hero__title, .page-hero__text { grid-column: 1 / -1; }
  .page-hero__label { padding-top: 0; margin-bottom: 1.75rem; }
}

/* ---------- Editorial image ---------- */
.frame { position: relative; overflow: hidden; background: #1a1a1b; }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame--wide { aspect-ratio: 21 / 9; }
@media (max-width: 700px) { .frame--wide { aspect-ratio: 4 / 3; } }
.caption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.9rem;
  font-size: var(--fs-micro);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------- Contact CTA band ---------- */
.cta {
  position: relative;
  overflow: hidden;
  padding-block: clamp(4.5rem, 2.5rem + 7vw, 8.5rem);
}
.cta__grid-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.55;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 75% 40%, #000 10%, transparent 72%);
  mask-image: radial-gradient(ellipse 70% 80% at 75% 40%, #000 10%, transparent 72%);
}
.cta__grid-bg svg { width: 100%; height: 100%; }
.cta__grid-bg .cell { fill: rgba(248, 246, 242, 0.06); transition: fill 1.6s var(--ease); }
.cta__grid-bg .cell.is-lit { fill: rgba(183, 175, 163, 0.22); }
.cta__content { grid-column: 1 / span 9; }
.cta__title { max-width: 12ch; }
.cta__text { margin-top: 1.75rem; }
.cta__actions {
  margin-top: clamp(2.5rem, 1.5rem + 2.5vw, 3.75rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 2.5rem;
}
.cta__email {
  font-family: var(--font-display);
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--paper-2);
  overflow-wrap: anywhere;
}
a.cta__email { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; text-decoration-color: var(--line-dark-strong); transition: color 0.3s var(--ease), text-decoration-color 0.3s var(--ease); }
a.cta__email:hover { color: var(--ivory); text-decoration-color: currentColor; }
@media (max-width: 900px) { .cta__content { grid-column: 1 / -1; } }

/* ---------- Footer ---------- */
.site-footer {
  padding-top: clamp(4.5rem, 3rem + 5vw, 7.5rem);
  padding-bottom: 2rem;
}
.footer__top { row-gap: 3rem; }
.footer__brand { grid-column: 1 / span 5; }
.footer__tagline {
  margin-top: 2rem;
  max-width: 16ch;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2.1rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.footer__col { grid-column: span 2; }
.footer__col:nth-child(2) { grid-column: 7 / span 2; }
.footer__heading {
  font-size: var(--fs-micro);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper-3);
  margin-bottom: 1.25rem;
  font-weight: 500;
}
.footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.footer__links a { display: inline-flex; min-height: 32px; align-items: center; font-size: 0.9375rem; color: var(--paper-2); transition: color 0.3s var(--ease); }
.footer__links a:hover { color: var(--ivory); }
.footer__bottom {
  margin-top: clamp(4rem, 3rem + 4vw, 7rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-dark);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  font-size: var(--fs-micro);
  letter-spacing: 0.04em;
  color: var(--paper-3);
}
.footer__mark-lg {
  margin-top: clamp(3rem, 2rem + 4vw, 6rem);
  color: rgba(248, 246, 242, 0.05);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(3rem, 0.5rem + 14vw, 15rem);
  line-height: 0.8;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  user-select: none;
  text-align: center;
}
@media (max-width: 900px) {
  .footer__brand { grid-column: 1 / -1; }
  .footer__col, .footer__col:nth-child(2) { grid-column: span 6; }
}

/* ---------- Scroll reveal (Magic UI "blur fade" pattern) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    filter: blur(6px);
    transition:
      opacity var(--dur) var(--ease-out),
      transform var(--dur) var(--ease-out),
      filter var(--dur) var(--ease-out);
    transition-delay: calc(var(--d, 0) * 90ms);
  }
  .js [data-reveal].is-visible { opacity: 1; transform: none; filter: none; }

  /* Line mask reveal for large headlines (transform only → no LCP delay) */
  .js .line-mask > span { display: block; overflow: clip; padding-bottom: 0.08em; margin-bottom: -0.08em; }
  .js .line-mask > span > span {
    display: block;
    transform: translateY(105%);
    animation: line-up 1.15s var(--ease-out) both;
    animation-delay: calc(0.15s + var(--l, 0) * 0.11s);
  }
  @keyframes line-up { to { transform: none; } }

  /* Rule draw */
  .js [data-reveal="rule"] { opacity: 1; filter: none; transform: scaleX(0); transform-origin: left; transition: transform 1.4s var(--ease-out); }
  .js [data-reveal="rule"].is-visible { transform: scaleX(1); }
}
.line-mask > span { display: block; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .marquee__track { animation: none; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee__track[aria-hidden="true"] { display: none; }
  .marquee__track { flex-wrap: wrap; justify-content: center; row-gap: 1rem; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ---------- Touch & safe-area refinements ---------- */
.logo { min-height: 44px; }
@media (pointer: coarse) {
  .footer__links a { min-height: 44px; }
  .footer__links { gap: 0; }
  .text-link { padding-block: 0.35em; }
}
.site-header .container, .menu .container, .site-footer .container {
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}
.menu { height: 100dvh; }
.site-footer { padding-bottom: max(2rem, env(safe-area-inset-bottom)); }
@media (max-width: 900px) {
  .footer__col:nth-child(4) { grid-column: 1 / -1; }
}
