/* ========================================
   Plebit - Institutional Website
   Color Palette: Navy / Steel Blue
   ======================================== */

:root {
    --primary: #1a3a5c;
    --primary-dark: #0f2640;
    --primary-light: #2a5a8c;
    --accent: #4a9eff;
    --accent-light: #7ab8ff;
    --bg: #ffffff;
    --bg-alt: #f5f7fa;
    --bg-dark: #0c1a2a;
    --text: #1a1a2e;
    --text-secondary: #5a6677;
    --text-light: #8a95a5;
    --border: #e2e8f0;
    --alert-bg: #fef3cd;
    --alert-border: #f0c84a;
    --alert-text: #665020;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 8px;
    --radius-lg: 12px;
}

/* ========================================
   Accessibility
   ======================================== */

.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    background: var(--primary);
    color: #fff;
    padding: 8px 16px;
    border-radius: var(--radius);
    z-index: 1000;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 16px;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================
   Header
   ======================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.header-scrolled {
    border-bottom-color: var(--border);
    box-shadow: var(--shadow-sm);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--primary);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.logo-icon {
    width: 32px;
    height: 32px;
}

.nav {
    display: flex;
    gap: 32px;
}

.nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav a:hover {
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

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

/* ========================================
   Alert Banner
   ======================================== */

.alert-banner {
    margin-top: 72px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3cd 100%);
    border-bottom: 2px solid var(--alert-border);
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
}

.alert-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: #f0c84a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #665020;
}

.alert-icon svg {
    width: 24px;
    height: 24px;
}

.alert-text {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    font-size: 1rem;
    color: #4a3910;
    margin-bottom: 4px;
}

.alert-description {
    font-size: 0.875rem;
    color: var(--alert-text);
    line-height: 1.5;
}

.alert-cta {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.alert-cta:hover {
    background: var(--primary-dark);
}

.alert-cta svg {
    width: 20px;
    height: 20px;
}

/* ========================================
   Hero
   ======================================== */

.hero {
    position: relative;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    padding: 120px 0 100px;
    overflow: hidden;
}

.hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text {
    max-width: 600px;
}

.hero-eyebrow {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.15em;
    margin-bottom: 16px;
}

.hero h1 {
    font-size: 2.75rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.7;
    max-width: 480px;
}

.hero-visual {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.hero-flow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-lg);
    padding: 28px 36px;
}

.flow-step {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.flow-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.6);
    flex-shrink: 0;
}

.flow-icon-active {
    background: rgba(74,158,255,0.15);
    border-color: rgba(74,158,255,0.3);
    color: var(--accent);
}

.flow-label {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    font-weight: 500;
}

.flow-arrow {
    color: rgba(255,255,255,0.2);
    padding: 2px 0;
    margin-left: 10px;
}

.hero-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 999px;
    padding: 10px 20px;
    color: rgba(255,255,255,0.7);
    font-weight: 500;
    font-size: 0.85rem;
}

.hero-card-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(74,222,128,0.5);
}

.hero-bg-pattern {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 60%;
    background: radial-gradient(circle at 70% 50%, rgba(74,158,255,0.12) 0%, transparent 60%),
                radial-gradient(circle at 90% 20%, rgba(74,158,255,0.08) 0%, transparent 40%);
    z-index: 1;
}

/* ========================================
   Sections
   ======================================== */

.section {
    padding: 80px 0;
}

.section-alt {
    background: var(--bg-alt);
}

.section-dark {
    background: var(--primary-dark);
}

.section-dark .section-header h2 {
    color: #fff;
}

.section-dark .section-header p {
    color: rgba(255,255,255,0.6);
}

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-dark);
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.section-header p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
}

/* ========================================
   About Grid
   ======================================== */

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.about-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.about-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.about-icon {
    width: 48px;
    height: 48px;
    background: rgba(74,158,255,0.1);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--accent);
}

.about-icon svg {
    width: 24px;
    height: 24px;
}

.about-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.about-card p {
    font-size: 0.925rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ========================================
   Services
   ======================================== */

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.service-item {
    padding: 32px 28px;
    background: var(--primary);
    border: 1px solid rgba(74,158,255,0.15);
    border-radius: var(--radius-lg);
    transition: border-color 0.3s, transform 0.3s;
}

.service-item:hover {
    border-color: rgba(74,158,255,0.3);
    transform: translateY(-2px);
}

.service-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    opacity: 0.3;
    line-height: 1;
    margin-bottom: 16px;
}

.service-item h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 10px;
}

.service-item p {
    font-size: 0.925rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.6;
}

/* ========================================
   Notice Box
   ======================================== */

.notice-section {
    background: var(--bg);
}

.notice-box {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 48px;
}

.notice-box h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 28px;
}

.notice-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.notice-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.notice-item svg {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    color: #d4860a;
    margin-top: 2px;
}

.notice-item strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 4px;
}

.notice-item p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ========================================
   Contact
   ======================================== */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    max-width: 420px;
    margin: 0 auto;
}

.contact-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    text-align: center;
}

.contact-icon {
    width: 56px;
    height: 56px;
    background: rgba(74,158,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--accent);
}

.contact-icon svg {
    width: 28px;
    height: 28px;
}

.contact-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.contact-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--primary);
    background: rgba(26,58,92,0.04);
}

/* ========================================
   Footer
   ======================================== */

.footer {
    background: var(--bg-dark);
    color: rgba(255,255,255,0.7);
    padding: 60px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand .logo {
    color: #fff;
    margin-bottom: 12px;
}

.footer-brand p {
    font-size: 0.875rem;
    line-height: 1.6;
    max-width: 320px;
}

.footer-links h4 {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.footer-links a {
    display: block;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.875rem;
    margin-bottom: 10px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
}

/* ========================================
   Privacy Policy
   ======================================== */

.privacy-content h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-top: 32px;
    margin-bottom: 12px;
}

.privacy-content p {
    font-size: 0.925rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 12px;
}

.privacy-content ul {
    margin-bottom: 12px;
    padding-left: 24px;
}

.privacy-content li {
    font-size: 0.925rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 6px;
}

.privacy-content a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.privacy-content a:hover {
    text-decoration: underline;
}

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

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .nav {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 16px 24px 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-md);
    }

    .nav-open {
        display: flex;
    }

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

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .hero-visual {
        display: none;
    }

    .hero h1 {
        font-size: 1.85rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .alert-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .alert-icon {
        margin: 0 auto;
    }

    .about-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }

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

    .notice-box {
        padding: 28px 20px;
    }

    .section {
        padding: 56px 0;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .section-header h2 {
        font-size: 1.6rem;
    }
}

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

    .container {
        padding: 0 16px;
    }
}

/* ========================================
   Cookie Consent (cookieconsent v3)
   ======================================== */

:root {
    --cc-bg: var(--bg-dark);
    --cc-primary-color: #fff;
    --cc-secondary-color: rgba(255, 255, 255, 0.7);
    --cc-btn-primary-bg: var(--accent);
    --cc-btn-primary-color: #fff;
    --cc-btn-primary-hover-bg: var(--accent-light);
    --cc-btn-primary-hover-color: #fff;
    --cc-btn-secondary-bg: var(--primary);
    --cc-btn-secondary-color: rgba(255, 255, 255, 0.8);
    --cc-btn-secondary-hover-bg: var(--primary-light);
    --cc-btn-secondary-hover-color: #fff;
    --cc-separator-border-color: rgba(255, 255, 255, 0.1);
    --cc-cookie-category-block-bg: var(--primary);
    --cc-cookie-category-block-hover-bg: var(--primary-light);
    --cc-overlay-bg: rgba(12, 26, 42, 0.7);
    --cc-toggle-on-bg: var(--accent);
    --cc-toggle-off-bg: rgba(255, 255, 255, 0.15);
    --cc-toggle-readonly-bg: var(--primary-light);
    --cc-modal-border-radius: var(--radius-lg);
    --cc-btn-border-radius: var(--radius);
}

#cc-main .cm,
#cc-main .pm {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

#cc-main .cm {
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-lg);
}

#cc-main .pm {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#cc-main .pm__title,
#cc-main .cm__title {
    font-weight: 700;
    letter-spacing: -0.02em;
}

#cc-main .cm__desc,
#cc-main .pm__section-desc {
    font-size: 0.875rem;
    line-height: 1.6;
}

#cc-main .cm__desc a,
#cc-main .pm__section-desc a {
    color: var(--accent);
    font-weight: 500;
}

#cc-main .cm__desc a:hover,
#cc-main .pm__section-desc a:hover {
    color: var(--accent-light);
}

/* ========================================
   In-site Chat Widget (n8n) — brand overrides
   ======================================== */

:root {
    /* Variable names follow @n8n/chat v1.21 internal tokens.
       NOTE: the upstream package uses inconsistent dashing — the color tokens
       are `--chat--color--primary` / `--chat--color--secondary` (double dash),
       while neutral colors are `--chat--color-light` etc. (single dash). */
    --chat--color--primary: var(--primary);
    --chat--color--primary-shade-50: var(--primary-dark);
    --chat--color--primary--shade-100: var(--primary-dark);
    --chat--color--secondary: var(--accent);
    --chat--color-secondary-shade-50: var(--primary-light);
    --chat--color-white: var(--bg);
    --chat--color-light: var(--bg-alt);
    --chat--color-dark: var(--text);
    --chat--toggle--background: var(--primary);
    --chat--toggle--hover--background: var(--primary-dark);
    --chat--toggle--active--background: var(--primary-dark);
    --chat--toggle--color: var(--bg);
    --chat--header--background: var(--primary);
    --chat--header--color: var(--bg);
    --chat--message--font-size: 0.925rem;
    --chat--body--font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}