/* 
   AI Master - Premium Design System 
   Inspiration: UmbrelOS, Apple, Linear
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Core Palette - Deep Space & Aurora */
    --bg-deep: #000000;
    --bg-surface: #0a0a0a;

    /* The "Glow" Colors */
    --accent-blue: #2997ff;
    /* Apple Blue */
    --accent-purple: #bf5af2;
    /* Apple Purple */
    --accent-cyan: #30d158;
    /* Apple Greenish */

    /* Omni-present Borders */
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.12);

    /* Surfaces */
    --glass-panel: rgba(20, 20, 20, 0.6);
    --glass-panel-hover: rgba(30, 30, 30, 0.8);

    /* Typography */
    --text-primary: #ffffff;
    --text-secondary: #98989d;
    /* San Francisco Gray */
    --text-tertiary: #6e6e73;
}

body {
    background-color: var(--bg-deep);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    /* Subtle noise texture */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
}

/* 
   The "Aurora" Background Effect 
   Fixed position glowing orbs that sit behind content
*/
.aurora-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.aurora-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: drift 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--accent-blue);
    top: -100px;
    left: -100px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--accent-purple);
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: var(--accent-cyan);
    top: 40%;
    left: 40%;
    opacity: 0.2;
    filter: blur(100px);
}

@keyframes drift {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(30px, 50px);
    }
}

/* Typography Overrides */
h1,
h2,
h3,
h4 {
    letter-spacing: -0.025em;
    /* Tight apple tracking */
    font-weight: 700;
}

.display-title {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.05;
    background: linear-gradient(180deg, #fff 0%, #a1a1aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 40px rgba(255, 255, 255, 0.1);
}

.text-gradient-purple {
    background: linear-gradient(135deg, #c471f5 0%, #fa71cd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Container & Navbar */
.container {
    max-width: 1100px;
    /* Tighter container for focus */
}

/* The Floating Dock Navbar */
.dock-nav {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 15, 15, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 12px 24px;
    border-radius: 100px;
    /* Pill shape */
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.dock-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.dock-link:hover,
.dock-link.active {
    color: var(--text-primary);
}

.dock-brand {
    font-weight: 700;
    color: white;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 12px;
    border-right: 1px solid var(--glass-border);
    text-decoration: none;
}

.dock-brand:hover {
    color: white;
    text-decoration: none;
}

/* Bento Grid System */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
}

.bento-card {
    background: var(--glass-panel);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    /* Large UmbelsOS radius */
    padding: 32px;
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.3s ease;
}

.bento-card:hover {
    transform: translateY(-4px) scale(1.01);
    border-color: var(--glass-highlight);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

.span-12 {
    grid-column: span 12;
}

.span-6 {
    grid-column: span 6;
}

.span-4 {
    grid-column: span 4;
}

.span-8 {
    grid-column: span 8;
}

/* =========================================
   RESPONSIVE DESIGN - All Platforms
   ========================================= */

/* Large Tablets & Small Desktops (max-width: 991px) */
@media (max-width: 991px) {

    .span-4,
    .span-6,
    .span-8 {
        grid-column: span 12;
    }

    .display-title {
        font-size: 3rem;
    }

    .dock-nav {
        padding: 10px 16px;
        gap: 16px;
    }

    .dock-link {
        padding: 6px 14px;
        font-size: 0.85rem;
    }

    .bento-card {
        padding: 24px;
        border-radius: 24px;
    }

    .container {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* Tablets (max-width: 768px) */
@media (max-width: 768px) {
    .display-title {
        font-size: 2.5rem;
        line-height: 1.1;
    }

    .dock-nav {
        top: 12px;
        padding: 8px 12px;
        gap: 12px;
        max-width: calc(100% - 24px);
    }

    .dock-brand {
        font-size: 0.95rem;
        padding-right: 10px;
        gap: 6px;
    }

    .dock-brand i {
        font-size: 1rem;
    }

    .bento-grid {
        gap: 16px;
    }

    .bento-card {
        padding: 20px;
        border-radius: 20px;
    }

    /* Touch-friendly buttons */
    .btn-apple {
        padding: 14px 24px;
        font-size: 0.95rem;
        width: 100%;
        justify-content: center;
    }

    .btn-apple-glass {
        width: 100%;
        justify-content: center;
    }

    /* Stack buttons on mobile */
    .d-flex.gap-3 {
        flex-direction: column;
        width: 100%;
    }

    /* Form inputs larger for touch */
    .form-control {
        font-size: 16px !important;
        /* Prevents iOS zoom */
        padding: 14px 16px !important;
    }

    /* Footer adjustments */
    footer {
        padding: 40px 0;
        margin-top: 60px;
    }

    footer .row {
        text-align: center;
    }

    footer .col-6 {
        margin-bottom: 20px;
    }

    /* Icon boxes */
    .icon-box {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
        border-radius: 16px;
    }

    /* Aurora orbs smaller on mobile */
    .orb-1 {
        width: 300px;
        height: 300px;
    }

    .orb-2 {
        width: 250px;
        height: 250px;
    }

    .orb-3 {
        width: 150px;
        height: 150px;
    }

    /* Spacer for nav */
    div[style*="height: 120px"] {
        height: 100px !important;
    }
}

/* Mobile Phones (max-width: 576px) */
@media (max-width: 576px) {
    .display-title {
        font-size: 2rem;
        line-height: 1.15;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.35rem;
    }

    h4 {
        font-size: 1.15rem;
    }

    .dock-nav {
        top: 8px;
        padding: 6px 10px;
        gap: 8px;
        border-radius: 50px;
    }

    .dock-brand {
        font-size: 0.85rem;
        padding-right: 8px;
    }

    .dock-link {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .bento-grid {
        gap: 12px;
    }

    .bento-card {
        padding: 16px;
        border-radius: 16px;
    }

    /* Disable hover transformations on touch devices */
    .bento-card:hover {
        transform: none;
    }

    .btn-apple:hover {
        transform: none;
    }

    /* Better text sizing */
    .lead {
        font-size: 1rem;
    }

    .text-secondary.small {
        font-size: 0.85rem;
    }

    /* Container padding */
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    /* Section padding */
    section {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    /* Hero section specific */
    section[style*="padding: 60px"] {
        padding: 30px 0 60px !important;
    }

    /* Cards for grid display on small screens */
    .row.g-3>.col-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Extra Small Phones (max-width: 380px) */
@media (max-width: 380px) {
    .display-title {
        font-size: 1.75rem;
    }

    .dock-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
        border-radius: 20px;
    }

    .dock-brand {
        border-right: none;
        padding-right: 0;
        width: 100%;
        justify-content: center;
        margin-bottom: 4px;
    }

    .bento-card {
        padding: 14px;
    }

    .btn-apple {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .icon-box {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        border-radius: 12px;
    }
}

/* Landscape phones */
@media (max-height: 500px) and (orientation: landscape) {
    .dock-nav {
        top: 8px;
        padding: 6px 12px;
    }

    div[style*="height: 120px"] {
        height: 80px !important;
    }

    section[style*="padding: 60px"] {
        padding: 20px 0 40px !important;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .bento-card:hover {
        transform: none;
        box-shadow: none;
    }

    .btn-apple:hover {
        transform: none;
    }

    /* Active states for touch */
    .bento-card:active {
        transform: scale(0.98);
        transition: transform 0.1s;
    }

    .btn-apple:active {
        transform: scale(0.97);
        background: #e5e5e7;
    }

    .dock-link:active {
        opacity: 0.7;
    }

    /* Hide spotlight effect on touch */
    .bento-card::after {
        display: none;
    }
}

/* High resolution screens */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .aurora-orb {
        animation: none;
    }
}

/* Apple-style Buttons */
.btn-apple {
    background: white;
    color: black;
    border-radius: 100px;
    padding: 14px 32px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    transition: transform 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-apple:hover {
    transform: scale(1.03);
    background: #f5f5f7;
    color: black;
}

.btn-apple-glass {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.btn-apple-glass:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Feature Icons */
.icon-box {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

/* Footer */
footer {
    border-top: 1px solid var(--glass-border);
    margin-top: 80px;
    padding: 60px 0;
}

/* =========================================
   Advanced Animations
   ========================================= */

/* 2. Liquid Navbar Pill */
.dock-nav {
    position: fixed;
    /* Ensure context */
}

.dock-links-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px;
    border-radius: 100px;
    border: 1px solid var(--glass-border);
}

.nav-liquid-pill {
    position: absolute;
    height: calc(100% - 12px);
    top: 6px;
    left: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 100px;
    z-index: 0;
    opacity: 0;
    pointer-events: none;
    box-shadow:
        0 0 20px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.dock-link {
    position: relative;
    z-index: 1;
    padding: 8px 20px;
    color: var(--text-secondary);
    transition: color 0.2s;
    border-radius: 100px;
}

.dock-link.active {
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

/* 3. Staggered Entry Animation */
.animate-enter {
    opacity: 0;
    transform: translateY(20px);
    animation: enterUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

@keyframes enterUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 4. Mouse Spotlight Effect */
.bento-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(600px circle at var(--mouse-x) var(--mouse-y),
            rgba(255, 255, 255, 0.06),
            transparent 40%);
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s;
    border-radius: inherit;
}

.bento-card:hover::after {
    opacity: 1;
}