:root {
    /* Background */
    --bg-page: #f0edf9;
    --bg-panel: #2d1b69;
    /* deep indigo-purple – matches reference */
    --bg-card: #ffffff;
    --bg-section: #f7f5ff;

    /* Accent */
    --accent: #7c3aed;
    /* vivid violet */
    --accent-dark: #5b21b6;
    --accent-light: #ede9fe;

    /* Coral highlight (buttons / CTAs) */
    --cta: #e85d7a;
    --cta-hover: #d44668;

    /* Text */
    --text-dark: #1e1a3d;
    --text-mid: #4b4676;
    --text-light: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);
}

/* ─── Reset ─────────────────────────────────────────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ─── Base ───────────────────────────────────────────────── */
body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(155deg, #e8e2f8 0%, #f0edf9 40%, #e8f1fb 100%);
    color: var(--text-dark);
    overflow-x: hidden;
    min-height: 100vh;
}

/* ─── Header ─────────────────────────────────────────────── */
header {
    padding: 1.4rem 6%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(240, 237, 249, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(124, 58, 237, 0.1);
}

header h1 {
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 2px;
    font-size: 1.2rem;
    color: var(--bg-panel);
}

nav a {
    margin-left: 2rem;
    text-decoration: none;
    color: var(--text-mid);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--accent);
}

/* ─── Buttons ─────────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 0.75rem 1.8rem;
    border-radius: 8px;
    border: none;
    background: var(--accent);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    letter-spacing: 0.3px;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
}

.btn:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.35);
}

/* ─── Hero ────────────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 86vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 6% 6rem;
    overflow: hidden;
}

#signalCanvas {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.35;
}

.hero-content {
    position: relative;
    z-index: 4;
    max-width: 820px;
}

.hero h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.9rem;
    line-height: 1.2;
    margin-bottom: 1.2rem;
    color: var(--bg-panel);
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-mid);
    margin-bottom: 2.4rem;
    min-height: 3.5em;
    line-height: 1.65;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* hero CTA button */
.hero .btn {
    padding: 0.85rem 2.4rem;
    font-size: 0.95rem;
    border-radius: 10px;
}

/* ─── Robot (hero) ────────────────────────────────────────── */
.robot {
    position: absolute;
    bottom: 20px;
    right: 6%;
    width: 200px;
    z-index: 3;
    opacity: 0.12;
    filter: drop-shadow(0 0 12px rgba(124, 58, 237, 0.25));
    animation: float 5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.robot-eyes {
    fill: var(--accent);
    animation: glow 1.8s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        opacity: 0.5;
    }

    to {
        opacity: 1;
    }
}

@media (max-width: 900px) {
    .robot {
        display: none;
    }
}

/* ─── Sections ────────────────────────────────────────────── */
section {
    padding: 5rem 7%;
}

/* ─── Panel (deep purple card used by About / Contact / AI DevOps) ── */
.panel {
    background: var(--bg-panel);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 24px 64px rgba(45, 27, 105, 0.22);
    color: var(--text-light);
}

section h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.9rem;
    margin-bottom: 1.1rem;
    color: var(--accent);
}

.panel h3 {
    color: var(--text-light);
}

section .panel p {
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.7;
    font-size: 0.97rem;
}

/* ─── Feature cards ───────────────────────────────────────── */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.4rem;
    margin-top: 0.5rem;
}

.feature-card {
    padding: 1.6rem 1.8rem;
    border-radius: 12px;
    background: var(--accent);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.1px;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.2);
}

.panel .feature-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: none;
}

.feature-card:hover {
    background: var(--accent-dark);
    transform: translateY(-3px);
}

.panel .feature-card:hover {
    background: rgba(255, 255, 255, 0.18);
}

/* ─── Contact ─────────────────────────────────────────────── */
.contact-email {
    color: #a5f3d4;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
}

.contact-email:hover {
    text-decoration: underline;
}

/* ─── Footer ──────────────────────────────────────────────── */
footer {
    padding: 2.4rem 6%;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-mid);
    border-top: 1px solid rgba(124, 58, 237, 0.12);
    background: #ece8f8;
}

/* ─── Product section layout ──────────────────────────────── */
.product-panel {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: nowrap;
}

/* ─── PDF viewer ──────────────────────────────────────────── */
.product-pdf {
    flex: 0 0 480px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pdf-canvas-wrap {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
}

#pdf-canvas {
    display: block;
    width: 100%;
    height: auto;
}

.pdf-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 1rem;
    background: rgba(0, 0, 0, 0.15);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    justify-content: center;
}

.pdf-nav button {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    border-radius: 6px;
    padding: 0.32rem 0.85rem;
    cursor: pointer;
    font-size: 0.82rem;
    transition: background 0.2s, transform 0.15s;
}

.pdf-nav button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.pdf-nav button:disabled {
    opacity: 0.3;
    cursor: default;
}

#pdf-page-info {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.7);
    min-width: 80px;
    text-align: center;
}

.pdf-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    border: none;
    background: var(--accent);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
}

.pdf-download-btn:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.38);
}

.pdf-download-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* ─── Product text column ─────────────────────────────────── */
.product-text {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}

.product-text .product-copy {
    max-width: 860px;
    font-size: 0.93rem;
    line-height: 1.6;
    text-align: left;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 0.5rem;
    color: rgba(255, 255, 255, 0.88);
}

.product-text .product-copy h3 {
    position: sticky;
    top: 0;
    background: var(--bg-panel);
    padding-bottom: 0.5rem;
    z-index: 10;
    color: var(--text-light);
}

#product-typing {
    white-space: pre-wrap;
    min-height: 140px;
}

/* ─── Product intro splash ────────────────────────────────── */
.product-intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 100vh;
    padding: 4rem 2rem;
}

.product-intro h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 3.2rem;
    margin-bottom: 1.6rem;
    color: var(--bg-panel);
    line-height: 1.2;
}

.product-intro p {
    font-size: 1.3rem;
    color: var(--text-mid);
    max-width: 700px;
    line-height: 1.65;
}

.product-content {
    min-height: 60vh;
}

/* ─── Product header ──────────────────────────────────────── */
.product-header-container {
    display: flex;
    justify-content: flex-start;
    padding: 0 0 1rem 0;
}

.product-header-container h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    color: var(--accent);
    margin: 0;
}

/* ─── Robot in product section ────────────────────────────── */
.product-robot {
    flex: 0 0 130px;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: rgba(255, 255, 255, 0.6);
}

.product-robot .product-robot-svg {
    position: static;
    width: 130px;
    opacity: 0.9;
    filter: none;
    transform: none;
}

.robot-mouth {
    fill: var(--accent);
    transform-origin: center;
}

.robot.talking .robot-mouth,
.product-robot-svg.talking .robot-mouth {
    animation: mouth 0.18s steps(2) infinite;
}

@keyframes mouth {
    0% {
        transform: scaleY(1);
    }

    50% {
        transform: scaleY(0.4);
    }

    100% {
        transform: scaleY(1);
    }
}

/* ─── Modal ───────────────────────────────────────────────── */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(30, 20, 70, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal {
    background: #ffffff;
    border-radius: 16px;
    padding: 2.2rem;
    width: 440px;
    max-width: calc(100% - 40px);
    box-shadow: 0 30px 80px rgba(45, 27, 105, 0.22);
}

.modal h4 {
    font-family: 'Orbitron', sans-serif;
    color: var(--bg-panel);
    margin-bottom: 0.4rem;
    font-size: 1.1rem;
}

.modal p.muted {
    color: var(--text-mid);
    font-size: 0.88rem;
    margin-bottom: 1rem;
}

.modal label {
    display: block;
    font-size: 0.82rem;
    color: var(--text-mid);
    margin-top: 1.1rem;
    margin-bottom: 0.35rem;
    font-weight: 500;
}

.modal input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border-radius: 8px;
    border: 1.5px solid rgba(124, 58, 237, 0.2);
    background: var(--bg-section);
    color: var(--text-dark);
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.2s;
}

.modal input:focus {
    border-color: var(--accent);
}

.modal .row {
    display: flex;
    gap: 0.75rem;
}

.modal .actions {
    display: flex;
    gap: 0.6rem;
    justify-content: flex-end;
    margin-top: 1.6rem;
}

.modal .actions .btn {
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
}

.modal .btn-secondary {
    background: transparent;
    border: 1.5px solid rgba(124, 58, 237, 0.25);
    color: var(--text-mid);
    box-shadow: none;
}

.modal .btn-secondary:hover {
    background: var(--accent-light);
    border-color: var(--accent);
    color: var(--accent-dark);
    transform: none;
    box-shadow: none;
}

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
    .hero h2 {
        font-size: 2rem;
    }

    .product-panel {
        flex-direction: column;
    }

    .product-pdf {
        flex: 1;
        width: 100%;
    }
}

/* ─── Fullscreen PDF ──────────────────────────────────────── */
#pdf-canvas:fullscreen,
#pdf-canvas:-webkit-full-screen,
#pdf-canvas:-moz-full-screen {
    width: 100vw;
    height: 100vh;
}