/* Premium Dark Theme - RefBoard Redesign */
:root {
    --bg-main: #020617;
    /* Slate 950 - Deepest Blue/Black */
    --bg-secondary: #0f172a;
    /* Slate 900 */
    --text-heading: #ffffff;
    --text-body: #94a3b8;
    /* Slate 400 */
    --primary: #6366f1;
    /* Indigo 500 */
    --primary-glow: rgba(99, 102, 241, 0.5);
    --accent: #a855f7;
    /* Purple 500 */
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.2);
    --card-bg: rgba(15, 23, 42, 0.6);
    --glass-bg: rgba(2, 6, 23, 0.8);

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;

    --font-stack: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-body);
    font-family: var(--font-stack);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography */
h1,
h2,
h3,
h4,
h5 {
    font-weight: 700;
    color: var(--text-heading);
    letter-spacing: -0.02em;
}

h1 {
    font-size: 1.5rem;
}

h2 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-heading);
}

h3 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

/* Header */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-heading);
    letter-spacing: -0.01em;
}

.logo i {
    color: var(--primary);
    filter: drop-shadow(0 0 8px var(--primary-glow));
}

nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

nav a {
    font-weight: 500;
    color: var(--text-body);
    font-size: 0.95rem;
}

nav a:hover {
    color: var(--text-heading);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

/* Language Switcher */
.lang-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    color: var(--text-body);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.lang-btn:hover {
    border-color: var(--text-heading);
    color: var(--text-heading);
    background: rgba(255, 255, 255, 0.05);
}

.lang-label.active {
    color: var(--text-heading);
    font-weight: 600;
}

/* Hero Section */
.hero {
    position: relative;
    padding: 160px 0 120px;
    text-align: center;
    overflow: hidden;
}

/* Hero Background Glow */
.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 1000px;
    height: 1000px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(168, 85, 247, 0.05) 30%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.25rem;
    background: rgba(99, 102, 241, 0.1);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-xl);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2rem;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

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

.gradient-text {
    background: linear-gradient(135deg, #818cf8 0%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 20px rgba(129, 140, 248, 0.3));
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    padding: 1rem 2.5rem;
    border-radius: var(--radius-xl);
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.4);
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.6);
    filter: brightness(1.1);
}

/* 3D Slider Container - Dark Mode */
.hero-image-placeholder {
    margin-top: 5rem;
    background: transparent !important;
    /* Override inline styles if any */
    border: none !important;
    box-shadow: none !important;
}

/* Features Section */
.features {
    padding: 100px 0;
    position: relative;
    background: var(--bg-main);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 5rem;
}

/* Feature Cards - "Services" Style */
.feature-item {
    position: relative;
    padding: 3rem 2.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(10px);
}

/* Geometric Background Patterns for Cards */
.feature-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.03) 0%, transparent 40%),
        linear-gradient(45deg, transparent 48%, rgba(255, 255, 255, 0.02) 49%, rgba(255, 255, 255, 0.02) 51%, transparent 52%);
    background-size: 100% 100%, 20px 20px;
    z-index: 0;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.feature-item:hover {
    border-color: var(--border-hover);
    transform: translateY(-5px);
    background: rgba(30, 41, 59, 0.6);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

.feature-item:hover::before {
    opacity: 1;
}

/* Glowing Corner Effect on Hover */
.feature-item::after {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.5;
}

.feature-icon {
    position: relative;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--heading);
    z-index: 1;
}

.feature-icon i {
    background: linear-gradient(135deg, var(--text-heading) 0%, var(--text-body) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.feature-item h4 {
    position: relative;
    z-index: 1;
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.feature-item p {
    position: relative;
    z-index: 1;
    color: var(--text-body);
    font-size: 1rem;
    line-height: 1.7;
}

/* Specific Card Variants (Mimicking Reference Variety) */
.feature-item:nth-child(1) {
    /* Infinite Canvas */
    background: linear-gradient(160deg, rgba(15, 23, 42, 0.8) 0%, rgba(2, 6, 23, 0.9) 100%);
}

.feature-item:nth-child(2) {
    /* PSD Support */
    border-top: 1px solid rgba(99, 102, 241, 0.3);
}

.feature-item:nth-child(7) {
    /* AI Generation - Special Highlight */
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 3rem;
    background: linear-gradient(120deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 27, 75, 0.8) 100%);
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.feature-item:nth-child(7) .feature-icon {
    width: 80px;
    height: 80px;
    font-size: 2rem;
    background: rgba(168, 85, 247, 0.1);
    border-color: rgba(168, 85, 247, 0.3);
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.2);
}

/* Footer */
footer {
    padding: 5rem 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    margin-top: 5rem;
}

.footer-link {
    color: var(--text-body);
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--text-heading);
    text-decoration: none;
}

.copyright {
    color: #475569;
}

/* Responsive */
@media (max-width: 768px) {
    h2 {
        font-size: 2.5rem;
    }

    .hero {
        padding: 120px 0 80px;
    }

    .feature-item:nth-child(7) {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
}