/* ============================================
   EPHEMERAL TRACE — Shared Styles
   ============================================ */

:root {
    --black: #0a0a0a;
    --deep: #111111;
    --surface: #161616;
    --surface-raised: #1c1c1c;
    --border: rgba(255,255,255,0.06);
    --border-hover: rgba(255,255,255,0.12);
    --text: #e8e4df;
    --text-muted: #8a857e;
    --text-dim: #5a5650;
    --accent: #2dd4a8;
    --accent-soft: rgba(45,212,168,0.10);
    --accent-glow: rgba(45,212,168,0.25);
    --serif: 'Instrument Serif', Georgia, serif;
    --sans: 'DM Sans', -apple-system, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--sans);
    color: var(--text);
    background: var(--black);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Noise overlay */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ---- NAV ---- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    background: rgba(10,10,10,0.7);
    border-bottom: 1px solid var(--border);
    transition: background 0.3s;
}

.nav-brand {
    font-family: var(--serif);
    font-size: 1.35rem;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.nav-brand em {
    color: var(--accent);
    font-style: italic;
}

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

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: color 0.25s;
}

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

/* Mobile hamburger */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 110;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    transition: transform 0.3s, opacity 0.3s;
    margin: 5px 0;
    border-radius: 1px;
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

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

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 640px) {
    .nav-toggle { display: block; }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(280px, 80vw);
        background: rgba(10,10,10,0.97);
        backdrop-filter: blur(30px) saturate(1.6);
        -webkit-backdrop-filter: blur(30px) saturate(1.6);
        flex-direction: column;
        padding: 6rem 2.5rem 3rem;
        gap: 0;
        border-left: 1px solid var(--border);
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-links.open {
        transform: translateX(0);
    }

    .nav-links li {
        border-bottom: 1px solid var(--border);
    }

    .nav-links a {
        display: block;
        padding: 1.1rem 0;
        font-size: 0.95rem;
        letter-spacing: 0.08em;
    }
}

/* ---- SECTION SHARED ---- */
section { position: relative; }

.section-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 7rem 2rem;
}

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

.section-heading {
    font-family: var(--serif);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.section-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 480px;
    line-height: 1.6;
    font-weight: 300;
}

/* ---- FOOTER ---- */
footer {
    border-top: 1px solid var(--border);
    padding: 2.5rem 2rem;
    text-align: center;
    background: var(--black);
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

@media (max-width: 640px) {
    .footer-inner { flex-direction: column; gap: 1rem; }
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-dim);
    font-weight: 300;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.footer-link {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 300;
    transition: color 0.25s;
}

.footer-link {
    position: relative;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.footer-link:hover { color: var(--accent); }
.footer-link:hover::after { width: 100%; }

/* ---- NAV BRAND HOVER ---- */
.nav-brand {
    transition: opacity 0.25s;
}

.nav-brand:hover {
    opacity: 0.85;
}

/* ---- ANIMATIONS ---- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.stagger-children .reveal:nth-child(1) { transition-delay: 0s; }
.stagger-children .reveal:nth-child(2) { transition-delay: 0.08s; }
.stagger-children .reveal:nth-child(3) { transition-delay: 0.16s; }
.stagger-children .reveal:nth-child(4) { transition-delay: 0.24s; }
.stagger-children .reveal:nth-child(5) { transition-delay: 0.32s; }
.stagger-children .reveal:nth-child(6) { transition-delay: 0.4s; }

/* Selection */
::selection {
    background: var(--accent);
    color: var(--black);
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--text-dim); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }


/* ============================================
   PAGE-LEVEL STYLES (Support, Privacy)
   ============================================ */

.page-header {
    padding: 10rem 2rem 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    width: min(700px, 100vw);
    height: min(700px, 100vw);
    background: radial-gradient(ellipse, var(--accent-soft) 0%, transparent 65%);
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.page-header .section-heading {
    position: relative;
    z-index: 1;
}

.page-header .section-desc {
    position: relative;
    z-index: 1;
    margin: 0 auto;
}

.page-subtitle {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-top: 1rem;
    position: relative;
    z-index: 1;
}

.page-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 2rem 6rem;
}

/* ---- PROSE ---- */
.prose h2 {
    font-family: var(--serif);
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--text);
    margin-top: 3.5rem;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.prose h3 {
    font-family: var(--serif);
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.prose p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.75;
    font-weight: 300;
    margin-bottom: 1.25rem;
}

.prose ul, .prose ol {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.75;
    font-weight: 300;
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.4rem;
}

.prose li::marker {
    color: var(--accent);
}

.prose a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(45,212,168,0.3);
    transition: border-color 0.25s;
}

.prose a:hover {
    border-color: var(--accent);
}

.prose strong {
    color: var(--text);
    font-weight: 500;
}

.prose .highlight-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
}

.prose .highlight-box p {
    margin-bottom: 0;
}

/* ---- PAGE HEADER ANIMATIONS ---- */
.page-header .section-label {
    opacity: 0;
    animation: fadeUp 0.8s 0.1s ease forwards;
}

.page-header .section-heading {
    opacity: 0;
    animation: fadeUp 0.8s 0.25s ease forwards;
}

.page-header .section-desc {
    opacity: 0;
    animation: fadeUp 0.8s 0.4s ease forwards;
}

.page-header .page-subtitle {
    opacity: 0;
    animation: fadeUp 0.8s 0.55s ease forwards;
}


/* ============================================
   SUPPORT PAGE — FAQ & TROUBLESHOOTING
   ============================================ */

.contact-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 3.5rem;
    text-align: center;
    transition: border-color 0.3s;
}

.contact-card:hover {
    border-color: var(--border-hover);
}

.contact-card h2 {
    font-family: var(--serif);
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--text);
    margin-bottom: 0.75rem;
    border-bottom: none;
    padding-bottom: 0;
    margin-top: 0;
}

.contact-card p {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.6;
    font-weight: 300;
    margin-bottom: 1.5rem;
}

.contact-email-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    background: var(--accent);
    color: var(--black);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    border-radius: 100px;
    transition: transform 0.25s, box-shadow 0.25s;
}

.contact-email-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 40px var(--accent-glow);
}

.contact-email-btn svg {
    width: 16px;
    height: 16px;
}

.faq-section-label,
.troubleshooting-section-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 1.5rem;
}

/* FAQ accordion */
.faq-item {
    border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 0;
    cursor: pointer;
    list-style: none;
    font-family: var(--serif);
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text);
    transition: color 0.25s;
    gap: 1rem;
}

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

.faq-item summary::after {
    content: '+';
    font-family: var(--sans);
    font-size: 1.3rem;
    font-weight: 300;
    color: var(--text-dim);
    transition: transform 0.3s, color 0.25s;
    flex-shrink: 0;
    width: 1.5rem;
    text-align: center;
}

.faq-item[open] summary::after {
    content: '\2212';
    color: var(--accent);
    transform: rotate(180deg);
}

.faq-item summary:hover {
    color: var(--accent);
}

.faq-answer {
    padding: 0 0 1.5rem;
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.7;
    font-weight: 300;
    animation: faqOpen 0.3s ease;
}

@keyframes faqOpen {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.faq-answer a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(45,212,168,0.3);
    transition: border-color 0.25s;
}

.faq-answer a:hover {
    border-color: var(--accent);
}

.faq-answer strong {
    color: var(--text);
    font-weight: 500;
}

/* Troubleshooting cards */
.troubleshoot-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.troubleshoot-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem 1.75rem;
    transition: border-color 0.3s;
}

.troubleshoot-card:hover {
    border-color: var(--border-hover);
}

.troubleshoot-card h3 {
    font-family: var(--serif);
    font-size: 1.05rem;
    font-weight: 400;
    color: var(--text);
    margin-bottom: 0.6rem;
}

.troubleshoot-card p {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.65;
    font-weight: 300;
}

.troubleshoot-card ol {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.65;
    font-weight: 300;
    padding-left: 1.25rem;
    margin-top: 0.5rem;
}

.troubleshoot-card li {
    margin-bottom: 0.25rem;
}

.troubleshoot-card li::marker {
    color: var(--accent);
}


/* ============================================
   MICRO-INTERACTIONS & POLISH
   ============================================ */

/* Smooth page transitions — elements fade in on load */
.page-content {
    animation: fadeIn 0.6s 0.3s ease both;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Accent line that pulses subtly on section labels */
.section-label {
    position: relative;
}

/* Contact card button pulse on idle */
.contact-email-btn {
    position: relative;
    overflow: hidden;
}

.contact-email-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: 0 0 20px var(--accent-glow);
    opacity: 0;
    animation: btnGlow 3s ease-in-out infinite;
}

@keyframes btnGlow {
    0%, 100% { opacity: 0; }
    50% { opacity: 0.5; }
}

/* Highlight box accent bar subtle shimmer */
.prose .highlight-box {
    position: relative;
    overflow: hidden;
}

.prose .highlight-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent), rgba(45,212,168,0.3), var(--accent));
    background-size: 100% 200%;
    animation: shimmerBar 4s ease-in-out infinite;
}

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