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

/* Main Design System - pinto.pages Studio */
:root {
    /* Brand Colors - Sophisticated Orange */
    --primary: #f97316;
    --primary-light: #fdba74;
    --primary-dark: #c2410c;
    --primary-subtle: #fff7ed;

    /* Neutrals & Surface */
    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.9);

    /* Text */
    --text-heading: #0f172a;
    --text-body: #334155;
    --text-muted: #64748b;
    --text-light: #94a3b8;

    /* Borders & Accents */
    --border: #e2e8f0;
    --border-hover: #cbd5e1;

    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.08);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.08), 0 8px 10px -6px rgb(0 0 0 / 0.08);
    --shadow-glow: 0 0 20px rgba(249, 115, 22, 0.15);

    /* Layout */
    --radius-full: 9999px;
    --radius-xl: 24px;
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;

    /* Transitions */
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Outfit', 'Inter', -apple-system, system-ui, sans-serif;
    background-color: var(--bg-body);
    background-image:
        radial-gradient(circle at 15% 50%, rgba(249, 115, 22, 0.03) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(59, 130, 246, 0.03) 0%, transparent 25%);
    color: var(--text-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fade {
    animation: fadeIn 0.6s var(--ease-smooth) forwards;
}

/* Layout Components */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navigation & Dropdowns */
nav {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1000px;
    height: 72px;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--shadow-md), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-full);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 40px;
    transition: all 0.3s var(--ease-smooth);
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-heading);
    text-decoration: none;
    letter-spacing: -0.02em;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-brand-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 8px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(249, 115, 22, 0.3);
}

.nav-links {
    margin-left: auto;
    display: flex;
    gap: 4px;
    align-items: center;
}

.nav-item {
    position: relative;
    padding: 8px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-body);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link:hover,
.nav-item:hover .nav-link {
    background: var(--primary-subtle);
    color: var(--primary-dark);
}

/* Dropdown Menu - Studio Style */
.nav-category {
    padding: 12px 16px 8px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}

.dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    width: 280px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.98);
    transform-origin: top right;
    transition: all 0.2s var(--ease-smooth);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 70vh;
    overflow-y: auto;
    scrollbar-width: thin;
}

.dropdown::-webkit-scrollbar {
    width: 6px;
}

.dropdown::-webkit-scrollbar-thumb {
    background-color: var(--border);
    border-radius: 4px;
}

.nav-item:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-item {
    padding: 10px 14px;
    text-decoration: none;
    color: var(--text-body);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dropdown-item i,
.dropdown-item .icon {
    color: var(--text-light);
    font-size: 1.1rem;
    transition: color 0.2s;
}

.dropdown-item:hover {
    background: var(--bg-body);
    color: var(--primary-dark);
}

.dropdown-item:hover i,
.dropdown-item:hover .icon {
    color: var(--primary);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-body);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s var(--ease-bounce);
    text-decoration: none;
    border: none;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    background: linear-gradient(145deg, var(--primary-light), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(249, 115, 22, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(249, 115, 22, 0.2);
}

/* Hero Section */
.hero {
    padding: 200px 24px 100px;
    text-align: center;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--text-heading) 0%, #475569 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Grid & Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
    padding-bottom: 120px;
}

.card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: all 0.3s var(--ease-smooth);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s var(--ease-smooth);
}

.card:hover {
    transform: translateY(-6px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-lg);
}

.card:hover::before {
    transform: scaleX(1);
}

.card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 4px;
}

/* Tool Studio Common Layout */
.tool-header {
    text-align: center;
    padding: 140px 24px 60px;
    max-width: 800px;
    margin: 0 auto;
}

.tool-header h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    color: var(--text-heading);
    margin-bottom: 16px;
    letter-spacing: -0.03em;
    font-weight: 800;
    position: relative;
    display: inline-block;
}

.tool-header p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;

}

.tool-icon-large {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 32px;
    background: white;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.tool-studio {
    max-width: 900px;
    margin: 0 auto 100px;
}

.control-group {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
}

.control-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-heading);
    font-size: 0.95rem;
    letter-spacing: -0.01em;
}

/* Inputs & Ranges */
input[type="range"] {
    width: 100%;
    height: 6px;
    background: var(--border);
    border-radius: var(--radius-full);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(249, 115, 22, 0.4);
    transition: transform 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-body);
    position: relative;
    overflow: hidden;
}

.upload-zone:hover {
    border-color: var(--primary);
    background: var(--primary-subtle);
    transform: scale(1.005);
}

.upload-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
    opacity: 1;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s var(--ease-bounce);
}

.upload-zone:hover .upload-icon {
    transform: translateY(-8px) scale(1.1);
}

.upload-zone h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-heading);
}

.upload-zone p {
    color: var(--text-muted);
    font-size: 1rem;
}

.help-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Utilities */
.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mt-4 {
    margin-top: 1rem;
}

.w-full {
    width: 100%;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--bg-surface);
        padding: 24px;
        border-radius: var(--radius-xl);
        box-shadow: var(--shadow-lg);
        border: 1px solid var(--border);
        animation: scaleIn 0.2s var(--ease-bounce);
        max-height: 80vh;
        overflow-y: auto;
    }

    .nav-links.active .nav-item {
        width: 100%;
        padding: 0;
    }

    .nav-links.active .nav-link {
        padding: 16px;
        font-size: 1.1rem;
        justify-content: space-between;
        border-bottom: 1px solid var(--border);
    }

    /* Force dropdowns to show on mobile when menu is open for simplicity, 
       or rely on tap. specialized styling for mobile dropdowns: */
    .nav-links.active .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        width: 100%;
        padding: 0 0 0 16px;
        background: var(--bg-body);
        margin-bottom: 8px;
        display: none;
        /* Hidden by default */
    }

    /* Show dropdown on hover/focus (tap) */
    .nav-links.active .nav-item:hover .dropdown,
    .nav-links.active .nav-item:focus-within .dropdown {
        display: flex;
    }

    .mobile-toggle {
        display: block;
    }

    nav {
        padding: 0 20px;
        width: 95%;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
}