@php($portal = app(\App\Support\PortalNavigationContext::class)->resolve(request()))
<x-layouts.app :title="__('landing.meta_title')">
    <main class="tp-landing">
        <section class="tp-landing-hero">
            <div class="container">
                <div class="tp-landing-hero-copy">
                    <span class="tp-landing-eyebrow">{{ __('landing.eyebrow') }}</span>
                    <h1>{{ __('landing.hero_title') }}</h1>
                    <p>{{ __('landing.hero_description') }}</p>
                    <div class="tp-landing-actions">
                        @if($portal['kind'] === 'web')
                            <a class="btn btn-primary btn-lg" href="{{ $portal['panel_url'] }}">{{ $portal['panel_label'] }}</a>
                        @else
                            <a class="btn btn-primary btn-lg" href="{{ route('register') }}">{{ __('landing.create_account') }}</a>
                            <a class="btn btn-outline-secondary btn-lg" href="{{ route('login') }}">{{ __('ui.sign_in') }}</a>
                        @endif
                    </div>
                </div>
                <div class="tp-landing-preview" aria-label="{{ __('landing.preview_label') }}">
                    <div class="tp-preview-heading"><span>{{ __('landing.preview_project') }}</span><strong>{{ __('landing.preview_visibility') }}</strong></div>
                    <div class="tp-preview-metric"><span>{{ __('landing.preview_keywords') }}</span><strong>128</strong></div>
                    <div class="tp-preview-chart" aria-hidden="true"><i></i><i></i><i></i><i></i><i></i><i></i></div>
                    <div class="tp-preview-status"><span>● {{ __('landing.preview_gained') }}</span><span>● {{ __('landing.preview_stable') }}</span></div>
                </div>
            </div>
        </section>

        <section class="tp-landing-section" aria-labelledby="features-title">
            <div class="container">
                <div class="tp-section-heading"><span>{{ __('landing.features_eyebrow') }}</span><h2 id="features-title">{{ __('landing.features_title') }}</h2><p>{{ __('landing.features_description') }}</p></div>
                <div class="tp-feature-grid">
                    @foreach(['keywords' => '◎', 'history' => '◷', 'serp' => '⌕', 'visibility' => '◒', 'movers' => '↕', 'competitors' => '◇', 'projects' => '▦', 'preferences' => '◐'] as $feature => $icon)
                        <article class="tp-feature-card"><span class="tp-feature-icon" aria-hidden="true">{{ $icon }}</span><h3>{{ __('landing.features.'.$feature.'.title') }}</h3><p>{{ __('landing.features.'.$feature.'.description') }}</p></article>
                    @endforeach
                </div>
            </div>
        </section>

        <section class="tp-landing-section tp-how-section" aria-labelledby="how-title">
            <div class="container">
                <div class="tp-section-heading"><span>{{ __('landing.how_eyebrow') }}</span><h2 id="how-title">{{ __('landing.how_title') }}</h2></div>
                <ol class="tp-how-grid">
                    @foreach(['project', 'keywords', 'track'] as $step)
                        <li><span>{{ $loop->iteration }}</span><div><h3>{{ __('landing.steps.'.$step.'.title') }}</h3><p>{{ __('landing.steps.'.$step.'.description') }}</p></div></li>
                    @endforeach
                </ol>
            </div>
        </section>

        <section class="tp-landing-cta"><div class="container"><div><h2>{{ __('landing.cta_title') }}</h2><p>{{ __('landing.cta_description') }}</p></div>@if($portal['kind'] === 'web')<a class="btn btn-primary btn-lg" href="{{ $portal['panel_url'] }}">{{ $portal['panel_label'] }}</a>@else<a class="btn btn-primary btn-lg" href="{{ route('register') }}">{{ __('landing.create_account') }}</a>@endif</div></section>
    </main>

    <footer class="tp-landing-footer"><div class="container"><a href="{{ route('home') }}" class="tp-footer-brand">TrafficPumper</a><nav aria-label="{{ __('landing.footer_navigation') }}"><a href="{{ route('earn') }}">{{ __('earn.navigation') }}</a>@if($portal['kind'] === 'web')<a href="{{ $portal['panel_url'] }}">{{ $portal['panel_label'] }}</a>@else<a href="{{ route('login') }}">{{ __('ui.sign_in') }}</a><a href="{{ route('register') }}">{{ __('ui.register') }}</a>@endif</nav><small>© {{ now()->year }} TrafficPumper</small></div></footer>
</x-layouts.app>
