/* ============================================================
   Shared interactive component styles.
   Vanilla CSS/JS approximations of 21st.dev React components,
   rebuilt to match this site's existing navy/sky design tokens
   with no build step or framework dependency.
   ============================================================ */

/* ── LIQUID METAL BUTTON ──
   Chrome/liquid sheen that tracks the cursor via --mx/--my custom
   properties (set by assets/js/interactive.js on mousemove). */
.btn--primary.liquid-btn,
.btn-primary.liquid-btn{
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.liquid-btn::before{
  content: '';
  position: absolute;
  inset: -40%;
  background: radial-gradient(
    circle at var(--mx, 50%) var(--my, 50%),
    rgba(255,255,255,.55) 0%,
    rgba(255,255,255,.18) 22%,
    transparent 45%
  );
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: overlay;
}
.liquid-btn::after{
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg,
    transparent 20%,
    rgba(255,255,255,.35) 38%,
    rgba(255,255,255,.05) 46%,
    transparent 60%
  );
  background-size: 260% 260%;
  background-position: 100% 0%;
  opacity: 0;
  transition: opacity .3s ease, background-position 1.1s cubic-bezier(.22,.61,.36,1);
  pointer-events: none;
  z-index: 1;
}
.liquid-btn:hover::before,
.liquid-btn:hover::after{ opacity: 1; }
.liquid-btn:hover::after{ background-position: 0% 100%; }
.liquid-btn > *{ position: relative; z-index: 2; }
@media (prefers-reduced-motion: reduce){
  .liquid-btn::before,.liquid-btn::after{ transition: none; }
}

/* ── ANIMATED FOOTER BRAND ──
   Huge outline wordmark that tilts gently toward the cursor. */
.footer-mega{
  position: relative;
  overflow: hidden;
  padding: clamp(2rem,6vw,3.5rem) 0 clamp(1.2rem,3vw,2rem);
  text-align: center;
  cursor: default;
}
.footer-mega-text{
  font-family: var(--font-display, var(--font-d, serif));
  font-weight: 700;
  font-size: clamp(3.2rem, 13vw, 9rem);
  line-height: .9;
  letter-spacing: -.02em;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--line);
  transform: perspective(600px) rotateX(0deg) rotateY(0deg);
  transition: transform .25s ease-out, -webkit-text-stroke-color .3s;
  user-select: none;
  display: inline-block;
}
.footer-mega:hover .footer-mega-text{
  -webkit-text-stroke-color: var(--sky);
}
@media (prefers-reduced-motion: reduce){
  .footer-mega-text{ transition: none; }
}

/* ── STICKY SCROLL CARDS ──
   Each card pins under the previous one as you scroll past it. */
.stack-section{ position: relative; }
.stack-card{
  position: sticky;
  top: 6.5rem;
  min-height: 320px;
  border-radius: var(--r-lg, 18px);
  padding: clamp(1.8rem,4vw,3rem);
  margin-bottom: 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem,3vw,3rem);
  align-items: center;
  box-shadow: 0 24px 60px -24px rgba(15,25,35,.18);
  border: 1px solid var(--line);
}
.stack-card .stack-num{
  font-family: var(--font-mono, var(--font-m, monospace));
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: .6rem;
  display: block;
}
.stack-card h3{ font-size: clamp(1.4rem,2.4vw,1.9rem); margin-bottom: .8rem; }
.stack-card p{ font-size: .98rem; line-height: 1.7; }
.stack-card .stack-visual{
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 4/3;
}
.stack-card .stack-visual img{ width:100%; height:100%; object-fit:cover; }
.stack-card .stack-visual.stack-visual--icon{
  display:flex; align-items:center; justify-content:center;
  background: linear-gradient(135deg, var(--sky-lo, rgba(47,127,224,.12)), var(--paper, #F6F8FB));
}
.stack-card .stack-visual--icon svg{ width: clamp(64px,10vw,96px); height: clamp(64px,10vw,96px); color: var(--sky); }
@media (max-width: 760px){
  .stack-card{ grid-template-columns: 1fr; top: 5.5rem; }
}

/* ── FEATURE CAROUSEL ──
   Continuous auto-rotating marquee, no buttons: a duplicated card set
   scrolls via a JS requestAnimationFrame loop (not a CSS @keyframes
   animation -- some browsers force CSS animation durations to
   near-zero under an OS-level "reduce motion"/"disable animations"
   setting, which silently freezes a pure-CSS marquee; a plain
   transform mutation via rAF is not subject to that override and
   always moves smoothly). Pauses on hover/focus/touch. */
.fcarousel{ position: relative; overflow: hidden; }
.fcarousel-track{
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
}
.fcarousel-rail{
  display: flex;
  gap: 1.25rem;
  width: max-content;
  padding: .5rem .25rem 1.5rem;
  will-change: transform;
}

.fcarousel-card{
  flex: 0 0 min(340px, 82vw);
  background: var(--paper-raised, #fff);
  border: 1px solid var(--line);
  border-radius: var(--r-lg, 18px);
  padding: 1.8rem;
  transition: transform .3s ease, box-shadow .3s ease;
}
.fcarousel-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 20px 45px -18px rgba(15,25,35,.18);
}
.fcarousel-card .fc-icon{
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--sky-lo, rgba(47,127,224,.1));
  color: var(--sky);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.1rem;
}
.fcarousel-card .fc-icon svg{ width: 22px; height: 22px; }
.fcarousel-card h3{ font-size: 1.15rem; margin-bottom: .5rem; }
.fcarousel-card p{ font-size: .9rem; line-height: 1.65; }

/* ── INTERACTIVE IMAGE ACCORDION ──
   Vertical strips that expand to full width on hover/focus. */
.img-accordion{
  display: flex;
  gap: .4rem;
  height: clamp(320px, 42vw, 480px);
  border-radius: var(--r-lg, 18px);
  overflow: hidden;
}
.img-accordion-panel{
  position: relative;
  flex: 1;
  min-width: 0;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: flex .5s cubic-bezier(.22,.61,.36,1);
}
.img-accordion-panel.is-active{ flex: 4.5; }
.img-accordion-panel img{
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s ease;
}
.img-accordion-panel:hover img{ transform: scale(1.04); }
.img-accordion-panel::after{
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,27,48,.85) 0%, rgba(10,27,48,.15) 45%, transparent 70%);
}
.img-accordion-label{
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1rem .9rem;
  z-index: 1;
  color: #fff;
  font-family: var(--font-mono, var(--font-m, monospace));
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 700px){
  .img-accordion{ flex-direction: column; height: auto; }
  .img-accordion-panel{ height: 64px; flex: none; }
  .img-accordion-panel.is-active{ height: 220px; flex: none; }
}

/* Hero photo parallax transform is applied inline via JS
   (assets/js/interactive.js); no dedicated rules needed here. */

/* ── TUBELIGHT NAVBAR ──
   Desktop primary nav becomes a white pill housing a single absolutely-
   positioned "glow" pill that JS slides beneath the hovered/active link
   via getBoundingClientRect(). White background (not the usual dark
   glassmorphic take) so it reads clearly over both navy hero sections
   and paper sections; the sky-blue glow underneath does the accent work. */
nav.main-nav .nav-links{
  position: relative;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 999px;
  padding: .3rem;
  gap: 0;
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  box-shadow:
    0 1px 1px rgba(15,25,35,.04),
    0 8px 24px -12px rgba(15,25,35,.14),
    inset 0 0 0 1px rgba(255,255,255,.5);
}
nav.main-nav .nav-links li{ position: relative; z-index: 2; }
nav.main-nav .nav-links a{
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: .5rem 1.05rem !important;
  border-radius: 999px !important;
  font-size: .85rem;
  color: var(--ink-2, #4A5D72);
  transition: color .25s ease;
}
nav.main-nav .nav-links a::after{ display: none !important; }
nav.main-nav .nav-links a:hover,
nav.main-nav .nav-links a.is-active,
nav.main-nav .nav-links a[aria-current="page"]{
  color: var(--ink, #0F1923) !important;
  background: transparent !important;
}
/* the glow pill itself: absolutely positioned, animated via left/width */
.tubelight-glow{
  position: absolute;
  top: .3rem;
  left: 0;
  height: calc(100% - .6rem);
  width: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(240,246,255,.9));
  box-shadow:
    0 0 0 1px rgba(47,127,224,.16),
    0 6px 18px -4px var(--sky-glow, rgba(47,127,224,.35)),
    0 0 24px 2px var(--sky-glow, rgba(47,127,224,.28));
  transition: left .3s ease, width .3s ease, opacity .3s ease;
  opacity: 0;
  z-index: 1;
  pointer-events: none;
}
.tubelight-glow::before{
  content: '';
  position: absolute;
  left: 50%;
  top: -6px;
  transform: translateX(-50%);
  width: 60%;
  height: 3px;
  border-radius: 999px;
  background: var(--sky, #2F7FE0);
  box-shadow: 0 0 12px 3px var(--sky-glow, rgba(47,127,224,.6));
  opacity: .9;
}
.tubelight-glow.is-visible{ opacity: 1; }
@media (prefers-reduced-motion: reduce){
  .tubelight-glow{ transition: none; }
}
@media (max-width: 860px){
  .tubelight-glow{ display: none; }
}


