/**
 * True Heart - Reset & Base Styles
 * Browser normalization and foundational rules
 */

/* ============================================
   RESET
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Disable text selection everywhere; re-enabled on editable elements below */
    -webkit-user-select: none;
    user-select: none;
}

/* Re-enable text selection inside typed / editable fields */
input, textarea, [contenteditable="true"] {
    -webkit-user-select: text;
    user-select: text;
}

/* ============================================
   BASE
   ============================================ */

/* Teal html background peeks through system bar zones on Android 15+ edge-to-edge */
html {
    background: #3ECFCF;
}

body {
    font-family: 'DM Sans', system-ui, sans-serif;
    background:
        radial-gradient(ellipse 60% 50% at 50% 50%, var(--th-bg-glow-main) 0%, transparent 70%),
        radial-gradient(ellipse 40% 60% at 80% 20%, var(--th-bg-glow-soft) 0%, transparent 60%),
        linear-gradient(135deg, var(--th-bg-secondary) 0%, var(--th-bg-tertiary) 100%);
    min-height: 100vh;
    color: var(--th-text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    overflow-x: hidden;
    /* Safe-area padding: push content below status bar; body::before (fixed) covers gap while scrolling */
    padding-top: var(--th-safe-top);
    padding-bottom: var(--th-safe-bottom);
}

.th-bg-particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.th-bg-particle {
    position: absolute;
    left: 0;
    bottom: -14vh;
    width: var(--th-particle-size, 2px);
    height: var(--th-particle-size, 2px);
    border-radius: 50%;
    background: var(--th-particle-color, var(--th-bg-particle));
    box-shadow: 0 0 10px transparent;
    opacity: var(--th-opacity-min, 0.18);
    will-change: transform, opacity;
    animation-name: thParticleFloat, thParticleTwinkle;
    animation-duration: var(--th-float-duration, 18s), var(--th-twinkle-duration, 4s);
    animation-delay: var(--th-float-delay, 0s), var(--th-twinkle-delay, 0s);
    animation-timing-function: linear, ease-in-out;
    animation-iteration-count: infinite, infinite;
}

@keyframes thParticleFloat {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(var(--th-drift-x, 24px), -122vh, 0);
    }
}

@keyframes thParticleTwinkle {
    0%, 100% {
        opacity: var(--th-opacity-min, 0.18);
        box-shadow: 0 0 8px transparent;
    }
    35% {
        opacity: var(--th-opacity-max, 0.62);
        box-shadow: 0 0 14px var(--th-particle-glow, var(--th-bg-particle-soft));
    }
    65% {
        opacity: var(--th-opacity-mid, 0.32);
        box-shadow: 0 0 10px transparent;
    }
}

@media (prefers-reduced-motion: reduce) {
    .th-bg-particle {
        animation: none;
        opacity: var(--th-opacity-mid, 0.28);
    }
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 500;
    line-height: 1.2;
}

p {
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ============================================
   UTILITIES
   ============================================ */

.text-center {
    text-align: center;
}

.mt-1 { margin-top: var(--th-space-xs); }
.mt-2 { margin-top: var(--th-space-md); }
.mt-3 { margin-top: var(--th-space-lg); }
.mt-4 { margin-top: var(--th-space-xl); }

.mb-1 { margin-bottom: var(--th-space-xs); }
.mb-2 { margin-bottom: var(--th-space-md); }
.mb-3 { margin-bottom: var(--th-space-lg); }
.mb-4 { margin-bottom: var(--th-space-xl); }

.hidden {
    display: none !important;
}