/* ============================================================
   System Guardian — Website Design System
   Dark glassmorphism theme matching SwiftUI .ultraThinMaterial
   ============================================================ */

/* --- Custom Properties --- */
:root {
    --bg-deep: #0a0a18;
    --bg: #1a1a2e;
    --bg-card: rgba(22, 33, 62, 0.6);
    --bg-card-solid: #16213e;
    --bg-card-hover: #1c2a4a;
    --border-card: rgba(15, 52, 96, 0.6);
    --border-subtle: rgba(15, 52, 96, 0.3);

    --accent: #e94560;
    --accent-glow: rgba(233, 69, 96, 0.15);
    --green: #53d769;
    --blue: #3b82f6;
    --orange: #f59e0b;
    --purple: #a855f7;

    --text-primary: #f0f0f5;
    --text-secondary: #c8c8d0;
    --text-muted: #8892a4;
    --text-dim: #555;

    --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: "SF Mono", "Fira Code", Menlo, monospace;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 40px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 60px var(--accent-glow);

    --glass-blur: blur(16px);

    --max-width: 1200px;
    --content-width: 720px;
    --nav-height: 64px;

    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg);
    color: var(--text-secondary);
    line-height: 1.7;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

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

/* --- Typography --- */
h1, h2, h3, h4 {
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(1.75rem, 3.5vw, 2.25rem);
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
}

code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: rgba(15, 52, 96, 0.4);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    color: var(--green);
}

/* --- Navigation --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--nav-height);
    background: rgba(10, 10, 24, 0.8);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    padding: 0 2rem;
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
}

.nav-brand img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

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

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

.nav-links .separator {
    width: 1px;
    height: 16px;
    background: var(--border-card);
}

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

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-muted);
    transition: var(--transition);
    border-radius: 2px;
}

/* --- Sections --- */
section {
    padding: 6rem 2rem;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.container--narrow {
    max-width: var(--content-width);
    margin: 0 auto;
}

.section-label {
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.section-title {
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 3rem;
}

.text-center {
    text-align: center;
}

.text-center .section-subtitle {
    margin-left: auto;
    margin-right: auto;
}

/* --- Hero --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: var(--nav-height);
    background: radial-gradient(ellipse at 50% 0%, rgba(233, 69, 96, 0.08) 0%, transparent 60%),
                var(--bg-deep);
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 800px;
    padding: 2rem;
}

.hero-icon {
    width: 128px;
    height: 128px;
    margin: 0 auto 2rem;
    border-radius: 28px;
    animation: float 6s ease-in-out infinite;
    filter: drop-shadow(0 0 40px var(--accent-glow));
}

.hero h1 {
    margin-bottom: 1.25rem;
}

.hero-tagline {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.hero-image {
    max-width: 600px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s ease-in-out infinite;
    color: var(--text-dim);
    font-size: 1.5rem;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.4; }
    50% { transform: translateX(-50%) translateY(8px); opacity: 0.8; }
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    border: none;
}

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

.btn-primary:hover {
    background: #d63a54;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(233, 69, 96, 0.3);
}

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

.btn-outline:hover {
    background: var(--bg-card);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.btn-small {
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
}

/* --- Glass Cards --- */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 2rem;
    transition: all var(--transition);
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(233, 69, 96, 0.2);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

.glass-card h3 {
    margin-bottom: 0.75rem;
}

.glass-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* --- Grids --- */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* --- Screenshot Gallery --- */
.screenshot-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.screenshot-gallery img {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    transition: transform var(--transition);
    width: 100%;
}

.screenshot-gallery img:hover {
    transform: scale(1.02);
}

.screenshot-gallery .screenshot-wide {
    grid-column: 1 / -1;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

/* --- Technical Table --- */
.tech-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
}

.tech-table th,
.tech-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.95rem;
}

.tech-table th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tech-table td {
    color: var(--text-secondary);
}

.tech-table code {
    font-size: 0.85rem;
}

/* --- Privacy Grid --- */
.privacy-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

.privacy-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-sm);
}

.privacy-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.privacy-item h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.privacy-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* --- Specs --- */
.spec-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

.spec-item {
    text-align: center;
    padding: 1.5rem;
}

.spec-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.25rem;
}

.spec-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- CTA Section --- */
.cta-section {
    background: radial-gradient(ellipse at 50% 100%, rgba(233, 69, 96, 0.08) 0%, transparent 60%),
                var(--bg-deep);
    text-align: center;
}

/* --- Footer --- */
.footer {
    padding: 3rem 2rem;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    list-style: none;
}

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

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-credit {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.footer-built {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 0.5rem;
}

/* --- Legal Pages (Privacy, Terms, Support) --- */
.page-header {
    padding-top: calc(var(--nav-height) + 3rem);
    padding-bottom: 2rem;
    text-align: center;
    background: var(--bg-deep);
    border-bottom: 1px solid var(--border-subtle);
}

.page-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-muted);
    font-size: 1rem;
}

.legal-content {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.legal-card {
    background: var(--bg-card-solid);
    border: 1px solid rgba(15, 52, 96, 0.6);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
}

.legal-card h2 {
    font-size: 1.3rem;
    color: var(--accent);
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border-subtle);
}

.legal-card h3 {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.legal-card ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0.75rem;
}

.legal-card ul li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.legal-card ul li::before {
    content: "\2713";
    color: var(--green);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.legal-card ul.disc li::before {
    content: "\2022";
    color: var(--text-muted);
}

.warning-card {
    background: #2d1b1b;
    border: 1px solid var(--accent);
}

.warning-card h2,
.warning-card h3 {
    color: var(--accent);
}

.effective-date {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-top: 0.5rem;
}

.caps {
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.92rem;
    color: #a0a0a8;
}

.tip {
    background: rgba(26, 39, 64, 0.8);
    border-left: 3px solid var(--green);
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    border-radius: 0 6px 6px 0;
    font-size: 0.95rem;
}

/* --- FAQ Page --- */
.faq-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 3rem;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.faq-sidebar {
    position: sticky;
    top: calc(var(--nav-height) + 2rem);
    align-self: start;
    max-height: calc(100vh - var(--nav-height) - 4rem);
    overflow-y: auto;
}

.faq-sidebar a {
    display: block;
    padding: 0.4rem 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    border-left: 2px solid transparent;
    padding-left: 0.75rem;
    transition: all var(--transition);
}

.faq-sidebar a:hover,
.faq-sidebar a.active {
    color: var(--accent);
    border-left-color: var(--accent);
}

.faq-search {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: var(--font-sans);
    outline: none;
    margin-bottom: 2rem;
    transition: border-color var(--transition);
}

.faq-search:focus {
    border-color: var(--accent);
}

.faq-search::placeholder {
    color: var(--text-dim);
}

.faq-section {
    margin-bottom: 3rem;
}

.faq-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.faq-item {
    margin-bottom: 0.5rem;
}

.faq-item summary {
    cursor: pointer;
    padding: 1rem 1.25rem;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all var(--transition);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    font-size: 1.25rem;
    color: var(--text-muted);
    transition: transform var(--transition);
    flex-shrink: 0;
    margin-left: 1rem;
}

.faq-item[open] summary::after {
    content: "\2212";
}

.faq-item summary:hover {
    background: var(--bg-card-hover);
}

.faq-answer {
    padding: 1rem 1.25rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.faq-answer table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.faq-answer table th,
.faq-answer table td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
}

.faq-answer table th {
    color: var(--text-muted);
    font-weight: 600;
}

/* --- Scroll Animations --- */
.animate-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.animate-in.delay-1 { transition-delay: 0.1s; }
.animate-in.delay-2 { transition-delay: 0.2s; }
.animate-in.delay-3 { transition-delay: 0.3s; }
.animate-in.delay-4 { transition-delay: 0.4s; }
.animate-in.delay-5 { transition-delay: 0.5s; }

/* --- Responsive --- */
@media (max-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .spec-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .faq-layout {
        grid-template-columns: 1fr;
    }

    .faq-sidebar {
        position: static;
        display: none;
    }
}

@media (max-width: 768px) {
    :root {
        --nav-height: 56px;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(10, 10, 24, 0.95);
        backdrop-filter: var(--glass-blur);
        -webkit-backdrop-filter: var(--glass-blur);
        flex-direction: column;
        padding: 2rem;
        gap: 1.25rem;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links .separator {
        width: 100%;
        height: 1px;
    }

    .hamburger {
        display: flex;
    }

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

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

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

    .grid-3,
    .grid-2,
    .privacy-grid,
    .screenshot-gallery {
        grid-template-columns: 1fr;
    }

    .spec-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    section {
        padding: 4rem 1.25rem;
    }

    .hero {
        min-height: auto;
        padding-top: calc(var(--nav-height) + 3rem);
        padding-bottom: 3rem;
    }

    .hero-icon {
        width: 96px;
        height: 96px;
        border-radius: 22px;
    }

    .hero-image {
        max-width: 100%;
    }

    .screenshot-gallery .screenshot-wide {
        max-width: 100%;
    }

    .footer-links {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .spec-grid {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
}
