<x-layouts.auth title="Join {{ config('app.name') }} | Membership">
<header class="bg-[#f9f9f9] flex justify-between items-center w-full px-8 py-4 max-w-full fixed top-0 z-50">
    <div class="flex items-center gap-2">
        <span class="text-2xl font-serif italic text-neutral-900">{{ config('app.name') }}</span>
    </div>
    <div class="hidden md:flex items-center gap-8">
        <a class="text-neutral-600 font-medium hover:text-[#765a25] transition-colors duration-300" href="#">Solutions</a>
        <a class="text-neutral-600 font-medium hover:text-[#765a25] transition-colors duration-300" href="#">Philosophy</a>
    </div>
    <div class="flex items-center gap-4">
        <a href="{{ route('login') }}" class="text-neutral-600 font-medium hover:text-[#765a25] transition-colors text-sm">Sign In</a>
    </div>
</header>

<main class="pt-32 pb-20 px-6 max-w-7xl mx-auto grid grid-cols-1 lg:grid-cols-12 gap-12 lg:gap-20">
    <!-- Editorial Side Column -->
    <div class="lg:col-span-5 flex flex-col justify-start">
        <div class="sticky top-32">
            <span class="text-secondary font-medium tracking-widest uppercase text-xs block mb-4">Membership Application</span>
            <h1 class="text-5xl lg:text-7xl font-serif text-on-surface leading-[1.1] mb-8">Open your account with confidence.</h1>
            <p class="text-on-surface-variant text-lg leading-relaxed max-w-md mb-12">
                Join an exclusive circle of valued clients. Our onboarding process is designed for precision and absolute security.
            </p>
            <div class="bg-surface-container-low p-8 space-y-6">
                <div class="flex items-start gap-4">
                    <span class="material-symbols-outlined text-secondary text-3xl">verified_user</span>
                    <div>
                        <h3 class="font-serif text-xl mb-1">Encrypted Identity</h3>
                        <p class="text-sm text-on-surface-variant">Your personal data is secured using military-grade protocols.</p>
                    </div>
                </div>
                <div class="flex items-start gap-4">
                    <span class="material-symbols-outlined text-secondary text-3xl">account_balance</span>
                    <div>
                        <h3 class="font-serif text-xl mb-1">Global Liquidity</h3>
                        <p class="text-sm text-on-surface-variant">Instant access to major reserve currencies from a single interface.</p>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- Enrollment Form Column -->
    <div class="lg:col-span-7">
        <div class="bg-surface-container-lowest p-8 lg:p-12 shadow-[0_24px_48px_rgba(0,0,0,0.04)]">
            @if($errors->any())
                <div class="mb-8 bg-error-container text-on-error-container p-4 rounded-sm text-sm">
                    @foreach($errors->all() as $error)
                        <p>{{ $error }}</p>
                    @endforeach
                </div>
            @endif

            <form action="{{ route('register') }}" method="POST" class="space-y-12">
                @csrf
                <!-- Section: Foundation -->
                <section>
                    <div class="flex items-center gap-4 mb-8">
                        <span class="text-primary font-serif text-2xl">01</span>
                        <h2 class="text-2xl font-serif">The Foundation</h2>
                    </div>
                    <div class="grid grid-cols-1 md:grid-cols-2 gap-8">
                        <div class="md:col-span-2">
                            <label class="block text-xs font-semibold text-on-surface-variant uppercase tracking-tighter mb-2">Preferred Currency</label>
                            <div class="relative">
                                <select name="currency" class="w-full bg-surface-container-high border-none py-4 px-4 text-on-surface focus:ring-0 focus:border-b-2 focus:border-secondary appearance-none transition-all">
                                    @foreach(\App\Enums\Currency::cases() as $cur)
                                        <option value="{{ $cur->value }}" {{ old('currency') === $cur->value ? 'selected' : '' }}>{{ $cur->name }} ({{ $cur->value }})</option>
                                    @endforeach
                                </select>
                                <span class="material-symbols-outlined absolute right-4 top-4 pointer-events-none text-on-surface-variant">expand_more</span>
                            </div>
                        </div>
                        <div>
                            <label class="block text-xs font-semibold text-on-surface-variant uppercase tracking-tighter mb-2">First Name</label>
                            <input name="first_name" value="{{ old('first_name') }}" class="w-full bg-surface-container-high border-none py-4 px-4 text-on-surface focus:ring-0 focus:border-b-2 focus:border-secondary transition-all" placeholder="First name" type="text" required/>
                        </div>
                        <div>
                            <label class="block text-xs font-semibold text-on-surface-variant uppercase tracking-tighter mb-2">Last Name</label>
                            <input name="last_name" value="{{ old('last_name') }}" class="w-full bg-surface-container-high border-none py-4 px-4 text-on-surface focus:ring-0 focus:border-b-2 focus:border-secondary transition-all" placeholder="Last name" type="text" required/>
                        </div>
                        <div>
                            <label class="block text-xs font-semibold text-on-surface-variant uppercase tracking-tighter mb-2">Date of Birth</label>
                            <input name="dob" value="{{ old('dob') }}" class="w-full bg-surface-container-high border-none py-4 px-4 text-on-surface focus:ring-0 focus:border-b-2 focus:border-secondary transition-all" type="date"/>
                        </div>
                        <div>
                            <label class="block text-xs font-semibold text-on-surface-variant uppercase tracking-tighter mb-2">Phone Number</label>
                            <input name="phone" value="{{ old('phone') }}" class="w-full bg-surface-container-high border-none py-4 px-4 text-on-surface focus:ring-0 focus:border-b-2 focus:border-secondary transition-all" placeholder="+1 (000) 000-0000" type="tel"/>
                        </div>
                    </div>
                </section>

                <!-- Section: Residence -->
                <section>
                    <div class="flex items-center gap-4 mb-8">
                        <span class="text-primary font-serif text-2xl">02</span>
                        <h2 class="text-2xl font-serif">Legal Residence</h2>
                    </div>
                    <div class="space-y-8">
                        <div>
                            <label class="block text-xs font-semibold text-on-surface-variant uppercase tracking-tighter mb-2">Address</label>
                            <input name="address" value="{{ old('address') }}" class="w-full bg-surface-container-high border-none py-4 px-4 text-on-surface focus:ring-0 focus:border-b-2 focus:border-secondary transition-all mb-4" placeholder="Street Address" type="text"/>
                        </div>
                        <div>
                            <label class="block text-xs font-semibold text-on-surface-variant uppercase tracking-tighter mb-2">Country</label>
                            <input name="country" value="{{ old('country') }}" class="w-full bg-surface-container-high border-none py-4 px-4 text-on-surface focus:ring-0 focus:border-b-2 focus:border-secondary transition-all" placeholder="Country" type="text"/>
                        </div>
                    </div>
                </section>

                <!-- Section: Connectivity -->
                <section>
                    <div class="flex items-center gap-4 mb-8">
                        <span class="text-primary font-serif text-2xl">03</span>
                        <h2 class="text-2xl font-serif">Secure Connectivity</h2>
                    </div>
                    <div class="grid grid-cols-1 md:grid-cols-2 gap-8">
                        <div class="md:col-span-2">
                            <label class="block text-xs font-semibold text-on-surface-variant uppercase tracking-tighter mb-2">Primary Email</label>
                            <input name="email" value="{{ old('email') }}" class="w-full bg-surface-container-high border-none py-4 px-4 text-on-surface focus:ring-0 focus:border-b-2 focus:border-secondary transition-all" placeholder="you@example.com" type="email" required/>
                        </div>
                    </div>
                </section>

                <!-- Section: Security -->
                <section>
                    <div class="flex items-center gap-4 mb-8">
                        <span class="text-primary font-serif text-2xl">04</span>
                        <h2 class="text-2xl font-serif">Security Setup</h2>
                    </div>
                    <div class="space-y-8">
                        <div>
                            <label class="block text-xs font-semibold text-on-surface-variant uppercase tracking-tighter mb-2">Access Key (Password)</label>
                            <input name="password" class="w-full bg-surface-container-high border-none py-4 px-4 text-on-surface focus:ring-0 focus:border-b-2 focus:border-secondary transition-all" placeholder="Complex alphanumeric sequence" type="password" required/>
                        </div>
                        <div>
                            <label class="block text-xs font-semibold text-on-surface-variant uppercase tracking-tighter mb-2">Confirm Access Key</label>
                            <input name="password_confirmation" class="w-full bg-surface-container-high border-none py-4 px-4 text-on-surface focus:ring-0 focus:border-b-2 focus:border-secondary transition-all" placeholder="Re-enter password" type="password" required/>
                        </div>
                    </div>
                </section>

                <!-- CTA -->
                <div class="pt-8 border-t border-outline-variant/15 flex flex-col items-center gap-6">
                    <button class="w-full py-5 bg-gradient-to-r from-primary to-primary-container text-on-primary font-body font-semibold tracking-widest uppercase text-sm rounded-md shadow-lg hover:opacity-90 transition-all flex items-center justify-center gap-3 group" type="submit">
                        Finalize Enrollment
                        <span class="material-symbols-outlined group-hover:translate-x-1 transition-transform">arrow_forward</span>
                    </button>
                    <p class="text-xs text-on-surface-variant text-center px-8">
                        By finalizing, you attest that the information provided is accurate and you agree to the
                        <a class="text-secondary font-semibold hover:underline" href="#">Terms of Service</a> and
                        <a class="text-secondary font-semibold hover:underline" href="#">Privacy Protocols</a>.
                    </p>
                </div>
            </form>
        </div>
        <div class="mt-8 flex justify-center gap-4 items-center text-on-surface-variant">
            <span class="text-xs font-medium">Already have an account?</span>
            <a class="text-primary font-semibold text-sm hover:underline" href="{{ route('login') }}">Return to Sign In</a>
        </div>
    </div>
</main>
</x-layouts.auth>
