/* ============================================================
   Hostika-bg.com — homepage redesign (loaded on / only)
   ------------------------------------------------------------
   Layers on top of style.css. The NEW LOOK (layout, colour,
   components) is always-on — it does NOT depend on JS or motion
   settings. Only the *animations* are gated behind
   @media (prefers-reduced-motion: no-preference), so a visitor
   with "reduce motion" on still gets the full redesign, just calm.
   Reuses brand tokens from style.css :root (--brand, --bg-ink, …).
   ============================================================ */

:root {
  --hx-mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Consolas, Monaco, monospace;
  --hx-emerald: #34d399;
}

/* The redesigned homepage drives its own section rhythm */
body.home main > section { padding: 0; }

/* ============================================================
   HERO
   ============================================================ */
.hx-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(62% 80% at 80% 6%,  rgba(180, 83, 9, .30),  transparent 60%),
    radial-gradient(58% 72% at 8% 16%,  rgba(5, 150, 105, .34), transparent 60%),
    radial-gradient(50% 60% at 62% 108%, rgba(16, 185, 129, .20), transparent 60%),
    linear-gradient(180deg, var(--bg-ink) 0%, var(--bg-ink-2) 100%);
}
/* Drifting aurora layer (animated only when motion is welcome) */
.hx-hero::before {
  content: ""; position: absolute; inset: -30%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(closest-side at 25% 30%, rgba(5, 150, 105, .22), transparent 70%),
    radial-gradient(closest-side at 80% 22%, rgba(180, 83, 9, .18),  transparent 70%),
    radial-gradient(closest-side at 60% 82%, rgba(52, 211, 153, .14), transparent 70%);
  will-change: transform;
}
/* Masked grid, fades toward the edges */
.hx-hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(ellipse 82% 72% at 50% 28%, #000 38%, transparent 82%);
          mask-image: radial-gradient(ellipse 82% 72% at 50% 28%, #000 38%, transparent 82%);
}

.hx-hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.02fr .98fr; gap: 56px; align-items: center;
  padding: clamp(54px, 9vh, 104px) 0 clamp(60px, 10vh, 116px);
}

.hx-eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 14px; border-radius: 999px;
  background: rgba(52, 211, 153, .10); border: 1px solid rgba(52, 211, 153, .26);
  color: #6ee7b7; font-size: .8rem; font-weight: 600; letter-spacing: .02em;
  margin-bottom: 22px;
}
.hx-eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--hx-emerald);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, .55);
}
.hx-hero h1 {
  color: #fff; margin: 0 0 20px;
  font-size: clamp(2.35rem, 5.6vw, 4.6rem);
  line-height: 1.03; letter-spacing: -.04em; font-weight: 800;
}
.hx-hero h1 .accent {
  background: linear-gradient(90deg, #f59e0b, #fcd34d 45%, #fb923c 70%, #f59e0b);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: 700;
}
.hx-hero .lede {
  color: rgba(255, 255, 255, .76);
  font-size: clamp(1.04rem, 1.35vw, 1.2rem); line-height: 1.6;
  max-width: 38ch; margin: 0 0 28px;
}
.hx-cta-row { display: flex; gap: 14px; flex-wrap: wrap; }
.hx-cta-row .btn { padding: 15px 26px; font-size: 1.02rem; border-radius: 12px; }
.hx-trust {
  margin-top: 24px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px;
  color: rgba(255, 255, 255, .6); font-size: .88rem;
}
.hx-trust span { display: inline-flex; align-items: center; gap: 8px; }
.hx-trust span::before {
  content: ""; width: 15px; height: 15px; border-radius: 50%; flex: none;
  background: rgba(52, 211, 153, .18)
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2334d399' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6L9 17l-5-5'/></svg>") center / 10px no-repeat;
}

/* ---- Hero visual: live deploy terminal ---- */
.hx-visual { position: relative; }
.hx-terminal {
  position: relative; z-index: 1;
  background: linear-gradient(180deg, #0c1118 0%, #090d14 100%);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 44px 90px -34px rgba(0, 0, 0, .75), 0 0 0 1px rgba(5, 150, 105, .07);
}
.hx-term-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 13px 16px; border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .02);
}
.hx-term-bar .tdot { width: 11px; height: 11px; border-radius: 50%; }
.hx-term-bar .tdot.r { background: #ff5f57; }
.hx-term-bar .tdot.y { background: #febc2e; }
.hx-term-bar .tdot.g { background: #28c840; }
.hx-term-bar .ttl {
  margin-left: 10px; font-family: var(--hx-mono); font-size: .78rem;
  color: rgba(255, 255, 255, .45); letter-spacing: .02em;
}
.hx-term-body {
  padding: 20px 20px 22px; min-height: 256px;
  font-family: var(--hx-mono); font-size: .85rem; line-height: 1.85;
}
.hx-line { display: block; white-space: pre-wrap; color: rgba(255, 255, 255, .68); min-height: 1.85em; }
.hx-line.cmd    { color: #e9edf2; }
.hx-line.out    { color: rgba(255, 255, 255, .52); }
.hx-line.ok     { color: var(--hx-emerald); }
.hx-line.warn   { color: #fbbf24; }
.hx-line.strong { font-weight: 600; }
.hx-prompt { color: var(--hx-emerald); }
.hx-prompt::after {
  content: "▌"; margin-left: 2px; color: var(--hx-emerald);
}
.hx-term-body.typing .hx-prompt { opacity: .35; }
.hx-term-body.typing .hx-line.active::after {
  content: "▌"; margin-left: 1px; color: var(--hx-emerald);
}

/* Floating live-readout chips */
.hx-chip {
  position: absolute; z-index: 2;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 14px; border-radius: 999px;
  background: rgba(10, 14, 20, .72);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .12); color: #fff;
  font-size: .8rem; font-weight: 600; letter-spacing: -.01em;
  box-shadow: 0 14px 34px -14px rgba(0, 0, 0, .7);
}
.hx-chip small { color: rgba(255, 255, 255, .5); font-weight: 500; }
.hx-chip .pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--hx-emerald);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); flex: none;
}
.hx-chip.tr { top: -18px; right: -10px; }
.hx-chip.bl { bottom: -18px; left: -10px; }

@media (max-width: 980px) {
  .hx-hero-inner { grid-template-columns: 1fr; gap: 38px; padding: 46px 0 54px; }
  .hx-visual { max-width: 540px; }
}
@media (max-width: 560px) {
  .hx-chip { display: none; }
  .hx-term-body { font-size: .78rem; min-height: 220px; }
}

/* ============================================================
   VALUE-PROP MARQUEE
   ============================================================ */
.hx-marquee {
  background: var(--bg-ink); overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, .07);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.hx-marquee-track {
  display: flex; flex-wrap: wrap; justify-content: center;  /* static fallback */
}
.hx-mq-item {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 17px 28px; white-space: nowrap;
  color: rgba(255, 255, 255, .82); font-weight: 600; font-size: .95rem; letter-spacing: -.01em;
}
.hx-mq-item .d { width: 6px; height: 6px; border-radius: 50%; background: var(--hx-emerald); flex: none; }
.hx-mq-item:nth-child(even) .d { background: #fbbf24; }

/* ============================================================
   SECTION SCAFFOLD
   ============================================================ */
.hx-section { padding: clamp(70px, 10vh, 116px) 0; }
.hx-section--ink {
  background: linear-gradient(180deg, var(--bg-ink) 0%, var(--bg-ink-2) 100%);
  color: #fff; position: relative; overflow: hidden;
}
.hx-section--alt { background: var(--bg-alt); }

.hx-head { max-width: 760px; margin: 0 auto clamp(38px, 5.5vh, 60px); text-align: center; }
.hx-kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .76rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 16px;
}
.hx-kicker::before { content: ""; width: 22px; height: 2px; background: currentColor; border-radius: 2px; opacity: .6; }
.hx-kicker.is-accent { color: var(--accent); }
.hx-section--ink .hx-kicker { color: var(--hx-emerald); }
.hx-head h2 {
  font-size: clamp(1.9rem, 3.8vw, 3rem); line-height: 1.08;
  letter-spacing: -.035em; font-weight: 800; margin: 0;
}
.hx-head p { margin: 14px auto 0; font-size: 1.06rem; color: var(--text-2); max-width: 58ch; }
.hx-section--ink .hx-head h2 { color: #fff; }
.hx-section--ink .hx-head p { color: rgba(255, 255, 255, .72); }

/* ============================================================
   WHY WE EXIST
   ============================================================ */
.hx-why { position: relative; overflow: hidden; }
.hx-why::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(700px 320px at 18% 0%,  rgba(5, 150, 105, .22), transparent 62%),
    radial-gradient(620px 300px at 88% 100%, rgba(180, 83, 9, .18), transparent 62%);
}
.hx-why-inner { position: relative; z-index: 1; max-width: 900px; margin: 0 auto; text-align: center; }
.hx-why h2 {
  color: #fff; font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.07;
  letter-spacing: -.035em; font-weight: 800; margin: 0;
}
.hx-why h2 em { font-style: normal; color: var(--hx-emerald); }
.hx-why p { color: rgba(255, 255, 255, .74); font-size: 1.12rem; max-width: 60ch; margin: 22px auto 0; }
.hx-why-compare {
  display: inline-flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 36px;
}
.hx-cmp {
  display: flex; flex-direction: column; gap: 4px; align-items: flex-start;
  padding: 18px 24px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .03); text-align: left;
}
.hx-cmp .k { font-size: .76rem; text-transform: uppercase; letter-spacing: .12em; color: rgba(255, 255, 255, .5); }
.hx-cmp .v { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.hx-cmp.bad .v { color: #fca5a5; text-decoration: line-through; text-decoration-color: rgba(252, 165, 165, .5); }
.hx-cmp.good { border-color: rgba(52, 211, 153, .4); background: rgba(52, 211, 153, .08); }
.hx-cmp.good .v { color: var(--hx-emerald); }

/* ============================================================
   FREE ADD-ONS — bento
   ============================================================ */
.hx-free-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(238px, 1fr)); gap: 18px; }
.hx-free {
  position: relative; overflow: hidden;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 16px;
  padding: 26px; transition: transform .25s var(--t), box-shadow .25s var(--t), border-color .25s var(--t);
}
.hx-free::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(360px circle at var(--mx, -20%) var(--my, -20%), rgba(5, 150, 105, .10), transparent 60%);
  opacity: 0; transition: opacity .35s var(--t);
}
.hx-free:hover { transform: translateY(-4px); border-color: transparent; box-shadow: var(--shadow-md); }
.hx-free:hover::after { opacity: 1; }
.hx-free .ic {
  position: relative; z-index: 1;
  width: 46px; height: 46px; border-radius: 12px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--hx-emerald) 100%); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px;
  box-shadow: 0 10px 24px -8px rgba(5, 150, 105, .55);
}
.hx-free .ic svg { width: 22px; height: 22px; }
.hx-free h4 { position: relative; z-index: 1; margin: 0 0 6px; font-size: 1.04rem; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.hx-free h4 .free-tag {
  font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  background: var(--brand-soft); color: var(--brand-2); padding: 3px 7px; border-radius: 5px;
}
.hx-free p { position: relative; z-index: 1; margin: 0; font-size: .92rem; color: var(--text-mute); line-height: 1.5; }

/* ============================================================
   INFRA — live pulse on datacenter dots (uses existing .dc-strip)
   ============================================================ */
.hx-section .dc-card .live-dot { will-change: box-shadow; }

/* ============================================================
   CTA
   ============================================================ */
.hx-cta {
  position: relative; overflow: hidden; text-align: center; color: #fff;
  border-radius: 26px; padding: clamp(46px, 7vw, 74px);
  background: linear-gradient(135deg, var(--brand-2) 0%, var(--brand) 48%, #10b981 100%);
  box-shadow: 0 44px 90px -34px rgba(5, 150, 105, .6);
}
.hx-cta::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(620px 240px at 18% -10%, rgba(255, 255, 255, .22), transparent 60%);
}
.hx-cta > * { position: relative; z-index: 1; }
.hx-cta h2 { color: #fff; font-size: clamp(1.9rem, 4vw, 3rem); letter-spacing: -.03em; margin: 0 0 12px; }
.hx-cta p { color: rgba(255, 255, 255, .9); font-size: 1.1rem; max-width: 50ch; margin: 0 auto 30px; }
.hx-cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hx-cta .btn { padding: 15px 28px; font-size: 1.02rem; border-radius: 12px; }
.hx-cta .btn-on { background: #fff; color: var(--brand-2); border: 1px solid #fff; }
.hx-cta .btn-on:hover { background: #ecfdf5; color: var(--brand-2); transform: translateY(-1px); }
.hx-cta .btn-ghost { background: rgba(255, 255, 255, .08); color: #fff; border: 1px solid rgba(255, 255, 255, .5); }
.hx-cta .btn-ghost:hover { background: rgba(255, 255, 255, .16); color: #fff; }

/* ============================================================
   MOTION — enhancement only. Everything above is fully usable
   without any of this. Animations run only when the visitor has
   not asked the OS to reduce motion.
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  /* hero entrance */
  .hx-hero-copy > * { opacity: 0; animation: hx-rise .7s var(--t) forwards; }
  .hx-hero-copy > .hx-eyebrow { animation-delay: .05s; }
  .hx-hero-copy > h1          { animation-delay: .15s; }
  .hx-hero-copy > .lede       { animation-delay: .28s; }
  .hx-hero-copy > .hx-cta-row { animation-delay: .40s; }
  .hx-hero-copy > .hx-trust   { animation-delay: .52s; }
  .hx-visual { opacity: 0; animation: hx-rise .8s var(--t) .30s forwards; }
  @keyframes hx-rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

  /* hero aurora + grid drift */
  .hx-hero::before { animation: hx-mesh 26s ease-in-out infinite alternate; }
  @keyframes hx-mesh {
    0%   { transform: translate3d(-3%, -2%, 0) scale(1); }
    50%  { transform: translate3d(4%, 3%, 0)  scale(1.12); }
    100% { transform: translate3d(-2%, 3%, 0) scale(1.06); }
  }

  /* accent shimmer */
  .hx-hero h1 .accent { background-size: 220% auto; animation: hx-shimmer 6s linear infinite; }
  @keyframes hx-shimmer { to { background-position: 220% center; } }

  /* terminal prompt + active cursor blink */
  .hx-prompt::after,
  .hx-term-body.typing .hx-line.active::after { animation: hx-blink 1.05s steps(1) infinite; }
  @keyframes hx-blink { 50% { opacity: 0; } }

  /* live chip pulse + datacenter dot pulse */
  .hx-chip .pulse,
  .hx-section .dc-card .live-dot { animation: hx-pulse 2.2s ease-out infinite; }
  @keyframes hx-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(52, 211, 153, .55); }
    70%  { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
  }

  /* marquee scroll (track is duplicated in markup for a seamless loop) */
  .hx-marquee-track { flex-wrap: nowrap; justify-content: flex-start; width: max-content; animation: hx-scroll 40s linear infinite; }
  .hx-marquee:hover .hx-marquee-track { animation-play-state: paused; }
  @keyframes hx-scroll { to { transform: translateX(-50%); } }

  /* CTA sheen */
  .hx-cta::before { animation: hx-sheen 7s ease-in-out infinite; }
  @keyframes hx-sheen {
    0%, 100% { transform: translateX(-6%); opacity: .8; }
    50%      { transform: translateX(6%);  opacity: 1; }
  }
}

/* ============================================================
   PRELOADER — brand 3D cube (first visit per session only)
   ------------------------------------------------------------
   Covers the dark backdrop while the page loads, then fades into
   the homepage. Pure CSS 3D, no libraries. Guaranteed to dismiss:
   home.js hides it on window.load; a CSS fallback hides it by ~3.2s
   even with no JS; and a pre-paint check in index.php skips it for
   repeat visits this session and for reduced-motion.
   ============================================================ */
#hx-loader {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px;
  background:
    radial-gradient(60% 65% at 50% 40%, rgba(5, 150, 105, .20), transparent 60%),
    linear-gradient(180deg, var(--bg-ink) 0%, var(--bg-ink-2) 100%);
  opacity: 1; visibility: visible;
  transition: opacity .6s var(--t), visibility .6s var(--t);
  animation: hx-loader-out .6s var(--t) 2.6s forwards; /* no-JS safety net */
}
#hx-loader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.hx-skip-loader #hx-loader { display: none !important; }
@keyframes hx-loader-out { to { opacity: 0; visibility: hidden; } }

.hx-loader-stage { perspective: 760px; }
.hx-cube {
  position: relative; width: 92px; height: 92px;
  transform-style: preserve-3d;
  animation: hx-cube-spin 5s linear infinite;
  filter: drop-shadow(0 26px 42px rgba(5, 150, 105, .35));
}
.hx-cube .f {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 2.5rem; color: #fff; letter-spacing: -.02em;
  border: 1px solid rgba(52, 211, 153, .45);
  box-shadow: inset 0 0 34px rgba(0, 0, 0, .30);
}
.hx-cube .f.h { background: linear-gradient(135deg, #059669 0%, #10b981 100%); }
.hx-cube .f.p {
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .09) 0 2px, transparent 2px 13px),
    linear-gradient(135deg, #047857 0%, #065f46 100%);
}
.hx-cube .front  { transform: translateZ(46px); }
.hx-cube .back   { transform: rotateY(180deg) translateZ(46px); }
.hx-cube .right  { transform: rotateY(90deg)  translateZ(46px); }
.hx-cube .left   { transform: rotateY(-90deg) translateZ(46px); }
.hx-cube .top    { transform: rotateX(90deg)  translateZ(46px); }
.hx-cube .bottom { transform: rotateX(-90deg) translateZ(46px); }
@keyframes hx-cube-spin {
  from { transform: rotateX(-22deg) rotateY(0deg); }
  to   { transform: rotateX(-22deg) rotateY(360deg); }
}
.hx-loader-brand { font-weight: 800; font-size: 1.12rem; color: #fff; letter-spacing: -.01em; }
.hx-loader-brand span { color: var(--hx-emerald); }
.hx-loader-bar { width: 168px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.hx-loader-bar i {
  display: block; height: 100%; width: 38%; border-radius: 3px;
  background: linear-gradient(90deg, var(--brand), var(--hx-emerald));
  animation: hx-load-bar 1.15s ease-in-out infinite;
}
@keyframes hx-load-bar { 0% { transform: translateX(-130%); } 100% { transform: translateX(380%); } }

/* Lion-emblem variant (set $LOADER='lion' in index.php): mane rotates, face turns in 3D */
.hx-lion { width: 170px; height: 170px; transform-style: preserve-3d; filter: drop-shadow(0 22px 42px rgba(5, 150, 105, .42)); animation: hx-lion-bob 5s ease-in-out infinite; }
.hx-lion .mane-outer { transform-box: fill-box; transform-origin: center; animation: hx-lion-spin 18s linear infinite; }
.hx-lion .mane-inner { transform-box: fill-box; transform-origin: center; animation: hx-lion-spin 14s linear infinite reverse; }
@keyframes hx-lion-spin { to { transform: rotate(360deg); } }
@keyframes hx-lion-bob { 0%, 100% { transform: rotateY(-13deg) rotateX(5deg); } 50% { transform: rotateY(13deg) rotateX(-3deg); } }

/* Reduced motion: no preloader at all — content shows instantly. */
@media (prefers-reduced-motion: reduce) {
  #hx-loader { display: none !important; }
}
