/* SafeW Global Styles */
:root {
    /* Color Palette */
    --bg-dark: #21163C;
    --bg-paper: #F4F3F7;
    --text-body: #191523;
    --brand-color: #5214EB;
    --accent-color: #ED926E;
    
    /* Derived Colors for Text/Border */
    --text-on-dark: #F4F3F7;
    --text-on-light: #191523;
    --border-color: rgba(25, 21, 35, 0.16);
    
    /* Spacing & Layout */
    --radius-card: 20px;
    --radius-btn: 12px;
    --section-y: clamp(3.5rem, 7vw, 6rem);
    --gap: clamp(1rem, 2vw, 1.75rem);
    --content-max: 1280px;
    
    /* Typography */
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-paper);
    color: var(--text-body);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Header & Nav */
.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 var(--border-color);
    padding: 16px 24px;
}

.header-inner {
    max-width: var(--content-max);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.02em;
}

.nav-links {
    display: flex;
    gap: 24px;
    list-style: none;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-links a:hover, .nav-links a[aria-current="page"] {
    color: var(--brand-color);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-btn);
    font-weight: 600;
    font-size: 1rem;
    transition: transform 0.2s ease, opacity 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--bg-dark);
    height: 48px;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--text-body);
    color: var(--text-body);
}

.btn-outline-dark {
    background: transparent;
    border: 1px solid var(--text-on-dark);
    color: var(--text-on-dark);
}

.btn:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}

.btn:focus-visible {
    outline: 2px solid var(--brand-color);
    outline-offset: 2px;
}

/* Section Layout */
section {
    padding: var(--section-y) 24px;
}

.container {
    max-width: var(--content-max);
    margin: 0 auto;
}

/* Typography Utilities */
.section-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--brand-color);
    margin-bottom: 16px;
}

.dark-section .section-label {
    color: var(--accent-color);
}

.section-label-light {
    color: var(--text-body) !important;
}

h1 {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
    text-wrap: balance;
}

h2 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 32px;
    text-wrap: balance;
}

h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: 0.02em;
}

p {
    margin-bottom: 16px;
    max-width: 38em;
}

.hl {
    color: var(--brand-color);
}

.dark-section .hl {
    color: var(--accent-color);
}

.hl-dark {
    color: #7C6CB0 !important;
}

/* Hero Section */
.hero {
    background-color: var(--bg-dark);
    color: var(--text-on-dark);
    padding-top: calc(var(--section-y) + 40px);
    padding-bottom: var(--section-y);
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.hero-content p {
    font-size: 1.15rem;
    color: var(--text-on-dark);
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.hero-facts {
    margin-top: 24px;
    font-size: 0.85rem;
    opacity: 0.7;
    display: flex;
    gap: 16px;
}

/* SVG Visuals */
.visual-panel {
    background-color: #2A1D45;
    border-radius: var(--radius-card);
    padding: 32px;
    width: 100%;
    aspect-ratio: 4/3;
    position: relative;
    overflow: hidden;
}

.safew-svg {
    width: 100%;
    height: 100%;
}

/* Feature Cards Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--gap);
}

.feature-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    padding: 32px;
    transition: transform 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
}

.card-icon {
    width: 48px;
    height: 48px;
    background-color: var(--bg-paper);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: var(--brand-color);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 32px;
    border-left: 2px solid var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 48px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -39px;
    top: 8px;
    width: 12px;
    height: 12px;
    background-color: var(--accent-color);
    border-radius: 50%;
    border: 2px solid var(--bg-paper);
}

.dark-section .timeline-item::before {
    border-color: var(--bg-dark);
}

.time-tag {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--brand-color);
    margin-bottom: 8px;
    display: block;
}

.time-tag-highlight {
    color: #7C6CB0 !important;
}

/* Deep Dive Section */
.deep-dive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 48px;
}

/* Steps */
.steps-list {
    counter-reset: step;
    list-style: none;
}

.steps-list li {
    position: relative;
    padding-left: 64px;
    margin-bottom: 32px;
}

.steps-list li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    background-color: var(--accent-color);
    color: var(--bg-dark);
    font-weight: 800;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

/* Table */
.spec-table {
    width: 100%;
    border-collapse: collapse;
    margin: 32px 0;
    font-size: 0.95rem;
}

.spec-table th, .spec-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.spec-table th {
    font-weight: 700;
    color: var(--text-body);
    width: 30%;
}

.dark-section .spec-table th,
.dark-section .spec-table td {
    border-bottom-color: rgba(244, 243, 247, 0.15);
    color: var(--text-on-dark);
}

/* News Cards */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.news-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.news-date {
    font-size: 0.8rem;
    color: var(--brand-color);
    margin-bottom: 12px;
    font-weight: 600;
}

.news-card h4 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    font-weight: 700;
}

.news-card p {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 0;
}

/* FAQ */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

details {
    border-bottom: 1px solid var(--border-color);
    padding: 24px 0;
}

summary {
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

summary::-webkit-details-marker {
    display: none;
}

summary::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--brand-color);
}

details[open] summary::after {
    content: '-';
}

details p {
    margin-top: 16px;
    color: #555;
}

/* Footer */
.site-footer {
    background-color: var(--bg-dark);
    color: var(--text-on-dark);
    padding: 64px 24px;
    text-align: center;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.footer-nav a {
    opacity: 0.8;
    transition: opacity 0.2s;
}

.footer-nav a:hover {
    opacity: 1;
    color: var(--accent-color);
}

.footer-copy {
    font-size: 0.85rem;
    opacity: 0.6;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        display: none; /* Simple mobile hide for static site, or could be a burger menu if JS allowed, keeping simple */
    }
    
    .header-inner {
        justify-content: center;
    }
    
    .brand-logo {
        margin-right: auto;
    }
}

/* SVG Animations */
@keyframes float-bubble {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes slide-in-right {
    0% { transform: translateX(20px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes breathe {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

@keyframes dash-flow {
    to { stroke-dashoffset: -20; }
}

.anim-float {
    animation: float-bubble 4s ease-in-out infinite;
}

.anim-slide {
    animation: slide-in-right 0.8s ease-out forwards;
}

.anim-breathe {
    animation: breathe 2s ease-in-out infinite;
}

.anim-dash {
    stroke-dasharray: 10;
    animation: dash-flow 1s linear infinite;
}

/* Staggered Delays */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.5s; }

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 兜底：裁掉横向溢出 */
body > * {
  overflow-x: clip;
}
