/* ============================================
   Cosmin Mare — Minimalist & Modern
   ============================================ */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    cursor: default;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #f5f5f5;
    background: #050509;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Cursor rules — explicit for every interactive element --- */
a,
button,
[type="button"],
[type="submit"],
[type="reset"],
select,
summary,
label[for],
.btn,
.nav-cta,
.nav-toggle,
.contact-links a,
.contact-item a,
.nav-links a,
.nav-logo {
    cursor: pointer !important;
}

input,
textarea,
[contenteditable="true"] {
    cursor: text !important;
}

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

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

/* --- Container --- */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Nav --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(5, 5, 9, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.nav.scrolled {
    border-bottom-color: #262635;
}

.nav-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-logo {
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: #b5b5c9;
    transition: color 0.2s ease;
    position: relative;
}

.nav-links a:not(.nav-cta)::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: #ffffff;
    transition: width 0.3s ease;
}

.nav-links a:not(.nav-cta):hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: #ffffff;
}

.nav-cta {
    background: #ffffff;
    color: #050509 !important;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 0.85rem !important;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease !important;
}

.nav-cta:hover {
    background: #e4e4e9 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 12px rgba(255, 255, 255, 0.15);
}

/* Mobile toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* --- Cursor glow --- */
.cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(90, 90, 255, 0.07) 0%, transparent 70%);
    pointer-events: none;
    z-index: 10;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.cursor-glow.active {
    opacity: 1;
}

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

.hero-content {
    position: relative;
    z-index: 2;
}

/* Floating gradient orb */
.hero-orb {
    position: absolute;
    top: 50%;
    right: -5%;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 40%, rgba(70, 70, 220, 0.15) 0%, rgba(100, 60, 180, 0.08) 40%, transparent 70%);
    filter: blur(60px);
    transform: translateY(-50%);
    animation: orbFloat 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes orbFloat {
    0%, 100% {
        transform: translateY(-50%) translate(0, 0);
    }
    33% {
        transform: translateY(-50%) translate(-12px, -18px);
    }
    66% {
        transform: translateY(-50%) translate(8px, 12px);
    }
}

/* Subtle dot grid */
.hero-grid {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(ellipse 70% 60% at 70% 50%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 50%, black 20%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 3.8rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 20px;
    color: #ffffff;
    background: linear-gradient(135deg, #ffffff 0%, #b8b8ff 50%, #ffffff 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleShimmer 6s ease-in-out infinite;
}

@keyframes titleShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.2vw, 1.35rem);
    color: #d1d1e1;
    font-weight: 500;
    line-height: 1.5;
    max-width: 560px;
    margin-bottom: 12px;
}

.hero-desc {
    font-size: 1.05rem;
    color: #a3a3b5;
    max-width: 480px;
    margin-bottom: 40px;
}

.hero-ctas {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 14px 28px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #ffffff;
    color: #050509;
    position: relative;
}

.btn-primary:hover {
    background: #e4e4e9;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.15);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-secondary {
    background: transparent;
    color: #ffffff;
    border: 1.5px solid #3c3c4d;
}

.btn-secondary:hover {
    border-color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.06);
}

.btn-secondary:active {
    transform: translateY(0);
}

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

/* --- Sections --- */
.section {
    padding: 100px 0;
}

.section-alt {
    background: #080812;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 48px;
    color: #ffffff;
}

/* --- Despre --- */
.despre-layout {
    display: flex;
    align-items: flex-start;
    gap: 40px;
}

.despre-photo {
    flex-shrink: 0;
}

.despre-photo-frame {
    width: 180px;
    height: 180px;
    border-radius: 28px;
    border: 1px solid #26263a;
    background: radial-gradient(circle at 0 0, #2d2dff 0, #141424 40%, #050509 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.despre-photo-frame:hover {
    transform: scale(1.04) rotate(1deg);
    box-shadow: 0 8px 40px rgba(90, 90, 255, 0.2);
    border-color: #5d5de0;
}

.despre-photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.despre-initials {
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ffffff;
}

.despre-content {
    max-width: 560px;
}

.despre-content p {
    font-size: 1.05rem;
    color: #d1d1e1;
    margin-bottom: 12px;
}

.despre-content p:last-child {
    margin-bottom: 0;
}

.despre-content strong {
    color: #ffffff;
    font-weight: 600;
}

.despre-meta {
    margin-top: 24px;
}

.despre-meta h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #8a8aa3;
    margin-bottom: 10px;
}

.despre-meta ul {
    list-style: none;
    padding-left: 0;
}

.despre-meta li {
    font-size: 0.95rem;
    color: #ccccde;
    margin-bottom: 6px;
    position: relative;
    padding-left: 18px;
}

.despre-meta li::before {
    content: "•";
    position: absolute;
    left: 0;
    top: 0;
    color: #5d5de0;
}

/* --- Servicii --- */
.servicii-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 40px;
}

.serviciu-card {
    background: #0c0c16;
    padding: 32px 28px;
    border-radius: 12px;
    border: 1px solid #232336;
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.serviciu-card:hover {
    border-color: #5d5de0;
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(90, 90, 255, 0.08);
}

.serviciu-icon {
    color: #f5f5ff;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.serviciu-card:hover .serviciu-icon {
    transform: scale(1.1);
}

.serviciu-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.serviciu-card p {
    font-size: 0.95rem;
    color: #b5b5c9;
    line-height: 1.6;
}

.servicii-footer {
    font-size: 1rem;
    color: #a3a3b5;
}

/* --- Proiecte --- */
.proiecte-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.proiect-card {
    background: #080812;
    padding: 32px 28px;
    border-radius: 12px;
    border: 1px solid #26263a;
    transition: border-color 0.2s ease, transform 0.15s ease;
}

.proiect-card:hover {
    border-color: #4b4b6a;
    transform: translateY(-2px);
}

.proiect-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.proiect-header h3 {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.proiect-link {
    font-size: 0.8rem;
    font-weight: 500;
    color: #cacadd;
    border-radius: 999px;
    border: 1px solid #3b3b52;
    padding: 5px 12px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.proiect-link:hover {
    color: #050509;
    background: #ffffff;
    border-color: #ffffff;
}

.proiect-card > p {
    font-size: 0.95rem;
    color: #b5b5c9;
    line-height: 1.6;
    margin-bottom: 16px;
}

.proiect-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.proiect-tags span {
    font-size: 0.8rem;
    font-weight: 500;
    color: #cacadd;
    background: #141424;
    padding: 4px 12px;
    border-radius: 20px;
}

/* --- Contact --- */
.contact-intro {
    font-size: 1.1rem;
    color: #d1d1e1;
    margin-bottom: 40px;
    max-width: 480px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #d1d1e1;
    margin-bottom: 6px;
    cursor: pointer;
}

.form-group input,
.form-group textarea {
    width: 100%;
    font-family: inherit;
    font-size: 0.95rem;
    padding: 12px 16px;
    border: 1.5px solid #26263a;
    border-radius: 8px;
    background: #050509;
    color: #f5f5f5;
    transition: border-color 0.2s ease;
    outline: none;
    cursor: text;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #5d5de0;
    box-shadow: 0 0 0 3px rgba(93, 93, 224, 0.12);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #666688;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-info {
    padding-top: 8px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    color: #d1d1e1;
}

.contact-item svg {
    flex-shrink: 0;
    color: #ffffff;
}

.contact-item a {
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.contact-item a:hover {
    color: #ffffff;
}

.contact-links {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.contact-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    color: #d1d1e1;
    border: 1.5px solid #26263a;
    transition: all 0.25s ease;
}

.contact-links a:hover {
    color: #ffffff;
    border-color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.08);
}

/* --- Form success state --- */
.form-success {
    text-align: center;
    padding: 40px 0;
}

.form-success p {
    font-size: 1.1rem;
    color: #e4e4f2;
    font-weight: 500;
}

.form-success .check {
    font-size: 2rem;
    margin-bottom: 12px;
    display: block;
}

/* --- Footer --- */
.footer {
    padding: 40px 0;
    border-top: 1px solid #232336;
    text-align: center;
}

.footer p {
    font-size: 0.85rem;
    color: #727290;
}

/* --- Fade-in animation (staggered) --- */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children */
.fade-in.visible .serviciu-card,
.fade-in.visible .despre-photo,
.fade-in.visible .despre-content,
.fade-in.visible .contact-form,
.fade-in.visible .contact-info {
    opacity: 0;
    animation: staggerIn 0.5s ease forwards;
}

.fade-in.visible .serviciu-card:nth-child(1),
.fade-in.visible .despre-photo,
.fade-in.visible .contact-form { animation-delay: 0.1s; }
.fade-in.visible .serviciu-card:nth-child(2),
.fade-in.visible .despre-content,
.fade-in.visible .contact-info { animation-delay: 0.25s; }
.fade-in.visible .serviciu-card:nth-child(3) { animation-delay: 0.4s; }

@keyframes staggerIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Form states --- */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #050509;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.form-error {
    background: rgba(220, 60, 60, 0.1);
    border: 1px solid rgba(220, 60, 60, 0.3);
    color: #ff8888;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 16px;
    animation: shakeIn 0.4s ease;
}

@keyframes shakeIn {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.form-success .check {
    font-size: 2.5rem;
    margin-bottom: 16px;
    display: block;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* --- Hamburger active state --- */
.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   Responsive
   ============================================ */

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

    .nav-links {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(5, 5, 9, 0.98);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 24px;
        gap: 20px;
        border-bottom: 1px solid #262635;
        transform: translateY(-120%);
        opacity: 0;
        transition: all 0.3s ease;
        pointer-events: none;
    }

    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .nav-links a {
        font-size: 1rem;
    }

    .nav-cta {
        text-align: center;
        display: block;
    }

    .hero {
        padding: 130px 0 80px;
        min-height: auto;
    }

    .hero-orb {
        width: 260px;
        height: 260px;
        right: -15%;
        top: 30%;
    }

    .hero-grid {
        opacity: 0.5;
    }

    .cursor-glow {
        display: none;
    }

    .hero-title {
        font-size: 2.4rem;
    }

    .section {
        padding: 72px 0;
    }

    .section-title {
        margin-bottom: 32px;
    }

    .servicii-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .despre-layout {
        flex-direction: column;
        gap: 24px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-ctas {
        flex-direction: column;
    }

    .hero-ctas .btn {
        text-align: center;
        justify-content: center;
    }

    .container {
        padding: 0 20px;
    }
}
