/* ================================================================
   LANDING PAGE — Cathodic Protection
   Eye-catching hero with animated particles, glowing cards,
   gradient text, and a smooth scroll experience.
   ================================================================ */

:root {
    --lp-bg-0: #050a14;
    --lp-bg-1: #0a1628;
    --lp-bg-2: #0d1f3a;
    --lp-cyan: #00e5ff;
    --lp-cyan-soft: rgba(0, 229, 255, 0.55);
    --lp-violet: #7c5cff;
    --lp-pink: #ff4ecd;
    --lp-text: #e6f1ff;
    --lp-muted: #93a4bf;
}

/* ---------- Page-level reset for landing ---------- */
body.landing-page {
    background: radial-gradient(ellipse at top, var(--lp-bg-1) 0%, var(--lp-bg-0) 60%, #02050b 100%);
    color: var(--lp-text);
    overflow-x: hidden;
}

/* ===================== HERO ===================== */
.lp-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-align: center;
    padding: 6rem 1.5rem 4rem;
}

/* Particle canvas — sits behind everything in the hero */
#particles-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    display: block;
}

/* Soft glowing orbs for depth */
.lp-hero::before,
.lp-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.55;
    z-index: 1;
    pointer-events: none;
    animation: lp-float 14s ease-in-out infinite alternate;
}
.lp-hero::before {
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.55) 0%, transparent 70%);
    top: -120px;
    left: -120px;
}
.lp-hero::after {
    width: 460px;
    height: 460px;
    background: radial-gradient(circle, rgba(124, 92, 255, 0.5) 0%, transparent 70%);
    bottom: -160px;
    right: -120px;
    animation-delay: -7s;
}

@keyframes lp-float {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, -30px) scale(1.1); }
}

/* Grid overlay */
.lp-grid-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(0, 229, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.06) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, #000 0%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, #000 0%, transparent 75%);
}

.lp-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 980px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.6rem;
}

/* Top badge */
.lp-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 1rem;
    border: 1px solid rgba(0, 229, 255, 0.35);
    background: rgba(0, 229, 255, 0.06);
    border-radius: 999px;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--lp-cyan);
    backdrop-filter: blur(8px);
    animation: lp-fade-up 0.9s 0.05s ease both;
}
.lp-badge .lp-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--lp-cyan);
    box-shadow: 0 0 12px var(--lp-cyan);
    animation: lp-pulse 1.8s ease-in-out infinite;
}
@keyframes lp-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.4); opacity: 0.55; }
}

/* Title with animated gradient */
.lp-title {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: clamp(2.4rem, 5.6vw, 4.6rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin: 0;
    color: #ffffff;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    animation: lp-fade-up 1s 0.15s ease both;
}

.lp-title .lp-accent {
    position: relative;
    display: inline-block;
    background: linear-gradient(
        110deg,
        var(--lp-cyan) 0%,
        #67f0ff 25%,
        var(--lp-violet) 55%,
        var(--lp-pink) 80%,
        var(--lp-cyan) 100%
    );
    background-size: 250% 100%;
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
            color: transparent;
    animation: lp-gradient-shift 6s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(0, 229, 255, 0.35));
}
.lp-title .lp-accent::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -10px;
    height: 6px;
    background: linear-gradient(90deg, transparent, var(--lp-cyan), var(--lp-violet), transparent);
    border-radius: 4px;
    filter: blur(5px);
    opacity: 0.8;
}
@keyframes lp-gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

.lp-subtitle {
    font-size: clamp(1rem, 1.6vw, 1.25rem);
    color: var(--lp-muted);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.6;
    animation: lp-fade-up 1s 0.25s ease both;
}

/* Hero CTAs */
.lp-cta-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 0.6rem;
    animation: lp-fade-up 1s 0.35s ease both;
}
.lp-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.95rem 1.8rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    border: 1px solid transparent;
    overflow: hidden;
    isolation: isolate;
}
.lp-btn-primary {
    color: #02050b;
    background: linear-gradient(120deg, var(--lp-cyan), var(--lp-violet));
    box-shadow: 0 8px 30px rgba(0, 229, 255, 0.35), 0 0 0 1px rgba(255,255,255,0.06) inset;
}
.lp-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 40px rgba(0, 229, 255, 0.55);
}
.lp-btn-primary::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.45), transparent);
    transform: translateX(-110%);
    transition: transform 0.7s ease;
    z-index: -1;
}
.lp-btn-primary:hover::before { transform: translateX(110%); }

.lp-btn-ghost {
    color: var(--lp-text);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(6px);
}
.lp-btn-ghost:hover {
    transform: translateY(-3px);
    border-color: var(--lp-cyan);
    color: var(--lp-cyan);
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.25);
}

/* Hero stats */
.lp-stats {
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 2rem;
    animation: lp-fade-up 1s 0.5s ease both;
}
.lp-stat {
    text-align: center;
    min-width: 110px;
}
.lp-stat-num {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 800;
    color: var(--lp-cyan);
    text-shadow: 0 0 20px rgba(0, 229, 255, 0.45);
    line-height: 1;
}
.lp-stat-lbl {
    margin-top: 0.4rem;
    font-size: 0.8rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--lp-muted);
}

/* Scroll cue */
.lp-scroll {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: var(--lp-muted);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.85;
}
.lp-scroll-mouse {
    width: 22px;
    height: 36px;
    border: 2px solid var(--lp-cyan-soft);
    border-radius: 14px;
    position: relative;
}
.lp-scroll-mouse::after {
    content: "";
    position: absolute;
    top: 6px; left: 50%;
    transform: translateX(-50%);
    width: 4px; height: 8px;
    background: var(--lp-cyan);
    border-radius: 2px;
    animation: lp-scroll-dot 1.6s ease-in-out infinite;
}
@keyframes lp-scroll-dot {
    0%   { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, 14px); }
}

/* SVG wave divider at the bottom of hero */
.lp-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    z-index: 2;
    line-height: 0;
    pointer-events: none;
}
.lp-wave svg { display: block; width: 100%; height: 90px; }

@keyframes lp-fade-up {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===================== TOOLS SECTION ===================== */
.lp-tools {
    position: relative;
    padding: 6rem 1.5rem 5rem;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(0, 229, 255, 0.08) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 100%, rgba(124, 92, 255, 0.08) 0%, transparent 55%),
        var(--lp-bg-0);
}

.lp-section-head {
    max-width: 800px;
    margin: 0 auto 3.2rem;
    text-align: center;
}
.lp-section-eyebrow {
    color: var(--lp-cyan);
    font-size: 0.78rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 0.9rem;
}
.lp-section-title {
    font-size: clamp(2rem, 3.6vw, 2.8rem);
    font-weight: 800;
    margin: 0 0 1rem;
    background: linear-gradient(120deg, #ffffff, var(--lp-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.lp-section-sub {
    color: var(--lp-muted);
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 0;
}

.lp-tools-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.6rem;
    max-width: 1280px;
    margin: 0 auto;
}

/* Tool card with conic gradient border on hover */
.lp-tool-card {
    position: relative;
    padding: 1.8rem 1.6rem 1.6rem;
    border-radius: 16px;
    background: linear-gradient(160deg, rgba(20, 32, 56, 0.85), rgba(8, 16, 32, 0.85));
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
    backdrop-filter: blur(6px);
    isolation: isolate;
}
.lp-tool-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: conic-gradient(from var(--lp-angle, 0deg),
                rgba(0, 229, 255, 0.0),
                rgba(0, 229, 255, 0.6),
                rgba(124, 92, 255, 0.6),
                rgba(0, 229, 255, 0.0));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
    pointer-events: none;
}
.lp-tool-card:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 229, 255, 0.35);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.45),
        0 0 30px rgba(0, 229, 255, 0.18);
    animation: lp-spin-border 6s linear infinite;
}
.lp-tool-card:hover::before { opacity: 1; }

@property --lp-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}
@keyframes lp-spin-border {
    to { --lp-angle: 360deg; }
}

.lp-tool-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.1rem;
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.18), rgba(124, 92, 255, 0.18));
    border: 1px solid rgba(0, 229, 255, 0.25);
    color: var(--lp-cyan);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    position: relative;
    z-index: 1;
}
.lp-tool-icon svg { width: 26px; height: 26px; }
.lp-tool-card:hover .lp-tool-icon {
    transform: rotate(-6deg) scale(1.06);
    box-shadow: 0 0 24px rgba(0, 229, 255, 0.45);
}

.lp-tool-card h3 {
    font-size: 1.18rem;
    margin: 0 0 0.6rem;
    color: #ffffff;
    position: relative;
    z-index: 1;
}
.lp-tool-card p {
    font-size: 0.95rem;
    color: var(--lp-muted);
    line-height: 1.55;
    margin: 0;
    position: relative;
    z-index: 1;
}

.lp-tool-tag {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.25rem 0.7rem;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--lp-cyan);
    border: 1px solid rgba(0, 229, 255, 0.3);
    border-radius: 999px;
    background: rgba(0, 229, 255, 0.05);
    position: relative;
    z-index: 1;
}

/* Reveal animation on scroll (uses .fade-in from main.js) */
.lp-tools-grid .fade-in {
    transition-delay: var(--lp-delay, 0s);
}

/* Final CTA */
.lp-final-cta {
    margin-top: 4rem;
    text-align: center;
}

/* ===================== CONTACT ===================== */
.lp-contact {
    position: relative;
    padding: 5rem 1.5rem 6rem;
    background: linear-gradient(180deg, var(--lp-bg-0) 0%, #02050b 100%);
    text-align: center;
    overflow: hidden;
}
.lp-contact::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 0%, rgba(0, 229, 255, 0.12) 0%, transparent 60%);
    pointer-events: none;
}
.lp-contact h2 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    margin: 0 0 0.8rem;
    background: linear-gradient(120deg, #fff, var(--lp-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.lp-contact p {
    color: var(--lp-muted);
    margin-bottom: 1.6rem;
}
.lp-contact-mail {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1.4rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 229, 255, 0.4);
    color: var(--lp-cyan);
    text-decoration: none;
    font-weight: 500;
    background: rgba(0, 229, 255, 0.06);
    transition: all 0.3s ease;
}
.lp-contact-mail:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 24px rgba(0, 229, 255, 0.35);
    background: rgba(0, 229, 255, 0.12);
}
.lp-copy {
    margin-top: 2.5rem;
    color: var(--lp-muted);
    font-size: 0.85rem;
}
.lp-copy .registered { font-size: 0.6em; vertical-align: super; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1024px) {
    .lp-tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .lp-tools-grid { grid-template-columns: 1fr; }
    .lp-stats { gap: 1.4rem; }
    .lp-hero { padding-top: 5rem; }
    .lp-hero::before, .lp-hero::after { width: 320px; height: 320px; filter: blur(70px); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .lp-title,
    .lp-hero::before,
    .lp-hero::after,
    .lp-badge .lp-dot,
    .lp-scroll-mouse::after,
    .lp-tool-card:hover {
        animation: none !important;
    }
}
