/* ============================================
   Anka TMS — Shared Design System
   "Warm Playful Light" — palette from Sparkle app (AppTheme.swift)
   ============================================ */

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

:root {
    /* Core surfaces */
    --color-bg: #FDFCF8;            /* warm off-white */
    --color-surface: #F4F3FA;       /* soft violet-tinted surface */
    --color-card: #FFFFFF;
    --color-border: #E9E6F5;

    /* Type */
    --color-heading: #3C3489;       /* deep purple */
    --color-text: #3A3651;
    --color-text-secondary: #6B6685;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Fraunces', Georgia, serif;

    /* Brand accents */
    --purple: #7B61FF;
    --purple-deep: #3C3489;
    --gold: #F5A623;
    --gold-light: #FFD166;
    --cyan: #2DE4FF;
    --magenta: #FF3FB5;

    /* Signature gradients (use sparingly: logo, CTAs, small accents) */
    --gradient-brand: linear-gradient(135deg, var(--purple) 0%, var(--magenta) 100%);
    --gradient-star: linear-gradient(135deg, #FFD700 0%, #FF8C00 100%);
    --gradient-spark: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 50%, var(--magenta) 100%);

    /* Elevation */
    --shadow-soft: 0 2px 12px rgba(60, 52, 137, 0.06);
    --shadow-card: 0 6px 24px rgba(60, 52, 137, 0.09);
    --shadow-lift: 0 12px 40px rgba(60, 52, 137, 0.14);
    --radius-card: 20px;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ---- Nav ---- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(253, 252, 248, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--color-border);
}

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

.logo {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--purple-deep);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.logo span {
    background: none;
    -webkit-text-fill-color: currentColor;
}

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

.nav-links a {
    font-size: 0.82rem;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.2s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--purple), var(--magenta));
    border-radius: 1px;
    transition: width 0.3s ease;
}

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

.nav-links a:hover::after {
    width: 100%;
}

/* Nav CTA button (no underline effect) */
.nav-links .nav-cta {
    padding: 7px 18px;
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--gradient-brand);
    color: #fff;
    border-radius: 980px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.nav-links .nav-cta::after {
    display: none;
}

.nav-links .nav-cta:hover {
    color: #fff;
    transform: scale(1.04);
    box-shadow: 0 4px 16px rgba(123, 97, 255, 0.35);
}

/* Breadcrumb nav variant */
.nav-inner .breadcrumb {
    color: var(--color-text-secondary);
    font-size: 0.82rem;
}

.nav-inner .breadcrumb span {
    margin: 0 8px;
    color: var(--color-border);
}

.nav-inner .breadcrumb a {
    font-size: 0.82rem;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.nav-inner .breadcrumb a:hover {
    color: var(--purple);
}

/* ---- Sections ---- */
section {
    padding: 120px 24px;
}

.container {
    max-width: 720px;
    margin: 0 auto;
}

.container-wide {
    max-width: 980px;
    margin: 0 auto;
}

.section-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}

.label-purple { color: var(--purple); }
.label-gold { color: var(--gold); }
.label-magenta { color: var(--magenta); }
/* Legacy label names used in page markup */
.label-teal { color: var(--purple); }
.label-amber { color: var(--gold); }
.label-violet { color: var(--purple); }
.label-indigo { color: var(--purple-deep); }

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: var(--font);
    border-radius: 980px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-hero {
    background: var(--gradient-star);
    color: #3A2A00;
    font-weight: 600;
    box-shadow: 0 4px 24px rgba(245, 166, 35, 0.35);
}

.btn-hero:hover {
    transform: scale(1.04) translateY(-1px);
    box-shadow: 0 8px 32px rgba(245, 166, 35, 0.5);
}

.btn-primary {
    background: var(--gradient-brand);
    color: #fff;
    box-shadow: 0 4px 16px rgba(123, 97, 255, 0.3);
}

.btn-primary:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 24px rgba(123, 97, 255, 0.45);
}

.btn-outline {
    background: transparent;
    color: var(--purple);
    border: 1.5px solid var(--purple);
}

.btn-outline:hover {
    background: var(--purple);
    color: #fff;
    box-shadow: 0 4px 16px rgba(123, 97, 255, 0.25);
}

.btn-ghost {
    background: rgba(60, 52, 137, 0.05);
    color: var(--purple-deep);
    border: 1.5px solid rgba(60, 52, 137, 0.18);
}

.btn-ghost:hover {
    background: rgba(60, 52, 137, 0.09);
    border-color: rgba(60, 52, 137, 0.3);
}

/* ---- App Store badge ---- */
.appstore-badge {
    display: inline-block;
    line-height: 0;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.appstore-badge img {
    height: 52px;
    width: auto;
    display: block;
}

.appstore-badge:hover {
    transform: scale(1.04);
    filter: drop-shadow(0 6px 16px rgba(60, 52, 137, 0.25));
}

/* ---- Cards ---- */
.card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card);
}

/* ---- Footer ---- */
footer {
    padding: 40px 24px;
    background: linear-gradient(180deg, var(--color-surface) 0%, #EDEAF8 100%);
    border-top: 1px solid var(--color-border);
}

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

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

.footer-links {
    display: flex;
    gap: 24px;
    list-style: none;
}

.footer-links a {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

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

/* ---- Animations ---- */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

@keyframes pulse {
    0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.1); }
}

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

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

@keyframes twinkle {
    0%, 100% { opacity: 0.25; transform: scale(1); }
    50% { opacity: 0.9; transform: scale(1.15); }
}

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

.container-lg {
    max-width: 1100px;
    margin: 0 auto;
}

/* ---- Content pages (privacy, support, terms) ---- */
.page-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 116px 24px 100px;
}

.page-header {
    margin-bottom: 48px;
}

.page-header h1 {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--color-heading);
    margin-bottom: 8px;
}

.page-header .updated {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

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

.page-section {
    margin-bottom: 36px;
}

.page-section h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-heading);
    margin-bottom: 8px;
}

.page-section p {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

.page-section a {
    color: var(--purple);
    text-decoration: none;
}

.page-section a:hover {
    text-decoration: underline;
}

.page-section ul {
    list-style: none;
    padding: 0;
    margin-top: 8px;
}

.page-section li {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
    padding-left: 20px;
    position: relative;
}

.page-section li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold);
}

.highlight-box {
    background: linear-gradient(135deg, var(--color-surface), #FBF6EC);
    border-left: 3px solid var(--gold);
    border-radius: 0 12px 12px 0;
    padding: 20px 24px;
    margin-bottom: 36px;
}

.highlight-box p {
    font-size: 0.95rem;
    color: var(--color-text);
    font-weight: 500;
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .fade-in {
        opacity: 1;
        transform: none;
    }
}

/* ---- Mobile ---- */
@media (max-width: 600px) {
    section {
        padding: 80px 20px;
    }

    .nav-links {
        gap: 16px;
    }

    .nav-links a {
        font-size: 0.78rem;
    }

    .appstore-badge img {
        height: 48px;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .page-content {
        padding: 100px 20px 80px;
    }
}
