/*!
 * Cloudhim home hero (v1.2.0)
 * Dark, two-column: message + search + topics + stats on the left, an
 * animated terminal on the right. The terminal is decorative (aria-hidden)
 * and hidden on small screens so the search stays above the fold.
 */
.ch-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #0b1220;
  color: #cbd5e1;
  border-bottom: 1px solid #1e293b;
}
/* Fine grid, fading out towards the edges. */
.ch-hero::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(148, 163, 184, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .07) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 35%, #000 30%, transparent 80%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 35%, #000 30%, transparent 80%);
}
.ch-hero__glow { position: absolute; z-index: -1; border-radius: 9999px; filter: blur(70px); pointer-events: none; }
.ch-hero__glow--a { width: 34rem; height: 34rem; top: -14rem; left: -10rem; background: rgba(37, 99, 235, .38); }
.ch-hero__glow--b { width: 28rem; height: 28rem; bottom: -14rem; right: -6rem; background: rgba(124, 58, 237, .28); }
.ch-hero__glow--c { width: 18rem; height: 18rem; top: 30%; right: 30%; background: rgba(6, 182, 212, .14); }

.ch-hero__inner {
  max-width: 72rem; margin: 0 auto;
  padding: 4rem 1rem 3.5rem;
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: 3.5rem; align-items: center;
}
@media (min-width: 1024px) { .ch-hero__inner { padding: 5.5rem 1.5rem 5rem; } }

/* ── Copy ── */
.ch-hero__badge {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .35rem .85rem .35rem .65rem; border-radius: 9999px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12);
  color: #e2e8f0; font-size: .78rem; font-weight: 600; letter-spacing: .02em;
  margin-bottom: 1.5rem;
}
.ch-hero__dot { position: relative; width: .5rem; height: .5rem; border-radius: 9999px; background: #4ade80; flex-shrink: 0; }
.ch-hero__dot::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; background: #4ade80;
  animation: ch-ping 1.8s cubic-bezier(0, 0, .2, 1) infinite;
}
@keyframes ch-ping { 75%, 100% { transform: scale(2.4); opacity: 0; } }

.ch-hero__title {
  margin: 0 0 1.25rem;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-size: clamp(2.2rem, 1.35rem + 3.4vw, 3.7rem);
  line-height: 1.06; font-weight: 800; letter-spacing: -.03em;
  color: #fff; text-wrap: balance;
}
.ch-hero__hl {
  background: linear-gradient(90deg, #60a5fa 0%, #a78bfa 55%, #22d3ee 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: #93c5fd;
}
.ch-hero__text { margin: 0 0 2rem; max-width: 34rem; font-size: clamp(1rem, .95rem + .3vw, 1.15rem); line-height: 1.65; color: #94a3b8; }

.ch-hero__search {
  display: flex; align-items: center; gap: .5rem; max-width: 34rem;
  padding: .4rem .4rem .4rem 1rem; border-radius: .9rem;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.ch-hero__search:focus-within { border-color: #60a5fa; background: rgba(255, 255, 255, .09); box-shadow: 0 0 0 4px rgba(96, 165, 250, .18); }
.ch-hero__search .bh-ico { color: #64748b; width: 1.1rem; height: 1.1rem; }
.ch-hero__search input {
  flex: 1 1 auto; min-width: 0; border: 0; outline: none; background: transparent;
  color: #f8fafc; font-size: .975rem; padding: .65rem 0;
}
.ch-hero__search input::placeholder { color: #64748b; }
.ch-hero__search button {
  flex-shrink: 0; border: 0; cursor: pointer; border-radius: .65rem;
  padding: .7rem 1.25rem; font-size: .9rem; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  box-shadow: 0 8px 20px -8px rgba(59, 130, 246, .7);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.ch-hero__search button:hover { filter: brightness(1.08); transform: translateY(-1px); }
.ch-hero__search button:focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; }

.ch-hero__topics { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 1.25rem; }
.ch-hero__topics-label { font-size: .8rem; font-weight: 600; color: #64748b; margin-right: .15rem; }
.ch-hero__topic {
  display: inline-flex; align-items: center; padding: .35rem .8rem; border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, .12); color: #cbd5e1; text-decoration: none;
  font-size: .8rem; font-weight: 500; transition: all .15s ease;
}
.ch-hero__topic:hover { border-color: #60a5fa; color: #fff; background: rgba(96, 165, 250, .12); }

.ch-hero__stats {
  display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 2.5rem;
  margin: 2.5rem 0 0; padding-top: 1.75rem; border-top: 1px solid rgba(255, 255, 255, .08);
}
.ch-hero__stat dt { order: 2; font-size: .8rem; color: #64748b; margin-top: .15rem; }
.ch-hero__stat { display: flex; flex-direction: column; }
.ch-hero__stat dd { order: 1; margin: 0; font-size: 1.6rem; font-weight: 800; color: #fff; letter-spacing: -.02em; line-height: 1.1; }

/* ── Terminal ── */
.ch-hero__visual { position: relative; }
.ch-term {
  position: relative; border-radius: 1rem; overflow: hidden;
  background: rgba(15, 23, 42, .88);
  border: 1px solid rgba(148, 163, 184, .18);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 255, 255, .03) inset;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transform: perspective(1400px) rotateY(-6deg) rotateX(2deg);
}
.ch-term__bar {
  display: flex; align-items: center; gap: .45rem; padding: .75rem 1rem;
  background: rgba(30, 41, 59, .7); border-bottom: 1px solid rgba(148, 163, 184, .12);
}
.ch-term__bar i { width: .7rem; height: .7rem; border-radius: 9999px; display: block; }
.ch-term__bar i:nth-child(1) { background: #f87171; }
.ch-term__bar i:nth-child(2) { background: #fbbf24; }
.ch-term__bar i:nth-child(3) { background: #4ade80; }
.ch-term__title { margin-left: .6rem; font: 500 .75rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #64748b; }
.ch-term__body {
  margin: 0; padding: 1.15rem 1.25rem 1.35rem;
  font: .82rem/1.85 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #e2e8f0; white-space: pre; overflow: hidden;
}
.ch-term__line { display: block; opacity: 0; animation: ch-line .35s ease forwards; }
.ch-term__line:nth-child(1) { animation-delay: .2s; }
.ch-term__line:nth-child(2) { animation-delay: .7s; }
.ch-term__line:nth-child(3) { animation-delay: 1.0s; }
.ch-term__line:nth-child(4) { animation-delay: 1.5s; }
.ch-term__line:nth-child(5) { animation-delay: 2.0s; }
.ch-term__line:nth-child(6) { animation-delay: 2.3s; }
.ch-term__line:nth-child(7) { animation-delay: 2.8s; }
.ch-term__line:nth-child(8) { animation-delay: 3.2s; }
.ch-term__line:nth-child(9) { animation-delay: 3.6s; }
@keyframes ch-line { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.ch-term .p { color: #22d3ee; }
.ch-term .u { color: #a78bfa; }
.ch-term .o { color: #94a3b8; }
.ch-term .ok { color: #4ade80; }
.ch-term .w { color: #fbbf24; }
.ch-term__cursor { display: inline-block; width: .55rem; height: 1.05em; vertical-align: -.15em; background: #e2e8f0; animation: ch-blink 1s steps(1) infinite; }
@keyframes ch-blink { 50% { opacity: 0; } }

.ch-float {
  position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: .45rem;
  padding: .5rem .8rem; border-radius: .75rem;
  background: rgba(255, 255, 255, .96); color: #0f172a;
  font-size: .78rem; font-weight: 600; white-space: nowrap;
  box-shadow: 0 16px 32px -12px rgba(0, 0, 0, .55);
  animation: ch-float 6s ease-in-out infinite;
}
.ch-float .bh-ico { width: 1rem; height: 1rem; }
.ch-float--a { top: -1.1rem; right: 1.5rem; }
.ch-float--a .bh-ico { color: #f97316; }
.ch-float--b { bottom: -1.2rem; left: -1.4rem; animation-delay: -3s; }
.ch-float--b .bh-ico { color: #16a34a; }
@keyframes ch-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ── Responsive ── */
@media (max-width: 1023px) {
  .ch-hero__inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .ch-hero__copy { text-align: center; }
  .ch-hero__text, .ch-hero__search { margin-left: auto; margin-right: auto; }
  .ch-hero__topics, .ch-hero__stats { justify-content: center; }
  .ch-hero__visual { max-width: 34rem; width: 100%; margin: 0 auto; }
  .ch-term { transform: none; }
}
@media (max-width: 767px) {
  .ch-hero__visual { display: none; }
  .ch-hero__inner { padding: 3rem 1rem 2.75rem; }
  .ch-hero__stats { gap: 1.5rem; }
  .ch-hero__stat dd { font-size: 1.3rem; }
}
@media (max-width: 480px) {
  .ch-hero__search { flex-wrap: wrap; padding: .45rem; }
  .ch-hero__search .bh-ico { margin-left: .5rem; }
  .ch-hero__search button { flex: 1 0 100%; padding: .75rem 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .ch-term__line { opacity: 1; animation: none; }
  .ch-hero__dot::after, .ch-term__cursor, .ch-float { animation: none; }
}
