/* ── Home hero visual: 3D orbit around the logo mark ──
   --rx / --ry (−1..1) come from the cursor, set by hero-scene.js */
.hs {
    --rx: 0; --ry: 0; --tilt: 64deg; --scale: 1;
    position: relative;
    height: min(58vh, 500px);
    min-height: 360px;
    perspective: 1400px;
    display: flex; align-items: center; justify-content: center;
    user-select: none;
}
@media (max-width: 1199px) { .hs { --scale: .85; } }
@media (max-width: 575px)  { .hs { --scale: .52; min-height: 300px; height: 300px; } }

.hs-glow {
    position: absolute; inset: 8% 10%;
    background: radial-gradient(closest-side, rgba(58, 227, 249, .35), rgba(131, 253, 223, .15) 55%, transparent 75%);
    filter: blur(30px);
    animation: hsGlow 8s ease-in-out infinite;
}
@keyframes hsGlow { 50% { transform: scale(1.08); opacity: .8; } }

.hs-fit { transform: scale(var(--scale)); transform-style: preserve-3d; }
.hs-tilt {
    position: relative; width: 0; height: 0;
    transform-style: preserve-3d;
    transform: rotateX(calc(var(--ry) * -6deg)) rotateY(calc(var(--rx) * 8deg));
}

/* the orbital plane is laid back so circles read as ellipses */
.hs-plane { position: absolute; left: 0; top: 0; transform-style: preserve-3d; transform: rotateX(var(--tilt)); }

.hs-ring {
    position: absolute; border-radius: 50%;
    width: calc(var(--r) * 2); height: calc(var(--r) * 2);
    left: calc(var(--r) * -1); top: calc(var(--r) * -1);
    border: 1.5px dashed rgba(31, 178, 237, .35);
}
.hs-ring-1 { --r: 170px; }
.hs-ring-2 { --r: 250px; border-style: solid; border-color: rgba(53, 218, 214, .25); }
.hs-ring-3 { --r: 320px; border-color: rgba(31, 178, 237, .12); }
.hs-ring-1 { animation: hsSpin 60s linear infinite; }
.hs-ring-3 { animation: hsSpin 90s linear infinite reverse; }

.hs-shadow {
    position: absolute; width: 260px; height: 260px; left: -130px; top: -130px; border-radius: 50%;
    background: radial-gradient(closest-side, rgba(31, 178, 237, .28), transparent);
    filter: blur(10px);
}

/* orbits: the ring spins, each satellite counter-spins, the face stands back up toward the viewer */
.hs-orbit { position: absolute; left: 0; top: 0; transform-style: preserve-3d; animation: hsSpin var(--dur) linear infinite; }
.hs-orbit-inner { --r: 170px; --dur: 26s; }
.hs-orbit-outer { --r: 250px; --dur: 40s; animation-direction: reverse; }
.hs-sat { position: absolute; left: 0; top: 0; transform-style: preserve-3d; transform: rotate(var(--a)) translateX(var(--r)) rotate(calc(var(--a) * -1)); }
.hs-sat-in { transform-style: preserve-3d; animation: hsSpin var(--dur) linear infinite reverse; }
.hs-orbit-outer .hs-sat-in { animation-direction: normal; }
.hs-face { transform-style: preserve-3d; transform: rotateX(calc(var(--tilt) * -1)); }
@keyframes hsSpin { to { transform: rotate(360deg); } }

/* cards */
.hs-card {
    position: absolute; width: var(--w); height: var(--h);
    left: calc(var(--w) / -2); top: calc(var(--h) / -2);
    background: #fff; border-radius: 16px;
    box-shadow: 0 24px 40px -18px rgba(13, 60, 80, .35), 0 0 0 1px rgba(31, 178, 237, .12);
    animation: hsBob 5s ease-in-out infinite;
}
@keyframes hsBob { 50% { translate: 0 -8px; } }
.hs-chip { --w: 62px; --h: 62px; display: flex; align-items: center; justify-content: center; font-size: 1.35rem; }
.hs-chip i, .hs-code {
    background: linear-gradient(135deg, #35dad6, #1fb2ed); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hs-code { font-weight: 800; font-size: 1.1rem; letter-spacing: -.04em; }

.hs-phone { --w: 62px; --h: 112px; border-radius: 16px; padding: 14px 7px 7px; display: flex; flex-direction: column; gap: 5px; }
.hs-notch { position: absolute; top: 5px; left: 50%; translate: -50% 0; width: 20px; height: 4px; border-radius: 4px; background: #e3eef1; }
.hs-block { display: block; height: 30px; border-radius: 7px; background: linear-gradient(135deg, #83fddf, #3ae3f9); }
.hs-line { display: block; height: 5px; border-radius: 4px; background: #e3eef1; }
.hs-line.short { width: 60%; }
.hs-tabbar { margin-top: auto; display: flex; justify-content: space-around; }
.hs-tabbar i { width: 6px; height: 6px; border-radius: 50%; background: #cfe3e8; }
.hs-tabbar i:first-child { background: #1fb2ed; }

.hs-browser { --w: 132px; --h: 88px; padding: 8px; display: flex; flex-direction: column; gap: 6px; animation-delay: -2s; }
.hs-dots { display: flex; gap: 4px; }
.hs-dots i { width: 6px; height: 6px; border-radius: 50%; background: #ffb4a8; }
.hs-dots i:nth-child(2) { background: #ffe08a; }
.hs-dots i:nth-child(3) { background: #9be7b4; }
.hs-browser .hs-block { height: 26px; }
.hs-cols { display: flex; gap: 5px; }
.hs-cols i { flex: 1; height: 18px; border-radius: 5px; background: #eef5f7; }

/* centre: a small live app that draws its chart, flips a toggle and gets a notification */
.hs { --amber: #FFB938; --amber-deep: #F5A623; }
.hs-core { position: absolute; left: 0; top: 0; transform-style: preserve-3d; transform: translateZ(1px); }
.hs-app {
    position: absolute; width: 250px; left: -125px; top: -120px;
    padding: 12px 14px 14px; border-radius: 22px; background: #fff;
    box-shadow: 0 40px 60px -24px rgba(13, 60, 80, .4), 0 0 0 1px rgba(31, 178, 237, .1);
    display: flex; flex-direction: column; gap: 10px;
    animation: hsFloat 6s ease-in-out infinite;
}
@keyframes hsFloat { 50% { translate: 0 -10px; } }
.hs-app-top { display: flex; align-items: center; gap: 10px; }
.hs-app-url { flex: 1; height: 8px; border-radius: 6px; background: #eef5f7; }
.hs-app-head { display: flex; align-items: center; gap: 10px; }
.hs-avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #83fddf, #3ae3f9); flex: none; }
.hs-app-title { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.hs-app-title .hs-line.short { width: 55%; }
.hs-toggle { width: 34px; height: 20px; border-radius: 20px; background: #3ae3f9; position: relative; flex: none; animation: hsToggleBg 8s infinite; }
.hs-toggle i { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); animation: hsToggleKnob 8s infinite; }
@keyframes hsToggleBg { 0%, 46% { background: #cfe3e8; } 50%, 92% { background: var(--amber); } 96%, 100% { background: #cfe3e8; } }
@keyframes hsToggleKnob { 0%, 46% { transform: translateX(0); } 50%, 92% { transform: translateX(14px); } 96%, 100% { transform: translateX(0); } }

.hs-chart { width: 100%; height: 64px; overflow: visible; }
.hs-curve { fill: none; stroke: var(--amber-deep); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 100; animation: hsDraw 8s ease-in-out infinite; }
.hs-area { animation: hsArea 8s ease-in-out infinite; }
@keyframes hsDraw { 0% { stroke-dashoffset: 100; } 35%, 88% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes hsArea { 0%, 20% { opacity: 0; } 40%, 88% { opacity: 1; } 100% { opacity: 0; } }

.hs-bars { display: flex; align-items: flex-end; gap: 6px; height: 34px; }
.hs-bars i { flex: 1; height: 100%; border-radius: 5px; background: linear-gradient(#3ae3f9, #83fddf); transform-origin: bottom; animation: hsBar 3.2s ease-in-out infinite; animation-delay: var(--d); }
.hs-bars i:nth-child(4) { background: linear-gradient(var(--amber), #ffd98a); }
@keyframes hsBar { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }

/* notification ping after the "click" */
.hs-ping {
    position: absolute; left: 100px; top: -138px; z-index: 2;
    padding: 4px 10px; border-radius: 999px; font-size: .8rem; font-weight: 800; color: #5a3b00;
    background: linear-gradient(135deg, #ffd27a, var(--amber));
    box-shadow: 0 10px 20px -8px rgba(245, 166, 35, .7);
    opacity: 0; animation: hsPing 8s ease-out infinite;
}
@keyframes hsPing { 0%, 49% { opacity: 0; transform: translateY(8px) scale(.6); } 54% { opacity: 1; transform: translateY(0) scale(1.08); } 58%, 80% { opacity: 1; transform: translateY(0) scale(1); } 90%, 100% { opacity: 0; transform: translateY(-14px) scale(.9); } }

/* a cursor drifts in, taps the toggle, drifts away */
.hs-cursor { position: absolute; width: 22px; height: 22px; left: 0; top: 0; z-index: 3; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .2)); animation: hsCursor 8s cubic-bezier(.6, 0, .3, 1) infinite; }
@keyframes hsCursor {
    0%   { transform: translate(140px, 70px); opacity: 0; }
    12%  { opacity: 1; }
    40%  { transform: translate(84px, -72px); }
    46%  { transform: translate(84px, -72px) scale(.82); }
    50%  { transform: translate(84px, -72px) scale(1); }
    70%  { transform: translate(84px, -72px); opacity: 1; }
    90%  { transform: translate(160px, 30px); opacity: 0; }
    100% { transform: translate(160px, 30px); opacity: 0; }
}

/* amber accents in the orbit */
.hs-chip-amber i { background: linear-gradient(135deg, #ffcf6b, var(--amber-deep)); -webkit-background-clip: text; background-clip: text; }
.hs-planet { position: absolute; width: 18px; height: 18px; left: -9px; top: -9px; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #ffe3a3, var(--amber) 55%, var(--amber-deep));
    box-shadow: 0 0 18px rgba(255, 185, 56, .7); }
.hs-glow::after { content: ''; position: absolute; width: 45%; height: 45%; right: 2%; top: 4%; border-radius: 50%;
    background: radial-gradient(closest-side, rgba(255, 185, 56, .28), transparent); }

/* intro: hidden until hero-scene.js plays it; idle loops wait until the intro is done */
.hs.is-intro .hs-app, .hs.is-intro .hs-app *, .hs.is-intro .hs-ping, .hs.is-intro .hs-cursor, .hs.is-intro .hs-ring { animation: none !important; }
.hs.is-intro .hs-curve { stroke-dashoffset: 100; }
.hs.is-pre .hs-ring, .hs.is-pre .hs-card, .hs.is-pre .hs-core { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
    .hs * { animation: none !important; }
    .hs-ping, .hs-cursor { display: none; }
    .hs.is-pre .hs-ring, .hs.is-pre .hs-card, .hs.is-pre .hs-core { opacity: 1; }
}

/* ── Hero headline: amber swash + twinkles (subtle fun) ── */
.hero-dev { position: relative; display: block; width: fit-content; }
.hero-swash { position: absolute; left: 2%; right: 0; bottom: -.12em; width: 98%; height: .28em; overflow: visible; }
.hero-swash path {
    fill: none; stroke: #FFB938; stroke-width: 5; stroke-linecap: round;
    stroke-dasharray: 100; stroke-dashoffset: 100;
    animation: heroSwash 1.1s cubic-bezier(.65, 0, .35, 1) 1s forwards;
}
@keyframes heroSwash { to { stroke-dashoffset: 0; } }
.hero-spark {
    position: absolute; right: -.55em; top: -.05em;
    font-size: .38em; line-height: 1; color: #FFB938;
    text-shadow: 0 0 12px rgba(255, 185, 56, .7);
    animation: heroTwinkle 3.2s ease-in-out infinite;
}
.hero-spark-sm { right: -.95em; top: .5em; font-size: .22em; color: #35dad6; text-shadow: 0 0 10px rgba(53, 218, 214, .7); animation-delay: -1.6s; }
@keyframes heroTwinkle { 0%, 100% { transform: scale(.4) rotate(0deg); opacity: .2; } 50% { transform: scale(1) rotate(90deg); opacity: 1; } }

/* the primary hero button gets a warm hover glow */
.hero-section--home .hero-btn-primary:hover { box-shadow: 0 10px 28px -10px rgba(255, 185, 56, .9); }

@media (prefers-reduced-motion: reduce) {
    .hero-swash path { animation: none; stroke-dashoffset: 0; }
    .hero-spark { animation: none; opacity: .8; transform: none; }
}

/* ── Quieter hiring badge on the home hero ── */
.hero-section--home .hiring-badge-ring { padding: 0; animation: none; overflow: visible; }
.hero-section--home .hiring-badge-ring::before,
.hero-section--home .hiring-sparkle { display: none; }
.hero-section--home .hiring-badge--fun {
    min-width: 0;
    min-height: 34px;
    padding: 6px 14px 6px 12px;
    grid-template-columns: .75rem minmax(8.5rem, 1fr) .75rem;
    column-gap: .5rem;
    border: 1px solid rgba(31, 178, 237, .18);
    background: rgba(255, 255, 255, .55);
    backdrop-filter: blur(8px);
    box-shadow: 0 6px 18px -12px rgba(13, 60, 80, .35);
    transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.hero-section--home .hiring-text-rotator { min-width: 8.5rem; --hiring-line-h: 1rem; }
.hero-section--home .hiring-text-track span { font-size: .8rem; font-weight: 600; }
.hero-section--home .hiring-dot::before,
.hero-section--home .hiring-badge--fun .hiring-dot::after { width: 6px; height: 6px; background: #FFB938; }
.hero-section--home .hiring-badge--fun .hiring-dot::after { margin: -3px 0 0 -3px; }
.hero-section--home .hiring-arrow { font-size: .7rem; opacity: .6; transition: transform .25s ease, opacity .25s ease; }
.hero-section--home .hiring-badge-link--fun:hover .hiring-badge--fun {
    background: #fff; border-color: rgba(31, 178, 237, .35);
    box-shadow: 0 10px 22px -12px rgba(13, 60, 80, .45);
}
.hero-section--home .hiring-badge-link--fun:hover .hiring-arrow { transform: translateX(3px); opacity: 1; }

/* ── Hero always fills the first screen ── */
.hero-section--home {
    min-height: calc(100svh - var(--site-header-offset, 7.5rem));
    display: flex;
    align-items: center;
    padding-top: 0;
    padding-bottom: 4.5rem;
}
.hero-section--home > .container { width: 100%; }
.hero-section--home .row { padding-bottom: 0 !important; }

/* short laptop screens: tighten so everything fits above the fold */
@media (min-width: 992px) and (max-height: 860px) {
    .hero-section--home h1 { font-size: clamp(3rem, 7.2vh, 4.5rem); }
    .hero-section--home .hero-subtext { line-height: 1.65; }
    .hero-section--home .hero-cta-group { padding-top: 1.25rem; }
    .hero-section--home .hero-trust-pills { margin-top: 1.5rem; padding-top: 1.25rem; }
    .hs { height: min(56vh, 460px); min-height: 320px; --scale: .85; }
}

/* phones: the bottom nav bar takes ~84px; keep text first, visual compact */
@media (max-width: 960px) {
    .hero-section--home { min-height: calc(100svh - 84px - env(safe-area-inset-bottom)); padding-bottom: 3.5rem; }
}
@media (max-width: 575px) {
    .hero-section--home .text-center.mb-3 { margin-bottom: .75rem !important; }
    .hero-section--home h1 { font-size: 2.35rem; line-height: 1.12; }
    .hero-section--home .hero-subtext { font-size: .95rem; line-height: 1.6; padding-top: .75rem !important; }
    .hero-section--home .hero-cta-group { flex-direction: row; gap: .6rem; padding-top: 1.1rem; }
    .hero-section--home .hero-btn { flex: 1 1 0; width: auto; padding: .8rem .5rem; font-size: .85rem; justify-content: center; }
    .hero-section--home .hero-trust-pills { margin-top: 1.1rem; padding-top: 1rem; gap: .4rem; }
    .hero-section--home .hero-trust-pill { font-size: .72rem; padding: .35rem .7rem; }
    .hero-section--home .col-12.pt-5 { padding-top: .5rem !important; }
    .hs { --scale: .44; height: 230px; min-height: 230px; }
}

/* ── Scroll indicator ── */
.hero-scroll {
    position: absolute; left: 50%; bottom: 1.1rem; z-index: 3;
    translate: -50% 0;
    display: flex; flex-direction: column; align-items: center; gap: .45rem;
    color: var(--secondary-text) !important; text-decoration: none;
    opacity: .75; transition: opacity .3s ease, transform .3s ease;
    animation: heroScrollIn .8s ease 2.2s both;
}
.hero-scroll:hover .hero-scroll-mouse { border-color: rgba(13, 18, 19, .6); }
.hero-scroll.is-gone { animation: none; opacity: 0; pointer-events: none; }
.hero-scroll-mouse {
    position: relative; width: 22px; height: 34px; border-radius: 12px;
    border: 1.5px solid rgba(13, 18, 19, .35);
}
.hero-scroll-mouse i {
    position: absolute; left: 50%; top: 7px; width: 4px; height: 7px; margin-left: -2px;
    border-radius: 3px; background: #FFB938;
    animation: heroScrollDot 1.8s cubic-bezier(.65, 0, .35, 1) infinite;
}
.hero-scroll-label { font-size: .62rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; }
@keyframes heroScrollDot { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 70% { transform: translateY(11px); opacity: 0; } 100% { transform: translateY(11px); opacity: 0; } }
@keyframes heroScrollIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: .75; transform: none; } }
@media (max-width: 575px) {
    .hero-scroll { bottom: .6rem; }
    .hero-scroll-label { display: none; }
    .hero-scroll-mouse { width: 18px; height: 28px; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-scroll, .hero-scroll-mouse i { animation: none; }
}

/* short phones (iPhone SE / mini): shrink the visual so the whole hero fits above the bottom bar */
@media (max-width: 575px) and (max-height: 760px) {
    .hero-section--home { padding-bottom: 2.75rem !important; }
    .hero-section--home h1 { font-size: 2.1rem; }
    .hero-section--home .hero-subtext { font-size: .9rem; }
    .hero-section--home .hero-trust-pills { margin-top: .9rem; padding-top: .8rem; }
    .hs { --scale: .38; height: 188px; min-height: 188px; }
    .hero-scroll { display: none; }
}

/* phones: one clear focal point instead of a crowded miniature orbit */
@media (max-width: 575px) {
    .hs-orbit .hs-card, .hs-ring-3 { display: none; }
    .hs { --scale: .74; --tilt: 70deg; height: 230px; min-height: 230px; }
    .hs-ring-1 { --r: 150px; }
    .hs-ring-2 { --r: 205px; }
    .hs-orbit-inner { --r: 150px; }
    .hs-orbit-outer { --r: 205px; }
    .hs-glow { inset: 0 18%; }
}
@media (max-width: 575px) and (max-height: 760px) {
    .hs { --scale: .56; height: 158px; min-height: 158px; }
}
@media (max-width: 575px) and (min-height: 761px) {
    .hero-section--home .text-center.mb-3 { margin-bottom: 1.25rem !important; }
    .hero-section--home .hero-subtext { padding-top: 1rem !important; line-height: 1.7; }
    .hero-section--home .hero-cta-group { padding-top: 1.5rem; }
    .hero-section--home .hero-trust-pills { margin-top: 1.5rem; padding-top: 1.25rem; }
    .hero-section--home .col-12.pt-5 { padding-top: 1rem !important; }
}
