/* ============================================================================
   FixLab Studios — Home hero
   A giant wordmark behind a dark rounded panel on a glossy gold ground. Inside
   the panel: the nav, a two-tone headline with a handwritten note, and a
   project board (people, folders, files, a floating sidebar, labelled cursors)
   that runs off the panel's bottom edge. Depends on foundation.css.
   Motion is gated: loops only while on screen, parallax only on hover-capable
   desktops, nothing under reduced motion.
   ============================================================================ */

@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('../assets/fonts/caveat-latin-var.woff2') format('woff2');
}

.fx-hero {
  --hero-top: clamp(6rem, 12vw, 12.5rem);
  position: relative;
  isolation: isolate;
  padding: var(--hero-top) 0 0;
  overflow: hidden;
}

/* ---------- Ground: glossy gold with shine bands, fading into the ink page ---------- */
.fx-ground {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(60% 40% at 50% 0%, rgba(var(--gm1, 255, 222, 160), 0.55), transparent 70%),
    radial-gradient(22% 62% at 0% 48%, rgba(var(--gs, 255, 214, 128), 0.95), rgba(var(--gs2, 236, 156, 48), 0.5) 42%, transparent 70%),
    radial-gradient(22% 62% at 100% 48%, rgba(var(--gs, 255, 214, 128), 0.95), rgba(var(--gs2, 236, 156, 48), 0.5) 42%, transparent 70%),
    radial-gradient(80% 36% at 50% 100%, rgba(14, 12, 11, 1), transparent 72%),
    linear-gradient(180deg, var(--g1, #d4922e) 0%, var(--g2, #a86a1a) 18%, var(--g3, #4e330c) 42%, var(--g4, #1e1508) 68%, #0e0c0b 100%);
}
.fx-ground-mark {
  position: absolute; left: 50%; top: -0.07em; transform: translateX(-50%);
  font-family: var(--font-display); font-weight: 800; font-size: 30vw; line-height: 0.85; letter-spacing: -0.06em; white-space: nowrap;
  background: linear-gradient(180deg, rgba(var(--gm1, 255, 240, 200), 0.85) 0%, rgba(var(--gm2, 255, 210, 130), 0.5) 40%, rgba(var(--gm2, 255, 190, 90), 0.1) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 1px rgba(var(--gm1, 255, 228, 170), 0.16);
}
.fx-ground-shine {
  position: absolute; inset: -30% -60%; pointer-events: none;
  background: linear-gradient(104deg, transparent 44%, rgba(var(--gm1, 255, 248, 225), 0.24) 50%, transparent 56%);
  transform: translateX(-40%);
  mix-blend-mode: screen;
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (min-width: 900px) {
  .fx-ground-shine { animation: fx-sheen 14s var(--ease-in-out) infinite alternate; will-change: transform; }
}
@keyframes fx-sheen { from { transform: translateX(-40%); } to { transform: translateX(40%); } }

/* ---------- The dark panel ---------- */
.fx-hero-panel {
  position: relative;
  width: min(1440px, 100% - (var(--container-padding) * 2));
  margin: 0 auto;
  padding: clamp(6.5rem, 9vw, 8.5rem) 0 0;
  border-radius: clamp(1.25rem, 2.5vw, 2.5rem);
  border: 1px solid rgba(255, 228, 175, 0.16);
  background: linear-gradient(180deg, #17120f 0%, #120f0d 45%, var(--color-bg) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 238, 205, 0.14), 0 -30px 90px -30px rgba(255, 205, 120, 0.4), 0 70px 140px -40px rgba(0, 0, 0, 0.85);
  overflow: hidden;
}
.fx-hero-panel::before {
  content: ''; position: absolute; inset: 0 0 auto; height: 45%; pointer-events: none;
  background: radial-gradient(45% 60% at 50% 0%, rgba(241, 187, 95, 0.14), transparent 70%);
}
.fx-hero-panel::after {
  content: ''; position: absolute; inset: auto 0 0; height: 55%; pointer-events: none;
  background: radial-gradient(40% 60% at 8% 100%, rgba(236, 143, 47, 0.28), transparent 70%), radial-gradient(40% 60% at 92% 100%, rgba(241, 187, 95, 0.22), transparent 70%);
}

/* The nav starts inside the panel and rises to the top as you scroll (scroll-driven; static fallback) */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .home-page .nav, .fx-scene-page .nav { animation: fx-nav-rise linear both; animation-timeline: scroll(root); animation-range: 0 260px; }
  }
}
@keyframes fx-nav-rise { from { transform: translateY(calc(var(--hero-top, 8rem) + 0.15rem)); } to { transform: translateY(0); } }

/* ---------- Copy ---------- */
.fx-hero-copy { position: relative; z-index: 1; max-width: 60rem; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; padding-inline: var(--container-padding); }
.fx-hero-title { font-size: clamp(2.5rem, 1.2rem + 4.6vw, 5rem); font-weight: 750; letter-spacing: -0.04em; line-height: 1.02; margin: 0 0 var(--space-6); }
.fx-hero-title span { display: block; }
.fx-hero-title .fx-line-2 { background: linear-gradient(180deg, #faf7f2 0%, #bdb5a8 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fx-hero-lede { max-width: 34rem; font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.3rem); color: var(--color-text-secondary); }
.fx-hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); margin-top: var(--space-8); }
.fx-scribble {
  position: absolute; left: calc(50% - 34rem); top: 62%; transform: rotate(-9deg);
  font-family: 'Caveat', 'Segoe Script', 'Bradley Hand', cursive; font-weight: 600; font-size: clamp(1.6rem, 2.6vw, 2.4rem); line-height: 1.05;
  color: var(--color-accent-bright); text-shadow: 0 0 24px rgba(255, 217, 141, 0.55);
  white-space: nowrap; pointer-events: none;
}

/* ---------- Board ---------- */
.fx-stage { position: relative; height: clamp(26rem, 44vw, 34rem); margin-top: clamp(2.5rem, 5vw, 4.5rem); perspective: 2000px; perspective-origin: 50% 0%; }
.fx-portal-tilt { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 700ms var(--ease-out); will-change: transform; }
.fx-board {
  position: absolute; left: 50%; top: 0; width: min(1240px, 92%); transform: translateX(-50%) rotateX(3deg); transform-origin: 50% 100%;
  padding: 1.35rem; border-radius: 1.9rem;
  border: 1px solid rgba(255, 255, 255, 0.09); background: rgba(255, 255, 255, 0.015);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.fx-board-grid { display: grid; grid-template-columns: 0.85fr 1.35fr 2fr; grid-template-rows: auto auto; gap: 1.25rem; }
.fx-slot { border: 1.5px dashed rgba(255, 255, 255, 0.16); border-radius: 1.1rem; min-height: 6rem; }
.fx-slot--side { grid-row: 1 / 2; }
.fx-panel { border-radius: 1.25rem; border: 1px solid rgba(255, 255, 255, 0.08); background: linear-gradient(180deg, #1c1714 0%, #15110e 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 30px 60px -30px rgba(0,0,0,0.8); }
.fx-panel h4 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }

/* People */
.fx-people { display: flex; flex-direction: column; gap: 0.5rem; padding: 1.35rem; }
.fx-people h4 { margin-bottom: 0.4rem; }
.fx-person { display: flex; align-items: center; gap: 0.75rem; padding: 0.3rem 0; }
.fx-avatar { flex: none; width: 2.5rem; height: 2.5rem; display: grid; place-items: center; border-radius: 50%; font-size: 0.72rem; font-weight: 700; color: var(--color-text-on-accent); background: linear-gradient(160deg, #ffd98d, #e0a53f); box-shadow: inset 0 1px 0 rgba(255,255,255,0.4); }
.fx-avatar--b { background: linear-gradient(160deg, #ffb39d, #d9532f); color: #fff; }
.fx-avatar--c { background: linear-gradient(160deg, #9fe3bb, #3fb076); color: #0c2a1a; }
.fx-person div { flex: 1; min-width: 0; }
.fx-person b { display: block; font-size: 0.95rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-person small { display: block; font-size: 0.74rem; color: var(--color-text-muted); }
.fx-role { flex: none; padding: 0.4rem 0.8rem; border-radius: var(--radius-pill); border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.03); font-size: 0.74rem; font-weight: 600; color: var(--color-text-secondary); }
.fx-role--owner { color: var(--color-accent-bright); border-color: rgba(241,187,95,0.4); background: var(--color-accent-soft); }
.fx-add { margin-top: 0.6rem; padding: 0.8rem; border-radius: 0.8rem; background: #0d0b09; border: 1px solid rgba(255,255,255,0.08); text-align: center; font-size: 0.9rem; font-weight: 600; }

/* Folders */
.fx-folders {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 1rem; padding: 2rem 1.5rem 1.5rem;
  border-radius: 1.25rem; overflow: hidden;
  background: radial-gradient(70% 90% at 20% 0%, rgba(255, 245, 215, 0.55), transparent 60%), linear-gradient(160deg, #ffd98d 0%, #f1bb5f 42%, #c88a2a 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 40px 80px -30px rgba(236, 143, 47, 0.6);
  color: #1a1305;
}
.fx-folders::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 55%, rgba(120, 70, 10, 0.25) 100%); }
.fx-folder { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.9rem; text-align: center; }
.fx-folder-icon { position: relative; width: 7.5rem; height: 5.6rem; }
.fx-folder-icon::before { content: ''; position: absolute; left: 0; right: 0; top: 0; bottom: 0.4rem; border-radius: 0.8rem; background: linear-gradient(180deg, #fff2cf, #f5d38a); box-shadow: 0 20px 30px -18px rgba(90, 50, 0, 0.6); }
.fx-folder-icon::after { content: ''; position: absolute; left: 0; right: 0; top: 1.4rem; bottom: 0; border-radius: 0.8rem; background: linear-gradient(180deg, #fffaf0, #ffe4ad); box-shadow: inset 0 1px 0 #fff, 0 -6px 14px -8px rgba(90, 50, 0, 0.35); }
.fx-folder-icon i { position: absolute; left: 0; top: -0.5rem; width: 42%; height: 1.2rem; border-radius: 0.5rem 0.5rem 0 0; background: #f5d38a; }
.fx-folder b { display: block; font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }
.fx-folder small { display: block; font-size: 0.78rem; font-weight: 600; opacity: 0.7; }

/* Bottom row, cut off by the panel edge */
.fx-bottom { padding: 1.35rem; min-height: 9rem; }
.fx-bottom-row { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.9rem; font-size: 0.85rem; color: var(--color-text-secondary); }
.fx-bottom-row i { width: 8px; height: 8px; border-radius: 50%; background: var(--color-accent); box-shadow: 0 0 10px rgba(241,187,95,0.8); }

/* Floating layers */
.fx-float { position: absolute; z-index: 3; pointer-events: none; will-change: transform; }
.fx-float-inner { display: flex; align-items: center; gap: 0.6rem; }

/* Sidebar card, pulled out to the left and tilted */
.fx-float--side { left: calc(50% - 41rem); top: 1.5rem; }
.fx-sidecard {
  display: block; width: 15rem; padding: 1.4rem 1.1rem 1.6rem; border-radius: 1.4rem;
  border: 1px solid rgba(255,255,255,0.12); background: linear-gradient(160deg, rgba(46, 38, 32, 0.72), rgba(20, 16, 13, 0.9));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 50px 90px -30px rgba(0,0,0,0.85);
  transform: rotate(-7deg); transform-origin: 50% 0%;
  font-size: 0.95rem;
}
.fx-sidecard ul { list-style: none; display: grid; gap: 0.2rem; }
.fx-sidecard li { display: flex; align-items: center; gap: 0.7rem; padding: 0.5rem 0.55rem; border-radius: 0.6rem; color: var(--color-text-secondary); font-weight: 500; }
.fx-sidecard li svg { width: 1.15rem; height: 1.15rem; color: var(--color-text-muted); }
.fx-sidecard li.is-active { color: var(--color-text-primary); background: rgba(255,255,255,0.06); }
.fx-sidecard li.is-active svg { color: var(--color-accent); }
.fx-sidecard-head { display: flex; align-items: center; justify-content: space-between; margin: 1.2rem 0.55rem 0.5rem; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-text-secondary); }
.fx-sidecard-head b { width: 1.1rem; height: 1.1rem; display: grid; place-items: center; border-radius: 0.3rem; border: 1px solid rgba(255,255,255,0.18); font-weight: 500; font-size: 0.8rem; color: var(--color-text-muted); }
.fx-sidecard .fx-status { font-size: 0.86rem; }
.fx-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--dot, var(--color-accent)); box-shadow: 0 0 10px var(--dot, var(--color-accent)); }

/* File chips */
.fx-float--chip-a { left: calc(50% + 8rem); top: 74%; }
.fx-float--chip-b { left: calc(50% + 23rem); top: 80%; }
.fx-chip {
  min-width: 13rem; padding: 0.8rem 0.9rem; border-radius: 1rem; gap: 0.75rem;
  border: 1px solid rgba(255,255,255,0.12); background: linear-gradient(160deg, rgba(48, 40, 33, 0.85), rgba(20, 16, 13, 0.95));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 40px 70px -30px rgba(0,0,0,0.9);
}
.fx-float--chip-a .fx-chip { transform: rotate(-2deg); }
.fx-float--chip-b .fx-chip { transform: rotate(3deg); }
.fx-chip-badge { flex: none; width: 2.6rem; height: 2.6rem; display: grid; place-items: center; border-radius: 0.7rem; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.04em; color: #fff; background: linear-gradient(160deg, #ff9b3d, #e8532f); box-shadow: inset 0 1px 0 rgba(255,255,255,0.35); }
.fx-chip-badge--fig { background: linear-gradient(160deg, #ffb39d, #d9532f); }
.fx-chip div { flex: 1; }
.fx-chip b { display: block; font-size: 0.95rem; font-weight: 600; }
.fx-chip small { font-size: 0.72rem; color: var(--color-text-muted); }
.fx-chip svg { width: 1.1rem; height: 1.1rem; color: var(--color-text-muted); flex: none; }

/* Cursors */
.fx-cursor { gap: 0.15rem; align-items: flex-start; }
.fx-cursor svg { width: 1.3rem; height: 1.3rem; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.6)); }
.fx-cursor span { margin-top: 0.95rem; padding: 0.25rem 0.6rem; border-radius: 0.35rem; font-size: 0.82rem; font-weight: 700; color: #fff; }
.fx-cursor--green svg { color: #3fb950; } .fx-cursor--green span { background: #2f9e44; }
.fx-cursor--orange svg { color: #f2882c; } .fx-cursor--orange span { background: #e8712a; }
.fx-cursor--blue svg { color: #3fc9b0; } .fx-cursor--blue span { background: #157a66; }
.fx-float--cur-1 { left: calc(50% - 26rem); top: 8%; }
.fx-float--cur-2 { left: calc(50% + 34rem); top: 90%; }
.fx-float--cur-3 { left: calc(50% - 20rem); top: 92%; }

/* Entrance and loops */
.fx-stage.is-ready .fx-anim { animation: fx-rise 900ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 90ms + 120ms); }
@keyframes fx-rise { from { opacity: 0; transform: translateY(18px) scale(0.985); } to { opacity: 1; transform: none; } }
@media (hover: hover) and (min-width: 900px) {
  .fx-stage.is-in-view .fx-sidecard { animation: fx-bob-side 7s var(--ease-in-out) infinite alternate; }
  .fx-stage.is-in-view .fx-float--chip-a .fx-chip { animation: fx-bob-a 6s var(--ease-in-out) infinite alternate; }
  .fx-stage.is-in-view .fx-float--chip-b .fx-chip { animation: fx-bob-b 8s var(--ease-in-out) infinite alternate; animation-delay: -2s; }
  .fx-stage.is-in-view .fx-float--cur-1 .fx-float-inner { animation: fx-drift-a 13s var(--ease-in-out) infinite alternate; }
  .fx-stage.is-in-view .fx-float--cur-2 .fx-float-inner { animation: fx-drift-b 17s var(--ease-in-out) infinite alternate; }
  .fx-stage.is-in-view .fx-float--cur-3 .fx-float-inner { animation: fx-drift-c 15s var(--ease-in-out) infinite alternate; }
}
@keyframes fx-bob-side { from { transform: rotate(-7deg) translateY(0); } to { transform: rotate(-6deg) translateY(-10px); } }
@keyframes fx-bob-a { from { transform: rotate(-2deg) translateY(0); } to { transform: rotate(-1deg) translateY(-8px); } }
@keyframes fx-bob-b { from { transform: rotate(3deg) translateY(0); } to { transform: rotate(2deg) translateY(-9px); } }
@keyframes fx-drift-a { from { transform: translate(0, 0); } 50% { transform: translate(60px, 26px); } to { transform: translate(20px, -10px); } }
@keyframes fx-drift-b { from { transform: translate(0, 0); } 50% { transform: translate(-70px, -30px); } to { transform: translate(-20px, 16px); } }
@keyframes fx-drift-c { from { transform: translate(0, 0); } 50% { transform: translate(80px, -10px); } to { transform: translate(30px, 12px); } }
@media (hover: none), (max-width: 899px) { .fx-portal-tilt { transition: none; } }
@media (prefers-reduced-motion: reduce) {
  .fx-stage .fx-anim, .fx-sidecard, .fx-chip, .fx-float-inner, .fx-ground-shine { animation: none !important; }
  .fx-board { transform: translateX(-50%); }
}

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .fx-float--side { left: -0.5rem; }
  .fx-sidecard { width: 13.5rem; }
  .fx-float--cur-1 { left: 10%; }
  .fx-float--cur-2 { left: auto; right: 3%; }
  .fx-float--chip-a { left: 46%; top: 76%; }
  .fx-float--chip-b { left: auto; right: 3%; top: 84%; }
  .fx-scribble { display: none; }
}
@media (max-width: 1024px) {
  .fx-board-grid { grid-template-columns: 1.2fr 1.6fr; }
  .fx-slot--side, .fx-slot--a { display: none; }
  .fx-float--side, .fx-float--cur-3 { display: none; }
  .fx-float--chip-a { left: 6%; top: 70%; }
}
@media (max-width: 640px) {
  .fx-hero { --hero-top: 5.5rem; }
  .fx-hero-panel { width: min(1440px, 100% - 1.25rem); padding-top: 7.75rem; }
  .fx-ground-mark { font-size: 36vw; top: -0.05em; }
  .fx-ground-shine { display: none; }
  .fx-scribble, .fx-float--chip-b, .fx-float--cur-1, .fx-float--cur-2, .fx-slot { display: none; }
  .fx-stage { height: 30rem; }
  .fx-board { width: 100%; transform: translateX(-50%); padding: 0.9rem; }
  .fx-board-grid { grid-template-columns: 1fr; gap: 0.9rem; }
  .fx-folders { padding: 1.5rem 1rem 1.25rem; }
  .fx-folder-icon { width: 5.5rem; height: 4.2rem; }
  .fx-float--chip-a { left: 8%; top: auto; bottom: 8%; }
  .fx-hero-actions .btn { flex: 1 1 100%; }
}

/* On sky pages the ground fades into the page sky and the panel is glass */
.sky-page .fx-ground { background:
    radial-gradient(60% 40% at 50% 0%, rgba(var(--gm1, 255, 222, 160), 0.55), transparent 70%),
    radial-gradient(22% 62% at 0% 48%, rgba(var(--gs, 255, 214, 128), 0.85), rgba(var(--gs2, 236, 156, 48), 0.4) 42%, transparent 70%),
    radial-gradient(22% 62% at 100% 48%, rgba(var(--gs, 255, 214, 128), 0.85), rgba(var(--gs2, 236, 156, 48), 0.4) 42%, transparent 70%),
    linear-gradient(180deg, var(--g1, #d4922e) 0%, var(--g2, #a86a1a) 18%, rgba(78, 51, 12, 0.6) 42%, rgba(30, 21, 8, 0.2) 68%, transparent 100%); }
.sky-page .fx-hero-panel { background: linear-gradient(180deg, rgba(23, 18, 15, 0.86) 0%, rgba(18, 15, 13, 0.9) 45%, rgba(14, 12, 11, 0.6) 100%); }
@media (hover: hover) and (min-width: 768px) { .sky-page .fx-hero-panel { backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); } }
.sky-page .fx-panel, .sky-page .sc-card { background: linear-gradient(180deg, rgba(28, 23, 20, 0.92) 0%, rgba(21, 17, 14, 0.94) 100%); }
