* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --sky-1: #d7ecfe;
    --sky-2: #c0dffc;
    --blue:  #2563eb;
    --blue-deep: #1d4ed8;
    --blue-soft: #93c5fd;
    --lime:  #d4f543;
    --lime-deep: #b9dc30;
    --navy:  #0f172a;
    --navy-muted: rgba(15, 23, 42, 0.65);
    --white: #ffffff;
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.1);
}

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--sky-1);
    color: var(--navy);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.back-link {
    position: fixed;
    bottom: 0.75rem;
    left: 0.75rem;
    z-index: 1000;
    color: var(--navy);
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    padding: 0.45rem 0.9rem;
    background: var(--white);
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    opacity: 0.85;
    transition: opacity 0.3s, transform 0.3s;
}
.back-link:hover { opacity: 1; transform: translateY(-2px); }

/* =========================================================
   LOADER — Sonar signal
   ========================================================= */
.loader {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: var(--sky-1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
}

.loader__sonar {
    position: relative;
    width: 240px;
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.loader__logo {
    position: relative;
    z-index: 2;
    width: 80px;
    height: 80px;
}
.loader__pulses {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.loader__pulses span {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--blue);
    opacity: 0;
    will-change: transform, opacity;
}

.loader__meta {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    color: var(--navy-muted);
}
.loader__counter {
    color: var(--blue);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    min-width: 3ch;
}

/* =========================================================
   SAAS SECTION
   ========================================================= */
.saas {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 720px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--sky-1) 0%, var(--sky-2) 100%);
}

/* Decorative curves */
.curves {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    z-index: 1;
    pointer-events: none;
}
.curves path {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
}

/* ---------- Top nav (floating pill) ---------- */
.topnav {
    position: relative;
    z-index: 30;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: center;
}
.topnav__pill {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: var(--white);
    border-radius: 999px;
    padding: 0.65rem 0.75rem 0.65rem 1.5rem;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
    max-width: 1100px;
    width: 100%;
}

.topnav__logo {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    color: var(--navy);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
    will-change: transform;
}
.topnav__logo-mark { width: 32px; height: 32px; }
.topnav__logo-mark svg { width: 100%; height: 100%; display: block; }

.topnav__links {
    display: flex;
    gap: 1.75rem;
    margin-left: auto;
}
.topnav__links a {
    position: relative;
    color: var(--navy);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.3rem 0.1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    will-change: transform;
}
.caret {
    font-size: 0.7em;
    color: var(--blue);
    transition: transform 0.3s;
    display: inline-block;
}
.topnav__links a:hover .caret { transform: translateY(2px); }
.topnav__links a::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 100%; height: 2px;
    background: var(--blue);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
    border-radius: 2px;
}
.topnav__links a:hover::after { transform: scaleX(1); transform-origin: left; }

.topnav__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--lime);
    color: var(--navy);
    text-decoration: none;
    padding: 0.85rem 1.5rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
    will-change: transform;
    transition: background 0.3s;
    position: relative;
    overflow: hidden;
}
.topnav__cta svg { width: 15px; height: 15px; transition: transform 0.3s ease; }
.topnav__cta:hover { background: var(--lime-deep); }
.topnav__cta:hover svg { transform: translateX(4px); }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 3rem;
    padding: 2rem 4rem 4rem;
    align-items: center;
    min-height: calc(100vh - 100px);
}

/* LEFT */
.hero__left { max-width: 580px; }

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.28em;
    color: var(--blue);
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}
.hero__eyebrow-line {
    display: inline-block;
    width: 40px;
    height: 2px;
    background: var(--blue);
    transform-origin: left;
}

.hero__title {
    font-size: clamp(2.2rem, 4.3vw, 3.75rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.02em;
    color: var(--navy);
    margin-bottom: 1.5rem;
}
.hero__line {
    display: block;
    overflow: hidden;
    padding-bottom: 0.04em;
}
.hero__char {
    display: inline-block;
    will-change: transform, color;
    transition: color 0.3s ease;
}
.hero__char.is-space { width: 0.25em; }

.hero__desc {
    font-size: 1rem;
    line-height: 1.55;
    color: var(--navy-muted);
    margin-bottom: 2rem;
    max-width: 460px;
}

.hero__cta-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.btn-primary {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--blue);
    color: var(--white);
    text-decoration: none;
    padding: 1rem 2.25rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    overflow: hidden;
    will-change: transform;
    transition: background 0.3s;
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.3);
}
.btn-primary__label { position: relative; z-index: 2; }
.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--navy);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.45s cubic-bezier(0.65, 0, 0.35, 1);
    z-index: 1;
}
.btn-primary:hover::before { transform: scaleY(1); transform-origin: top; }

.phone {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    color: var(--navy);
    text-decoration: none;
    will-change: transform;
}
.phone__icon {
    position: relative;
    width: 50px; height: 50px;
    border-radius: 50%;
    background: var(--lime);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--navy);
    flex-shrink: 0;
}
.phone__icon svg { width: 20px; height: 20px; position: relative; z-index: 2; }
.phone__ring {
    position: absolute;
    inset: -6px;
    border: 2px solid var(--lime);
    border-radius: 50%;
    opacity: 0.5;
}
.phone__label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--navy-muted);
    letter-spacing: 0.18em;
    margin-bottom: 0.15rem;
}
.phone__number {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy);
}

/* RIGHT — photo + badges */
.hero__right {
    position: relative;
    min-height: 540px;
}

.hero__photo-shape {
    position: absolute;
    top: -6%;
    right: -4%;
    width: 115%;
    height: 110%;
    background: var(--white);
    border-radius: 55% 40% 50% 45% / 45% 55% 50% 50%;
    opacity: 0.4;
    will-change: transform;
    z-index: 1;
}

.hero__photo {
    position: absolute;
    inset: 0;
    z-index: 2;
    overflow: hidden;
    border-radius: 48% 40% 44% 52% / 42% 50% 50% 48%;
    will-change: transform;
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.15);
}
.hero__photo img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center 22%;
    user-select: none;
    transition: transform 0.6s ease;
}
.hero__photo:hover img { transform: scale(1.05); }

/* Rotating badge */
.badge {
    position: absolute;
    left: -70px;
    top: 46%;
    width: 160px;
    height: 160px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: 50%;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.15);
    text-decoration: none;
    will-change: transform;
}
.badge svg:first-child {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    will-change: transform;
}
.badge__logo {
    position: relative;
    z-index: 2;
    width: 46px;
    height: 46px;
}

/* Stripe circle */
.stripes {
    position: absolute;
    right: -20px;
    bottom: 12%;
    width: 90px;
    height: 90px;
    z-index: 5;
    will-change: transform;
    opacity: 0.85;
}
.stripes svg { width: 100%; height: 100%; }

/* ---------- Initial hidden states ---------- */
[data-magnetic], [data-link], [data-fade], [data-eyebrow], [data-phone], [data-read],
[data-title-line] .hero__char, [data-badge], [data-stripes], [data-shape] { opacity: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .hero { grid-template-columns: 1fr; padding: 2rem 2rem 3rem; }
    .hero__right { min-height: 380px; max-width: 500px; margin: 0 auto; }
    .badge { left: -30px; top: 40%; width: 130px; height: 130px; }
    .topnav__links { display: none; }
}
@media (max-width: 760px) {
    .topnav__pill { padding: 0.5rem 0.5rem 0.5rem 1.25rem; }
    .topnav__cta { padding: 0.65rem 1.2rem; font-size: 0.85rem; }
    .topnav__logo-text { font-size: 1.1rem; }
    .hero__cta-row { gap: 1rem; }
    .btn-primary { padding: 0.85rem 1.75rem; font-size: 0.9rem; }
    .badge { width: 100px; height: 100px; left: -20px; }
    .stripes { width: 60px; height: 60px; right: 0; }
}
@media (max-width: 480px) {
    .hero { padding: 1rem 1.25rem 2rem; }
    .hero__right { min-height: 320px; }
    .phone__label { font-size: 0.6rem; }
    .phone__number { font-size: 0.85rem; }
    .phone__icon { width: 42px; height: 42px; }
    .badge { display: none; }
}
