/* SafeW Global Styles */

:root {
    /* Color Palette */
    --color-bg-dark: #1B1231;
    --color-bg-paper: #F4F3F7;
    --color-text-body: #191523;
    --color-brand: #5214EB;
    --color-accent: #9977EE;
    
    /* Derived Colors */
    --color-white: #FFFFFF;
    --color-dark-text: #F4F3F7;
    
    /* Design Tokens */
    --radius-card: 24px;
    --radius-btn: 999px;
    --card-border: 0;
    --card-shadow: none;
    --section-y: clamp(2.5rem, 5vw, 4rem);
    --gap: clamp(0.75rem, 1.5vw, 1.25rem);
    --content-max: 960px;
    
    /* Typography */
    --font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --title-weight: 500;
    --title-line-height: 1.15;
    --h1-size: clamp(2.6rem, 6.4vw, 5rem);
    --h2-size: clamp(1.8rem, 3.5vw, 2.8rem);
    --body-line-height: 1.55;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    color: var(--color-text-body);
    background-color: var(--color-bg-paper);
    line-height: var(--body-line-height);
    font-size: 16px;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

ul, ol {
    list-style: none;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 var(--gap);
}

.section {
    padding-top: var(--section-y);
    padding-bottom: var(--section-y);
}

.section-header {
    margin-bottom: var(--gap);
    text-align: center;
}

.section-title {
    font-size: var(--h2-size);
    font-weight: var(--title-weight);
    line-height: var(--title-line-height);
    margin-bottom: calc(var(--gap) / 2);
    letter-spacing: -0.01em;
}

.section-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(244, 243, 247, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(25, 21, 35, 0.05);
    padding: 16px 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.2rem;
}

.brand-logo img {
    width: 32px;
    height: 32px;
}

.nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--color-brand);
}

.nav-link[aria-current="page"] {
    color: var(--color-brand);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-body);
}

@media (max-width: 768px) {
    .nav-links {
        display: none; 
        /* Simple hide for this static version, ideally JS toggle */
    }
    .mobile-menu-btn {
        display: block;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 24px;
    border-radius: var(--radius-btn);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    border: none;
}

.btn:focus-visible {
    outline: 3px solid var(--color-brand);
    outline-offset: 2px;
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-bg-dark);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(153, 119, 238, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-text-body);
    border: 2px solid var(--color-text-body);
}

.btn-secondary:hover {
    background-color: rgba(25, 21, 35, 0.05);
    transform: translateY(-2px);
}

.btn-icon {
    width: 20px;
    height: 20px;
}

/* Hero Section */
.hero-section {
    background-color: var(--color-bg-dark);
    color: var(--color-dark-text);
    padding-top: calc(var(--section-y) * 1.5);
    padding-bottom: calc(var(--section-y) * 1.5);
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap);
    align-items: center;
}

.hero-content {
    max-width: 500px;
}

.hero-badge {
    display: inline-block;
    background-color: rgba(153, 119, 238, 0.15);
    color: var(--color-accent);
    padding: 6px 12px;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: 0.05em;
}

.hero-title {
    font-size: var(--h1-size);
    font-weight: var(--title-weight);
    line-height: var(--title-line-height);
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero-desc {
    font-size: 1.125rem;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 32px;
    max-width: 480px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-svg-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* SVG Animations */
.flow-path {
    fill: none;
    stroke: var(--color-accent);
    stroke-width: 2;
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
    opacity: 0.6;
}

@keyframes flowDash {
    from { stroke-dashoffset: 1; }
    to { stroke-dashoffset: 0; }
}

.animate-flow {
    animation: flowDash 2s linear infinite;
}

.float-element {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.dot-flow {
    fill: var(--color-accent);
    animation: moveDot 3s linear infinite;
}

@keyframes moveDot {
    0% { offset-distance: 0%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { offset-distance: 100%; opacity: 0; }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .animate-flow {
        animation: none;
        opacity: 0.3;
    }
    .float-element {
        animation: none;
    }
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--gap);
}

.feature-card {
    background-color: #FFFFFF;
    border-radius: var(--radius-card);
    padding: 32px;
    border: var(--card-border);
    box-shadow: var(--card-shadow);
    transition: transform 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background-color: rgba(82, 20, 235, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--color-brand);
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-text-body);
}

.feature-desc {
    font-size: 0.95rem;
    color: rgba(25, 21, 35, 0.7);
    line-height: 1.6;
}

/* User Groups Section */
.user-group-section {
    background-color: var(--color-bg-dark);
    color: var(--color-dark-text);
}

.user-group-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap);
}

@media (max-width: 768px) {
    .user-group-grid {
        grid-template-columns: 1fr;
    }
    .hero-grid {
        grid-template-columns: 1fr;
    }
    .hero-content {
        order: 2;
        text-align: center;
        max-width: 100%;
    }
    .hero-actions {
        justify-content: center;
    }
    .hero-svg-container {
        order: 1;
        margin-bottom: 32px;
    }
}

.user-card {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-card);
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-role {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    margin-bottom: 8px;
    font-weight: 700;
}

.user-name {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 16px;
}

.user-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 12px;
    font-size: 0.95rem;
    opacity: 0.9;
}

.user-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    background-color: var(--color-accent);
    border-radius: 50%;
}

/* Definition List Style */
.def-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 768px) {
    .def-list {
        grid-template-columns: 1fr 1fr;
    }
}

.def-item {
    background-color: #FFFFFF;
    padding: 24px;
    border-radius: var(--radius-card);
    border-left: 4px solid var(--color-brand);
}

.def-term {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-text-body);
}

.def-def {
    font-size: 0.95rem;
    color: rgba(25, 21, 35, 0.8);
    line-height: 1.6;
}

/* Steps Section */
.steps-container {
    display: flex;
    justify-content: space-between;
    position: relative;
    gap: var(--gap);
}

.step-item {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    background-color: var(--color-brand);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin: 0 auto 16px;
    font-size: 1.1rem;
}

.step-title {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.step-desc {
    font-size: 0.9rem;
    opacity: 0.8;
    max-width: 200px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .steps-container {
        flex-direction: column;
    }
    .step-item {
        text-align: left;
        display: flex;
        gap: 16px;
        align-items: flex-start;
    }
    .step-number {
        margin: 0;
        flex-shrink: 0;
    }
    .step-desc {
        max-width: none;
        margin: 0;
    }
}

/* News Section */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--gap);
}

.news-card {
    background-color: #FFFFFF;
    border-radius: var(--radius-card);
    padding: 24px;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.2s;
}

.news-card:hover {
    transform: translateY(-4px);
}

.news-date {
    font-size: 0.85rem;
    color: var(--color-brand);
    margin-bottom: 12px;
    font-weight: 600;
}

.news-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
}

.news-excerpt {
    font-size: 0.95rem;
    color: rgba(25, 21, 35, 0.7);
    flex-grow: 1;
    line-height: 1.6;
}

/* Table Section */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-card);
    background-color: #FFFFFF;
    padding: 24px;
}

.platform-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.platform-table th,
.platform-table td {
    padding: 16px;
    border-bottom: 1px solid rgba(25, 21, 35, 0.1);
}

.platform-table th {
    font-weight: 600;
    color: var(--color-text-body);
    background-color: rgba(25, 21, 35, 0.02);
}

.platform-table tr:last-child td {
    border-bottom: none;
}

.platform-table a {
    color: var(--color-brand);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.platform-table a:hover {
    color: var(--color-accent);
}

/* FAQ Section */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid rgba(25, 21, 35, 0.1);
    margin-bottom: 16px;
}

.faq-summary {
    padding: 20px 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.2s;
}

.faq-summary::-webkit-details-marker {
    display: none;
}

.faq-summary::after {
    content: "+";
    font-size: 1.5rem;
    font-weight: 300;
    transition: transform 0.2s;
}

.faq-item[open] .faq-summary::after {
    transform: rotate(45deg);
}

.faq-item[open] .faq-summary {
    color: var(--color-brand);
}

.faq-answer {
    padding-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.7;
    color: rgba(25, 21, 35, 0.8);
}

/* Footer */
.site-footer {
    background-color: var(--color-bg-dark);
    color: var(--color-dark-text);
    padding: var(--section-y) 0;
    text-align: center;
}

.footer-cta-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: var(--title-weight);
    margin-bottom: 16px;
}

.footer-cta-desc {
    opacity: 0.8;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 48px;
    font-size: 0.9rem;
    opacity: 0.6;
}

/* Highlight class for titles */
.hl {
    color: var(--color-brand);
}

.dark-mode .hl {
    color: var(--color-accent);
}

/* Utility for SVG container sizing */
.svg-main-visual {
    width: 100%;
    height: auto;
    max-width: 600px;
}
