/* AppIT Online — site styles. No build step, no external fonts (GDPR-friendly, fast). */

:root {
    --bg: #07080d;
    --bg-alt: #0c0e16;
    --surface: rgba(255, 255, 255, 0.035);
    --surface-hover: rgba(255, 255, 255, 0.07);
    --border: rgba(255, 255, 255, 0.08);
    --text: #eef0f6;
    --muted: #9aa3b8;
    --accent: #8b5cf6;
    --accent-2: #22d3ee;
    --grad: linear-gradient(120deg, #a78bfa 0%, #8b5cf6 35%, #22d3ee 100%);
    --radius: 20px;
    --radius-sm: 12px;
    --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
    --max: 1180px;
    --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
    --header-bg: rgba(7, 8, 13, 0.7);
    --menu-bg: rgba(7, 8, 13, 0.96);
    --title-top: #ffffff;
    --grid-line: rgba(255, 255, 255, 0.035);
    --marquee-2: #3b4256;
    color-scheme: dark;
}

:root[data-theme="light"] {
    --bg: #f7f8fb;
    --bg-alt: #eef0f5;
    --surface: rgba(10, 12, 20, 0.035);
    --surface-hover: rgba(10, 12, 20, 0.07);
    --border: rgba(10, 12, 20, 0.1);
    --text: #0b0c12;
    --muted: #5b6275;
    --accent-2: #0891b2;
    --header-bg: rgba(247, 248, 251, 0.75);
    --menu-bg: rgba(247, 248, 251, 0.97);
    --title-top: #0b0c12;
    --grid-line: rgba(10, 12, 20, 0.05);
    --marquee-2: #c4cad6;
    color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
      --bg: #f7f8fb;
      --bg-alt: #eef0f5;
      --surface: rgba(10, 12, 20, 0.035);
      --surface-hover: rgba(10, 12, 20, 0.07);
      --border: rgba(10, 12, 20, 0.1);
      --text: #0b0c12;
      --muted: #5b6275;
      --accent-2: #0891b2;
      --header-bg: rgba(247, 248, 251, 0.75);
      --menu-bg: rgba(247, 248, 251, 0.97);
      --title-top: #0b0c12;
      --grid-line: rgba(10, 12, 20, 0.05);
      --marquee-2: #c4cad6;
      color-scheme: light;
}
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img,
svg,
canvas { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

h1, h2, h3 {
    margin: 0 0 0.5em;
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-weight: 800;
}

p { margin: 0 0 1em; color: var(--muted); }

:focus-visible {
    outline: 2px solid var(--accent-2);
    outline-offset: 3px;
    border-radius: 6px;
}

.container {
    width: min(100% - 2.5rem, var(--max));
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -100px;
    z-index: 100;
    padding: 0.5rem 1rem;
    background: var(--text);
    color: var(--bg);
    border-radius: 8px;
}
.skip-link:focus { top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.975rem;
    border: 1px solid transparent;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
    cursor: pointer;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
    background: var(--text);
    color: var(--bg);
    box-shadow: 0 10px 30px -10px rgba(139, 92, 246, 0.7);
}
.btn-primary:hover { box-shadow: 0 16px 40px -10px rgba(34, 211, 238, 0.55); }
.btn-ghost {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
    backdrop-filter: blur(10px);
}
.btn-ghost:hover { background: var(--surface-hover); }
.btn-sm { padding: 0.5rem 1.1rem; font-size: 0.9rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }

/* ---------- Header / nav ---------- */
.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    transition: background 0.3s, backdrop-filter 0.3s, border-color 0.3s;
    border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
    background: var(--header-bg);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-color: var(--border);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}


.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.nav-menu a:not(.btn) {
    display: block;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.925rem;
    transition: color 0.2s, background 0.2s;
}
.nav-menu a:not(.btn):hover { color: var(--text); background: var(--surface-hover); }
.nav-menu .btn { margin-left: 0.5rem; }

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    background: none;
    border: 0;
    cursor: pointer;
    position: relative;
}
.nav-toggle span {
    position: absolute;
    left: 10px;
    right: 10px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s var(--ease), opacity 0.2s;
}
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 25px; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding: 120px 0 90px;
    overflow: hidden;
    isolation: isolate;
}

.hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.hero-glow {
    position: absolute;
    inset: -20% -10% auto -10%;
    height: 90%;
    z-index: -1;
    background:
        radial-gradient(45% 55% at 75% 20%, rgba(139, 92, 246, 0.22), transparent 70%),
        radial-gradient(35% 45% at 15% 0%, rgba(34, 211, 238, 0.10), transparent 70%);
    filter: blur(30px);
}

.eyebrow {
    display: inline-block;
    margin-bottom: 1.25rem;
    padding: 0.35rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-title {
    font-size: clamp(2.9rem, 1.2rem + 6vw, 6.25rem);
    font-weight: 600;
    letter-spacing: -0.045em;
    line-height: 1;
    margin-bottom: 1.5rem;
    max-width: 13ch;
    text-wrap: balance;
}

/* Silver-to-white sheen: premium, not playful */
.sheen {
    background: linear-gradient(180deg, var(--title-top) 25%, #8a92a8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-lead {
    font-size: clamp(1.05rem, 1rem + 0.5vw, 1.3rem);
    max-width: 60ch;
    color: var(--muted);
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 2rem 0 3rem;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem 3rem;
    margin: 0;
    padding: 1.5rem 0 0;
    list-style: none;
    border-top: 1px solid var(--border);
    max-width: 720px;
}
.hero-stats li { display: flex; flex-direction: column; gap: 0.2rem; }
.hero-stats strong {
    font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}
.hero-stats li > span:last-child { color: var(--muted); font-size: 0.9rem; }

.scroll-hint {
    position: absolute;
    left: 50%;
    bottom: 28px;
    width: 26px;
    height: 42px;
    margin-left: -13px;
    border: 1px solid var(--border);
    border-radius: 14px;
}
.scroll-hint span {
    position: absolute;
    left: 50%;
    top: 8px;
    width: 4px;
    height: 8px;
    margin-left: -2px;
    border-radius: 2px;
    background: var(--text);
    animation: wheel 1.8s var(--ease) infinite;
}
@keyframes wheel {
    0%   { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(14px); opacity: 0; }
}

/* ---------- Marquee ---------- */
.marquee {
    overflow: hidden;
    border-block: 1px solid var(--border);
    background: var(--bg-alt);
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 38s linear infinite;
}
.marquee-track span {
    padding: 1.1rem 1.75rem;
    font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
    font-weight: 700;
    color: var(--marquee-2);
    white-space: nowrap;
}
.marquee-track span:nth-child(odd) { color: var(--muted); }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee {
    to { transform: translateX(-50%); }
}

/* ---------- Sections ---------- */
.section {
    padding: clamp(5rem, 4rem + 6vw, 9rem) 0;
    position: relative;
}
.section-alt { background: var(--bg-alt); }

.section-head {
    max-width: 720px;
    margin-bottom: clamp(2.5rem, 2rem + 3vw, 4rem);
}
.section-head h2,
.split h2,
.contact h2 {
    font-size: clamp(2rem, 1.3rem + 3vw, 3.5rem);
    margin-bottom: 0.6em;
}
.section-head p:last-child { font-size: 1.1rem; margin-bottom: 0; }

.lead {
    font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem);
    color: var(--text);
    opacity: 0.85;
}

.grid {
    display: grid;
    gap: 1.25rem;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Cards ---------- */
.card {
    --mx: 50%;
    --my: 50%;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1.75rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: border-color 0.4s, background 0.4s, transform 0.4s var(--ease);
    transform-style: preserve-3d;
    will-change: transform;
}
/* Spotlight that follows the pointer */
.card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(420px circle at var(--mx) var(--my), rgba(139, 92, 246, 0.18), transparent 45%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}
.card:hover {
    border-color: rgba(139, 92, 246, 0.45);
    background: var(--surface-hover);
}
.card:hover::before { opacity: 1; }
.card h3 {
    font-size: 1.35rem;
    margin-top: 0.75rem;
}
.card p { font-size: 0.975rem; }

a.card:focus-visible { outline-offset: 4px; }

.card-icon {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--grad);
    color: #fff;
}

.card-num {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-2);
    letter-spacing: 0.08em;
}

.card .link {
    margin-top: auto;
    padding-top: 1rem;
    font-weight: 600;
    color: var(--text);
    transition: color 0.2s;
}
.card:hover .link { color: var(--accent-2); }

.card-wide {
    grid-column: span 1;
    padding: 0;
}
.card-media {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
    transition: transform 0.8s var(--ease);
}
.card-wide:hover .card-media { transform: scale(1.05); }
.card-body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(7, 8, 13, 0.95), rgba(7, 8, 13, 0.2));
}
.card-body h3 { margin-top: 0; font-size: 1.25rem; }
.card-body p { margin: 0; font-size: 0.95rem; }
.card-wide { min-height: 280px; }

/* Repo cards */
.repo { min-height: 190px; }
.repo-name {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    word-break: break-word;
}
.repo p { margin-top: 0.6rem; font-size: 0.92rem; }
.repo-meta {
    margin-top: auto;
    padding-top: 1rem;
    font-size: 0.8rem;
    color: var(--accent-2);
    letter-spacing: 0.02em;
}
.card-cta {
    justify-content: center;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(34, 211, 238, 0.08));
}
.card-cta .repo-name { font-family: var(--font); font-size: 1.25rem; font-weight: 800; }
.card-cta .link { padding-top: 0.75rem; }

.npm-note {
    margin: 2rem 0 0;
    text-align: center;
}
.npm-note a {
    color: var(--text);
    border-bottom: 1px solid var(--accent);
}

/* ---------- Steps ---------- */
.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin: 3rem 0 0;
    padding: 0;
    list-style: none;
    counter-reset: none;
}
.step {
    position: relative;
    padding: 2rem 1.75rem;
    border-radius: var(--radius);
    border: 1px dashed var(--border);
}
.step-num {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--grad);
    color: var(--bg);
    font-weight: 800;
}
.step h3 { margin-top: 1rem; font-size: 1.25rem; }

/* ---------- Split layouts ---------- */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 4vw, 5rem);
    align-items: center;
}
.split p:not(.eyebrow) { margin-bottom: 1.5rem; }
.card-media-only {
    padding: 0;
    min-height: 0;
}
.card-media-only img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

.about-links {
    display: grid;
    gap: 0.75rem;
}
.about-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    font-weight: 600;
    transition: background 0.25s, transform 0.25s var(--ease), border-color 0.25s;
}
.about-link:hover {
    background: var(--surface-hover);
    border-color: rgba(34, 211, 238, 0.4);
    transform: translateX(6px);
}

/* ---------- Contact ---------- */
.contact {
    text-align: center;
    background:
        radial-gradient(60% 80% at 50% 0%, rgba(139, 92, 246, 0.22), transparent 70%),
        var(--bg);
}
.contact-inner { max-width: 760px; margin-inline: auto; }
.contact .eyebrow { margin-inline: auto; }
.contact .lead { margin-inline: auto; max-width: 52ch; }
.contact .btn { margin-top: 1rem; font-size: clamp(0.95rem, 0.9rem + 0.4vw, 1.15rem); word-break: break-all; }

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 4rem 0 2rem;
    background: var(--bg-alt);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 2.5rem;
}
.footer-brand p { max-width: 26ch; }
.footer-brand .brand { margin-bottom: 1rem; }
.site-footer h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text);
    margin-bottom: 1rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li + li { margin-top: 0.6rem; }
.site-footer a {
    color: var(--muted);
    transition: color 0.2s;
}
.site-footer a:hover { color: var(--text); }
.footer-bottom {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
}
.footer-bottom p { margin: 0; }

/* ---------- Cursor glow (fine pointers only) ---------- */
.cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 360px;
    height: 360px;
    margin: -180px 0 0 -180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.14), transparent 60%);
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.4s;
    will-change: transform;
}
.cursor-glow.is-on { opacity: 1; }

/* ---------- Scroll reveal (only when JS runs) ---------- */
.js .reveal {
    opacity: 0;
    translate: 0 28px;
    transition: opacity 0.9s var(--ease), translate 0.9s var(--ease);
    transition-delay: var(--delay, 0ms);
}
.js .reveal.is-visible {
    opacity: 1;
    translate: 0 0;
}

/* Stagger hero children */
.hero .reveal:nth-child(1) { --delay: 0ms; }
.hero .reveal:nth-child(2) { --delay: 120ms; }
.hero .reveal:nth-child(3) { --delay: 240ms; }
.hero .reveal:nth-child(4) { --delay: 360ms; }
.hero .reveal:nth-child(5) { --delay: 480ms; }

.grid > .reveal:nth-child(2) { --delay: 80ms; }
.grid > .reveal:nth-child(3) { --delay: 160ms; }
.grid > .reveal:nth-child(4) { --delay: 240ms; }

/* ---------- Featured product + app grid ---------- */
.feature { margin-bottom: clamp(4rem, 3rem + 5vw, 7rem); }
.feature-title {
    font-size: clamp(3rem, 2rem + 4vw, 5rem);
    font-weight: 600;
    letter-spacing: -0.04em;
    margin-bottom: 0.3em;
}

.phone-stack {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    min-height: 480px;
}
.phone {
    width: 36%;
    max-width: 260px;
    height: auto;
    aspect-ratio: 9 / 19.5;
    object-fit: cover;
    border-radius: 36px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    background: #111;
    animation: float 7s ease-in-out infinite;
}
.phone-center {
    width: 42%;
    max-width: 300px;
    position: relative;
    z-index: 2;
    margin: 0 -4%;
    animation-delay: -2s;
}
.phone-side { position: relative; z-index: 1; opacity: 0.85; }
.phone-left { transform: rotate(-6deg) translateY(30px); animation-delay: -4s; }
.phone-right { transform: rotate(6deg) translateY(30px); }
.phone-stack:hover .phone-left { transform: rotate(-9deg) translateY(20px); }
.phone-stack:hover .phone-right { transform: rotate(9deg) translateY(20px); }
@keyframes float {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -12px; }
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}
.app-tile {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--border);
    transition: background 0.3s, border-color 0.3s, transform 0.35s var(--ease);
}
.app-tile:hover {
    background: var(--surface-hover);
    border-color: rgba(139, 92, 246, 0.45);
    transform: translateY(-4px);
}
.app-tile img {
    width: 64px;
    height: 64px;
    flex: none;
    border-radius: 15px;
    box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.7);
}
.app-tile h3 { font-size: 1.05rem; margin: 0 0 0.2rem; }
.app-tile p { margin: 0; font-size: 0.85rem; }

.store-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 2.5rem;
}

@media (max-width: 1024px) {
    .app-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .app-grid { grid-template-columns: 1fr; }
    .phone-stack { min-height: 380px; }
    .chip { display: none; }
}

.feature-note { font-size: 0.9rem; opacity: 0.8; }

/* ---------- Doggo showcase (mirrors the Doggo landing page) ---------- */
.dg { position: relative; }
.dg-head { margin-bottom: 0; }
.dg-visual { position: relative; padding: 2rem 0; }
.dg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    opacity: 0.35;
    z-index: 0;
}
.dg-orb--1 {
    width: 420px; height: 420px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.55), transparent 70%);
    top: -120px; right: -120px;
    animation: dgDrift 9s ease-in-out infinite;
}
.dg-orb--2 {
    width: 320px; height: 320px;
    background: radial-gradient(circle, rgba(111, 66, 193, 0.5), transparent 70%);
    bottom: -100px; left: -80px;
    animation: dgDrift 11s ease-in-out infinite 2s;
}
@keyframes dgDrift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(25px, -20px) scale(1.06); }
    66% { transform: translate(-20px, 25px) scale(0.94); }
}

.dg-dash {
    position: relative;
    z-index: 1;
    background: #13131f;
    border-radius: 24px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 40px 100px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(236, 72, 153, 0.18),
        inset 0 1px 0 var(--surface-hover);
}
.dg-dash-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.dg-title { display: flex; align-items: center; gap: 8px; color: rgba(255, 255, 255, 0.85); }
.dg-year { color: rgba(255, 255, 255, 0.35); font-weight: 500; }
.dg-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #2dce89;
    box-shadow: 0 0 8px rgba(45, 206, 137, 0.7);
    animation: dgPulse 2s ease-in-out infinite;
}
@keyframes dgPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.4); }
}

.dg-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dg-kpi {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px 10px;
    text-align: center;
}
.dg-kpi-icon {
    width: 34px; height: 34px;
    margin: 0 auto 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    display: grid;
    place-items: center;
}
.dg-kpi-val { font-size: 1.5rem; font-weight: 800; color: #fff; letter-spacing: -0.02em; }
.dg-kpi-lbl { font-size: 0.62rem; letter-spacing: 0.08em; color: rgba(255, 255, 255, 0.45); text-transform: uppercase; }

.dg-divider { height: 1px; background: var(--border); margin: 18px 0; }
.dg-sub {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 8px;
}
.dg-act {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.dg-act:last-child { border-bottom: 0; }
.dg-act-left { display: flex; align-items: center; gap: 12px; }
.dg-act-name { font-size: 0.9rem; font-weight: 600; color: #fff; }
.dg-act-time { font-size: 0.75rem; color: rgba(255, 255, 255, 0.45); }
.dg-act-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dg-act-dot--warn { background: #f87171; box-shadow: 0 0 8px rgba(248, 113, 113, 0.6); }
.dg-act-dot--ok { background: #4ade80; box-shadow: 0 0 8px rgba(74, 222, 128, 0.6); }
.dg-act-dot--blue { background: #60a5fa; box-shadow: 0 0 8px rgba(96, 165, 250, 0.6); }
.dg-badge {
    width: 28px; height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.8rem;
    font-weight: 700;
}
.dg-badge--warn { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.dg-badge--ok { background: rgba(45, 206, 137, 0.15); color: #4ade80; }
.dg-badge--blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }

/* Floating glass pills */
.dg-pill {
    position: absolute;
    z-index: 2;
    padding: 9px 18px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(236, 72, 153, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.dg-pill--1 { top: 6%; left: -70px; animation: dgFloatA 5s ease-in-out infinite; }
.dg-pill--2 { top: 44%; right: -60px; animation: dgFloatB 6s ease-in-out infinite 0.8s; }
.dg-pill--3 { bottom: 6%; left: -50px; animation: dgFloatC 4.5s ease-in-out infinite 1.5s; }
@keyframes dgFloatA { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes dgFloatB { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes dgFloatC { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* Customer phone mockup */
.dg-phone-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
    margin-top: clamp(4rem, 6vw, 7rem);
}
.dg-phone {
    position: relative;
    width: 300px;
    aspect-ratio: 9 / 19.5;
    padding: 10px;
    border-radius: 44px;
    background: #1c1c28;
    box-shadow:
        0 40px 80px -20px rgba(0, 0, 0, 0.8),
        0 0 0 1px var(--border) inset;
    animation: dgFloatA 7s ease-in-out infinite;
}
.dg-notch {
    position: absolute;
    top: 18px; left: 50%;
    transform: translateX(-50%);
    width: 96px; height: 26px;
    border-radius: 20px;
    background: #0b0b12;
    z-index: 2;
}
.dg-screen {
    width: 100%;
    height: 100%;
    border-radius: 34px;
    background: #f7f8fb;
    overflow: hidden;
    padding: 44px 18px 18px;
    color: #1a1d2b;
    font-size: 0.85rem;
}
.dg-me {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e5e7ef;
    margin-bottom: 6px;
}
.dg-me-avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: #fde7f1;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
}
.dg-me-name { font-weight: 800; font-size: 1.05rem; }
.dg-me-sub { font-size: 0.75rem; color: #6b7280; }
.dg-label {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 14px 0 8px;
}
.dg-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f0f3f8;
    margin-bottom: 6px;
    font-weight: 600;
}
.dg-row .g { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; }
.dg-row .c { margin-left: auto; color: #22c55e; font-weight: 700; }
.dg-inv {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #e5e7ef;
    margin-bottom: 8px;
}
.dg-inv-title { font-weight: 700; font-size: 0.82rem; }
.dg-inv-amt { font-size: 0.75rem; color: #6b7280; margin-top: 2px; }
.dg-pdf {
    padding: 5px 10px;
    border-radius: 999px;
    background: #fde7f1;
    border: 1px solid #f5b5d3;
    color: #e8478f;
    font-weight: 700;
    font-size: 0.72rem;
    white-space: nowrap;
}
.dg-balance {
    margin-top: 12px;
    padding: 14px;
    border-radius: 16px;
    background: linear-gradient(135deg, #fde7f1, #f1f0fb);
    border: 1px solid #f5b5d3;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.dg-balance-lbl { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.dg-balance-amt { font-size: 1.25rem; font-weight: 900; }
.dg-topup {
    padding: 8px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ec4899, #be185d);
    color: #fff;
    font-weight: 700;
    font-size: 0.78rem;
}

.dg-copy h3 { font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.4rem); margin-bottom: 1rem; }
.dg-list { margin: 1.5rem 0 0; padding: 0; list-style: none; }
.dg-list li {
    position: relative;
    padding: 0.6rem 0 0.6rem 1.75rem;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
}
.dg-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1.05rem;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

@media (max-width: 900px) {
    .dg-phone-row { grid-template-columns: 1fr; justify-items: center; }
    .dg-copy { text-align: center; }
    .dg-list li { text-align: left; }
}
@media (max-width: 1100px) {
    .dg-pill { display: none; }
}
@media (max-width: 600px) {
    .dg-phone { width: 270px; }
}

/* Section headings: silver sheen with a short accent bar */
.section-head h2,
.split h2,
.contact h2,
.feature-title {
    font-weight: 700;
    letter-spacing: -0.035em;
    padding-bottom: 0.08em;
    background: linear-gradient(180deg, var(--title-top) 35%, var(--muted) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.section-head h2::after,
.split h2::after,
.contact h2::after,
.feature-title::after {
    content: "";
    display: block;
    width: 56px;
    height: 3px;
    margin-top: 0.4em;
    border-radius: 3px;
    background: var(--grad);
}
.contact h2::after { margin-inline: auto; }

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}
.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    box-shadow: 0 8px 24px -10px rgba(139, 92, 246, 0.8);
}
.brand-name {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
}
.brand-tld { color: var(--muted); font-weight: 600; }

/* Navigation links: quieter default, gradient underline on hover (desktop) */
.nav-menu a:not(.btn) {
    position: relative;
    padding: 0.5rem 0.2rem;
    margin: 0 0.6rem;
    border-radius: 0;
    color: var(--muted);
    font-weight: 500;
    letter-spacing: 0.005em;
}
.nav-menu a:not(.btn):hover { background: none; color: var(--text); }
.nav-menu a:not(.btn)::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    border-radius: 2px;
    background: var(--grad);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s var(--ease);
}
.nav-menu a:not(.btn):hover::after,
.nav-menu a:not(.btn):focus-visible::after { transform: scaleX(1); }
.nav-menu .btn { margin-left: 1.1rem; }

.site-footer a { position: relative; display: inline-block; }
.site-footer a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -3px;
    height: 1px;
    background: var(--grad);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s var(--ease);
}
.site-footer a:hover::after { transform: scaleX(1); }

@media (max-width: 900px) {
    .nav-menu a:not(.btn) { margin: 0; }
    .nav-menu a:not(.btn)::after { display: none; }
    .nav-menu .btn { margin-left: 0; }
}

/* Hero background grid, fading out towards the edges */
.hero-grid {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 64px 64px;
    -webkit-mask-image: radial-gradient(ellipse at 60% 40%, #000 25%, transparent 75%);
    mask-image: radial-gradient(ellipse at 60% 40%, #000 25%, transparent 75%);
    pointer-events: none;
}

/* Floating glass chips around the product screenshots */
.chip {
    position: absolute;
    z-index: 3;
    padding: 0.6rem 1rem;
    border-radius: 999px;
    background: rgba(24, 24, 34, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 16px 40px -12px rgba(236, 72, 153, 0.45);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    animation: float 6s ease-in-out infinite;
}
.chip-1 { top: 6%; left: -2%; animation-delay: -1s; }
.chip-2 { top: 44%; right: -4%; animation-delay: -3s; }
.chip-3 { bottom: 10%; left: 2%; animation-delay: -5s; }

/* ---------- Effects ---------- */

/* Film grain over the whole page: removes flat banding, adds depth */
body::after {
    content: "";
    position: fixed;
    inset: -50%;
    z-index: 999;
    pointer-events: none;
    opacity: 0.045;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Scroll progress */
.progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    z-index: 60;
    transform-origin: 0 50%;
    transform: scaleX(0);
    background: linear-gradient(90deg, #a78bfa, #22d3ee);
}

/* Headline: words rise in one by one */
.hero-title .line {
    display: block;
}
.hero-title .w {
    display: inline-block;
    opacity: 0;
    transform: translateY(0.6em);
    filter: blur(8px);
    animation: word-in 1.1s var(--ease) forwards;
    animation-delay: calc(var(--i) * 85ms + 150ms);
}
@keyframes word-in {
    to { opacity: 1; transform: none; filter: blur(0); }
}

/* Ambient aura behind section headings */
.section { isolation: isolate; overflow: hidden; }
#apps::before,
#services::before,
#about::before {
    content: "";
    position: absolute;
    width: 70vw;
    height: 70vw;
    max-width: 900px;
    max-height: 900px;
    left: -25vw;
    top: -20vw;
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(139, 92, 246, 0.14), transparent);
    pointer-events: none;
}
#services::before { left: auto; right: -25vw; background: radial-gradient(closest-side, rgba(34, 211, 238, 0.10), transparent); }

/* Arrows nudge on card hover */
.card .link { transition: translate 0.35s var(--ease), color 0.2s; }
.card:hover .link { translate: 6px 0; }

/* Magnetic primary buttons */
.btn-primary { transition: transform 0.35s var(--ease), box-shadow 0.25s var(--ease); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
    .nav-toggle { display: block; }

    .nav-menu {
        position: fixed;
        inset: 72px 0 auto 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
        padding: 1rem 1.25rem 1.5rem;
        background: var(--menu-bg);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        border-bottom: 1px solid var(--border);
        transform: translateY(-12px);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s, transform 0.3s var(--ease), visibility 0.3s;
    }
    .nav-menu.is-open {
        opacity: 1;
        visibility: visible;
        transform: none;
    }
    .nav-menu a:not(.btn) {
        padding: 0.9rem 0.5rem;
        font-size: 1.05rem;
        border-radius: 10px;
    }
    .nav-menu .btn { margin: 0.75rem 0 0; }

    .grid-3,
    .steps,
    .split { grid-template-columns: 1fr; }
    .split { gap: 2.5rem; }
    .split > .card-media-only { order: -1; }

    .card-wide { min-height: 240px; }
}

@media (max-width: 600px) {
    .grid-4 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .footer-brand { grid-column: 1 / -1; }
    .hero { padding-top: 110px; }
    .hero-cta .btn { flex: 1 1 100%; }
    .hero-stats { gap: 1.5rem 2rem; }
    .scroll-hint { display: none; }
}

/* Touch devices: no hover-only tricks needed */
@media (hover: none) {
    .cursor-glow { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    .js .reveal { opacity: 1; translate: none; }
    .hero-title .w { opacity: 1; transform: none; filter: none; animation: none; }
    .progress { display: none; }
    .cursor-glow { display: none; }
}

/* Theme toggle */
.theme-toggle {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-left: 0.5rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
}
.theme-toggle:hover { background: var(--surface-hover); }
.theme-toggle svg { display: none; width: 18px; height: 18px; }
:root[data-theme="dark"] .theme-toggle .icon-sun,
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* Mobile: theme switch sits right next to the burger, both at the right edge */
@media (max-width: 900px) {
    .theme-toggle { margin-left: auto; margin-right: 0.5rem; }
}

/* Invisible anchor at the very top of the page (the header itself is fixed and cannot be scrolled to) */
.top-anchor { position: absolute; top: 0; left: 0; width: 1px; height: 1px; }
