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

/* CSS Custom Properties (Variables) */
:root {
    --background: hsl(0, 0%, 100%);
    --foreground: hsl(20, 14.3%, 4.1%);
    --muted: hsl(60, 4.8%, 95.9%);
    --muted-foreground: hsl(25, 5.3%, 44.7%);
    --popover: hsl(0, 0%, 100%);
    --popover-foreground: hsl(20, 14.3%, 4.1%);
    --card: hsl(0, 0%, 100%);
    --card-foreground: hsl(20, 14.3%, 4.1%);
    --border: hsl(20, 5.9%, 90%);
    --input: hsl(20, 5.9%, 90%);
    --primary: hsl(207, 90%, 54%);
    --primary-foreground: hsl(211, 100%, 99%);
    --secondary: hsl(60, 4.8%, 95.9%);
    --secondary-foreground: hsl(24, 9.8%, 10%);
    --accent: hsl(60, 4.8%, 95.9%);
    --accent-foreground: hsl(24, 9.8%, 10%);
    --destructive: hsl(0, 84.2%, 60.2%);
    --destructive-foreground: hsl(60, 9.1%, 97.8%);
    --ring: hsl(20, 14.3%, 4.1%);
    --radius: 0.5rem;
    
    /* True Apple palette - light theme */
    --apple-background: hsl(0, 0%, 99%);
    --apple-surface: hsl(0, 0%, 96%);
    --apple-card: hsl(0, 0%, 98%);
    --apple-blue: hsl(212, 100%, 50%);
    --apple-blue-light: hsl(212, 100%, 95%);
    --text-primary: hsl(0, 0%, 7%);
    --text-secondary: hsl(0, 0%, 28%);
    --text-muted: hsl(0, 0%, 46%);
    --border-subtle: hsl(0, 0%, 86%);
}

/* Base Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
}

html {
    scroll-behavior: smooth;
}

/* Utility Classes */
.bg-apple-background { background-color: var(--apple-background); }
.bg-apple-surface { background-color: var(--apple-surface); }
.bg-apple-card { background-color: var(--apple-card); }
.text-apple-blue { color: var(--apple-blue); }
.bg-apple-blue { background-color: var(--apple-blue); }
.bg-apple-blue-light { background-color: var(--apple-blue-light); }
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.border-subtle { border-color: var(--border-subtle); }

/* Layout Classes */
.fixed { position: fixed; }
.absolute { position: absolute; }
.relative { position: relative; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.top-1\/3 { top: 33.333333%; }
.bottom-1\/3 { bottom: 33.333333%; }
.right-1\/4 { right: 25%; }
.left-1\/4 { left: 25%; }
.z-10 { z-index: 10; }
.z-50 { z-index: 50; }
.-z-10 { z-index: -10; }

/* Display Classes */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

/* Spacing Classes */
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.p-12 { padding: 3rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.py-32 { padding-top: 8rem; padding-bottom: 8rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }
.mb-24 { margin-bottom: 6rem; }
.mt-16 { margin-top: 4rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-24 > * + * { margin-top: 6rem; }

/* Sizing Classes */
.w-full { width: 100%; }
.w-px { width: 1px; }
.w-12 { width: 3rem; }
.w-20 { width: 5rem; }
.w-24 { width: 6rem; }
.h-20 { height: 5rem; }
.h-24 { height: 6rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-6xl { max-width: 72rem; }
.min-h-screen { min-height: 100vh; }

/* Text Classes */
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }
.text-6xl { font-size: 3.75rem; }
.text-7xl { font-size: 4.5rem; }
.text-8xl { font-size: 6rem; }

/* Font Weight Classes */
.font-light { font-weight: 300; }
.font-extralight { font-weight: 200; }
.font-medium { font-weight: 500; }

/* Typography Classes */
.tracking-tight { letter-spacing: -0.025em; }
.leading-none { line-height: 1; }
.leading-relaxed { line-height: 1.625; }
.leading-tight { line-height: 1.25; }

/* Border Classes */
.border { border-width: 1px; }
.border-t { border-top-width: 1px; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-full { border-radius: 9999px; }
.rounded-3xl { border-radius: 1.5rem; }

/* Background Classes */
.bg-apple-blue\/20 { background-color: rgba(0, 122, 255, 0.2); }
.bg-apple-blue\/15 { background-color: rgba(0, 122, 255, 0.15); }

/* Opacity Classes */
.opacity-40 { opacity: 0.4; }

/* Pointer Events */
.pointer-events-none { pointer-events: none; }

/* Overflow */
.overflow-x-hidden { overflow-x: hidden; }

/* Responsive Classes */
@media (min-width: 768px) {
    .md\:text-2xl { font-size: 1.5rem; }
    .md\:text-3xl { font-size: 1.875rem; }
    .md\:text-4xl { font-size: 2.25rem; }
    .md\:text-5xl { font-size: 3rem; }
    .md\:text-6xl { font-size: 3.75rem; }
    .md\:text-7xl { font-size: 4.5rem; }
    .md\:text-8xl { font-size: 6rem; }
    .md\:text-xl { font-size: 1.25rem; }
    .md\:text-2xl { font-size: 1.5rem; }
    .md\:text-3xl { font-size: 1.875rem; }
}

@media (min-width: 1024px) {
    .lg\:text-3xl { font-size: 1.875rem; }
    .lg\:text-7xl { font-size: 4.5rem; }
    .lg\:text-8xl { font-size: 6rem; }
}

/* Custom Classes */
.apple-gradient {
    background: linear-gradient(135deg, var(--apple-background) 0%, var(--apple-surface) 100%);
}

.text-gradient {
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.apple-card {
    background: var(--apple-card);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.apple-button {
    background: var(--apple-blue);
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: white;
    font-weight: 500;
    padding: 1rem 2rem;
    border-radius: 9999px;
    font-size: 1.125rem;
    cursor: pointer;
}

.apple-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(0, 122, 255, 0.3);
}

.apple-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Form Styles */
.form-input {
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--apple-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    border-radius: 0.75rem;
    font-size: 1.125rem;
    font-weight: 300;
    transition: all 0.3s;
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus {
    outline: none;
    border-color: var(--apple-blue);
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2);
}

/* Animation Classes */
.reveal-text {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, transform;
}

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

/* Ensure elements are visible when they should be */
.reveal-text.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Toast Styles */
.toast {
    background: var(--apple-card);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
    margin-bottom: 0.5rem;
    max-width: 400px;
    animation: slideIn 0.3s ease-out;
}

.toast.success {
    border-left: 4px solid #10b981;
}

.toast.error {
    border-left: 4px solid #ef4444;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Success State Styles */
.success-card {
    text-align: center;
    padding: 3rem;
    max-width: 28rem;
    margin: 0 auto;
}

.success-icon {
    width: 5rem;
    height: 5rem;
    background: var(--apple-blue-light);
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin: 0 auto 1.5rem;
    /* Safari-specific fixes */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Safari-specific SVG fixes */
.success-icon svg {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: transform;
}

.success-icon svg path {
    stroke: currentColor !important;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* Fallback for Safari SVG issues */
.success-icon::before {
    content: "✓";
    position: absolute;
    font-size: 2rem;
    color: var(--apple-blue);
    font-weight: bold;
    display: none;
}

/* Show fallback if SVG is not visible */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    .success-icon:not(:has(svg:not([style*="display: none"])))::before {
        display: block;
    }
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 640px) {
    .text-5xl { font-size: 2.5rem; }
    .text-6xl { font-size: 3rem; }
    .text-7xl { font-size: 3.5rem; }
    .text-8xl { font-size: 4rem; }
    .py-32 { padding-top: 4rem; padding-bottom: 4rem; }
    .space-y-24 > * + * { margin-top: 3rem; }
}

/* Mobile-only line break */
.mobile-break {
    display: block;
}

@media (min-width: 768px) {
    .mobile-break {
        display: none;
    }
}

/* Focus States */
.apple-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.3);
}

.form-input:focus {
    outline: none;
    border-color: var(--apple-blue);
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2);
}

/* Text Animation Classes */
.whisper-fade-in {
    opacity: 0;
    animation: whisperFadeIn 1s ease-in-out 0.5s forwards;
}

.we-reveal {
    opacity: 0;
    animation: weReveal 0.1s ease-in-out 1.5s forwards;
}

.all-reveal {
    opacity: 0;
    animation: allReveal 0.1s ease-in-out 1.8s forwards;
}

.ears-reveal {
    opacity: 0;
    animation: earsReveal 0.1s ease-in-out 2.1s forwards;
}

@keyframes whisperFadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 0.7;
    }
}

@keyframes weReveal {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes allReveal {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes earsReveal {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
} 