/* ============================================
   TEMPLATE 4: MINIMAL & ELEGANT
   Lots of whitespace, refined micro-interactions
   ============================================ */

:root {
    --bg-primary: #fafafa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f5f5f5;
    --text-primary: #2d3748;
    --text-secondary: #5a6777;
    --text-muted: #9ca3af;
    --accent-navy: #334155;
    --accent-cyan: #64b5c6;
    --accent-cyan-light: rgba(100, 181, 198, 0.1);
    --border-color: #e5e7eb;
    --border-light: #f0f0f0;
}

/* Base */
body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

/* Loading Screen */
.loader {
    background: var(--bg-secondary);
}

.loader-text-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease forwards;
}

.loader-brand {
    font-size: 2.5rem;
    font-weight: 500;
    color: #1a365d;
    letter-spacing: -0.02em;
}

.loader-tagline {
    font-size: 1rem;
    color: #00b4d8;
    letter-spacing: 0.02em;
    margin-top: 0.25rem;
}

.loader-line:nth-child(1) { background: #1a365d; }
.loader-line:nth-child(2) { background: #00b4d8; }
.loader-line:nth-child(3) { background: #ff8c42; }

.loader-line {
    width: 2px;
    height: 30px;
}

/* Navigation */
.nav {
    background: transparent;
}

.nav.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
}

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

.nav-link::after {
    background: var(--accent-cyan);
    height: 1px;
}

.nav-toggle span {
    background: var(--text-primary);
    height: 1px;
}

/* Language Selector */
.lang-selector {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    user-select: none;
}

.lang-current {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
}

.lang-selector:hover {
    background: var(--bg-tertiary);
}

.lang-flag {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lang-flag svg {
    width: 100%;
    height: 100%;
}

.lang-text {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
}

.lang-chevron {
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.lang-selector.open .lang-chevron {
    transform: rotate(180deg);
}

/* Language Dropdown */
.lang-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 140px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 100;
}

.lang-selector.open .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: background 0.15s ease, color 0.15s ease;
}

.lang-option:first-child {
    border-radius: 7px 7px 0 0;
}

.lang-option:last-child {
    border-radius: 0 0 7px 7px;
}

.lang-option:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.lang-option * {
    pointer-events: none;
}

.lang-option-flag {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lang-option-flag svg {
    width: 100%;
    height: 100%;
}

/* Language Switch Animation */
body.lang-switching [data-i18n] {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

body:not(.lang-switching) [data-i18n] {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Mobile nav background */
@media (max-width: 768px) {
    .nav-links {
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-light);
    }
}

/* Hero */
.hero {
    background: var(--bg-secondary);
    min-height: 90vh;
}

.hero-content {
    max-width: 700px;
}

.hero-headline {
    color: var(--text-primary);
    font-weight: 500;
    font-size: clamp(1.875rem, 4vw, 2.75rem);
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.hero-headline span {
    color: var(--accent-cyan);
}

.hero-subtext {
    color: var(--text-secondary);
    font-size: 1.0625rem;
    line-height: 1.9;
}

.hero-stat {
    color: var(--text-primary);
    font-weight: 600;
}

/* Problem Section */
.problem {
    background: var(--bg-primary);
    padding: 5rem 0;
}

.problem-content {
    max-width: 650px;
}

.problem-text {
    color: var(--text-secondary);
    font-size: 1.0625rem;
    line-height: 1.9;
}

.problem-highlight {
    color: var(--text-primary);
    font-weight: 500;
}

/* Services */
.services {
    background: var(--bg-secondary);
    padding: 6rem 0;
}

.services-title {
    color: var(--text-primary);
    font-weight: 500;
    font-size: clamp(1.5rem, 3vw, 2rem);
    letter-spacing: -0.02em;
}

.services-subtitle {
    color: var(--text-secondary);
    font-size: 1.0625rem;
}

.service-card {
    background: transparent;
    border: none;
    padding: 2rem 1.5rem;
    border-top: 1px solid var(--border-color);
    border-radius: 0;
}

.service-card:hover {
    background: var(--accent-cyan-light);
    transform: none;
}

.service-icon {
    color: var(--accent-cyan);
    width: 32px;
    height: 32px;
    stroke-width: 1.5;
}

.service-title {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1.125rem;
}

.service-description {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.8;
}

/* Workflow Section */
.workflow {
    background: var(--bg-primary);
    padding: 6rem 0;
}

.workflow-title {
    color: var(--text-primary);
    font-weight: 500;
    font-size: clamp(1.5rem, 3vw, 2rem);
    letter-spacing: -0.02em;
}

.workflow-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    padding: 2rem;
}

.workflow-box.before {
    opacity: 0.7;
}

.workflow-box.after {
    border-color: var(--accent-cyan);
}

.workflow-box-title {
    font-weight: 500;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
}

.workflow-box.before .workflow-box-title {
    color: var(--text-muted);
}

.workflow-box.after .workflow-box-title {
    color: var(--accent-cyan);
}

.workflow-box-text {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.8;
}

.workflow-conclusion {
    background: transparent;
    border: none;
    border-top: 1px solid var(--border-color);
    border-radius: 0;
    padding: 2rem 0;
    margin-top: 2rem;
}

.workflow-conclusion p {
    color: var(--text-secondary);
    font-size: 1.0625rem;
    line-height: 1.8;
}

.workflow-highlight {
    color: var(--text-primary);
    font-weight: 500;
}

/* Team Section */
.team {
    background: var(--bg-secondary);
    padding: 6rem 0;
}

.team-title {
    color: var(--text-primary);
    font-weight: 500;
    font-size: clamp(1.5rem, 3vw, 2rem);
    letter-spacing: -0.02em;
}

.team-photo-wrapper {
    border: none;
    width: 140px;
    height: 140px;
    filter: grayscale(20%);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.team-photo-wrapper:hover {
    filter: grayscale(0%);
}

.team-name {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1.125rem;
}

.team-bio {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.8;
}

.team-credentials {
    background: transparent;
    border: none;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.875rem;
    padding: 2rem 0 0;
    margin-top: 3rem;
}

/* CTA Section */
.cta {
    background: var(--bg-primary);
    padding: 6rem 0;
    border-top: 1px solid var(--border-color);
}

.cta-title {
    color: var(--text-primary);
    font-weight: 500;
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

.cta-button {
    background: var(--text-primary);
    color: var(--bg-secondary);
    font-weight: 500;
    padding: 0.875rem 1.75rem;
    font-size: 0.9375rem;
    border-radius: 6px;
}

.cta-button:hover {
    background: var(--accent-navy);
}

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

.footer-text {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

/* Refined animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Selection color */
::selection {
    background: var(--accent-cyan);
    color: var(--bg-secondary);
}
