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

:root {
    --primary:        #667eea;
    --primary-dark:   #5a67d8;
    --primary-end:    #764ba2;
    --accent:         #0d6efd;
    --success:        #198754;
    --danger:         #dc3545;
    --warning:        #ffc107;
    --text:           #1e293b;
    --text-secondary: #475569;
    --text-muted:     #64748b;
    --bg-light:       #f8fafc;
    --bg-subtle:      #f1f5f9;
    --border:         rgba(0,0,0,.07);

    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--primary-end) 100%);
    --gradient-soft: linear-gradient(135deg, #e0e7ff 0%, #ede9fe 100%);

    --shadow-xs: 0 1px 3px rgba(0,0,0,.08);
    --shadow-sm: 0 4px 12px rgba(0,0,0,.08);
    --shadow-md: 0 8px 24px rgba(0,0,0,.12);
    --shadow-lg: 0 16px 48px rgba(0,0,0,.16);
    --shadow-xl: 0 24px 64px rgba(0,0,0,.20);

    --radius:    .625rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-pill: 9999px;
    --transition: all .25s ease;
    --animation-duration: .6s;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,h2,h3,h4,h5,h6 { font-weight: 600; color: var(--text); line-height: 1.3; margin-bottom: .75rem; }
.display-3,.display-4,.display-5 { font-weight: 800; line-height: 1.15; }
p { color: var(--text-secondary); line-height: 1.7; margin-bottom: 1rem; }
.lead { font-size: 1.15rem; color: var(--text-secondary); }
a { transition: var(--transition); }

/* Sections */
.py-section { padding: 5rem 0; }
@media (max-width: 768px) { .py-section { padding: 3.5rem 0; } }
@media (max-width: 576px) { .py-section { padding: 2.5rem 0; } }

.bg-light-subtle { background: var(--bg-subtle); }

/* Section Label */
.section-label {
    display: inline-block;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--primary);
    background: var(--gradient-soft);
    padding: .35rem .9rem;
    border-radius: var(--radius-pill);
    margin-bottom: 1rem;
}
.section-label.light {
    background: rgba(255,255,255,.15);
    color: rgba(255,255,255,.95);
}

/* ===== Scroll Indicator ===== */
.scroll-indicator { position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 9999; background: rgba(255,255,255,.15); }
.scroll-progress { height: 100%; background: var(--gradient); transition: width .1s ease; }

/* ===== Navbar ===== */
.navbar {
    background: var(--gradient) !important;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    padding: .875rem 0;
    z-index: 1050;
}

.navbar-brand {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff !important;
    letter-spacing: -.02em;
}

.navbar-nav .nav-link {
    font-weight: 500;
    font-size: .95rem;
    color: rgba(255,255,255,.88) !important;
    padding: .5rem .85rem !important;
    border-radius: var(--radius);
    transition: var(--transition);
    margin: 0 .1rem;
    position: relative;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #fff !important;
    background: rgba(255,255,255,.15);
}

/* ===== Hero ===== */
.hero-section {
    background: var(--gradient);
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-particles {
    position: absolute; inset: 0; z-index: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(255,255,255,.07) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(255,255,255,.05) 0%, transparent 50%);
}

.hero-content { position: relative; z-index: 2; animation: fadeInUp var(--animation-duration) ease-out; }

.hero-badge { }
.hero-badge .badge-pill {
    display: inline-flex;
    align-items: center;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.3);
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    padding: .45rem 1.1rem;
    border-radius: var(--radius-pill);
    backdrop-filter: blur(8px);
    letter-spacing: .02em;
}

.text-gradient {
    background: linear-gradient(135deg, #fff 0%, #c7d2fe 60%, #e9d5ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-white-75 { color: rgba(255,255,255,.78) !important; }
.text-white-50 { color: rgba(255,255,255,.52) !important; }

.tech-badges .badge {
    font-size: .82rem;
    padding: .45rem 1rem;
    background: rgba(255,255,255,.14) !important;
    border: 1px solid rgba(255,255,255,.28);
    color: #fff !important;
    font-weight: 500;
    border-radius: var(--radius-pill);
    cursor: help;
    transition: var(--transition);
    backdrop-filter: blur(6px);
}
.tech-badges .badge:hover {
    background: rgba(255,255,255,.24) !important;
    transform: translateY(-2px);
}

/* Hero Wave */
.hero-wave { position: absolute; bottom: 0; left: 0; right: 0; line-height: 0; z-index: 1; }
.hero-wave svg { display: block; width: 100%; }

/* ===== Hero Mockup ===== */
.hero-image { position: relative; z-index: 2; animation: fadeInRight var(--animation-duration) ease-out; }

.mockup-container { perspective: 1200px; max-width: 480px; margin: 0 auto; }

.mockup-screen {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    transform: rotateY(-6deg) rotateX(8deg);
    transition: transform .5s ease;
    animation: float 6s ease-in-out infinite;
}
.mockup-screen:hover { transform: rotateY(0deg) rotateX(0deg); }

.mockup-header {
    background: #f1f5f9;
    padding: .75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: .75rem;
}
.mockup-dots { display: flex; gap: .4rem; }
.mockup-dots span { width: 11px; height: 11px; border-radius: 50%; }
.mockup-dots span:nth-child(1) { background: #ff5f57; }
.mockup-dots span:nth-child(2) { background: #febc2e; }
.mockup-dots span:nth-child(3) { background: #28c840; }
.mockup-url { font-size: .72rem; color: var(--text-muted); font-family: monospace; background: #e2e8f0; padding: .2rem .6rem; border-radius: var(--radius-pill); flex: 1; text-align: center; }

.mockup-content { padding: 1.25rem; background: #fff; }
.mockup-nav {
    background: var(--gradient);
    color: #fff;
    padding: .75rem 1rem;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: .85rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.mockup-nav-icons { font-size: 1rem; opacity: .85; }

.mockup-search {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-pill);
    padding: .5rem 1rem;
    font-size: .78rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.mockup-products { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }

.product-card { border: 1px solid #e2e8f0; border-radius: var(--radius); overflow: hidden; }
.product-image { height: 64px; }
.product-image-1 { background: linear-gradient(135deg, #667eea, #764ba2); }
.product-image-2 { background: linear-gradient(135deg, #f093fb, #f5576c); }
.product-image-3 { background: linear-gradient(135deg, #4facfe, #00f2fe); }

.product-info { padding: .5rem; }
.product-title { height: 8px; background: #e2e8f0; border-radius: 2px; margin-bottom: .35rem; }
.product-price { height: 6px; background: var(--primary); border-radius: 2px; width: 55%; margin-bottom: .35rem; }
.product-btn  { height: 6px; background: #e2e8f0; border-radius: 2px; width: 80%; }

/* ===== Stats ===== */
.stat-item { padding: 1rem; }
.stat-number, .stat-suffix { display: inline; font-size: 2.8rem !important; }
.stat-label { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; margin-top: .25rem; }

/* ===== Feature Cards ===== */
.feature-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 2.25rem 2rem;
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--border);
    transition: var(--transition);
}
.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(102,126,234,.25);
}
.feature-icon {
    width: 72px; height: 72px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.25rem;
    font-size: 1.75rem;
    color: #fff;
}
.feature-card h4 { font-weight: 700; font-size: 1.15rem; color: var(--text); margin-bottom: .6rem; }
.feature-card p  { color: var(--text-secondary); font-size: .95rem; margin: 0; }

/* ===== Feature Groups ===== */
.feature-group {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--border);
}
.feature-group-title {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-weight: 700;
    color: var(--text);
}
.feature-group-icon {
    width: 32px; height: 32px;
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: .85rem;
}
.bg-purple { background: linear-gradient(135deg,#7c3aed,#5b21b6); }

.feature-list { list-style: none; padding: 0; margin: 0; }
.feature-list li {
    padding: .55rem 0;
    font-size: .95rem;
    color: var(--text-secondary);
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
}
.feature-list li:last-child { border-bottom: none; }

/* ===== Architecture Cards ===== */
.architecture-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--border);
}
.layer-stack { display: flex; flex-direction: column; gap: .6rem; }
.layer {
    padding: .875rem 1rem;
    border-radius: var(--radius);
    border-left: 4px solid;
    background: var(--bg-light);
    transition: var(--transition);
    cursor: default;
}
.layer:hover { transform: translateX(4px); box-shadow: var(--shadow-xs); }
.layer-content strong { display: block; font-size: .9rem; color: var(--text); margin-bottom: .15rem; }
.layer-content small  { font-size: .8rem; color: var(--text-muted); }
.layer-api            { border-left-color: #dc3545; }
.layer-application    { border-left-color: #fd7e14; }
.layer-infrastructure { border-left-color: #20c997; }
.layer-domain         { border-left-color: #6f42c1; }
.layer-pages          { border-left-color: #0d6efd; }
.layer-components     { border-left-color: #198754; }
.layer-services       { border-left-color: #ffc107; }
.layer-types          { border-left-color: #6c757d; }

/* Infra Card */
.infra-card { margin-top: .5rem; }
.infra-grid .infra-item {
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 1.25rem 1rem;
    text-align: center;
    height: 100%;
    border: 1px solid var(--border);
    transition: var(--transition);
}
.infra-item:hover { box-shadow: var(--shadow-sm); transform: translateY(-3px); }
.infra-item i  { font-size: 1.75rem; display: block; margin-bottom: .6rem; }
.infra-item strong { display: block; font-size: .9rem; margin-bottom: .4rem; color: var(--text); }
.infra-item small  { font-size: .8rem; color: var(--text-muted); line-height: 1.5; }

/* ===== Tech Stack ===== */
.tech-category {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--border);
}
.tech-grid  { display: flex; flex-direction: column; gap: .75rem; }
.tech-item  {
    display: flex; align-items: center; gap: 1rem;
    padding: .875rem 1rem;
    background: var(--bg-light);
    border-radius: var(--radius);
    transition: var(--transition);
    border: 1px solid transparent;
}
.tech-item:hover { background: #ede9fe; border-color: rgba(102,126,234,.2); transform: translateX(4px); }
.tech-icon {
    width: 46px; height: 46px;
    background: var(--gradient);
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: .78rem; text-align: center;
    flex-shrink: 0;
    transition: var(--transition);
}
.tech-item:hover .tech-icon { transform: rotate(8deg) scale(1.05); }
.tech-info strong { display: block; font-size: .9rem; color: var(--text); margin-bottom: .2rem; }
.tech-info small  { font-size: .8rem; color: var(--text-muted); }

/* ===== API Cards ===== */
.api-card {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}
.api-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.api-header {
    background: var(--gradient);
    color: #fff;
    padding: 1.25rem;
    text-align: center;
}
.api-header i    { font-size: 1.75rem; margin-bottom: .4rem; display: block; }
.api-header h4   { margin: 0 0 .3rem; font-weight: 700; font-size: 1rem; }
.api-badge {
    display: inline-block;
    font-size: .72rem;
    font-weight: 600;
    background: rgba(255,255,255,.2);
    border: 1px solid rgba(255,255,255,.3);
    padding: .15rem .6rem;
    border-radius: var(--radius-pill);
}
.api-endpoints { padding: 1.25rem; flex: 1; }
.endpoint {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .4rem 0;
    border-bottom: 1px solid var(--bg-light);
}
.endpoint:last-child { border-bottom: none; }
.method {
    padding: .2rem .45rem;
    border-radius: 4px;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    min-width: 40px;
    text-align: center;
    flex-shrink: 0;
}
.method.get  { background: #dbeafe; color: #1e40af; }
.method.post { background: #dcfce7; color: #166534; }
.method.put  { background: #fef9c3; color: #854d0e; }
.method.del  { background: #fee2e2; color: #991b1b; }
.path { font-family: 'Monaco', 'Menlo', monospace; font-size: .78rem; color: var(--text); word-break: break-all; }

/* ===== Demo Section ===== */
.demo-section {
    background: var(--gradient);
    position: relative;
    overflow: hidden;
}
.demo-section::before {
    content: '';
    position: absolute; inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="rgba(255,255,255,.04)" points="0,1000 1000,0 1000,1000"/></svg>');
    background-size: cover;
}
.demo-section .container { position: relative; z-index: 1; }

.demo-card {
    background: rgba(255,255,255,.97);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.3);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
}
.demo-header {
    background: var(--gradient);
    color: #fff;
    padding: 1.5rem;
    text-align: center;
}
.demo-header.admin { background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%); }
.demo-header.api   { background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%); }
.demo-header i  { font-size: 2.5rem; margin-bottom: .4rem; display: block; }
.demo-header h4 { margin: 0; font-weight: 700; }

.demo-content { padding: 1.75rem; flex: 1; }
.demo-content p { font-size: .9rem; color: var(--text-secondary); margin-bottom: .5rem; }
.demo-content ul { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.demo-content li {
    padding: .35rem 0;
    font-size: .88rem;
    color: var(--text-secondary);
    padding-left: 1.4rem;
    position: relative;
}
.demo-content li::before { content: '✓'; position: absolute; left: 0; color: var(--success); font-weight: 700; }

.demo-credentials {
    background: var(--bg-subtle);
    border-radius: var(--radius);
    padding: .875rem 1rem;
    border-left: 3px solid var(--accent);
}
.cred-row { font-size: .82rem; color: var(--text-secondary); margin-bottom: .25rem; display: flex; align-items: center; gap: .25rem; }
.cred-row:last-child { margin-bottom: 0; }
.cred-row code { font-size: .8rem; color: var(--text); background: transparent; padding: 0; }

.btn-xs {
    padding: .2rem .5rem;
    font-size: .75rem;
    background: rgba(102,126,234,.12);
    border: 1px solid rgba(102,126,234,.25);
    border-radius: var(--radius);
    color: var(--primary-dark);
    cursor: pointer;
    transition: var(--transition);
}
.btn-xs:hover { background: rgba(102,126,234,.22); }

/* CTA */
.demo-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.btn-xl { padding: .95rem 2.25rem; font-size: 1.05rem; font-weight: 600; border-radius: var(--radius-lg); }

/* Quick Start / Docker */
.quickstart-card {
    background: rgba(0,0,0,.25);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid rgba(255,255,255,.15);
    backdrop-filter: blur(6px);
}
.code-block {
    background: rgba(0,0,0,.4);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    position: relative;
    overflow-x: auto;
}
.code-block code {
    font-family: 'Monaco','Menlo','Courier New',monospace;
    font-size: .82rem;
    color: #a5f3fc;
    white-space: pre;
    display: block;
    line-height: 1.7;
}
.code-copy-btn {
    position: absolute;
    top: .6rem; right: .75rem;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    color: rgba(255,255,255,.7);
    border-radius: var(--radius);
    padding: .3rem .55rem;
    font-size: .8rem;
    cursor: pointer;
    transition: var(--transition);
}
.code-copy-btn:hover { background: rgba(255,255,255,.22); color: #fff; }

/* ===== Buttons ===== */
.btn {
    font-weight: 500;
    border-radius: var(--radius);
    transition: var(--transition);
    letter-spacing: .015em;
}
.btn-lg { padding: .875rem 2rem; font-size: 1.05rem; border-radius: var(--radius-lg); }
.btn-primary { background: var(--gradient); border: none; box-shadow: var(--shadow-sm); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); background: var(--gradient); opacity: .92; }
.btn-outline-primary { border: 2px solid var(--primary); color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
.btn-light { color: var(--primary-dark) !important; font-weight: 600; }
.btn-light:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-outline-light { border: 2px solid rgba(255,255,255,.6); color: #fff !important; }
.btn-outline-light:hover { background: rgba(255,255,255,.15); border-color: #fff; }
.btn:active { transform: scale(.97); }

/* ===== Footer ===== */
footer {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #1e293b 100%);
    position: relative; overflow: hidden;
}
footer::before {
    content: '';
    position: absolute; inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 600"><polygon fill="rgba(255,255,255,.02)" points="0,600 1000,400 1000,600"/></svg>');
    background-size: cover;
}
footer .container { position: relative; z-index: 1; }

.footer-brand h3 { font-size: 1.6rem; font-weight: 800; color: #fff; }
.footer-brand p  { color: rgba(255,255,255,.7); font-size: .9rem; line-height: 1.7; }

.social-links .btn {
    width: 38px; height: 38px; padding: 0;
    border: 1.5px solid rgba(255,255,255,.25);
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.85);
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .95rem;
    transition: var(--transition);
}
.social-links .btn:hover { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.5); color: #fff; transform: translateY(-3px); }

footer h5 {
    font-size: 1rem; font-weight: 700; color: #fff; letter-spacing: .06em;
    text-transform: uppercase; padding-bottom: .5rem; position: relative; margin-bottom: 1rem;
}
footer h5::after { content:''; position:absolute; bottom:0; left:0; width:24px; height:2px; background:var(--primary); border-radius:1px; }

.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: .5rem; }
.footer-links a { color: rgba(255,255,255,.72); font-size: .9rem; text-decoration: none; transition: var(--transition); display: inline-flex; align-items: center; gap: .3rem; }
.footer-links a:hover { color: #fff; padding-left: 4px; }

.tech-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tech-tags .badge {
    background: rgba(255,255,255,.09) !important;
    border: 1px solid rgba(255,255,255,.15);
    color: rgba(255,255,255,.8) !important;
    font-size: .75rem;
    padding: .3rem .7rem;
    border-radius: var(--radius-pill);
    font-weight: 500;
    transition: var(--transition);
}
.tech-tags .badge:hover { background: rgba(255,255,255,.18) !important; color: #fff !important; }

.contact-info div { margin-bottom: .5rem; display: flex; align-items: center; color: rgba(255,255,255,.75); font-size: .88rem; }
.contact-info i   { color: rgba(255,255,255,.5); width: 1.2rem; flex-shrink: 0; }
.contact-info a   { color: rgba(255,255,255,.75); text-decoration: none; }
.contact-info a:hover { color: #fff; text-decoration: underline; }

footer hr { border-color: rgba(255,255,255,.1) !important; margin: 2rem 0 1.25rem; }
.text-footer-muted { color: rgba(255,255,255,.45) !important; font-size: .82rem; }

/* ===== Animations ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(28px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes float {
    0%,100% { transform: rotateY(-6deg) rotateX(8deg) translateY(0); }
    50%      { transform: rotateY(-6deg) rotateX(8deg) translateY(-12px); }
}
@keyframes slideInRight {
    from { transform: translateX(110%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Scroll animations */
.animate-on-scroll { opacity: 0; transition: opacity .55s ease-out, transform .55s ease-out; }
.animate-on-scroll.animate { opacity: 1; }
.slide-up   { transform: translateY(40px); }
.slide-up.animate { transform: translateY(0); }
.slide-left  { transform: translateX(-40px); }
.slide-left.animate { transform: translateX(0); }
.slide-right { transform: translateX(40px); }
.slide-right.animate { transform: translateX(0); }

/* Back to Top */
#backToTop {
    bottom: 24px; right: 24px; width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--gradient);
    border: none; color: #fff;
    box-shadow: var(--shadow-md);
    font-size: 1.1rem;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}
#backToTop.visible { opacity: 1; visibility: visible; }
#backToTop:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

/* Toast */
.berryfy-toast {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: .85rem 1.25rem;
    min-width: 260px;
    top: 80px; right: 20px;
    z-index: 9999;
    border-left: 4px solid var(--success);
    animation: slideInRight .3s ease;
    font-size: .88rem;
    color: var(--text);
}

/* ===== Mobile ===== */
@media (max-width: 992px) {
    .display-3 { font-size: 2.75rem; }
    .hero-section { padding: 4rem 0; }
    .mockup-container { max-width: 380px; }
}

@media (max-width: 768px) {
    body { font-size: 15px; }
    .display-3 { font-size: 2.1rem; }
    .display-5 { font-size: 1.75rem; }

    .hero-section { padding: 2rem 0; text-align: center; }
    .hero-section .d-flex { flex-direction: column; align-items: center; gap: 1rem !important; }
    .hero-section .btn { width: 100%; max-width: 280px; }
    .tech-badges { justify-content: center; }

    .navbar-collapse {
        margin-top: .75rem;
        background: rgba(255,255,255,.97);
        border-radius: var(--radius);
        padding: .75rem;
        box-shadow: var(--shadow-md);
    }
    .navbar-nav .nav-link {
        color: var(--text) !important;
        border-bottom: 1px solid var(--border);
        padding: .7rem 1rem !important;
    }
    .navbar-nav .nav-link:last-of-type { border-bottom: none; }

    /* GitHub icon button — switch to dark on the white mobile menu */
    .navbar-collapse .btn-outline-light {
        color: var(--text) !important;
        border-color: var(--border) !important;
    }
    .navbar-collapse .btn-outline-light:hover {
        background: var(--border) !important;
        color: var(--text) !important;
    }

    .mockup-screen   { transform: none; }
    .mockup-container { max-width: 300px; }
    .mockup-products  { grid-template-columns: repeat(3,1fr); }

    .tech-item { transform: none !important; }
    .demo-cta .btn { width: 100%; max-width: 320px; }

    .feature-card, .architecture-card, .tech-category,
    .demo-card, .api-card, .feature-group {
        transform: none !important;
        transition: box-shadow .25s ease !important;
    }
}

@media (max-width: 576px) {
    body { font-size: 14px; }
    .display-3 { font-size: 1.8rem; }
    .display-5 { font-size: 1.5rem; }

    .hero-section { padding: 1.5rem 0; }
    .stat-number, .stat-suffix { font-size: 2.1rem !important; }
    .btn-xl { padding: .8rem 1.5rem; font-size: .95rem; }
    .code-block code { font-size: .75rem; }
    .infra-item { padding: 1rem .75rem; }
    .mockup-products { grid-template-columns: repeat(3,1fr); }
    .feature-icon { width: 60px; height: 60px; font-size: 1.4rem; }
    footer h5::after { left: 50%; transform: translateX(-50%); }
    footer { text-align: center; }
    .social-links { justify-content: center; }
    .tech-tags { justify-content: center; }
    .footer-links a { justify-content: center; }
    .contact-info div { justify-content: center; }
}

/* Mobile device class */
.mobile-device .mockup-screen,
.mobile-device .hero-section { animation: none !important; transform: none !important; }
.mobile-device .feature-card,
.mobile-device .api-card,
.mobile-device .demo-card,
.mobile-device .architecture-card,
.mobile-device .tech-category {
    transform: none !important;
    transition: none !important;
    animation: none !important;
    opacity: 1 !important;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}
