/* ==========================================================
   79mplus — HOMEPAGE LAYER
   Loaded only by index.html, after style.css + experience.css.
   Dark-first: designed on the dark canvas, tuned back for light.

   1. tokens / display type      6. process
   2. hero                       7. team + products
   3. section shell (.hsec)      8. blog + recommends
   4. about bento                9. CTA band
   5. stats + work              10. reveal stagger + mobile
   ========================================================== */

:root {
  --h-display: "Space Grotesk", "Inter", system-ui, sans-serif;
}

.hero-title,
.section-title,
.bento-lead h5,
.cta-home h2 {
  font-family: var(--h-display);
  letter-spacing: -0.03em;
}

section[id] { scroll-margin-top: 92px; }

/* ------------------------------------------------------------
   2. HERO
   ------------------------------------------------------------ */
.hero-home { padding: 10rem 0 7.5rem; }

.hero-fx { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.aurora {
  position: absolute; border-radius: 50%; opacity: .8; will-change: transform;
}
.aurora.a1 {
  width: 46rem; height: 46rem; top: -16rem; right: -10rem;
  background: radial-gradient(closest-side, rgba(var(--brand-rgb), .40), transparent 72%);
  animation: h-drift-a 22s ease-in-out infinite;
}
.aurora.a2 {
  width: 40rem; height: 40rem; bottom: -18rem; left: -12rem;
  background: radial-gradient(closest-side, rgba(34, 211, 160, .22), transparent 72%);
  animation: h-drift-b 26s ease-in-out infinite;
}
.aurora.a3 {
  width: 30rem; height: 30rem; top: 26%; left: 42%;
  background: radial-gradient(closest-side, rgba(252, 196, 25, .10), transparent 70%);
  animation: h-drift-a 30s ease-in-out infinite reverse;
}
@keyframes h-drift-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-4%, 6%, 0) scale(1.12); }
}
@keyframes h-drift-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(5%, -5%, 0) scale(1.1); }
}
.hero-noise {
  position: absolute; inset: 0; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

.hero-pill {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .48rem 1rem; margin-bottom: 1.35rem;
  border-radius: 999px; background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(8px);
  color: #d7f5e3; font-size: .82rem; font-weight: 600; letter-spacing: .02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10);
}
.hero-pill i { color: var(--accent); font-size: .9rem; }

.hero-title { font-size: clamp(2.5rem, 5.6vw, 4rem); line-height: 1.06; }
.hero-title .hl {
  background: linear-gradient(100deg, var(--accent) 10%, #ffe08a 50%, var(--accent) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lead { font-size: 1.12rem; max-width: 32rem; }

.hero-cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 1.9rem; }

.btn-glass {
  background: rgba(255, 255, 255, .08); color: #fff;
  border: 2px solid rgba(255, 255, 255, .22); backdrop-filter: blur(8px);
}
.btn-glass:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .4); color: #fff; transform: translateY(-2px); }

.hero-visual { position: relative; z-index: 2; }
.hero-visual .position-relative { z-index: 2; }

.hv-glow {
  position: absolute; inset: -12% -8%; z-index: 0; border-radius: 50%;
  background: radial-gradient(55% 55% at 50% 46%, rgba(var(--brand-rgb), .38), transparent 70%);
  animation: h-breathe 7s ease-in-out infinite;
}
@keyframes h-breathe { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }

.hv-ring {
  position: absolute; left: 50%; top: 50%; z-index: 0;
  border-radius: 50%; border: 1px dashed rgba(255, 255, 255, .12);
  pointer-events: none;
}
.hv-ring.r1 { width: min(78vw, 30rem); height: min(78vw, 30rem); margin: 0; transform: translate(-50%, -50%); animation: h-spin 70s linear infinite; }
.hv-ring.r2 { width: min(92vw, 37rem); height: min(92vw, 37rem); border-style: solid; border-color: rgba(255, 255, 255, .06); animation: h-spin 110s linear infinite reverse; }
@keyframes h-spin {
  0% { rotate: 0deg; }
  100% { rotate: 360deg; }
}

.hv-back {
  position: absolute; z-index: 0; border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, .08);
}
.hv-back.b1 {
  inset: 6% 8% auto 2%; height: 78%;
  background: linear-gradient(145deg, rgba(var(--brand-rgb), .34), rgba(4, 39, 26, .08));
  transform: rotate(-6.5deg);
}
.hv-back.b2 {
  inset: 12% 2% auto 10%; height: 76%;
  background: linear-gradient(145deg, rgba(252, 196, 25, .12), rgba(34, 168, 78, .10));
  transform: rotate(4deg);
}

.hero-home .code-window {
  box-shadow: 0 42px 90px rgba(2, 8, 5, .55), inset 0 0 0 1px rgba(255, 255, 255, .05);
}

.hv-note {
  position: absolute; right: -.75rem; bottom: 14%; z-index: 3;
  display: flex; align-items: center; gap: .7rem;
  padding: .7rem .95rem; border-radius: 14px;
  background: rgba(5, 12, 8, .74); border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(10px); box-shadow: 0 18px 40px rgba(0, 0, 0, .4);
}
.hv-note i { color: #6ee7a0; font-size: 1.2rem; }
.hv-note strong { display: block; font-size: .84rem; color: #fff; line-height: 1.2; }
.hv-note small { font-size: .72rem; color: #9fb0c4; }

.hero-cue {
  position: absolute; left: 50%; bottom: 1.6rem; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .55rem;
  z-index: 2;
}
.hero-cue .line {
  width: 1px; height: 52px; border-radius: 2px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .45), transparent);
  position: relative; overflow: hidden;
}
.hero-cue .line::after {
  content: ""; position: absolute; left: 0; top: -40%;
  width: 100%; height: 40%; background: #6ee7a0;
  animation: h-cue 2.2s var(--fx-ease) infinite;
}
@keyframes h-cue { 0% { top: -40%; } 70%, 100% { top: 110%; } }
.hero-cue .txt {
  font: 600 .66rem/1 var(--fx-mono); letter-spacing: .32em; text-transform: uppercase;
  color: rgba(255, 255, 255, .5);
}

/* ------------------------------------------------------------
   3. SECTION SHELL
   ------------------------------------------------------------ */
.hsec { position: relative; overflow: hidden; }
.hsec > .container { position: relative; z-index: 1; }

.hsec-glow {
  position: absolute; width: 42rem; height: 42rem; top: -10rem; left: -16rem;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(var(--brand-rgb), .07), transparent 70%);
}
.hsec-glow.right { left: auto; right: -16rem; top: 18%; }
html[data-theme="dark"] .hsec-glow {
  background: radial-gradient(closest-side, rgba(47, 190, 95, .13), transparent 70%);
}

.hsec-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 2rem; margin-bottom: 3rem;
}
.hsec-copy { max-width: 44rem; }
.hsec-action { flex-shrink: 0; padding-bottom: .35rem; }
.hsec-head.center { flex-direction: column; align-items: center; text-align: center; }
.hsec-head.center .hsec-copy { max-width: 46rem; }
.hsec-head.center .section-sub { margin-inline: auto; }

.h-eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .42rem .9rem .42rem .5rem; margin-bottom: 1.1rem;
  border-radius: 999px;
  background: var(--brand-soft); border: 1px solid rgba(var(--brand-rgb), .22);
  font: 700 .72rem/1 var(--fx-mono); letter-spacing: .16em; text-transform: uppercase;
  color: var(--brand-dark);
}
.h-eyebrow .n {
  display: grid; place-items: center; width: 1.45rem; height: 1.45rem;
  border-radius: 50%; font-size: .64rem; letter-spacing: 0;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #052012;
}
html[data-theme="dark"] .h-eyebrow { color: var(--brand-2); border-color: rgba(47, 190, 95, .3); }

/* icon badges: gradient tiles instead of flat fills */
.icon-badge {
  background: linear-gradient(145deg, rgba(var(--brand-rgb), .16), rgba(var(--brand-rgb), .045));
  border: 1px solid rgba(var(--brand-rgb), .22);
  color: var(--brand-dark);
  box-shadow: 0 10px 22px -12px rgba(var(--brand-rgb), .45);
  transition: transform .35s var(--fx-ease), box-shadow .35s ease, border-color .35s ease;
}
html[data-theme="dark"] .icon-badge { color: var(--brand-2); border-color: rgba(47, 190, 95, .3); }
.feature-card:hover .icon-badge, .reco-card:hover .icon-badge, .work-card:hover .bi-brush,
.work-card:hover .bi-bicycle, .work-card:hover .bi-geo-alt, .work-card:hover .bi-person-workspace {
  transform: translateY(-3px) scale(1.06) rotate(-4deg);
}

/* ------------------------------------------------------------
   4. ABOUT BENTO
   ------------------------------------------------------------ */
.bento { display: grid; gap: 1.25rem; }
@media (min-width: 992px) {
  .bento { grid-template-columns: repeat(12, 1fr); }
  .bento > * { height: 100%; }
  .bento-lead { grid-column: span 6; grid-row: span 2; padding: 2.2rem; }
  .bento-tile { grid-column: span 6; }
  .bento-tile:nth-child(3), .bento-tile:nth-child(4) { grid-column: span 3; }
}
.bento-lead {
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 6%, var(--surface)), var(--surface) 55%);
}
html[data-theme="dark"] .bento-lead {
  background: linear-gradient(180deg, rgba(47, 190, 95, .10), var(--surface) 60%);
}
.bento-lead h5 { font-size: 1.35rem; }

/* ------------------------------------------------------------
   5. STATS + WORK
   ------------------------------------------------------------ */
.stats-card { position: relative; overflow: hidden; }
.stats-card::before {
  content: ""; position: absolute; top: 0; left: 10%; right: 10%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand), var(--accent), var(--brand), transparent);
  opacity: .75;
}
.stats-card .num { text-shadow: 0 6px 24px rgba(var(--brand-rgb), .25); }
html[data-theme="dark"] .stats-card { box-shadow: 0 34px 70px -30px rgba(0, 0, 0, .85); }

.device-frame { transition: border-color .35s ease, box-shadow .45s ease; }
.device-frame:hover {
  border-color: rgba(var(--brand-rgb), .45);
  box-shadow: 0 46px 100px -30px rgba(var(--brand-rgb), .38);
}
html[data-theme="dark"] .device-frame:hover { box-shadow: 0 46px 100px -34px rgba(0, 0, 0, .9), 0 0 60px rgba(47, 190, 95, .14); }

.impact .v.text-gradient { -webkit-text-fill-color: transparent; background-clip: text; }

/* ------------------------------------------------------------
   6. PROCESS
   ------------------------------------------------------------ */
.hprocess { position: relative; }
.hprocess-track { display: none; }
@media (min-width: 992px) {
  .hprocess-track {
    display: block; position: absolute; z-index: 0;
    top: calc(1.8rem + 22px); left: 3%; right: 3%; height: 2px;
    background: rgba(var(--brand-rgb), .16); border-radius: 2px; overflow: hidden;
  }
  #hProcessLine {
    display: block; height: 100%; width: 100%;
    border-radius: inherit; transform-origin: 0 50%;
    background: linear-gradient(90deg, var(--brand), var(--brand-2) 60%, var(--accent));
    box-shadow: 0 0 14px rgba(var(--brand-rgb), .55);
  }
  html[data-theme="dark"] .hprocess-track { background: rgba(47, 190, 95, .18); }
}
.hprocess .step-num {
  box-shadow: 0 0 0 6px rgba(var(--brand-rgb), .10), 0 8px 20px rgba(var(--brand-rgb), .35);
}

/* ------------------------------------------------------------
   7. TEAM + PRODUCTS
   ------------------------------------------------------------ */
.team-card-compact:hover { border-color: rgba(var(--brand-rgb), .35); }

.product-thumb { position: relative; overflow: hidden; }
.product-thumb::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 18% 0%, rgba(255, 255, 255, .26), transparent 55%);
}
.product-thumb::after {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: radial-gradient(rgba(255, 255, 255, .20) 1px, transparent 1px);
  background-size: 16px 16px;
  -webkit-mask-image: radial-gradient(90% 90% at 80% 100%, #000 20%, transparent 70%);
  mask-image: radial-gradient(90% 90% at 80% 100%, #000 20%, transparent 70%);
}
.thumb-4 { background: linear-gradient(135deg, #0f6e63, var(--brand-2)); }
.thumb-5 { background: linear-gradient(135deg, #123f24, var(--brand-dark)); }

.pt-app {
  position: relative; z-index: 1;
  width: min(78%, 235px);
  display: flex; flex-direction: column; gap: .5rem;
  padding: .85rem .9rem 1rem;
  border-radius: 14px;
  background: rgba(3, 18, 11, .40); border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(8px);
  box-shadow: 0 20px 44px rgba(0, 0, 0, .30);
  transition: transform .4s var(--fx-ease);
}
.product-card:hover .pt-app { transform: translateY(-6px) rotate(-.7deg); }
.pt-bar { display: flex; gap: .3rem; margin-bottom: .1rem; }
.pt-bar i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .5); }
.pt-row {
  height: 8px; border-radius: 99px;
  background: linear-gradient(90deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .48), rgba(255, 255, 255, .18));
  background-size: 220% 100%; background-position: 0 0;
}
.product-card:hover .pt-row { animation: h-scan 1.3s var(--fx-ease) both; animation-delay: .08s; }
@keyframes h-scan { from { background-position: 120% 0; } to { background-position: 0 0; } }
.pt-row.w-40 { width: 40%; } .pt-row.w-45 { width: 45%; } .pt-row.w-55 { width: 55%; }
.pt-row.w-65 { width: 65%; } .pt-row.w-70 { width: 70%; } .pt-row.w-80 { width: 80%; }
.pt-pill {
  align-self: flex-start; display: inline-flex; align-items: center; gap: .42rem;
  margin-top: .3rem; padding: .42rem .68rem; border-radius: 999px;
  background: #fff; color: #0b3d21;
  font-size: .72rem; font-weight: 700; line-height: 1;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .25);
}
.pt-pill i { font-size: .82rem; color: var(--brand); }

/* ------------------------------------------------------------
   8. BLOG + RECOMMENDS
   ------------------------------------------------------------ */
.post-card h5 a { transition: color .25s ease; }
.reco-card { transition: transform .3s var(--fx-ease), box-shadow .3s ease, border-color .3s ease; }
.reco-card:hover { border-color: rgba(var(--brand-rgb), .35); }

/* ------------------------------------------------------------
   9. CTA BAND
   ------------------------------------------------------------ */
.cta-home {
  padding: 4.5rem 2rem 4.75rem;
  background: linear-gradient(150deg, #04140c, #0b3d21 55%, #0a5a2a);
}
.cta-home > :not(.cta-aurora):not(.cta-grid) { position: relative; z-index: 1; }
.cta-aurora {
  position: absolute; inset: 0;
  background:
    radial-gradient(50% 70% at 15% 20%, rgba(69, 217, 124, .20), transparent 62%),
    radial-gradient(45% 60% at 85% 85%, rgba(252, 196, 25, .15), transparent 60%);
}
.cta-grid {
  position: absolute; inset: 0; opacity: .8;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(72% 85% at 50% 42%, #000 30%, transparent 78%);
  mask-image: radial-gradient(72% 85% at 50% 42%, #000 30%, transparent 78%);
}
.cta-terminal {
  display: inline-flex; align-items: center; gap: .3rem;
  margin-bottom: 1.6rem; padding: .6rem 1rem;
  border-radius: 10px;
  background: rgba(2, 10, 6, .55); border: 1px solid rgba(255, 255, 255, .16);
  font: 600 .82rem/1 var(--fx-mono); color: #d1fae5;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .35);
}
.cta-terminal .tps { color: var(--accent); }
.cta-terminal .targ { color: #6ee7a0; }
.tcursor {
  display: inline-block; width: 8px; height: 1.05em; margin-left: 3px;
  background: #6ee7a0; border-radius: 2px;
  box-shadow: 0 0 10px rgba(110, 231, 160, .8);
  animation: h-blink 1.05s steps(1) infinite;
}
@keyframes h-blink { 50% { opacity: 0; } }
.cta-home h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); }
.cta-home p { color: rgba(232, 255, 241, .85); }

/* home.js takes over tilt from main.js via the __gsapHome flag; these
   cards get .h-tilt instead of .tilt-3d so GSAP owns the transform. */
.h-tilt { transform-style: preserve-3d; will-change: transform; }
.h-tilt:hover .tilt-glare { opacity: .5; }

/* ------------------------------------------------------------
   10. REVEAL STAGGER + MOTION SAFETY
   ------------------------------------------------------------ */
.row > .reveal:nth-child(2), .bento > .reveal:nth-child(2) { transition-delay: .08s; }
.row > .reveal:nth-child(3), .bento > .reveal:nth-child(3) { transition-delay: .16s; }
.row > .reveal:nth-child(4), .bento > .reveal:nth-child(4) { transition-delay: .24s; }
.row > .reveal:nth-child(5) { transition-delay: .32s; }
.row > .reveal:nth-child(6) { transition-delay: .4s; }

@media (prefers-reduced-motion: reduce) {
  .aurora, .hv-glow, .hv-ring, .hero-cue .line::after, .tcursor { animation: none !important; }
  .hero-cue .line::after { top: 30%; }
}

/* ------------------------------------------------------------
   11. RESPONSIVE
   ------------------------------------------------------------ */
@media (max-width: 991.98px) {
  .hero-home { padding: 8.5rem 0 6rem; }
  .hero-visual { margin-top: 3rem; }
  .hsec-head { flex-wrap: wrap; }
  .hsec-head .hsec-action { padding-bottom: 0; }
  .hv-note { right: 0; }
}
@media (max-width: 767.98px) {
  .hero-home { padding: 7.5rem 0 5rem; }
  .hero-cue { display: none; }
  .hsec-head { flex-direction: column; align-items: flex-start; gap: 1.25rem; margin-bottom: 2.25rem; }
  .hsec-head.center { align-items: center; text-align: center; }
  .pt-app { width: min(86%, 235px); }
}
@media (max-width: 575.98px) {
  .hv-note { display: none; }
  .hv-back.b1, .hv-back.b2 { inset-inline: 0; }
}
