/* ================================
   Rewind Landing Page Styles
   iOS 26 Design System
   ================================ */

/* CSS Variables - iOS Design System */
:root {
    /* System Colors */
    --ios-blue: #007AFF;
    --ios-blue-dark: #0051D5;
    --ios-gray: #8E8E93;
    --ios-light-gray: #F2F2F7;
    --ios-separator: #E5E5EA;
    --ios-white: #FFFFFF;
    --ios-black: #000000;
    --ios-green: #34C759;
    --ios-red: #FF3B30;

    /* Backgrounds */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8F8FC;
    --bg-tertiary: #F2F2F7;
    --bg-elevated: #FFFFFF;

    /* Labels */
    --label-primary: #000000;
    --label-secondary: #6E6E73;
    --label-tertiary: #A1A1A6;

    /* Fills */
    --fill-primary: #E8E8ED;
    --fill-secondary: #EDEDF2;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12), 0 16px 48px rgba(0, 0, 0, 0.08);

    /* Transitions */
    --ease-ios: cubic-bezier(0.16, 1, 0.3, 1);
    --duration-fast: 0.2s;
    --duration-normal: 0.4s;
    --duration-slow: 0.6s;
}

/* Dark Mode */
[data-theme="dark"] {
    --bg-primary: #000000;
    --bg-secondary: #1C1C1E;
    --bg-tertiary: #2C2C2E;
    --bg-elevated: #1C1C1E;

    --label-primary: #FFFFFF;
    --label-secondary: #ABABAB;
    --label-tertiary: #6E6E73;

    --fill-primary: #2C2C2E;
    --fill-secondary: #38383A;

    --ios-separator: #38383A;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.7), 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.8), 0 16px 48px rgba(0, 0, 0, 0.6);
}

/* Also respect system preference as fallback */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg-primary: #000000;
        --bg-secondary: #1C1C1E;
        --bg-tertiary: #2C2C2E;
        --bg-elevated: #1C1C1E;

        --label-primary: #FFFFFF;
        --label-secondary: #ABABAB;
        --label-tertiary: #6E6E73;

        --fill-primary: #2C2C2E;
        --fill-secondary: #38383A;

        --ios-separator: #38383A;
    }
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', system-ui, sans-serif;
    background: var(--bg-primary);
    color: var(--label-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Selection */
::selection {
    background-color: rgba(0, 122, 255, 0.25);
}

/* ================================
   Settings Bar
   ================================ */
.settings-bar {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    gap: 12px;
}

.toggle-button {
    width: 44px;
    height: 44px;
    background: var(--bg-elevated);
    border: 1px solid var(--ios-separator);
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-ios);
    box-shadow: var(--shadow-sm);
}

.toggle-button:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.toggle-button:active {
    transform: scale(0.95);
}

.toggle-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--label-primary);
}

.theme-icon {
    width: 20px;
    height: 20px;
    color: var(--label-primary);
}

.theme-icon.moon {
    display: none;
}

[data-theme="dark"] .theme-icon.sun {
    display: none;
}

[data-theme="dark"] .theme-icon.moon {
    display: block;
}

/* ================================
   Hero Section
   ================================ */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    position: relative;
    background: var(--bg-primary);
}

.hero-content {
    text-align: center;
    max-width: 600px;
}

/* Logo */
.logo-container {
    position: relative;
    display: inline-block;
    margin-bottom: 32px;
}

.logo-glow {
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle, rgba(0, 122, 255, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse-glow 3s ease-in-out infinite;
    pointer-events: none;
}

.logo {
    width: 120px;
    height: 120px;
    border-radius: 28px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}

/* Title */
.title {
    font-size: clamp(48px, 12vw, 72px);
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--label-primary) 0%, var(--label-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: clamp(18px, 4vw, 22px);
    color: var(--ios-gray);
    margin-bottom: 24px;
    font-weight: 500;
}

.description {
    font-size: 17px;
    color: var(--label-secondary);
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* CTA Button */
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    background: var(--ios-blue);
    color: white;
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    transition: all var(--duration-fast) var(--ease-ios);
}

.cta-button:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.cta-button:active {
    transform: scale(0.98);
}

.cta-arrow {
    width: 20px;
    height: 20px;
    transition: transform var(--duration-fast) var(--ease-ios);
}

.cta-button:hover .cta-arrow {
    transform: translateX(4px);
}

/* Scroll Indicator (Chevron) */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    animation: fade-in-up 1s var(--ease-ios) 1.5s forwards;
    opacity: 0;
}

.scroll-chevron {
    width: 32px;
    height: 32px;
    color: var(--label-tertiary);
    animation: bounce-down 2s ease-in-out infinite;
}

@keyframes bounce-down {

    0%,
    100% {
        transform: translateY(0);
        opacity: 1;
    }

    50% {
        transform: translateY(8px);
        opacity: 0.5;
    }
}

/* ================================
   About Section
   ================================ */
.about {
    padding: 80px 24px;
    background: var(--bg-secondary);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-text {
    font-size: 18px;
    color: var(--label-secondary);
    line-height: 1.7;
    margin-bottom: 48px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.features-inline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

.feature-inline {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-elevated);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s var(--ease-ios);
}

.feature-inline.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-inline svg {
    width: 24px;
    height: 24px;
    stroke: var(--ios-blue);
    flex-shrink: 0;
}

.feature-inline span {
    font-size: 15px;
    font-weight: 500;
    color: var(--label-primary);
}

/* ================================
   Section Common
   ================================ */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: clamp(28px, 6vw, 40px);
    text-align: center;
    margin-bottom: 24px;
    color: var(--label-primary);
}

/* ================================
   Waitlist Section
   ================================ */
.waitlist {
    padding: 100px 24px;
    background: var(--bg-primary);
}

.waitlist-content {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.waitlist-icon {
    width: 80px;
    height: 80px;
    background: rgba(0, 122, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.waitlist-icon svg {
    width: 40px;
    height: 40px;
    stroke: var(--ios-blue);
}

.waitlist-title {
    font-size: clamp(28px, 6vw, 36px);
    margin-bottom: 12px;
    color: var(--label-primary);
}

.waitlist-description {
    font-size: 17px;
    color: var(--label-secondary);
    margin-bottom: 40px;
}

/* Form */
.waitlist-form {
    width: 100%;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 500px) {
    .form-group {
        flex-direction: row;
    }
}

.input-wrapper {
    flex: 1;
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    stroke: var(--ios-gray);
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    font-size: 17px;
    font-family: inherit;
    background: var(--fill-primary);
    border: 2px solid transparent;
    border-radius: 14px;
    color: var(--label-primary);
    outline: none;
    transition: all var(--duration-fast) var(--ease-ios);
}

.input-wrapper input::placeholder {
    color: var(--ios-gray);
}

.input-wrapper input:focus {
    border-color: var(--ios-blue);
    background: var(--bg-elevated);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.15);
}

.submit-button {
    padding: 16px 28px;
    font-size: 17px;
    font-weight: 600;
    font-family: inherit;
    background: var(--ios-blue);
    color: white;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-ios);
    position: relative;
    min-width: 140px;
}

.submit-button:hover {
    background: var(--ios-blue-dark);
    transform: scale(1.02);
}

.submit-button:active {
    transform: scale(0.98);
}

.submit-button.loading {
    pointer-events: none;
}

.submit-button.loading .button-text {
    opacity: 0;
}

.submit-button.loading .button-loader {
    opacity: 1;
}

.button-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    opacity: 0;
    animation: spin 0.8s linear infinite;
}

.form-hint {
    font-size: 13px;
    color: var(--label-tertiary);
    margin-top: 16px;
}

/* Success Message */
.success-message {
    padding: 32px;
    background: rgba(52, 199, 89, 0.1);
    border-radius: 20px;
    animation: scale-in var(--duration-normal) var(--ease-ios);
}

.success-message.hidden {
    display: none;
}

.success-icon {
    width: 60px;
    height: 60px;
    background: var(--ios-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.success-icon svg {
    width: 32px;
    height: 32px;
    stroke: white;
}

.success-message h3 {
    font-size: 22px;
    margin-bottom: 8px;
    color: var(--label-primary);
}

.success-message p {
    font-size: 15px;
    color: var(--label-secondary);
}

/* ================================
   Footer
   ================================ */
.footer {
    padding: 40px 24px;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--ios-separator);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-logo-img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.footer-logo-text {
    font-size: 17px;
    font-weight: 600;
    color: var(--label-primary);
}

.footer-copyright {
    font-size: 13px;
    color: var(--label-tertiary);
}

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

.footer-link {
    font-size: 13px;
    color: var(--label-secondary);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-ios);
}

.footer-link:hover {
    color: var(--ios-blue);
}

/* ================================
   Animations
   ================================ */
@keyframes pulse-glow {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes scale-in {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Entry Animations */
.animate-icon-entry {
    animation: icon-entry 1s var(--ease-ios);
}

.animate-text-entry {
    opacity: 0;
    animation: text-entry 0.8s var(--ease-ios) 0.2s forwards;
}

.animate-subtitle-entry {
    opacity: 0;
    animation: text-entry 0.8s var(--ease-ios) 0.4s forwards;
}

.animate-fade-in {
    opacity: 0;
    animation: text-entry 0.8s var(--ease-ios) 0.6s forwards;
}

.animate-scale-in {
    opacity: 0;
    animation: scale-in 0.6s var(--ease-ios) 0.8s forwards;
}

@keyframes icon-entry {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-10deg);
    }

    60% {
        transform: scale(1.05) rotate(2deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes text-entry {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

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