/* ═══════════════════════════════════════════
   BITFRAME · DESIGN SYSTEM
   References: SpinX · MasterClass · Stink Studios
═══════════════════════════════════════════ */

/* ─── Base ──────────────────────────────── */
html { scroll-behavior: smooth; }
*, *::before, *::after { box-sizing: border-box; }

/* ─── Fonts ─────────────────────────────── */
.font-display { font-family: 'Syne', sans-serif; }

/* ─── Noise texture overlay ─────────────── */
.noise-overlay {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 160px;
  opacity: .35;
  mix-blend-mode: overlay;
}

/* ─── Custom cursor (desktop only) ─────── */
@media (pointer: fine) {
  body { cursor: none; }
}

.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 6px; height: 6px;
  background: #38bdf8;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.08s ease, opacity 0.2s;
  mix-blend-mode: difference;
}

.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 36px; height: 36px;
  border: 1px solid rgba(56,189,248,.35);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.18s ease, width 0.2s ease, height 0.2s ease, opacity 0.2s;
}

.cursor-ring.hovered {
  width: 52px; height: 52px;
  border-color: rgba(56,189,248,.6);
}

/* ─── Gradient text ─────────────────────── */
.text-gradient-hero {
  background: linear-gradient(110deg, #38bdf8 0%, #818cf8 45%, #e879f9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Buttons ───────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #0ea5e9;
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.75rem 1.5rem;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 0 0 rgba(14,165,233,0);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary:hover {
  background: #0284c7;
  box-shadow: 0 8px 30px rgba(14,165,233,.35);
  transform: translateY(-1px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.7);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
  padding: 0.75rem 0;
}
.btn-ghost:hover { color: #fff; }

.btn-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.7);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.2s;
  backdrop-filter: blur(8px);
}
.btn-pill:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
  border-color: rgba(255,255,255,.25);
}

/* ─── Magnetic button wrapper ───────────── */
.magnetic { position: relative; display: inline-flex; }

/* ─── Glass cards ───────────────────────── */
.glass-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.glass-card-dark {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
}

.glass-card-accent {
  background: linear-gradient(135deg, rgba(139,92,246,.15) 0%, rgba(14,165,233,.1) 100%);
  border: 1px solid rgba(139,92,246,.2);
}

/* ─── Navbar scroll ─────────────────────── */
.navbar-scrolled {
  background: rgba(10,10,15,.92) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(255,255,255,.05) !important;
}

/* ─── Eyebrow / section labels ──────────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #38bdf8;
}
.eyebrow::before {
  content: '';
  display: block;
  width: 20px;
  height: 1px;
  background: #38bdf8;
}

.section-heading {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #fff;
}

/* ─── SpinX Service rows ────────────────── */
.service-row {
  display: flex;
  align-items: center;
  gap: 6vw;
  padding: 2rem 0;
  cursor: pointer;
  transition: background 0.2s;
  border-radius: 12px;
  padding-left: 1rem;
  padding-right: 1rem;
  margin-left: -1rem;
  margin-right: -1rem;
}
.service-row:hover { background: rgba(255,255,255,.025); }

.service-num {
  font-family: 'Syne', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255,255,255,.2);
  width: 28px;
  flex-shrink: 0;
  transition: color 0.2s;
}
.service-row:hover .service-num { color: #38bdf8; }

.service-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  font-weight: 700;
  color: rgba(255,255,255,.85);
  transition: color 0.2s;
  margin-bottom: 0.2rem;
}
.service-row:hover .service-title { color: #fff; }

.service-desc {
  font-size: 0.8rem;
  color: rgba(255,255,255,.3);
  line-height: 1.5;
}

.service-tags { gap: 6px; }

.tag {
  font-size: 0.68rem;
  font-weight: 500;
  color: rgba(255,255,255,.35);
  border: 1px solid rgba(255,255,255,.1);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  transition: all 0.2s;
}
.service-row:hover .tag {
  border-color: rgba(56,189,248,.3);
  color: rgba(56,189,248,.7);
}

.service-arrow {
  font-size: 1.1rem;
  color: rgba(255,255,255,.15);
  flex-shrink: 0;
  transition: all 0.3s;
}
.service-row:hover .service-arrow {
  color: #38bdf8;
  transform: translateX(4px);
}

/* ─── Drone cards ───────────────────────── */
.drone-card {
  overflow: hidden;
  position: relative;
  background: #111118;
}
.drone-card img {
  transition: transform 0.6s cubic-bezier(0.25,0.46,0.45,0.94);
}
.drone-card:hover img { transform: scale(1.04); }

.play-btn {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  border: 1.5px solid rgba(255,255,255,.3);
  backdrop-filter: blur(8px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s;
}
.play-btn:hover {
  background: rgba(14,165,233,.7);
  border-color: #0ea5e9;
  transform: translate(-50%, -50%) scale(1.1);
}

/* ─── Spec cards ────────────────────────── */
.spec-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px;
  padding: 1rem;
  transition: border-color 0.2s, background 0.2s;
}
.spec-card:hover {
  background: rgba(255,255,255,.07);
  border-color: rgba(56,189,248,.2);
}

.spec-icon { font-size: 1.25rem; margin-bottom: 0.5rem; }

/* ─── Pills ─────────────────────────────── */
.pill {
  font-size: 0.7rem;
  font-weight: 500;
  color: rgba(255,255,255,.4);
  border: 1px solid rgba(255,255,255,.08);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  transition: all 0.2s;
}
.pill:hover {
  color: #38bdf8;
  border-color: rgba(56,189,248,.3);
}

/* ─── MasterClass Course cards ──────────── */
.course-card {
  background: #111118;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s, border-color 0.2s;
}
.course-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
  border-color: rgba(56,189,248,.15);
}

.course-thumb {
  position: relative;
  height: 190px;
  background-color: #1a1a24;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.course-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: rgba(14,165,233,.85);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
}

.course-play {
  position: absolute;
  bottom: 12px; right: 12px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(8px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.25s;
}
.course-card:hover .course-play {
  opacity: 1;
  transform: scale(1);
}

/* Hover overlay — Domestika-style preview info */
.course-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,10,15,.95) 0%, rgba(10,10,15,.4) 60%, transparent 100%);
  display: flex;
  align-items: flex-end;
  padding: 12px;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none; /* overlay decorativo — no intercepta toques */
}
.course-card:hover .course-overlay { opacity: 1; }

.course-body { padding: 1.25rem; }

/* ─── Filter buttons ────────────────────── */
.filter-btn {
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.4);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover { color: #fff; border-color: rgba(255,255,255,.25); }
.filter-btn.active {
  background: #0ea5e9;
  border-color: #0ea5e9;
  color: #fff;
}

/* ─── Testimonial cards ─────────────────── */
.testimonial-card {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 20px;
  padding: 1.75rem;
  transition: border-color 0.2s, background 0.2s;
}
.testimonial-card:hover {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.1);
}

/* ─── Contact rows ──────────────────────── */
.contact-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

.contact-ic {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.5);
  flex-shrink: 0;
  transition: all 0.2s;
}
.contact-row:hover .contact-ic {
  background: rgba(14,165,233,.1);
  border-color: rgba(14,165,233,.3);
  color: #38bdf8;
}

/* ─── Form ──────────────────────────────── */
.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255,255,255,.4);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.875rem;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  color: #fff;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.form-input::placeholder { color: rgba(255,255,255,.2); }
.form-input:focus {
  border-color: rgba(56,189,248,.4);
  background: rgba(56,189,248,.04);
}
.form-input option { background: #1a1a28; color: #fff; }
.form-input.invalid { border-color: rgba(244,63,94,.5); }

/* ─── Marquee ───────────────────────────── */
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-track {
  animation: marquee 28s linear infinite;
  display: inline-flex;
  will-change: transform;
}

.marquee-item {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.25);
  white-space: nowrap;
  padding: 0 0.5rem;
  transition: color 0.2s;
}
.marquee-item:hover { color: rgba(255,255,255,.6); }

.marquee-sep {
  color: rgba(56,189,248,.35);
  font-weight: 300;
  white-space: nowrap;
}

/* ─── Social buttons ────────────────────── */
.social-btn {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.35);
  transition: all 0.2s;
  text-decoration: none;
}
.social-btn:hover {
  background: rgba(14,165,233,.12);
  border-color: rgba(56,189,248,.3);
  color: #38bdf8;
}

/* ─── Scroll reveal ─────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.25,0.46,0.45,0.94),
              transform 0.65s cubic-bezier(0.25,0.46,0.45,0.94);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.32s; }

/* ─── Light mode overrides ──────────────── */
.light body,
body.light {
  background-color: #f8f9fb;
  color: #111118;
}

/* For dark sections that must stay dark in light mode */

/* ─── Responsive ────────────────────────── */
@media (max-width: 640px) {
  .service-row { gap: 1rem; }
  .service-tags { display: none !important; }
}
