/* ═══════════════════════════════════════════════════════════
   hero-visual.css
   New hero visual card — light-mode-first design
   ProjectsHub
═══════════════════════════════════════════════════════════ */

/* ── Hero section layout ─────────────────────────────── */
.hero-section {
  padding-block: 160px 80px;
  min-height: 640px;
  overflow: visible;
}

@media (max-width: 1199px) { .hero-section { padding-block: 140px 70px; } }
@media (max-width: 991px)  {
  .hero-section {
    padding-top: 84px !important;
    padding-bottom: 40px !important;
    min-height: auto !important;
    padding-inline: 20px;
  }
}
@media (max-width: 575px)  {
  .hero-section {
    padding-top: 80px !important;
    padding-bottom: 32px !important;
    min-height: auto !important;
    padding-inline: 16px;
  }
}

/* ── Hero left copy ──────────────────────────────────── */
.hero-text {
  opacity: 1;
  padding-right: 2rem;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-text {
    animation: heroFadeUp 0.5s cubic-bezier(0.23, 1, 0.32, 1) both;
  }
}

@keyframes heroFadeUp {
  from { opacity: 0.9; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-title__cursor {
  display: inline-block;
  width: 2px;
  min-width: 2px;
  margin-left: 2px;
  vertical-align: baseline;
  user-select: none;
}

/* Badge */
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 9999px;
  border: 1px solid rgba(99, 102, 241, 0.25);
  background: rgba(99, 102, 241, 0.07);
  font-size: 0.8rem;
  font-weight: 600;
  color: #4f46e5;
  margin-bottom: 1.4rem;
  letter-spacing: 0.02em;
}

.hero-tag__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
  animation: tagDotPulse 2s ease-in-out infinite;
}

@keyframes tagDotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
  50%       { box-shadow: 0 0 0 5px rgba(34,197,94,0); }
}

/* Headline */
.hero-title {
  font-size: clamp(2.4rem, 4.8vw, 3.75rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #0f172a;
  margin-bottom: 1.25rem;
  text-shadow: none;
}

.hero-title__underline {
  position: relative;
  display: inline;
  white-space: nowrap;
}

.hero-title__underline::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, #3b82f6, #6366f1 50%, #a855f7);
  animation: underlineGrow 0.8s ease 0.5s both;
  transform-origin: left;
}

@keyframes underlineGrow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

.hero-title__gradient {
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 40%, #a855f7 80%);
  background-size: 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

/* Description */
.hero-desc {
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  font-weight: 400;
  line-height: 1.75;
  color: #475569;
  max-width: 500px;
  margin-bottom: 2rem;
  padding-left: 14px;
  border-left: 3px solid rgba(99, 102, 241, 0.3);
  position: relative;
}

@media (max-width: 991px) { .hero-desc { max-width: 100%; } }

/* CTA row */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 0;
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; }
  .btn-hero-primary, .btn-hero-ghost { width: 100%; justify-content: center; }
}

/* Primary button */
.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 9999px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.35);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
  position: relative;
  overflow: hidden;
}

.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.45);
  filter: brightness(1.06);
  color: #fff;
}
.btn-hero-primary:active { transform: translateY(0); }

/* Ghost button */
.btn-hero-ghost {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 12px 24px;
  border-radius: 9999px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #374151;
  border: 1.5px solid rgba(0,0,0,0.14);
  background: transparent;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}

.btn-hero-ghost:hover {
  background: rgba(59,130,246,0.06);
  border-color: rgba(59,130,246,0.4);
  color: #1d4ed8;
  transform: translateY(-1px);
}
.btn-hero-ghost svg { transition: transform 0.2s; }
.btn-hero-ghost:hover svg { transform: translateX(3px); }

/* ── Trust bar ────────────────────────────────────────── */
.hero-trust-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  row-gap: 0.5rem;
  margin-top: 2rem;
  padding: 14px 20px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  width: fit-content;
  max-width: 100%;
}

.hero-trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
}

.hero-trust-icon {
  color: #6366f1;
  flex-shrink: 0;
}

.hero-trust-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}

.hero-trust-label {
  font-size: 0.78rem;
  color: #64748b;
  white-space: nowrap;
}

.hero-trust-divider {
  width: 1px;
  height: 28px;
  background: rgba(0,0,0,0.1);
  margin: 0 16px;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .hero-trust-bar { padding: 12px 14px; }
  .hero-trust-divider { margin: 0 10px; }
  .hero-trust-value { font-size: 0.95rem; }
}

/* ── Hero visual card ────────────────────────────────── */
.hero-visual-col {
  position: relative;
  padding-left: 1.5rem;
}

.hero-visual-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  animation: heroFadeUp 0.8s cubic-bezier(0.23, 1, 0.32, 1) 0.3s both;
}

/* Background glow blobs */
.hvc-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.hvc-blob--blue {
  width: 340px;
  height: 340px;
  background: rgba(59, 130, 246, 0.12);
  top: -40px;
  right: -40px;
}

.hvc-blob--purple {
  width: 280px;
  height: 280px;
  background: rgba(139, 92, 246, 0.1);
  bottom: 20px;
  left: 10px;
}

/* Browser window card */
.hvc-window {
  position: relative;
  z-index: 2;
  border-radius: 18px;
  overflow: hidden;
  background: #f8fafc;
  border: 1.5px solid rgba(0,0,0,0.1);
  box-shadow:
    0 24px 64px rgba(0,0,0,0.12),
    0 4px 16px rgba(0,0,0,0.06),
    0 0 0 1px rgba(255,255,255,0.8) inset;
  animation: windowFloat 6s ease-in-out infinite;
}

@keyframes windowFloat {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}

/* Browser chrome bar */
.hvc-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #f1f5f9;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.hvc-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.hvc-dot--red    { background: #ef4444; }
.hvc-dot--yellow { background: #f59e0b; }
.hvc-dot--green  { background: #22c55e; }

.hvc-chrome__url {
  margin-left: 8px;
  font-size: 0.75rem;
  color: #64748b;
  font-family: monospace;
  background: #e2e8f0;
  padding: 3px 10px;
  border-radius: 6px;
  flex: 1;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* iframe wrapper */
.hvc-iframe-wrap {
  height: 340px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 30%, #e0f2fe, #f8fafc 70%);
  position: relative;
}

/* ── Floating cards ──────────────────────────────────── */
.hvc-float {
  position: absolute;
  z-index: 10;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.09);
  box-shadow: 0 8px 28px rgba(0,0,0,0.1), 0 2px 6px rgba(0,0,0,0.06);
  padding: 10px 14px;
  backdrop-filter: blur(8px);
}

/* Positions */
.hvc-float--tl {
  top: 18px;
  left: -30px;
  animation: floatA 5s ease-in-out infinite;
}
.hvc-float--tr {
  top: -16px;
  right: -20px;
  animation: floatB 5.5s ease-in-out infinite 0.5s;
}
.hvc-float--br {
  bottom: 24px;
  right: -24px;
  animation: floatC 5s ease-in-out infinite 1s;
}
.hvc-float--bl {
  bottom: 10px;
  left: -20px;
  animation: floatA 6s ease-in-out infinite 1.5s;
}

@keyframes floatA {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}
@keyframes floatB {
  0%, 100% { transform: translateY(0px) rotate(-1deg); }
  50%       { transform: translateY(-10px) rotate(1deg); }
}
@keyframes floatC {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-6px); }
}

/* Code float card */
.hvc-float--code {
  min-width: 200px;
}

.hvc-float__bar {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(0,0,0,0.07);
}

.hvc-float__filename {
  font-size: 0.7rem;
  color: #64748b;
  font-family: monospace;
  margin-left: 4px;
}

.hvc-float__code {
  font-family: "Fira Code", "Cascadia Code", monospace;
  font-size: 0.72rem;
  line-height: 1.65;
  color: #334155;
}

.hvc-kw   { color: #7c3aed; font-weight: 600; }
.hvc-fn   { color: #0284c7; }
.hvc-str  { color: #16a34a; }
.hvc-cursor {
  display: none;
}

/* Stat float card */
.hvc-float--stat {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 150px;
}

.hvc-stat__icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hvc-stat__icon--green {
  background: rgba(34,197,94,0.1);
  color: #16a34a;
}
.hvc-stat__icon--blue {
  background: rgba(59,130,246,0.1);
  color: #2563eb;
}

.hvc-stat__value {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}
.hvc-stat__label {
  font-size: 0.7rem;
  color: #64748b;
  margin-top: 2px;
}

/* Live pulse dot on stat */
.hvc-stat__pulse {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34,197,94,0.5);
  animation: statPulse 2s ease-in-out infinite;
}
@keyframes statPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
  50%       { box-shadow: 0 0 0 5px rgba(34,197,94,0); }
}

/* AI Chip float card */
.hvc-float--chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
}

.hvc-chip {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(59,130,246,0.35);
}

.hvc-chip__core {
  font-size: 0.75rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.02em;
}

.hvc-chip__label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #16a34a;
  letter-spacing: 0.06em;
}

.hvc-chip__pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  animation: statPulse 1.8s ease-in-out infinite;
}

/* ── Dot grid background on visual col ── */
.hero-visual-col::before {
  content: '';
  position: absolute;
  inset: -60px -80px;
  background-image: radial-gradient(circle, rgba(99,102,241,0.14) 1.2px, transparent 1.2px);
  background-size: 22px 22px;
  pointer-events: none;
  z-index: 0;
  border-radius: 24px;
}

@media (max-width: 1199px) {
  .hvc-float--tl { left: -10px; }
  .hvc-float--tr { right: -10px; }
  .hvc-float--br { right: -10px; }
  .hvc-float--bl { left: -10px; }
}

@media (max-width: 1024px) {
  .hvc-iframe-wrap { height: 300px; }
  .hvc-float--code  { display: none; }
}
