/* ============================================================
   LABHOUSE v2.0 — style.css
   ============================================================ */

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #080808;
  --bg2: #0f0f0f;
  --bg3: #141414;
  --surface: #161616;
  --border: rgba(255,255,255,0.07);
  --text: #f0f0f0;
  --muted: #888;
  --accent: #6c63ff;
  --accent2: #a855f7;
  --accent3: #06b6d4;
  --gradient: linear-gradient(135deg, #6c63ff, #a855f7, #06b6d4);
  --font: 'Inter', sans-serif;
  --nav-h: 72px;
}

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100vw;
}

a { text-decoration: none; color: inherit; }

img { display: block; }

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }


/* cursor: default browser */


/* ============================================================
   NAV
   ============================================================ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: var(--nav-h);
  background: transparent;
  transition: background 0.4s ease, backdrop-filter 0.4s ease;
}
#navbar.scrolled {
  background: rgba(8,8,8,0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.logo {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #fff;
  flex-shrink: 0;
  text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}
.logo span {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Desktop nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.nav-links a:hover,
.nav-links a.active { color: #fff; }

/* Hide mobile-only CTA in desktop nav */
.nav-cta-mobile { display: none !important; }

/* Desktop CTA button */
.nav-cta-desktop {
  background: var(--gradient);
  color: #fff !important;
  padding: 10px 22px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: opacity 0.2s, transform 0.2s;
}
.nav-cta-desktop:hover { opacity: 0.85; transform: translateY(-1px); }

/* Hamburger button */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.2s, background 0.2s;
  flex-shrink: 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.hamburger:hover { border-color: rgba(108,99,255,0.6); background: rgba(108,99,255,0.12); }
.hamburger span {
  display: block;
  width: 20px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}
/* Open state */
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Overlay */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 190;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.nav-overlay.active {
  display: block;
  opacity: 1;
}


/* ============================================================
   MOBILE NAV MENU (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {
  #navbar { padding: 0 20px; }

  .nav-cta-desktop { display: none !important; }
  .hamburger { display: flex; }

  .nav-links {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: rgba(10,10,10,0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    z-index: 195;
    /* Hidden by default — use display:none to avoid ghost block */
    display: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1);
  }
  .nav-links.open {
    display: flex;
    max-height: 400px;
    padding: 8px 0 16px;
  }
  .nav-links a {
    padding: 14px 28px;
    font-size: 16px;
    border-bottom: 1px solid var(--border);
    min-height: 52px;
  }
  .nav-links a:last-child { border-bottom: none; }
  .nav-cta-mobile {
    display: flex !important;
    margin: 8px 20px 0;
    background: var(--gradient);
    color: #fff !important;
    border-radius: 100px;
    justify-content: center;
    font-weight: 600;
    border-bottom: none !important;
  }
}


/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient);
  color: #fff;
  padding: 14px 28px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 15px;
  min-height: 48px;
  transition: opacity 0.2s, transform 0.2s;
}
.btn-primary:hover { opacity: 0.85; transform: translateY(-2px); }
.btn-primary.btn-large { padding: 18px 40px; font-size: 17px; min-height: 56px; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  padding: 14px 28px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 15px;
  min-height: 48px;
  border: 1px solid var(--border);
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}
.btn-ghost:hover { border-color: var(--accent); background: rgba(108,99,255,0.08); transform: translateY(-2px); }
.btn-ghost.btn-sm { padding: 10px 20px; font-size: 14px; min-height: 44px; }
.btn-primary.btn-sm { padding: 10px 20px; font-size: 14px; min-height: 44px; }


/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + 60px) 24px 100px;
  overflow: clip; /* clip instead of hidden so canvas can extend upward behind nav */
}

/* Particle canvas — extends behind the nav */
#particleCanvas {
  position: absolute;
  top: calc(-1 * var(--nav-h));
  left: 0; right: 0;
  width: 100%;
  height: calc(100% + var(--nav-h));
  z-index: 0;
}

/* Gradient mesh overlay */
.hero-mesh {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 20% 30%, rgba(108,99,255,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 80% 70%, rgba(168,85,247,0.15) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 55% 10%, rgba(6,182,212,0.12) 0%, transparent 55%);
  animation: meshPulse 8s ease-in-out infinite alternate;
}
@keyframes meshPulse {
  0%   { opacity: 0.7; }
  100% { opacity: 1; }
}

/* Floating app icons */
.floating-icon {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  will-change: transform;
  filter: drop-shadow(0 12px 40px rgba(0,0,0,0.6));
  animation: iconFloat 6s ease-in-out infinite;
}
.floating-icon img {
  border-radius: 22px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.fi-invoice {
  top: 18%; left: 8%;
  animation-delay: 0s;
}
.fi-invoice img { width: 72px; height: 72px; }

.fi-summary {
  top: 60%; right: 7%;
  animation-delay: 2s;
}
.fi-summary img { width: 64px; height: 64px; }

.fi-cleaner {
  bottom: 22%; left: 12%;
  animation-delay: 4s;
}
.fi-cleaner img { width: 56px; height: 56px; }

@keyframes iconFloat {
  0%, 100% { transform: translateY(0px) rotate(-2deg); }
  50%       { transform: translateY(-18px) rotate(2deg); }
}

/* Hide floating icons on small phones to avoid overlap */
@media (max-width: 500px) {
  .floating-icon { display: none; }
}

/* Hero content */
.hero-content {
  position: relative;
  z-index: 3;
  max-width: 820px;
}
.hero-badge {
  display: inline-block;
  background: rgba(108,99,255,0.15);
  border: 1px solid rgba(108,99,255,0.3);
  color: #a78bfa;
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 28px;
  animation: fadeUp 0.8s ease both;
}
.hero-title {
  font-size: clamp(44px, 8vw, 96px);
  font-weight: 900;
  line-height: 1.0;
  letter-spacing: -3px;
  margin-bottom: 24px;
  animation: fadeUp 0.8s 0.1s ease both;
}
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: clamp(16px, 2.5vw, 19px);
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 40px;
  animation: fadeUp 0.8s 0.2s ease both;
}
.hide-mobile { display: inline; }
.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeUp 0.8s 0.3s ease both;
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 3;
  opacity: 0;
  animation: fadeInScroll 1s 1s ease forwards;
}
.scroll-hint span { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--muted), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0.3; transform: scaleY(0.6); }
}
@keyframes fadeInScroll {
  to { opacity: 0.5; }
}


/* ============================================================
   MARQUEE TICKER
   ============================================================ */
.marquee-band {
  background: linear-gradient(to bottom, rgba(14,14,14,0.0) 0%, rgba(14,14,14,0.85) 40%, rgba(14,14,14,0.85) 100%);
  border-top: none;
  border-bottom: 1px solid var(--border);
  padding: 16px 0 18px;
  overflow: hidden;
  position: relative;
  z-index: 10;
  margin-top: -60px; /* overlap the hero bottom so no gap */
}
.marquee-track {
  display: flex;
  white-space: nowrap;
  width: max-content;
}
.marquee-content {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-right: 28px;
  animation: marqueeScroll 28s linear infinite;
}
.marquee-content span {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.3px;
}
.marquee-dot {
  color: var(--accent) !important;
  font-size: 18px !important;
}
@keyframes marqueeScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
/* Pause on hover */
.marquee-band:hover .marquee-content { animation-play-state: paused; }


/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 100px 24px; }
.section-dark { background: var(--bg2); }
.container { max-width: 1100px; margin: 0 auto; }
.section-label {
  font-size: 12px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 16px;
}
.section-title {
  font-size: clamp(32px, 5vw, 60px);
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1.1;
  margin-bottom: 24px;
}
.section-sub {
  font-size: 18px;
  color: var(--muted);
  max-width: 600px;
  margin-bottom: 56px;
  line-height: 1.7;
}


/* ============================================================
   PILLARS (glassmorphism)
   ============================================================ */
.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 56px;
}
.pillar {
  background: rgba(22,22,22,0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 22px;
  padding: 36px 28px;
  transition: border-color 0.3s, transform 0.3s, background 0.3s;
}
.pillar:hover {
  border-color: rgba(108,99,255,0.4);
  background: rgba(108,99,255,0.07);
  transform: translateY(-6px);
}
.pillar-icon { font-size: 32px; margin-bottom: 16px; }
.pillar h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.pillar p { color: var(--muted); font-size: 14px; line-height: 1.7; }

@media (max-width: 900px) {
  .pillars { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .pillars { grid-template-columns: 1fr; gap: 14px; }
}


/* ============================================================
   APP SHOWCASE CARDS
   ============================================================ */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 56px;
}

.app-card-wrap {
  /* 3D tilt container */
  perspective: 1000px;
  border-radius: 28px;
}

.app-card {
  position: relative;
  border-radius: 28px;
  padding: 36px 28px 28px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: box-shadow 0.3s, border-color 0.3s;
  transform-style: preserve-3d;
  will-change: transform;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.app-card:hover {
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}

/* Animated gradient backgrounds per app */
.app-card-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  transition: opacity 0.4s;
}
.app-card--invoice .app-card-bg {
  background: linear-gradient(135deg, rgba(79,70,229,0.25) 0%, rgba(99,102,241,0.12) 50%, transparent 100%);
}
.app-card--invoice { border-color: rgba(99,102,241,0.25); }
.app-card--invoice:hover { border-color: rgba(99,102,241,0.55); }

.app-card--summary .app-card-bg {
  background: linear-gradient(135deg, rgba(168,85,247,0.22) 0%, rgba(139,92,246,0.1) 50%, transparent 100%);
}
.app-card--summary { border-color: rgba(168,85,247,0.22); }
.app-card--summary:hover { border-color: rgba(168,85,247,0.5); }

.app-card--cleaner .app-card-bg {
  background: linear-gradient(135deg, rgba(16,185,129,0.2) 0%, rgba(6,182,212,0.1) 50%, transparent 100%);
}
.app-card--cleaner { border-color: rgba(16,185,129,0.22); }
.app-card--cleaner:hover { border-color: rgba(16,185,129,0.45); }

/* Card content above bg */
.app-tag,
.app-card-icon,
.app-card h3,
.app-card p,
.app-rating,
.app-store-btns,
.app-detail-link {
  position: relative; z-index: 1;
}

.app-tag {
  display: inline-block;
  background: rgba(108,99,255,0.15);
  border: 1px solid rgba(108,99,255,0.3);
  color: #a78bfa;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 20px;
}

.app-card-icon {
  margin-bottom: 20px;
}
.app-card-icon img {
  width: 80px; height: 80px;
  border-radius: 18px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.55);
}

.app-card h3 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}
.app-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 20px;
  flex: 1;
}

.app-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}
.stars { color: #fbbf24; font-size: 14px; letter-spacing: 1px; }
.rating-val { font-size: 14px; font-weight: 700; color: var(--text); }
.rating-count { font-size: 12px; color: var(--muted); }

/* Store buttons */
.app-store-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  min-height: 44px;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.store-btn:hover {
  background: rgba(108,99,255,0.12);
  border-color: rgba(108,99,255,0.4);
  transform: translateY(-2px);
}
.store-btn svg {
  width: 16px; height: 16px;
  flex-shrink: 0;
}

.app-detail-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  transition: color 0.2s, letter-spacing 0.2s;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.app-detail-link:hover { color: var(--accent2); letter-spacing: 0.5px; }

.apps-footer-link { text-align: center; margin-top: 48px; }

/* Responsive grid */
@media (max-width: 900px) {
  .apps-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .apps-grid { grid-template-columns: 1fr; }
  .app-card { padding: 28px 22px; }
}


/* ============================================================
   STATS COUNTERS SECTION
   ============================================================ */
.stats-section {
  background: var(--bg);
  padding: 80px 24px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stat-block {
  padding: 40px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: border-color 0.3s, transform 0.3s;
}
.stat-block:hover { border-color: rgba(108,99,255,0.35); transform: translateY(-4px); }
.stat-num-big {
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
}
.stat-label-big {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.5px;
}
@media (max-width: 700px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
@media (max-width: 380px) {
  .stats-grid { grid-template-columns: 1fr; }
}


/* ============================================================
   ABOUT SPLIT
   ============================================================ */
.about-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.about-left p {
  color: var(--muted); font-size: 16px;
  line-height: 1.8; margin-bottom: 16px;
}
.about-left strong { color: var(--text); }
.about-left .btn-primary { margin-top: 16px; }

.location-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}
.location-map {
  position: relative;
  width: 60px; height: 60px;
  background: rgba(108,99,255,0.1);
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.map-dot { width: 12px; height: 12px; background: var(--accent); border-radius: 50%; }
.map-pulse {
  position: absolute;
  width: 40px; height: 40px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  opacity: 0;
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(0.5); opacity: 0.8; }
  100% { transform: scale(1.5); opacity: 0; }
}
.location-city { display: block; font-size: 18px; font-weight: 800; }
.location-detail { font-size: 13px; color: var(--muted); }

.values-list { display: flex; flex-direction: column; gap: 12px; }
.value-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 500;
  min-height: 52px;
  transition: border-color 0.2s;
}
.value-item:hover { border-color: rgba(108,99,255,0.3); }
.vi-icon { font-size: 20px; }

@media (max-width: 900px) {
  .about-split { grid-template-columns: 1fr; gap: 48px; }
}


/* ============================================================
   CTA BAND
   ============================================================ */
.cta-band {
  position: relative;
  padding: 100px 24px;
  text-align: center;
  overflow: hidden;
}
.cta-band-bg { position: absolute; inset: 0; pointer-events: none; }
.orb-cta {
  position: absolute;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(108,99,255,0.18), transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}
.cta-content { position: relative; z-index: 1; }
.cta-band h2 {
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 900; letter-spacing: -2px; margin-bottom: 16px;
}
.cta-band p { font-size: 18px; color: var(--muted); margin-bottom: 40px; }


/* ============================================================
   FOOTER
   ============================================================ */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 48px;
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.footer-links { display: flex; gap: 28px; flex-wrap: wrap; }
.footer-links a {
  font-size: 14px; color: var(--muted);
  transition: color 0.2s; min-height: 44px;
  display: inline-flex; align-items: center;
}
.footer-links a:hover { color: var(--text); }
.footer-right {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.footer-copy { font-size: 13px; color: var(--muted); }
.version-badge {
  font-size: 12px; color: var(--muted);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  padding: 4px 12px; border-radius: 100px;
  min-height: 28px; display: inline-flex; align-items: center;
  transition: border-color 0.2s, color 0.2s;
}
.version-badge:hover { border-color: rgba(108,99,255,0.4); color: var(--accent); }

@media (max-width: 768px) {
  footer { padding: 32px 20px; }
  .footer-inner { flex-direction: column; text-align: center; align-items: center; }
  .footer-links { justify-content: center; }
  .footer-right { justify-content: center; }
}


/* ============================================================
   SHARED SECTION UTILITIES (used in apps.html / careers.html)
   ============================================================ */

/* Careers perks */
.perks-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-top: 56px; }
.perk-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 36px 28px;
  transition: border-color 0.3s, transform 0.3s;
}
.perk-card:hover { border-color: rgba(168,85,247,0.4); transform: translateY(-4px); }
.perk-icon { font-size: 36px; margin-bottom: 16px; }
.perk-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.perk-card p { color: var(--muted); font-size: 15px; line-height: 1.6; }

/* Roles */
.roles-list { display: flex; flex-direction: column; gap: 16px; margin-top: 56px; margin-bottom: 48px; }
.role-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 28px 32px;
  display: flex; align-items: center;
  justify-content: space-between; gap: 24px;
  transition: border-color 0.3s, transform 0.2s; min-height: 80px;
}
.role-card:hover { border-color: rgba(108,99,255,0.4); transform: translateX(4px); }
.role-dept { font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; display: block; }
.role-card h3 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.role-card p { color: var(--muted); font-size: 14px; }
.role-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.role-tag {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  padding: 6px 14px; border-radius: 100px;
  font-size: 12px; font-weight: 600; color: var(--muted);
}
.spontaneous {
  background: linear-gradient(135deg, rgba(108,99,255,0.1), rgba(168,85,247,0.1));
  border: 1px solid rgba(108,99,255,0.3);
  border-radius: 24px; padding: 40px;
  display: flex; align-items: center;
  justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.spontaneous h3 { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.spontaneous p { color: var(--muted); font-size: 15px; }

/* Life grid */
.life-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 56px; }
.life-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 32px 28px;
  transition: border-color 0.3s, transform 0.3s;
}
.life-item:hover { border-color: rgba(6,182,212,0.4); transform: translateY(-4px); }
.life-item.li-large { grid-column: span 2; }
.life-icon { font-size: 36px; margin-bottom: 16px; }
.life-item h4 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.life-item p { color: var(--muted); font-size: 14px; line-height: 1.6; }

/* Hero SM (apps/careers pages) */
.hero-sm {
  position: relative;
  min-height: 50vh;
  padding: calc(var(--nav-h) + 60px) 24px 60px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  pointer-events: none; z-index: 0;
}
.orb {
  position: absolute; border-radius: 50%;
  filter: blur(120px); opacity: 0.25;
  animation: orbFloat 8s ease-in-out infinite;
}
.orb1 { width: 600px; height: 600px; background: #6c63ff; top: -200px; left: -100px; }
.orb2 { width: 500px; height: 500px; background: #a855f7; bottom: -100px; right: -100px; animation-delay: 3s; }
.orb3 { width: 300px; height: 300px; background: #06b6d4; top: 40%; left: 50%; animation-delay: 5s; }
.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
}
@keyframes orbFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}
.hero-sm .hero-content { position: relative; z-index: 1; }

/* App detail page */
.app-detail { padding: 80px 24px; }
.app-detail-inner {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 80px; align-items: start;
}
.app-detail-inner.reverse { direction: rtl; }
.app-detail-inner.reverse > * { direction: ltr; }
.app-detail-icon { font-size: 72px; margin-bottom: 20px; line-height: 1; }
.app-detail-badge { margin-bottom: 16px; }
.app-detail-title {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 900; letter-spacing: -2px; line-height: 1.1; margin-bottom: 8px;
}
.app-detail-sub { font-size: 15px; color: var(--muted); margin-bottom: 20px; font-weight: 500; }
.app-store-rating {
  display: flex; align-items: center; gap: 10px; margin-bottom: 24px;
}
.rating-num { font-size: 22px; font-weight: 800; }
.app-detail-desc { color: var(--muted); font-size: 16px; line-height: 1.8; margin-bottom: 16px; }

.features-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.feature-item {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 20px;
  transition: border-color 0.2s, transform 0.2s;
}
.feature-item:hover { border-color: rgba(108,99,255,0.3); transform: translateY(-2px); }
.fi-icon { font-size: 24px; flex-shrink: 0; margin-top: 2px; }
.feature-item h4 { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.feature-item p { font-size: 13px; color: var(--muted); line-height: 1.5; }

.section-divider { height: 1px; background: var(--border); max-width: 1100px; margin: 0 auto; }


/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}


/* ============================================================
   RESPONSIVE — CAREERS / APPS PAGES
   ============================================================ */
@media (max-width: 900px) {
  .life-grid { grid-template-columns: 1fr 1fr; }
  .life-item.li-large { grid-column: span 2; }
  .role-card { flex-direction: column; align-items: flex-start; }
  .spontaneous { flex-direction: column; }
  .app-detail-inner { grid-template-columns: 1fr; gap: 48px; }
  .app-detail-inner.reverse { direction: ltr; }
  .features-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .section { padding: 72px 20px; }
  .life-grid { grid-template-columns: 1fr; }
  .life-item.li-large { grid-column: span 1; }
  .hide-mobile { display: none; }
  .hero-title { letter-spacing: -2px; }
}

/* ============================================================
   OFFICE SECTION
   ============================================================ */
.office-section { background: var(--bg2); }

.office-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  margin-top: 56px;
}
.office-col-right { display: flex; flex-direction: column; gap: 20px; }

.office-card {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.3s, transform 0.3s;
}
.office-card:hover { border-color: rgba(108,99,255,0.35); transform: translateY(-3px); }

.office-card-info { padding: 20px 24px; }
.office-card-info h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.office-card-info p { font-size: 13px; color: var(--muted); line-height: 1.6; }

.office-visual {
  position: relative; overflow: hidden; background: #0d0d14;
}
.office-visual img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}
.office-card:hover .office-visual img { transform: scale(1.04); }
.office-visual--main { height: 260px; }
.office-visual--collab, .office-visual--pier { height: 160px; }

.office-stats {
  display: flex; align-items: center; justify-content: center;
  gap: 32px; margin-top: 32px; padding: 20px 32px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; flex-wrap: wrap;
}
.ostat { display: flex; align-items: center; gap: 8px; }
.ostat-icon { font-size: 18px; }
.ostat-text { font-size: 13px; color: var(--muted); font-weight: 500; }
.ostat-div { width: 1px; height: 20px; background: var(--border); }

@media (max-width: 900px) {
  .office-grid { grid-template-columns: 1fr; }
  .ostat-div { display: none; }
  .office-stats { gap: 16px; }
}


/* ============================================================
   INTRO OVERLAY — OPTION 5: ZOOM + RINGS + PARTICLES
   ============================================================ */
.intro-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: #030308;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.intro-overlay.done {
  animation: introExit 0.7s 0.05s ease forwards;
}
@keyframes introExit {
  0%   { opacity: 1; }
  100% { opacity: 0; visibility: hidden; pointer-events: none; }
}

.intro-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
}

/* Expanding rings */
.intro-ring {
  position: absolute; border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%) scale(0);
  pointer-events: none;
}
.intro-ring1 { width: 220px; height: 220px; border: 1px solid rgba(108,99,255,0.2); animation: ringExpand 0.7s 1.1s cubic-bezier(0.16,1,0.3,1) forwards; }
.intro-ring2 { width: 380px; height: 380px; border: 1px solid rgba(168,85,247,0.12); animation: ringExpand 0.7s 1.25s cubic-bezier(0.16,1,0.3,1) forwards; }
.intro-ring3 { width: 560px; height: 560px; border: 1px solid rgba(6,182,212,0.08); animation: ringExpand 0.7s 1.4s cubic-bezier(0.16,1,0.3,1) forwards; }
@keyframes ringExpand {
  to { transform: translate(-50%,-50%) scale(1); }
}

/* Inner content */
.intro-inner {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 24px;
}

/* Logo zoom-in from large */
.intro-logo-zoom {
  font-size: 60px; font-weight: 900; letter-spacing: -2px;
  opacity: 0;
  transform: scale(2.8) rotate(4deg);
  filter: blur(16px);
  animation: logoZoom 1s 0.3s cubic-bezier(0.16,1,0.3,1) forwards;
  line-height: 1;
}
.iz-lab { color: #fff; }
.iz-house { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
@keyframes logoZoom {
  0%   { opacity: 0; transform: scale(2.8) rotate(4deg); filter: blur(16px); }
  60%  { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); filter: blur(0); }
}

/* App icons */
.intro-apps-row { display: flex; gap: 14px; }
.intro-app {
  width: 52px; height: 52px; border-radius: 14px; overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.08);
  opacity: 0;
}
.intro-app img { width: 100%; height: 100%; object-fit: cover; }
.ia1 { animation: appPop 0.5s 1.4s cubic-bezier(0.16,1,0.3,1) forwards; }
.ia2 { animation: appPop 0.5s 1.55s cubic-bezier(0.16,1,0.3,1) forwards; }
.ia3 { animation: appPop 0.5s 1.7s cubic-bezier(0.16,1,0.3,1) forwards; }
@keyframes appPop {
  0%   { opacity: 0; transform: scale(0.5) translateY(12px); }
  60%  { transform: scale(1.08) translateY(-3px); opacity: 1; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* Downloads */
.intro-downloads {
  font-size: 11px; letter-spacing: 5px; text-transform: uppercase;
  color: rgba(255,255,255,0.25);
  opacity: 0; animation: fadeUp 0.5s 2s ease forwards;
}

/* ============================================================
   SCROLL ANIMATIONS — SPECTACULAR
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.9s cubic-bezier(0.16,1,0.3,1), transform 0.9s cubic-bezier(0.16,1,0.3,1);
  will-change: transform, opacity;
}
.reveal.visible { opacity: 1; transform: translateY(0) rotate(0deg); }

.reveal-left {
  opacity: 0; transform: translateX(-60px);
  transition: opacity 0.9s cubic-bezier(0.16,1,0.3,1), transform 0.9s cubic-bezier(0.16,1,0.3,1);
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }

.reveal-right {
  opacity: 0; transform: translateX(60px);
  transition: opacity 0.9s cubic-bezier(0.16,1,0.3,1), transform 0.9s cubic-bezier(0.16,1,0.3,1);
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }

.reveal-scale {
  opacity: 0; transform: scale(0.85);
  transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
.reveal-scale.visible { opacity: 1; transform: scale(1); }

/* Word split animation */
.word-split {
  display: inline-block; overflow: hidden; vertical-align: bottom;
  line-height: 1.2;
}
.word-inner {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.8s cubic-bezier(0.16,1,0.3,1);
}
[data-reveal].words-visible .word-inner { transform: translateY(0); }

/* Glow pulse on visible cards */
.pillar.visible, .app-card.visible, .perk-card.visible {
  animation: cardGlow 0.3s ease forwards;
}
@keyframes cardGlow {
  0%   { box-shadow: 0 0 0 0 rgba(108,99,255,0); }
  50%  { box-shadow: 0 0 30px 0 rgba(108,99,255,0.15); }
  100% { box-shadow: none; }
}

/* Number counter animation */
.stat-num { transition: color 0.3s; }

/* Parallax elements */
.parallax-slow { will-change: transform; }
.parallax-fast { will-change: transform; }


/* ============================================================
   FULLSCREEN DRAWER MENU — aiby style
   ============================================================ */

/* Blur overlay — covers entire screen */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 500;
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s ease;
  background: rgba(4,4,10,0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.drawer-overlay.open {
  opacity: 1; pointer-events: all;
}

/* Drawer panel — full height, 75% width from right */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(78vw, 460px);
  z-index: 501;
  background: #0c0c14;
  border-left: 1px solid rgba(255,255,255,0.05);
  transform: translateX(110%);
  transition: transform 0.55s cubic-bezier(0.76, 0, 0.24, 1);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.drawer.open {
  transform: translateX(0);
}

/* Radial glow inside */
.drawer::before {
  content: '';
  position: absolute; top: -100px; right: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(108,99,255,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.drawer-inner {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  height: 100%;
  padding: 32px 40px 40px;
}

/* Top bar */
.drawer-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 60px;
}
.drawer-logo {
  font-size: 18px; font-weight: 800; letter-spacing: 2px; text-decoration: none;
}
.drawer-close {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 50%;
  cursor: pointer;
  color: rgba(255,255,255,0.55);
  transition: all 0.25s;
  flex-shrink: 0;
}
.drawer-close:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
  transform: rotate(90deg);
  border-color: rgba(108,99,255,0.4);
}

/* Nav links — big, staggered */
.drawer-nav {
  flex: 1;
  display: flex; flex-direction: column;
  justify-content: center;
  gap: 0;
}

.drawer-link {
  display: flex; align-items: center;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  text-decoration: none;
  color: rgba(255,255,255,0.85);
  opacity: 0;
  transform: translateX(40px);
  transition: color 0.2s, padding-left 0.25s;
}
.drawer-link:first-child { border-top: 1px solid rgba(255,255,255,0.05); }
.drawer.open .drawer-link {
  animation: dlIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.drawer.open .dl1 { animation-delay: 0.14s; }
.drawer.open .dl2 { animation-delay: 0.21s; }
.drawer.open .dl3 { animation-delay: 0.28s; }
@keyframes dlIn {
  to { opacity: 1; transform: translateX(0); }
}
.drawer-link:hover { padding-left: 6px; color: #fff; }
.drawer-link:hover .dl-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.drawer-link:hover .dl-arrow { opacity: 1; transform: translateX(0); color: var(--accent); }

.dl-num {
  font-size: 11px; font-weight: 700; letter-spacing: 2px;
  color: rgba(255,255,255,0.18); min-width: 26px;
}
.dl-text {
  font-size: 28px; font-weight: 800; letter-spacing: -0.5px; flex: 1; line-height: 1;
}
.dl-arrow {
  font-size: 22px;
  opacity: 0; transform: translateX(-10px);
  transition: all 0.2s;
}

/* Footer */
.drawer-footer {
  display: flex; flex-direction: column; gap: 18px;
  padding-top: 28px;
  opacity: 0; transition: opacity 0.4s 0.35s ease;
}
.drawer.open .drawer-footer { opacity: 1; }

.drawer-cta { align-self: flex-start; }

.drawer-apps {
  display: flex; gap: 10px; align-items: center;
}
.drawer-apps img {
  width: 38px; height: 38px; border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.drawer-tagline {
  font-size: 11px; letter-spacing: 3px; text-transform: uppercase;
  color: rgba(255,255,255,0.18);
}

/* Keep desktop nav visible on wide screens */
@media (min-width: 769px) {
  .hamburger { display: none !important; }
  .drawer, .drawer-overlay { display: none !important; }
}

/* ============================================================
   NO HORIZONTAL SCROLL — GLOBAL FIX
   ============================================================ */
/* max-width scoped — not on svg/canvas to avoid breaking illustrations */
img, video, iframe { max-width: 100%; }
html, body {
  overflow-x: hidden !important;
  width: 100%;
}
/* Fix any element that might overflow */
.hero, .section, .marquee-band, .cta-band,
.office-grid, .apps-grid, .pillars, .about-split,
.hero-stats, .floating-icon, .intro-ring2, .intro-ring3 {
  max-width: 100vw;
}
/* Floating icons — hide on small to prevent overflow */
@media (max-width: 768px) {
  .floating-icon { display: none !important; }
  .intro-ring2, .intro-ring3 { overflow: hidden; }
  .hero-stats { gap: 16px; }
  .stat-num { font-size: 32px; }
  .stat-suffix { font-size: 22px; }
}
