/* ============================================
   AffiList — Shared Styles
   Design System: Calm, feminine, mindful
   "Breathing, not fireworks"
   ============================================ */

html {
    color-scheme: light only;
}

:root {
    /* Brand */
    --primary: #B08DE0;
    --primary-light: #C4A0E8;
    --primary-dark: #9470C8;
    --secondary: #F2A0B3;
    --secondary-light: #F7C1CE;
    --secondary-dark: #D4839A;
    --accent: #A0C8F0;
    --accent-light: #BDD8F5;
    --accent-dark: #7FAED8;
    --blush: #F5B8A0;
    --dark-anchor: #1A1A2E;

    /* Backgrounds */
    --bg-primary: #FAFBFC;
    --bg-secondary: #F4F5F7;
    --bg-tertiary: #EBEDF0;
    --bg-underlay: #EDE4E6;

    /* Text */
    --text-primary: #1A1A2E;
    --text-secondary: #4A4A68;
    --text-tertiary: #8E8EA9;
    --text-placeholder: #B4B4C7;

    /* Legacy aliases (used in some pages) */
    --color-primary: #B08DE0;
    --color-secondary: #F2A0B3;
    --color-text: #1A1A2E;
    --color-text-light: #4A4A68;
    --color-muted: #8E8EA9;
    --color-success: #34C759;
    --color-error: #FF3B30;
    --color-bg: #FAFBFC;

    /* Semantic */
    --success: #34C759;
    --warning: #FF9500;
    --error: #FF3B30;
    --info: #007AFF;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 20px;
    --space-xxl: 24px;
    --space-xxxl: 32px;

    /* Radius */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-xxl: 24px;
    --radius-pill: 9999px;
}

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

html {
    background-color: var(--bg-underlay);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text',
                 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    background: var(--bg-underlay);
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

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

a:hover {
    text-decoration: underline;
}

/* ============================================
   Aurora Orbs — Animated Background
   ============================================ */
.aurora-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 15% 10%, #E4DDE8 0%, transparent 50%),
        radial-gradient(ellipse at 85% 20%, #F0DDE0 0%, transparent 45%),
        radial-gradient(ellipse at 50% 50%, #F0EAED 0%, transparent 60%),
        radial-gradient(ellipse at 20% 80%, #E8E0EA 0%, transparent 50%),
        radial-gradient(ellipse at 80% 75%, #EDE0E4 0%, transparent 45%),
        linear-gradient(180deg, #EDE4E6 0%, #F0EAED 40%, #E8E0EA 100%);
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(30vmin);
    pointer-events: none;
    will-change: transform;
}

.orb--rose {
    width: 55vmin;
    height: 55vmin;
    background: #E8D0D8;
    opacity: 0.25;
    left: 20%;
    top: 15%;
    animation: drift-1 22s ease-in-out infinite alternate;
}

.orb--lavender {
    width: 50vmin;
    height: 50vmin;
    background: #DED0E8;
    opacity: 0.2;
    left: 70%;
    top: 40%;
    animation: drift-2 26s ease-in-out infinite alternate;
}

.orb--sky {
    width: 45vmin;
    height: 45vmin;
    background: #D0D8E8;
    opacity: 0.18;
    left: 25%;
    top: 65%;
    animation: drift-3 24s ease-in-out infinite alternate;
}

.orb--peach {
    width: 40vmin;
    height: 40vmin;
    background: #F0E0D8;
    opacity: 0.15;
    left: 75%;
    top: 10%;
    animation: drift-4 28s ease-in-out infinite alternate;
}

.orb--rose-lavender {
    width: 42vmin;
    height: 42vmin;
    background: #E0D0DC;
    opacity: 0.2;
    left: 45%;
    top: 80%;
    animation: drift-5 25s ease-in-out infinite alternate;
}

@keyframes drift-1 {
    0%   { transform: translate(0, 0); }
    33%  { transform: translate(5vw, -3vh); }
    66%  { transform: translate(-3vw, 4vh); }
    100% { transform: translate(2vw, -2vh); }
}

@keyframes drift-2 {
    0%   { transform: translate(0, 0); }
    33%  { transform: translate(-4vw, 3vh); }
    66%  { transform: translate(3vw, -2vh); }
    100% { transform: translate(-2vw, 5vh); }
}

@keyframes drift-3 {
    0%   { transform: translate(0, 0); }
    33%  { transform: translate(3vw, 2vh); }
    66%  { transform: translate(-5vw, -3vh); }
    100% { transform: translate(4vw, 1vh); }
}

@keyframes drift-4 {
    0%   { transform: translate(0, 0); }
    33%  { transform: translate(-3vw, -4vh); }
    66%  { transform: translate(2vw, 3vh); }
    100% { transform: translate(-4vw, -1vh); }
}

@keyframes drift-5 {
    0%   { transform: translate(0, 0); }
    33%  { transform: translate(4vw, -2vh); }
    66%  { transform: translate(-2vw, 5vh); }
    100% { transform: translate(3vw, -3vh); }
}

/* ============================================
   Liquid Glass Effects (Apple iOS 26 style)
   - Heavy blur with saturate for "refraction"
   - Inner glow (inset box-shadow) for edge lighting
   - Top highlight border for specular reflection
   - Soft drop shadow underneath
   ============================================ */
.glass-card {
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(32px) saturate(1.6) brightness(1.05);
    -webkit-backdrop-filter: blur(32px) saturate(1.6) brightness(1.05);
    border: 0.5px solid rgba(255, 255, 255, 0.35);
    border-top: 0.5px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-xl);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(255, 255, 255, 0.05),
        0 4px 16px rgba(0, 0, 0, 0.06),
        0 1px 3px rgba(0, 0, 0, 0.04);
}

.glass-card--clear {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(40px) saturate(1.4) brightness(1.02);
    -webkit-backdrop-filter: blur(40px) saturate(1.4) brightness(1.02);
    border: 0.5px solid rgba(255, 255, 255, 0.2);
    border-top: 0.5px solid rgba(255, 255, 255, 0.35);
    border-radius: var(--radius-xl);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 2px 8px rgba(0, 0, 0, 0.04);
}

.glass-card--interactive {
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(32px) saturate(1.6) brightness(1.05);
    -webkit-backdrop-filter: blur(32px) saturate(1.6) brightness(1.05);
    border: 0.5px solid rgba(255, 255, 255, 0.35);
    border-top: 0.5px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-xl);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(255, 255, 255, 0.05),
        0 4px 16px rgba(0, 0, 0, 0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}

.glass-card--interactive:hover {
    transform: scale(1.02);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(255, 255, 255, 0.08),
        0 8px 32px rgba(176, 141, 224, 0.18),
        0 2px 8px rgba(0, 0, 0, 0.06);
}

.glass-card--interactive:active {
    transform: scale(0.98);
}

.glass-card--tinted {
    background: rgba(176, 141, 224, 0.14);
    backdrop-filter: blur(32px) saturate(1.6) brightness(1.05);
    -webkit-backdrop-filter: blur(32px) saturate(1.6) brightness(1.05);
    border: 0.5px solid rgba(176, 141, 224, 0.25);
    border-top: 0.5px solid rgba(176, 141, 224, 0.4);
    border-radius: var(--radius-xl);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(176, 141, 224, 0.05),
        0 4px 16px rgba(176, 141, 224, 0.1);
}

/* ============================================
   Navigation
   ============================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(32px) saturate(1.6) brightness(1.05);
    -webkit-backdrop-filter: blur(32px) saturate(1.6) brightness(1.05);
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.35);
    box-shadow:
        inset 0 -1px 0 rgba(255, 255, 255, 0.1),
        0 1px 4px rgba(0, 0, 0, 0.04);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
}

.nav-logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark-anchor);
    text-decoration: none;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-logo img {
    width: 28px;
    height: 28px;
    border-radius: 7px;
}

.nav-logo:hover {
    text-decoration: none;
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

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

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

/* Hamburger */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--dark-anchor);
    margin: 5px 0;
    transition: all 0.3s;
    border-radius: 1px;
}

.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);
}

/* ============================================
   Main Content — flex to push footer down
   ============================================ */
.page-content,
.support-container,
.error-page {
    flex: 1;
    position: relative;
    z-index: 1;
}

/* ============================================
   Footer
   ============================================ */
footer {
    padding: 40px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    text-align: center;
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.footer-links a {
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
    position: relative;
    padding: 8px 12px;
}

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

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 12px;
    right: 12px;
    height: 1px;
    background: var(--primary);
    opacity: 0;
    transition: opacity 0.2s;
}

.footer-links a:hover::after {
    opacity: 0.4;
}

footer p {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* ============================================
   Back Link
   ============================================ */
.back-link {
    display: inline-block;
    margin-bottom: 32px;
    font-size: 15px;
    color: var(--primary);
}

.back-link:hover {
    opacity: 0.7;
    text-decoration: none;
}

/* ============================================
   Page Content (subpages: privacy, terms, support)
   ============================================ */
.page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 80px 40px;
    background: transparent;
}

.page-content h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--text-primary);
    letter-spacing: -1px;
}

.page-content h2 {
    font-size: 24px;
    font-weight: 600;
    margin-top: 40px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.page-content p {
    font-size: 17px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.page-content strong {
    font-weight: 600;
    color: var(--text-primary);
}

.page-content ul {
    margin-left: 24px;
    margin-bottom: 16px;
}

.page-content li {
    font-size: 17px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* ============================================
   Scroll Reveal Animation
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ============================================
   Scroll to Top Button
   ============================================ */
.scroll-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    box-shadow: 0 6px 12px rgba(176, 141, 224, 0.3);
    z-index: 999;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* ============================================
   Responsive — Common
   ============================================ */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 20px;
    }

    .hamburger {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 52px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(20px) saturate(1.4);
        -webkit-backdrop-filter: blur(20px) saturate(1.4);
        flex-direction: column;
        padding: 20px;
        gap: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    }

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

    .nav-links a {
        padding: 12px 0;
        font-size: 16px;
    }

    .page-content {
        padding: 60px 20px;
    }

    .page-content h1 {
        font-size: 36px;
    }

    .page-content h2 {
        font-size: 20px;
        margin-top: 32px;
    }

    .page-content p,
    .page-content li {
        font-size: 16px;
    }

    footer {
        padding: 40px 20px;
    }
}

@media (max-width: 480px) {
    .page-content {
        padding: 40px 16px;
    }

    .page-content h1 {
        font-size: 32px;
    }

    .page-content h2 {
        font-size: 18px;
    }

    footer {
        padding: 32px 16px;
    }

    .footer-links {
        gap: 16px;
    }

    .footer-links a {
        font-size: 12px;
    }

    .scroll-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}

/* ============================================
   Screen Reader Only (Accessibility)
   ============================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   Skip to Content (Accessibility)
   ============================================ */
.skip-to-content {
    position: absolute;
    top: -100%;
    left: 16px;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    border-radius: 0 0 8px 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10001;
    transition: top 0.2s;
    text-decoration: none;
}

.skip-to-content:focus {
    top: 0;
}

.skip-to-content:hover {
    text-decoration: none;
    color: white;
}

/* ============================================
   Focus Visible (Accessibility)
   ============================================ */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Remove default outline for mouse users */
*:focus:not(:focus-visible) {
    outline: none;
}

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .scroll-top {
        transition: none;
    }

    .orb {
        animation: none !important;
    }
}

/* Dark mode disabled — site uses light theme only (matching iOS app) */
