/* ===========================================================
   Homepage — graphics-led redesign
   Loaded only on index.html, layered on top of styles.css.
   Same palette; deeper black, glow, line drawings, white pills.
   =========================================================== */

.home-page { background: #000; }
.home-page .site-footer { background: #05070a; border-top-color: rgba(255,255,255,.06); }

/* ---------- Slim header ---------- */
.home-page .nav { height: 92px; transition: height .4s var(--ease-out); }
.home-page .brand-logo { height: 76px; transition: height .4s var(--ease-out); }
.home-page .site-header.scrolled { background: rgba(0,0,0,.62); border-bottom-color: rgba(255,255,255,.06); }
.home-page .site-header.scrolled .nav { height: 72px; }
.home-page .site-header.scrolled .brand-logo { height: 58px; }
.home-page .nav-links a { font-size: .92rem; }
.home-page .nav-links .btn { border-radius: 999px; padding: 10px 20px; font-size: .9rem; }
.home-page .nav-links .btn-primary { background: #fff; color: #07090c; box-shadow: none; }
.home-page .nav-links .btn-primary:hover { background: #e3e8ef; box-shadow: none; }
.home-page .nav-links .btn-ghost { border: 1px solid rgba(255,255,255,.16); }
@media (max-width: 680px) {
  .home-page .nav, .home-page .site-header.scrolled .nav { height: 80px; }
  .home-page .brand-logo, .home-page .site-header.scrolled .brand-logo { height: 62px; }
}

/* ---------- Pill buttons ---------- */
.h-pill {
  background: #fff; color: #07090c; border-radius: 999px; border: 0;
  padding: 16px 30px; font-size: 1rem;
  box-shadow: 0 12px 40px -14px rgba(143,176,255,.6);
}
.h-pill:hover { background: #e9eef6; }
.h-pill-ghost {
  background: rgba(255,255,255,.04); color: #fff; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18); padding: 15px 28px; font-size: 1rem;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.h-pill-ghost:hover { border-color: var(--accent-2); }
.h-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* ---------- Shared section bits ---------- */
.h-section { padding: 140px 0; position: relative; }
.h-head { text-align: center; max-width: 720px; margin: 0 auto 72px; }
.h-kicker {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .2em;
  text-transform: uppercase; color: var(--accent-2); margin-bottom: 18px;
}
.h-h2 { font-size: clamp(2.2rem, 5vw, 3.8rem); letter-spacing: -.035em; line-height: 1.02; color: #fff; text-wrap: balance; }
.h-sub { color: rgba(233,237,242,.66); font-size: 1.12rem; margin-top: 18px; text-wrap: pretty; }

/* ---------- Background glow + grid ---------- */
.h-glow {
  position: absolute; left: -10%; right: -10%; top: -120px; height: 980px;
  z-index: -2; pointer-events: none; filter: blur(72px);
  -webkit-mask-image: linear-gradient(#000 40%, transparent 90%);
          mask-image: linear-gradient(#000 40%, transparent 90%);
}
.h-glow span { position: absolute; border-radius: 50%; }
.h-glow .g1 { width: 58%; height: 560px; left: 21%; top: -60px;
  background: radial-gradient(closest-side, rgba(74,110,232,.9), transparent);
  animation: hGlow1 18s ease-in-out infinite alternate; }
.h-glow .g2 { width: 46%; height: 500px; left: -6%; top: 140px;
  background: radial-gradient(closest-side, rgba(30,64,216,.8), transparent);
  animation: hGlow2 22s ease-in-out infinite alternate; }
.h-glow .g3 { width: 44%; height: 460px; right: -6%; top: 80px;
  background: radial-gradient(closest-side, rgba(143,176,255,.5), transparent);
  animation: hGlow3 20s ease-in-out infinite alternate; }
@keyframes hGlow1 { to { transform: translate(-6%, 40px) scale(1.12); } }
@keyframes hGlow2 { to { transform: translate(10%, -30px) scale(1.08); } }
@keyframes hGlow3 { to { transform: translate(-8%, 50px) scale(1.1); } }
.h-gridlines {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .4;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 900px 520px at 50% 45%, #000, transparent 75%);
          mask-image: radial-gradient(ellipse 900px 520px at 50% 45%, #000, transparent 75%);
}
@keyframes hIn { from { opacity: 0; transform: translateY(24px); filter: blur(8px); } to { opacity: 1; transform: none; filter: blur(0); } }

/* ---------- Line drawings (shared by the hero scene and the service art) ----------
   Every stroke uses pathLength="1", so one dash of length 1 hides it until
   .drawn is added. --d staggers each stroke, in seconds. */
.draw svg { overflow: visible; }
.draw .ln {
  fill: none; stroke: #8fb0ff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.6s var(--ease-out) calc(var(--d, 0) * 1s);
}
.draw .ln.thick { stroke-width: 3.2; }
.draw .ln.thin { stroke-width: 1.4; opacity: .85; }
.draw.drawn .ln { stroke-dashoffset: 0; }
.draw .dim path { fill: none; stroke: rgba(255,255,255,.3); stroke-width: 1; }
.draw .dim, .draw .dim-t, .draw .later { opacity: 0; transition: opacity .9s ease 1.7s; }
.draw.drawn .dim, .draw.drawn .dim-t, .draw.drawn .later { opacity: 1; }
.draw .dim-t { fill: rgba(255,255,255,.5); font: 600 11px "Inter", sans-serif; letter-spacing: .08em; }

/* ---------- Hero: blank black, then a job site builds itself in 3D ----------
   The scene is drawn on .hs-canvas by js/home.js. .go starts the HUD,
   .go-copy brings in the headline, .done offers the replay. */
.hs {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column;
  padding: 112px 0 56px;
}
.hs .h-glow { opacity: .42; top: 0; }
.hs-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.hs::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 46%; z-index: -1; pointer-events: none;
  background: linear-gradient(transparent, rgba(0,0,0,.82) 62%, #000);
  opacity: 0; transition: opacity 1.4s ease;
}
.hs.go-copy::after { opacity: 1; }
.hs-inner { width: 100%; flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }

.hs-hud {
  font: 700 .72rem "Inter", sans-serif; letter-spacing: .2em; text-transform: uppercase; color: rgba(143,176,255,.55);
  opacity: 0; transition: opacity .8s ease;
}
.hs.go .hs-hud { opacity: 1; }
.hs-hud-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 12px; }
.hs-hud b { font-weight: 700; color: #8fb0ff; font-variant-numeric: tabular-nums; }
.hs-phase { display: inline-flex; align-items: center; gap: 12px; }
.hs-phase i {
  font-style: normal; color: #07090c; background: #8fb0ff; border-radius: 4px; padding: 2px 7px; letter-spacing: .08em;
  box-shadow: 0 0 18px rgba(143,176,255,.7);
}
.hs-phase b { color: #fff; }
.hs-loc { color: rgba(255,255,255,.34); }
.hs-bar { position: relative; height: 2px; background: rgba(255,255,255,.1); border-radius: 2px; }
.hs-bar i {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent-2), #cfdcff);
  box-shadow: 0 0 14px rgba(143,176,255,.9);
}
.hs-bar span { position: absolute; top: -3px; width: 1px; height: 8px; background: rgba(255,255,255,.28); }

.hs-copy { text-align: center; opacity: 0; transform: translateY(18px); transition: opacity 1s ease, transform 1.1s var(--ease-out); }
.hs.go-copy .hs-copy { opacity: 1; transform: none; }
.hs-title { font-size: clamp(2rem, 4.6vw, 3.6rem); line-height: 1; letter-spacing: -.045em; color: #fff; margin-bottom: 26px; text-wrap: balance; }

.hs-replay {
  position: absolute; right: 24px; bottom: 20px; cursor: pointer;
  font: 700 .68rem "Inter", sans-serif; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(255,255,255,.5); background: none; border: 1px solid rgba(255,255,255,.14); border-radius: 999px; padding: 8px 14px;
  opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility .6s, color .3s, border-color .3s;
}
.hs.done .hs-replay { opacity: 1; visibility: visible; }
/* Finished model can be spun: sideways drags orbit it, vertical swipes still scroll the page. */
.hs.done { cursor: grab; touch-action: pan-y; }
.hs.spinning { cursor: grabbing; user-select: none; -webkit-user-select: none; }
.hs-hint {
  position: absolute; left: 24px; bottom: 28px; pointer-events: none;
  font: 700 .68rem "Inter", sans-serif; letter-spacing: .18em; text-transform: uppercase; color: rgba(143,176,255,.7);
  opacity: 0; transition: opacity .6s ease;
}
.hs-hint::before { content: "\2194"; margin-right: 8px; font-size: 1.1em; letter-spacing: 0; }
.hs.done .hs-hint { opacity: 1; }
.hs-replay:hover { color: #fff; border-color: var(--accent-2); }


/* ---------- Trust + stats ---------- */
.h-trust { padding: 100px 0 120px; text-align: center; }
.h-trust-label { font-size: .86rem; color: rgba(255,255,255,.5); margin-bottom: 22px; }
.h-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 34px; margin-bottom: 90px; }
.h-chips span { font-family: "Archivo", sans-serif; font-weight: 700; font-size: 1.02rem; letter-spacing: .02em; color: rgba(255,255,255,.38); }
.h-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid rgba(255,255,255,.07); border-bottom: 1px solid rgba(255,255,255,.07); }
.h-stat { padding: 46px 16px; position: relative; }
.h-stat + .h-stat::before { content: ""; position: absolute; left: 0; top: 28%; bottom: 28%; width: 1px; background: rgba(255,255,255,.08); }
.h-stat b { display: block; font-family: "Archivo", sans-serif; font-weight: 800; font-size: clamp(2.4rem, 4.6vw, 3.6rem); color: #fff; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.h-stat b em { font-style: normal; color: var(--accent-2); }
.h-stat span { display: block; margin-top: 12px; font-size: .9rem; color: rgba(255,255,255,.55); font-weight: 600; }

/* ---------- Feature rows with line drawings ---------- */
.h-feature { display: grid; grid-template-columns: 1fr 1.1fr; gap: 80px; align-items: center; padding: 56px 0; }
.h-feature.flip .h-art { order: -1; }
.h-num { font-family: "Archivo", sans-serif; font-weight: 700; font-size: .9rem; letter-spacing: .18em; color: var(--accent-2); }
.h-feature h3 { font-size: clamp(2rem, 3.8vw, 3.1rem); letter-spacing: -.035em; color: #fff; margin: 14px 0 18px; text-wrap: balance; }
.h-feature p { color: rgba(233,237,242,.66); font-size: 1.08rem; max-width: 460px; }
.h-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 26px; font-weight: 700; color: #fff; }
.h-link i { font-style: normal; color: var(--accent-2); transition: transform .35s var(--ease-out); }
.h-link:hover i { transform: translateX(6px); }

.h-art {
  position: relative; overflow: hidden; aspect-ratio: 4 / 3; border-radius: 22px;
  border: 1px solid rgba(255,255,255,.08);
  background:
    radial-gradient(circle at 28% 18%, rgba(74,110,232,.18), transparent 58%),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 32px 32px,
    #05070b;
}
.h-art::after {
  content: ""; position: absolute; left: 0; right: 0; top: -140px; height: 140px; pointer-events: none;
  background: linear-gradient(transparent, rgba(143,176,255,.14), transparent);
}
.h-art.drawn::after { animation: hScan 2.6s ease-out .2s 1 forwards; }
@keyframes hScan { to { top: 100%; } }
.h-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.h-art .dash { fill: none; stroke: #fff; stroke-width: 2; stroke-dasharray: 7 7; animation: hMarch 1.4s linear infinite; filter: drop-shadow(0 0 6px rgba(143,176,255,.8)); }
.h-art .add-fill { fill: rgba(255,255,255,.05); }
.h-art .add-t { fill: #fff; font: 700 10px "Inter", sans-serif; letter-spacing: .16em; }
@keyframes hMarch { to { stroke-dashoffset: -28; } }
.h-art.drawn .hook { animation: hBob 3.6s ease-in-out 2.6s infinite alternate; }
@keyframes hBob { to { transform: translateY(14px); } }

/* ---------- Process flow ---------- */
.h-flow { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); }
.h-flow::before, .h-flow::after {
  content: ""; position: absolute; top: 27px; left: 12.5%; height: 2px; border-radius: 2px; z-index: 0;
}
.h-flow::before { right: 12.5%; background: rgba(255,255,255,.09); }
.h-flow::after {
  width: 0; background: linear-gradient(90deg, var(--accent-2), #8fb0ff);
  box-shadow: 0 0 18px rgba(74,110,232,.8); transition: width 2s var(--ease-out) .2s;
}
.h-flow.drawn::after { width: 75%; }
.h-flow-step { position: relative; z-index: 1; text-align: center; padding: 0 16px; }
.h-flow-step .dot {
  width: 56px; height: 56px; margin: 0 auto 26px; border-radius: 50%; display: grid; place-items: center;
  font-family: "Archivo", sans-serif; font-weight: 800; color: #8fb0ff;
  background: #05070b; border: 1px solid rgba(255,255,255,.14); position: relative; z-index: 1;
  transition: background .4s, color .4s, border-color .4s, box-shadow .4s, transform .4s var(--ease-out);
}
.h-flow-step:hover .dot { background: #fff; color: #07090c; border-color: #fff; transform: scale(1.08); box-shadow: 0 0 0 8px rgba(255,255,255,.06); }
.h-flow-step h3 { font-size: 1.2rem; color: #fff; margin-bottom: 10px; }
.h-flow-step p { color: rgba(233,237,242,.6); font-size: .95rem; max-width: 220px; margin: 0 auto; }

/* ---------- Explore tiles ---------- */
.h-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.h-tile {
  position: relative; display: flex; flex-direction: column; min-height: 280px; padding: 34px 30px;
  border-radius: 22px; border: 1px solid rgba(255,255,255,.08); overflow: hidden;
  background: radial-gradient(circle at 100% 0%, rgba(74,110,232,.12), transparent 55%), #07090d;
  transition: transform .55s var(--ease-out), border-color .4s, box-shadow .55s var(--ease-out);
}
.h-tile:hover { transform: translateY(-8px); border-color: rgba(74,110,232,.55); box-shadow: 0 30px 70px -30px rgba(74,110,232,.6); }
.h-tile-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(74,110,232,.14); color: #8fb0ff; margin-bottom: 26px; }
.h-tile-ico svg { width: 24px; height: 24px; }
.h-tile h3 { font-size: 1.4rem; color: #fff; margin-bottom: 10px; }
.h-tile p { color: rgba(233,237,242,.6); font-size: .98rem; }
.h-tile .go {
  margin-top: auto; align-self: flex-end; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid rgba(255,255,255,.16); color: #fff;
  transition: background .35s, color .35s, transform .45s var(--ease-out);
}
.h-tile:hover .go { background: #fff; color: #07090c; transform: rotate(-45deg); }

/* ---------- Closing CTA ---------- */
.h-cta { position: relative; overflow: hidden; isolation: isolate; padding: 170px 0; text-align: center; }
.h-cta::before {
  content: ""; position: absolute; left: 50%; bottom: -320px; width: 1100px; height: 640px; z-index: -1;
  transform: translateX(-50%); border-radius: 50%; filter: blur(80px);
  background: radial-gradient(closest-side, rgba(74,110,232,.75), rgba(30,64,216,.35) 55%, transparent);
  animation: hCtaGlow 12s ease-in-out infinite alternate;
}
@keyframes hCtaGlow { to { transform: translateX(-50%) scale(1.15); opacity: .8; } }
.h-cta .h-actions { margin-top: 40px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .h-feature, .h-feature.flip { grid-template-columns: 1fr; gap: 40px; }
  .h-feature.flip .h-art { order: 0; }
  .h-stats { grid-template-columns: repeat(2, 1fr); }
  .h-stat:nth-child(3)::before { display: none; }
  .h-flow { grid-template-columns: repeat(2, 1fr); gap: 48px 0; }
  .h-flow::before, .h-flow::after { display: none; }
  .h-tiles { grid-template-columns: 1fr; }
  .h-tile { min-height: 0; }
  .h-tile .go { margin-top: 24px; }
}
@media (max-width: 680px) {
  .hs { padding: 100px 0 64px; }
  .hs-loc { display: none; }
  .hs-hud { font-size: .64rem; letter-spacing: .14em; }
  .hs-replay { right: 16px; bottom: 14px; }
  .hs-hint { left: 16px; bottom: 23px; font-size: .6rem; letter-spacing: .12em; }
  .h-section { padding: 100px 0; }
  .h-actions .btn { width: 100%; justify-content: center; }
  .h-chips { gap: 8px 22px; margin-bottom: 64px; }
  .h-flow { grid-template-columns: 1fr; }
  .h-cta { padding: 120px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .h-glow span, .h-art .dash, .h-cta::before, .h-art.drawn .hook, .h-art.drawn::after { animation: none; }
  .draw .ln { transition: none; stroke-dashoffset: 0; }
  .draw .dim, .draw .dim-t, .draw .later, .hs-copy, .hs-hud, .hs-hint, .hs::after { transition: none; }
  .h-flow::after { transition: none; width: 75%; }
}
