:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.98);
    --bg-card-hover: rgba(255, 255, 255, 1);

    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-muted: #888888;

    --accent-primary: #0078e7;
    --accent-secondary: #4da6ff;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;

    --border-color: rgba(0, 0, 0, 0.08);
    --border-hover: #4da6ff;

    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.15);

    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 32px;
    --radius-full: 9999px;

    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    min-height: 100vh;
    overflow-x: hidden;
}

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

.page-container {
    position: relative;
    min-height: 100vh;
    z-index: 1;
}

.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.monolith {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.planks-container {
    display: flex;
    width: 100%;
    gap: 0;
    background: transparent;
    position: relative;
}

.plank {
    background: var(--bg-card);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 2.5rem 0;
    box-shadow: var(--shadow-md);
    border: 2px solid transparent;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    display: flex;
}

.plank-left-wrapper { flex: 1; display: flex; justify-content: flex-start; }
.plank-left { border-radius: 40px 0 0 40px; padding-left: 40px; padding-right: 60px; width: 100%; justify-content: flex-start; }
.plank-left .plank-content { width: 100%; max-width: 350px; text-align: left; }

.plank-right-wrapper { flex: 1; display: flex; justify-content: flex-end; }
.plank-right { border-radius: 0 40px 40px 0; padding-right: 40px; padding-left: 60px; width: 100%; justify-content: flex-end; }
.plank-right .plank-content { width: 100%; max-width: 350px; text-align: right; }

.plank-title { font-size: 1.5rem; margin-bottom: 1rem; color: var(--text-primary); font-weight: 600; }
.plank-text { color: var(--text-secondary); margin-bottom: 1.5rem; font-size: 1rem; line-height: 1.6; }

.plank-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.plank-link:hover { color: #005bb5; text-decoration: underline; }
.plank-link svg { transition: transform 0.2s; }
.plank-link:hover svg { transform: translateX(4px); }

.circle-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    pointer-events: auto;
}

.hero-circle {
    width: 400px;
    height: 400px;
    background: var(--bg-card);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border: 2px solid transparent;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: inherit;
}
.hero-circle:hover {
    border-color: var(--border-hover);
    box-shadow: 0 20px 40px rgba(77, 166, 255, 0.25);
}

.circle-content { padding: 2rem; }

.circle-logo {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.logo-hermenius { color: var(--accent-primary); }

.circle-tagline { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 2rem; }

.circle-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-primary);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    box-shadow: 0 10px 20px rgba(0, 120, 231, 0.2);
}
.hero-circle:hover .circle-cta {
    background: #005bb5;
    box-shadow: 0 10px 20px rgba(0, 120, 231, 0.3);
    transform: translateY(-2px);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.2s;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.back-link:hover { background: rgba(255, 255, 255, 0.25); }

.scroll-container {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
}

.section {
    height: 100vh;
    width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.section-content { width: 100%; max-width: 1000px; margin: 0 auto; padding: 2rem; position: relative; z-index: 2; }
.section-title { color: white; text-align: center; margin-bottom: 2.5rem; font-size: 2rem; font-weight: 600; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }

.faq-hero-section { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.page-title { font-size: 2.5rem; font-weight: 600; margin-bottom: 3rem; text-align: center; color: white; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); }
.page-subtitle { color: white; font-size: 1.2rem; opacity: 0.8; text-align: center; text-shadow: 0 2px 8px rgba(0,0,0,0.2); }

.scroll-indicator { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); color: white; text-align: center; z-index: 10; opacity: 0.6; }
.scroll-indicator span { display: block; margin-bottom: 8px; font-size: 14px; letter-spacing: 1px; }
.arrow-down { width: 24px; height: 24px; margin: 0 auto; border-left: 2px solid white; border-bottom: 2px solid white; transform: rotate(-45deg); animation: bounce 2s infinite; }
@keyframes bounce { 0%, 100% { transform: rotate(-45deg) translateY(0); } 50% { transform: rotate(-45deg) translateY(8px); } }

.faq-header { position: fixed; top: 1.5rem; left: 1.5rem; z-index: 100; }

.faq-section .faq-list { display: flex; flex-direction: column; gap: 1rem; }
.faq-section .faq-item {
    background: var(--bg-card);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}
.faq-section .faq-item:hover { box-shadow: 0 12px 32px rgba(77, 166, 255, 0.15); transform: translateY(-2px); }
.faq-section .faq-question { font-size: 1.1rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.75rem; }
.faq-section .faq-answer { color: var(--text-secondary); line-height: 1.6; }

.contacts-section .contacts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 2rem; }
.contact-card {
    background: var(--bg-card);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}
.contact-card:hover { box-shadow: 0 12px 32px rgba(77, 166, 255, 0.15); transform: translateY(-4px); }
.contact-icon { width: 56px; height: 56px; background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary)); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; color: white; }
.contact-title { font-size: 1.1rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.5rem; }
.contact-link { display: block; color: var(--accent-primary); text-decoration: none; font-size: 1rem; font-weight: 500; margin-bottom: 0.5rem; transition: color 0.2s; }
.contact-link:hover { color: #005bb5; }
.contact-text { font-size: 0.85rem; color: var(--text-muted); }

.social-links { display: flex; justify-content: center; gap: 1rem; }
.social-link { background: var(--bg-card); color: var(--text-primary); text-decoration: none; padding: 0.75rem 1.5rem; border-radius: var(--radius-full); font-weight: 500; font-size: 0.9rem; transition: all 0.2s; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); }
.social-link:hover { background: var(--accent-primary); color: white; transform: translateY(-2px); }

.footer-section .footer-card { background: var(--bg-card); backdrop-filter: blur(5px); border-radius: 30px; padding: 2.5rem; text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); max-width: 600px; margin: 0 auto; }
.footer-section .footer-logo { font-family: 'JetBrains Mono', monospace; font-size: 1.8rem; font-weight: 600; margin-bottom: 1rem; }
.footer-section .footer-copyright { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1rem; }
.footer-section .footer-links { display: flex; justify-content: center; gap: 1.5rem; }
.footer-section .footer-link { color: var(--accent-primary); text-decoration: none; font-weight: 500; transition: color 0.2s; }
.footer-section .footer-link:hover { color: #005bb5; }

.error-page .error-content { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem; }
.error-code { font-family: 'JetBrains Mono', monospace; font-size: 8rem; font-weight: 700; color: white; text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2); margin-bottom: 2rem; }
.error-monolith { display: flex; align-items: center; justify-content: center; position: relative; }
.error-planks { display: flex; }
.error-plank { background: var(--bg-card); backdrop-filter: blur(5px); padding: 1.5rem 2rem; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); }
.error-plank-left { border-radius: 30px 0 0 30px; padding-right: 10rem; }
.error-plank-right { border-radius: 0 30px 30px 0; padding-left: 10rem; }
.error-plank-title { font-size: 1rem; font-weight: 600; color: var(--text-primary); }
.error-plank-text { font-size: 0.85rem; color: var(--text-secondary); }
.error-plank-link { color: var(--accent-primary); text-decoration: none; font-weight: 500; }
.error-circle {
    width: 150px; height: 150px; border-radius: 50%; background: var(--bg-card);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15); display: flex; align-items: center; justify-content: center;
    text-decoration: none; color: var(--text-primary); position: absolute; left: 50%; top: 50%;
    transform: translate(-50%, -50%); z-index: 10; transition: all 0.2s;
}
.error-circle-content { text-align: center; }
.error-circle svg { margin-bottom: 0.5rem; }
.error-circle span { display: block; font-size: 0.85rem; font-weight: 600; }

@media (max-width: 1200px) {
    .plank-left .plank-content, .plank-right .plank-content { max-width: 280px; }
}

@media (max-width: 1000px) {
    .planks-container { flex-direction: column; gap: 1rem; }
    .plank-left-wrapper, .plank-right-wrapper { justify-content: center; }
    .plank-left, .plank-right { border-radius: 40px !important; padding: 2rem !important; justify-content: center; }
    .plank-left .plank-content, .plank-right .plank-content { text-align: center !important; margin: 0 auto; }
    .circle-overlay { position: relative; transform: translate(-50%, 0); margin-top: 2rem; }
}

@media (max-width: 768px) {
    .hero-circle { width: 280px; height: 280px; }
    .circle-logo { font-size: 1.5rem; }
    .circle-tagline { font-size: 1rem; }
    .circle-cta { padding: 0.8rem 2rem; font-size: 1rem; }
    .page-title { font-size: 2rem; }
    .error-code { font-size: 5rem; }
    .error-planks { flex-direction: column; gap: 1rem; }
    .error-plank-left { border-radius: 30px 30px 0 0; }
    .error-plank-right { border-radius: 0 0 30px 30px; }
    .error-circle { position: relative; transform: none; left: auto; top: auto; width: 120px; height: 120px; margin: -1rem 0; z-index: 5; }

    .scroll-container { scroll-snap-type: none; height: auto; overflow-y: auto; }
    .section { height: auto; min-height: 100vh; scroll-snap-align: none; padding: 4rem 0; }
    .section-title { font-size: 1.5rem; }
    .contacts-section .contacts-grid { grid-template-columns: 1fr; }
    .scroll-indicator { display: none; }
}

@media (max-width: 480px) {
    .hero-circle { width: 220px; height: 220px; }
    .circle-logo { font-size: 1.2rem; }
    .plank-title { font-size: 1.25rem; }
    .plank-text { font-size: 0.9rem; }
}

@media (min-height: 1000px) {
    .hero-circle { width: 500px; height: 500px; }
    .circle-logo { font-size: 2.2rem; }
    .plank-left .plank-content, .plank-right .plank-content { max-width: 400px; }
}
