@extends('layouts.app')
@section('title', 'Contact Us')
@section('meta_description', 'Contact TrollMasters.AI with questions, special requests, or project details. We respond fast. All communications are completely anonymous and confidential.')
@section('meta_keywords', 'contact troll masters, reach troll masters ai, troll service inquiry, hire trolls contact, anonymous troll service contact')
@section('og_title', 'Contact TrollMasters.AI — We Respond Fast')

@push('schema')
@php
echo '<script type="application/ld+json">'.json_encode([
    '@context'     => 'https://schema.org',
    '@type'        => 'ContactPage',
    'name'         => 'TrollMasters.AI Contact',
    'url'          => route('contact.index'),
    'description'  => 'Contact TrollMasters.AI with questions or project details.',
    'contactOption'=> 'TollFree',
    'contactType'  => 'customer service',
], JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE).'</script>';
@endphp
@endpush

@section('content')

{{-- ── Hero ── --}}
<section class="relative overflow-hidden grid-bg py-14 sm:py-24">
    <div class="absolute inset-0 pointer-events-none">
        <div class="absolute top-0 left-1/2 -translate-x-1/2 w-[600px] h-[350px]" style="background:radial-gradient(ellipse,rgba(220,38,38,0.07) 0%,transparent 70%);"></div>
    </div>
    <div class="relative max-w-3xl mx-auto px-4 text-center">
        <div class="inline-flex items-center gap-2 bg-red-950/40 border border-red-900/40 rounded-full px-4 py-1.5 mb-6">
            <svg class="w-3 h-3 text-red-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"/></svg>
            <span class="section-label text-[10px]">Get In Touch</span>
        </div>
        <h1 class="font-display text-white troll-glow mb-4" style="font-size:clamp(60px,12vw,110px);line-height:1;">CONTACT US</h1>
        <p class="text-gray-400 text-xl leading-relaxed">Have questions? Have a special request? Feel free to reach out — we respond fast.</p>
    </div>
</section>

<section class="max-w-5xl mx-auto px-4 py-10 sm:py-16">
    <div class="grid lg:grid-cols-3 gap-6 lg:gap-8 items-start">

        {{-- Info sidebar --}}
        <div class="space-y-4 reveal-left">
            {{-- Info cards --}}
            @foreach([
                ['M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z','text-red-400','General Inquiries','info@trollmasters.ai'],
                ['M16 11V7a4 4 0 00-8 0v4M5 9h14l1 12H4L5 9z','text-orange-400','Orders & Billing','orders@trollmasters.ai'],
                ['M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z','text-green-400','Onboarding','onboarding@trollmasters.ai'],
            ] as [$path, $color, $label, $email])
            <div class="card-dark rounded-xl p-4 flex items-center gap-3">
                <div class="w-9 h-9 rounded-lg flex items-center justify-center shrink-0" style="background:rgba(255,255,255,0.03);border:1px solid rgba(255,255,255,0.07);">
                    <svg class="w-4 h-4 {{ $color }}" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="{{ $path }}"/></svg>
                </div>
                <div>
                    <div class="font-mono text-[10px] text-gray-600 tracking-widest">{{ strtoupper($label) }}</div>
                    <div class="text-gray-300 text-sm font-medium mt-0.5">{{ $email }}</div>
                </div>
            </div>
            @endforeach

            {{-- Status --}}
            <div class="card-dark rounded-xl p-4">
                <div class="font-mono text-[10px] text-gray-600 tracking-widest mb-3">SYSTEM STATUS</div>
                @foreach([
                    ['Troll Operations','ACTIVE','text-green-400'],
                    ['New Orders','OPEN','text-green-400'],
                    ['Response Time','< 24hrs','text-yellow-400'],
                ] as [$label, $val, $color])
                <div class="flex items-center justify-between py-2 border-b border-white/5 last:border-0">
                    <span class="text-gray-500 text-xs">{{ $label }}</span>
                    <span class="font-mono text-xs font-bold {{ $color }}">{{ $val }}</span>
                </div>
                @endforeach
            </div>

            {{-- Privacy note --}}
            <div class="rounded-xl p-4" style="background:rgba(127,29,29,0.12);border:1px solid rgba(127,29,29,0.3);">
                <div class="flex items-center gap-2 mb-2">
                    <svg class="w-4 h-4 text-red-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"/></svg>
                    <span class="text-white text-xs font-semibold">100% Confidential</span>
                </div>
                <p class="text-red-300/70 text-xs leading-relaxed">All communications are confidential. We never reveal client identities — to anyone, for any reason.</p>
            </div>
        </div>

        {{-- Contact form --}}
        <div class="lg:col-span-2 card-dark rounded-2xl p-5 sm:p-8 reveal-right">
            <h2 class="font-display text-2xl text-white tracking-wide mb-2">SEND A MESSAGE</h2>
            <p class="text-gray-500 text-sm mb-8 leading-relaxed">Include your name, email, phone, and any questions or project details. We'll get back to you as soon as possible.</p>

            @if(session('success'))
            <div class="flex items-center gap-3 rounded-xl p-4 mb-6 text-sm font-medium" style="background:rgba(20,83,45,0.4);border:1px solid rgba(34,197,94,0.3);">
                <svg class="w-5 h-5 text-green-400 shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/></svg>
                <span class="text-green-300">{{ session('success') }}</span>
            </div>
            @endif

            <form action="{{ route('contact.store') }}" method="POST" class="space-y-5">
                @csrf
                <div class="grid sm:grid-cols-2 gap-5">
                    <div>
                        <label class="tm-label">Full Name <span class="text-red-500">*</span></label>
                        <input type="text" name="full_name" value="{{ old('full_name') }}" required
                            class="tm-input" placeholder="Your full name">
                        @error('full_name')<p class="text-red-500 text-xs mt-1.5 font-mono">{{ $message }}</p>@enderror
                    </div>
                    <div>
                        <label class="tm-label">Phone Number</label>
                        <input type="tel" name="phone" value="{{ old('phone') }}"
                            class="tm-input" placeholder="+1 (555) 000-0000">
                    </div>
                </div>

                <div>
                    <label class="tm-label">Email Address <span class="text-red-500">*</span></label>
                    <input type="email" name="email" value="{{ old('email') }}" required
                        class="tm-input" placeholder="your@email.com">
                    @error('email')<p class="text-red-500 text-xs mt-1.5 font-mono">{{ $message }}</p>@enderror
                </div>

                <div>
                    <label class="tm-label">Message <span class="text-red-500">*</span></label>
                    <textarea name="message" rows="6" required
                        class="tm-input resize-none"
                        placeholder="Questions, special requests, or project details...">{{ old('message') }}</textarea>
                    @error('message')<p class="text-red-500 text-xs mt-1.5 font-mono">{{ $message }}</p>@enderror
                </div>

                <button type="submit" class="btn-troll w-full text-white py-4 rounded-xl font-bold text-base flex items-center justify-center gap-2">
                    <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 19l9 2-9-18-9 18 9-2zm0 0v-8"/></svg>
                    SEND MESSAGE
                </button>
            </form>
        </div>
    </div>
</section>

@endsection
