/* ARRK studios — reference-alignment refinements (loaded last). */

/* ---- Services mega menu (desktop): image cards in two columns; the hovered card grows ---- */
@media (min-width: 768px) {
  .main-navigation.mega-open { height: 30vw; min-height: 380px; }
  .nav-service-panel > .eyebrow, .nav-service-panel > .nav-all-services { display: none; }
  .mega-open .nav-service-panel { display: flex; flex-direction: column; height: calc(100% - 48px); padding: 7px; box-sizing: border-box; }
  .nav-service-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .5vw; margin: 0; }
  .nav-service-col { display: flex; flex-direction: column; gap: .5vw; min-height: 0; }
  .nav-service-grid .nav-service-card {
    position: relative; display: block; flex: 1 1 0; min-height: 0; overflow: hidden;
    padding: .5vw 1vw .5vw .7vw; border: 0; border-radius: .6vw; background: rgba(34, 34, 34, .4);
    color: #fff; font-size: clamp(13px, 1vw, 20px); font-weight: 300; line-height: 1.2;
    transition: flex-grow .3s cubic-bezier(.4, 0, .2, 1);
  }
  .nav-service-grid .nav-service-card:hover { color: #fff; }
  .nav-service-col:hover .nav-service-card, .nav-service-col:focus-within .nav-service-card { flex-grow: .5; }
  .nav-service-col .nav-service-card:hover, .nav-service-col .nav-service-card:focus-visible { flex-grow: 1; }
  .nav-service-image {
    position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover;
    opacity: 0; transition: opacity .7s cubic-bezier(.4, 0, .2, 1); pointer-events: none;
  }
  .nav-service-card:hover .nav-service-image, .nav-service-card:focus-visible .nav-service-image { opacity: .9; }
  /* Faint top shade keeps the white title legible over light photos (only while the image shows). */
  .nav-service-card::after { content: ''; position: absolute; inset: 0 0 auto; height: 60%; z-index: 1; pointer-events: none;
    background: linear-gradient(180deg, rgba(0, 0, 0, .28), rgba(0, 0, 0, 0)); opacity: 0; transition: opacity .7s cubic-bezier(.4, 0, .2, 1); }
  .nav-service-card:hover::after, .nav-service-card:focus-visible::after { opacity: 1; }
  .nav-service-head { position: relative; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: .3vw; }
  .nav-service-name { display: flex; align-items: center; gap: .4vw; }
  .nav-service-name .dot-grid { flex: none; width: clamp(14px, 1.2vw, 24px); height: clamp(14px, 1.2vw, 24px); margin-right: .2vw; color: #ececec; opacity: .5; }
  .nav-service-grid .nav-service-card small { flex: none; font-size: clamp(11px, .8vw, 16px); color: rgba(255, 255, 255, .5); white-space: nowrap; }
  /* Cards fade up in sequence as the menu opens. */
  .mega-open .nav-service-card { animation: arrk-mega-in .45s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(60ms + var(--i, 0) * 35ms); }
  @keyframes arrk-mega-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
@media (min-width: 768px) and (prefers-reduced-motion: reduce) {
  .mega-open .nav-service-card { animation: none; }
  .nav-service-grid .nav-service-card, .nav-service-image { transition: none; }
}
/* Phones: the Services pane stays a text list; icons sit beside the names, no images. */
@media (max-width: 767px) {
  .nav-service-col { display: contents; }
  .nav-service-image { display: none; }
  .nav-service-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; }
  .nav-service-name { display: flex; align-items: center; gap: 12px; }
  .nav-service-name .dot-grid { width: 18px; height: 18px; opacity: .5; flex: none; }
}

/* ---- Footer wordmark: near-invisible by default; a soft spotlight follows the pointer ---- */
@property --fw-glow { syntax: '<number>'; inherits: true; initial-value: 0; }
.footer-wordmark {
  --fw-x: 50%; --fw-y: 50%;
  --fw-top: #101010; --fw-bottom: #070707; --fw-light: 255, 255, 255; --fw-strength: .2;
  color: transparent;
  background:
    radial-gradient(20vw circle at var(--fw-x) var(--fw-y),
      rgba(var(--fw-light), calc(var(--fw-glow) * var(--fw-strength))) 0%,
      rgba(var(--fw-light), calc(var(--fw-glow) * var(--fw-strength) * .45)) 40%,
      rgba(var(--fw-light), 0) 70%),
    linear-gradient(180deg, var(--fw-top) -4%, var(--fw-bottom) 106%);
  -webkit-background-clip: text; background-clip: text;
  transition: --fw-glow .5s ease;
  user-select: none;
}
.footer-wordmark.is-lit { --fw-glow: 1; }
/* Desktop: the wordmark spans the full content width like the reference logo (text metrics are fixed, so vw scales exactly). */
@media (min-width: 768px) { .footer-wordmark { font-size: 33.3vw; } }
/* Light footer (pages that stay in the light palette): pale letters, darker spotlight. */
body:not(.theme-dark) .footer-wordmark { --fw-top: #e2e2e2; --fw-bottom: #dadada; --fw-light: 0, 0, 0; --fw-strength: .22; }
