:root {
    --primary-color: #5236A2;
    --primary-light: #7b5fd1;
    --primary-hover: #412a85;
    --bg-color: #fcfaff;
    --card-bg: #ffffff;
    --text-main: #2d1b5e;
    --text-muted: #6b5a9c;
    --accent-color: #ff9d00;
    --container-width: 1100px;
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --border-radius: 24px;
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-color);
    background-image: radial-gradient(circle at 0% 0%, #f3efff 0%, transparent 50%),
                      radial-gradient(circle at 100% 100%, #f3efff 0%, transparent 50%);
    background-attachment: fixed;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

header {
    padding: 100px 0 140px;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f6ff 0%, #eeebff 100%);
}

.header-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.shape {
    position: absolute;
    background: var(--primary-color);
    opacity: 0.05;
    border-radius: 50%;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -50px;
    background: var(--accent-color);
    animation: float 20s infinite alternate;
}

.shape-2 {
    width: 200px;
    height: 200px;
    bottom: 50px;
    right: -50px;
    animation: float 15s infinite alternate-reverse;
}

.shape-3 {
    width: 150px;
    height: 150px;
    top: 100px;
    right: 15%;
    opacity: 0.03;
    animation: float 18s infinite alternate;
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(30px, 50px) rotate(10deg); }
}

header .container {
    position: relative;
    z-index: 1;
}

header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 80px;
    background: var(--bg-color);
    clip-path: ellipse(60% 100% at 50% 100%);
}

nav {
    margin-bottom: 60px;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 40px;
}

.logo img {
    height: 100px;
    filter: drop-shadow(0 8px 20px rgba(82, 54, 162, 0.15));
    transition: var(--transition);
}

.logo img:hover {
    transform: scale(1.05) rotate(-2deg);
}

.hero h1 {
    font-family: 'Solway', serif;
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -2px;
    color: var(--primary-color);
    line-height: 1;
    position: relative;
    display: inline-block;
}

.hero h1::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 0;
    width: 100%;
    height: 12px;
    background: var(--accent-color);
    opacity: 0.2;
    z-index: -1;
    border-radius: 4px;
}

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

main {
    padding: 40px 0 100px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 40px;
}

.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 30px -10px rgba(82, 54, 162, 0.1);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(82, 54, 162, 0.05);
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px -15px rgba(82, 54, 162, 0.2);
}

.card-image {
    height: 220px;
    background: linear-gradient(135deg, #f8f6ff 0%, #eeebff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    position: relative;
}

.card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20px;
    background: var(--card-bg);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: var(--transition);
}

.card:hover .card-image img {
    transform: scale(1.1) rotate(2deg);
}

.card-content {
    padding: 32px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h2 {
    font-family: 'Solway', serif;
    font-size: 1.75rem;
    margin-bottom: 16px;
    color: var(--primary-color);
}

.card-content p {
    color: var(--text-muted);
    margin-bottom: 32px;
    flex-grow: 1;
    font-size: 1.05rem;
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(82, 54, 162, 0.3);
}

.btn:hover {
    background-color: var(--primary-hover);
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(82, 54, 162, 0.4);
}

footer {
    padding: 80px 0 60px;
    text-align: center;
    color: var(--text-muted);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-light);
    border-radius: 2px;
    opacity: 0.3;
}

@media (max-width: 640px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    header {
        padding: 60px 0 80px;
    }

    .card-image {
        height: 180px;
    }
}
