/* styles.css */

/* Theme Colors - Light Mode (Default) */
:root {
    --primary: #625690;
    --on-primary: #FFFFFF;
    --primary-container: #e7deff;
    --on-primary-container: #4a3e76;
    --secondary: #8f4b3a;
    --on-secondary: #FFFFFF;
    --secondary-container: #ffdbd2;
    --on-secondary-container: #723525;
    --tertiary: #00696b;
    --on-tertiary: #FFFFFF;
    --tertiary-container: #9cf1f1;
    --on-tertiary-container: #004f50;
    --error: #904a44;
    --on-error: #FFFFFF;
    --error-container: #ffdad6;
    --on-error-container: #73332f;
    --surface: #f9f9ff;
    --on-surface: #1a1b20;
    --on-surface-variant: #48454f;
    --outline: #79767f;
    --outline-variant: #c9c5d0;
    --surface-container: #ededf4;
    --surface-container-high: #e8e7ee;
    --neutral-variant: #e6e0f8;
    --on-neutral-variant: #2c2c34;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    :root {
        --primary: #ccbeff;
        --on-primary: #33275e;
        --primary-container: #4a3e76;
        --on-primary-container: #e7deff;
        --secondary: #ffb4a2;
        --on-secondary: #561f11;
        --secondary-container: #723525;
        --on-secondary-container: #ffdbd2;
        --tertiary: #80d4d5;
        --on-tertiary: #003737;
        --tertiary-container: #004f50;
        --on-tertiary-container: #9cf1f1;
        --error: #ffb3ac;
        --on-error: #561e1a;
        --error-container: #73332f;
        --on-error-container: #ffdad6;
        --surface: #111318;
        --on-surface: #e2e2e9;
        --on-surface-variant: #c9c5d0;
        --outline: #938f99;
        --outline-variant: #48454f;
        --surface-container: #1e2025;
        --surface-container-high: #282a2f;
        --neutral-variant: #48454f;
        --on-neutral-variant: #e2e2e9;
    }
}

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', Arial, sans-serif;
    color: var(--on-surface);
    background-color: var(--surface);
    margin: 0;
    padding: 0;
    text-align: center;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.policy-page {
    padding: 2em;
    max-width: 900px;
    margin: auto;
    line-height: 1.7;
    text-align: left;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: color 0.3s ease;
}

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

/* Header */
header {
    background: linear-gradient(135deg, var(--primary), var(--primary-container));
    color: var(--on-primary);
    padding: 5em 1em;
    animation: headerFadeIn 1s ease-in-out;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.5;
    pointer-events: none;
}

header h1 {
    margin: 0;
    font-size: clamp(2.5em, 5vw, 3.5em);
    font-weight: 700;
    animation: slideDown 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    z-index: 1;
}

header p {
    font-size: 1.3em;
    margin-top: 0.5em;
    font-weight: 500;
    animation: fadeInDelay 2s ease-in;
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Main Content */
main {
    padding: 3em 1em;
    animation: fadeInUp 0.8s ease-out;
}

main h2 {
    color: var(--primary);
    font-size: clamp(1.8em, 4vw, 2.5em);
    margin-bottom: 0.5em;
    font-weight: 600;
    animation: fadeInUp 1s ease-out forwards;
}

main p {
    max-width: 700px;
    margin: 0 auto 2em auto;
    animation: fadeInUp 1.2s ease-out forwards;
    font-weight: 400;
}

main p strong {
    color: var(--secondary);
}

/* Links/Buttons */
.links {
    display: flex;
    justify-content: center;
    gap: 1em;
    flex-wrap: wrap;
    animation: fadeInUp 1.4s ease-out forwards;
}

.links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0.5em;
    color: var(--secondary);
    font-weight: 600;
    background-color: var(--secondary-container);
    border: 2px solid var(--secondary);
    padding: 0.8em 2em;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-width: 200px;
}

.links a:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--on-primary);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Policy Page Specific */
.policy-page h1 {
    color: var(--primary);
    text-align: center;
    font-size: clamp(2em, 5vw, 2.8em);
    margin-bottom: 1em;
    animation: fadeInDown 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-weight: 700;
}

.policy-page h2 {
    color: var(--secondary);
    margin-top: 2em;
    margin-bottom: 0.5em;
    font-weight: 600;
    animation: fadeInUp 1s ease-out forwards;
    border-bottom: 2px solid var(--outline-variant);
    padding-bottom: 0.5em;
}

.policy-page p {
    margin-bottom: 1em;
    animation: fadeInUp 1.2s ease-out forwards;
}

.policy-page ul {
    padding-left: 1.5em;
    margin-bottom: 1em;
    list-style-type: disc;
}

.policy-page ul li {
    margin-bottom: 0.5em;
    color: var(--on-surface);
}

/* Footer */
footer {
    background-color: var(--surface-container-high);
    color: var(--on-surface-variant);
    padding: 2em 1em;
    font-size: 0.9em;
    border-top: 1px solid var(--outline-variant);
    transition: background-color 0.3s ease;
}

footer a {
    color: var(--primary);
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--on-primary);
    text-decoration: underline;
}

/* Animations */
@keyframes headerFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes fadeInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

@keyframes fadeInDelay {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        padding: 3em 1em;
    }

    main {
        padding: 2em 1em;
    }

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

    .links a {
        width: 100%;
        max-width: 300px;
    }

    body.policy-page {
        padding: 1em;
    }
}

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

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }

    header, footer {
        display: none;
    }

    .links {
        display: none;
    }
}