/* Support page. Tokens, buttons, navbar and footer come from styles.css. */

:root {
    --tilt-x: 0deg;
    --tilt-y: 0deg;
}

.support-page {
    overflow-x: hidden;
    background: var(--white);
}

/* ---------- Reveal on scroll ---------- */

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* ---------- Hero ---------- */

.support-hero {
    position: relative;
    padding: 140px 0 72px;
    overflow: hidden;
    perspective: 1200px;
}

.support-hero-glow {
    position: absolute;
    inset: -20% -10% auto auto;
    width: 60vw;
    height: 60vw;
    max-width: 720px;
    max-height: 720px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.35), rgba(42, 126, 159, 0.12) 45%, transparent 70%);
    filter: blur(20px);
    pointer-events: none;
    animation: glow-drift 14s ease-in-out infinite alternate;
}

.support-hero-inner {
    position: relative;
    display: grid;
    gap: 48px;
    align-items: center;
}

.support-hero-title {
    color: var(--ink-deep);
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 800;
    line-height: 1.1;
    margin: 16px 0;
}

.gradient-text {
    background: linear-gradient(120deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.support-hero-copy .muted {
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 520px;
}

.hero-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.hero-quick-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* 3D orbit: a logo core with chips circling on tilted rings */

.orbit-scene {
    position: relative;
    display: grid;
    place-items: center;
    height: 340px;
}

.orbit {
    position: relative;
    width: 300px;
    height: 300px;
    transform-style: preserve-3d;
    transform: rotateX(62deg) rotateZ(-12deg);
    animation: orbit-spin 22s linear infinite;
}

.orbit::before,
.orbit::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px dashed rgba(42, 126, 159, 0.35);
}

.orbit::after {
    inset: 40px;
    border-color: rgba(96, 165, 250, 0.35);
}

.orbit-core {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    width: 110px;
    height: 110px;
    margin: -55px 0 0 -55px;
    border-radius: 28px;
    background: var(--white);
    box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--border);
    z-index: 2;
    animation: core-float 6s ease-in-out infinite;
}

.orbit-core img {
    width: 72px;
    height: 72px;
}

.orbit-chip {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin: -28px 0 0 -28px;
    border-radius: 16px;
    background: linear-gradient(145deg, var(--primary), var(--primary-dark));
    color: var(--white);
    font-size: 1.3rem;
    box-shadow: var(--shadow-lg);
    transform: rotateX(-62deg) rotateZ(12deg);
}

.orbit-chip-1 { transform: rotateX(-62deg) rotateZ(12deg) translate(150px); }
.orbit-chip-2 { transform: rotateX(-62deg) rotateZ(12deg) translate(0, -150px); }
.orbit-chip-3 { transform: rotateX(-62deg) rotateZ(12deg) translate(-150px); }
.orbit-chip-4 { transform: rotateX(-62deg) rotateZ(12deg) translate(0, 150px); }

/* ---------- Contact info ---------- */

.support-grid {
    display: grid;
    gap: 48px;
}

.support-brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 24px;
}

.support-about {
    color: var(--text-medium);
    font-size: 1.1rem;
    line-height: 1.7;
    max-width: 480px;
}

.support-socials {
    display: flex;
    gap: 14px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.support-socials a {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: var(--radius);
    background: var(--bg-light);
    border: 1px solid var(--border);
    color: var(--ink-deep);
    font-size: 1.4rem;
    transition: transform 0.35s var(--ease), background 0.35s var(--ease), color 0.35s var(--ease);
}

.support-socials a:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-4px) rotate(-4deg);
}

.support-title {
    color: var(--ink-deep);
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0 0 24px;
}

/* Tilt cards follow the pointer in 3D */

.tilt-card {
    transform: perspective(1000px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
    transform-style: preserve-3d;
}

.support-contact .tilt-card {
    padding: 32px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 22px;
    list-style: none;
    margin: 0 0 28px;
    padding: 0;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--ink-deep);
    font-size: 1rem;
    line-height: 1.5;
}

.contact-badge {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(42, 126, 159, 0.1);
    color: var(--primary);
    font-size: 1.1rem;
    transition: transform 0.4s var(--ease), background 0.4s var(--ease), color 0.4s var(--ease);
}

.contact-item:hover .contact-badge {
    background: var(--primary);
    color: var(--white);
    transform: translateZ(18px) rotate(-6deg);
}

.contact-item a {
    color: var(--ink-deep);
    text-decoration: none;
    overflow-wrap: anywhere;
}

.contact-item a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.support-map {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(13, 37, 48, 0.12);
    transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.support-map:hover {
    transform: translateZ(12px) scale(1.01);
    box-shadow: 0 18px 40px rgba(13, 37, 48, 0.18);
}

.office-map {
    width: 100%;
    height: 300px;
    z-index: 0;
}

.office-map iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Company logo as the map pin */

.office-marker-wrap {
    background: none;
    border: 0;
}

.office-marker {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 50% 50% 50% 0;
    background: var(--white);
    border: 3px solid var(--primary);
    box-shadow: var(--shadow-lg);
    transform: rotate(-45deg);
    transform-origin: center;
    animation: pin-bounce 2.4s var(--ease) infinite;
}

.office-marker img {
    width: 34px;
    height: 34px;
    transform: rotate(45deg);
}

.leaflet-popup-content-wrapper {
    border-radius: var(--radius);
    color: var(--text-dark);
}

.leaflet-popup-content {
    margin: 12px 14px;
    line-height: 1.5;
}

@keyframes pin-bounce {
    0%, 100% { transform: rotate(-45deg) translateY(0); }
    50% { transform: rotate(-45deg) translateY(-8px); }
}

.directions-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 12px 20px;
    border-radius: 999px;
    background: var(--ink-deep);
    color: var(--white);
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}

.directions-btn:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.support-quick-title {
    margin: 32px 0 12px;
    color: var(--text-dark);
    font-weight: 600;
}

.support-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.quick-action {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: var(--radius);
    background: var(--bg-light);
    border: 1px solid var(--border);
    color: var(--ink-deep);
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
}

.quick-action i {
    color: var(--primary);
    transition: transform 0.4s var(--ease);
}

.quick-action:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-3px);
}

.quick-action:hover i {
    color: var(--white);
    transform: rotate(-8deg) scale(1.1);
}

.quick-action-whatsapp i {
    color: #25d366;
}

.quick-action-whatsapp:hover {
    background: #25d366;
}

.quick-action-whatsapp:hover i {
    color: var(--white);
}

.social-x svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.support-socials .social-facebook:hover { background: #1877f2; border-color: #1877f2; }
.support-socials .social-x:hover { background: #000; border-color: #000; }
.support-socials .social-instagram:hover { background: #e4405f; border-color: #e4405f; }
.support-socials .social-linkedin:hover { background: #0a66c2; border-color: #0a66c2; }

/* ---------- Form ---------- */

.support-form-wrap {
    max-width: 780px;
}

.support-form-wrap .muted {
    margin-bottom: 32px;
}

.support-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 32px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.form-row {
    display: grid;
    gap: 20px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.form-field label {
    color: var(--text-dark);
    font-size: 0.95rem;
    font-weight: 600;
}

.char-count {
    color: var(--text-light);
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
}

.form-field input,
.form-field textarea {
    width: 100%;
    padding: 13px 15px;
    font: inherit;
    color: var(--text-dark);
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}

.form-field textarea {
    resize: vertical;
    min-height: 140px;
}

.form-field input:hover,
.form-field textarea:hover {
    background: var(--white);
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    background: var(--white);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(42, 126, 159, 0.15);
    transform: translateY(-1px);
}

.form-field input[aria-invalid="true"],
.form-field textarea[aria-invalid="true"] {
    border-color: #c53030;
    animation: shake 0.4s var(--ease);
}

.form-error {
    color: #c53030;
    font-size: 0.85rem;
    margin: 0;
    animation: rise-in 0.3s var(--ease);
}

.form-error[hidden] {
    display: none;
}

.channel-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0 8px;
}

.channel-tab {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    font: inherit;
    font-weight: 700;
    color: var(--primary-dark);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 35px;
    cursor: pointer;
    transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.channel-tab:hover {
    border-color: var(--primary);
}

.channel-tab.is-active {
    color: var(--white);
    background: var(--primary);
    border-color: var(--primary);
}

.channel-tab:focus-visible {
    outline: 3px solid var(--primary-dark);
    outline-offset: 3px;
}

.support-form[hidden] {
    display: none;
}

.support-form:not([hidden]) {
    animation: form-enter 0.45s var(--ease);
}

@keyframes form-enter {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.channel-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    overflow: hidden;
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.channel-btn:hover {
    transform: translateY(-3px);
}

.channel-btn:active {
    transform: translateY(0) scale(0.98);
}

.channel-btn i {
    transition: transform 0.4s var(--ease);
}

.channel-btn:hover i {
    transform: translateX(3px) rotate(-8deg);
}

.form-status {
    min-height: 1.4em;
    margin: 0;
    color: var(--primary-dark);
    font-size: 0.92rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(6px);
}

.form-status.is-visible {
    animation: rise-in 0.45s var(--ease) forwards;
}

.form-status.is-error {
    color: #c53030;
}

/* ---------- Keyframes ---------- */

@keyframes orbit-spin {
    from { transform: rotateX(62deg) rotateZ(-12deg) rotateY(0deg); }
    to { transform: rotateX(62deg) rotateZ(-12deg) rotateY(360deg); }
}

@keyframes core-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes glow-drift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(-40px, 30px, 0) scale(1.1); }
}

@keyframes rise-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* ---------- Responsive ---------- */

@media (min-width: 720px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }

    .orbit-scene {
        height: 400px;
    }

    .orbit {
        width: 360px;
        height: 360px;
    }

    .orbit-chip-1 { transform: rotateX(-62deg) rotateZ(12deg) translate(180px); }
    .orbit-chip-2 { transform: rotateX(-62deg) rotateZ(12deg) translate(0, -180px); }
    .orbit-chip-3 { transform: rotateX(-62deg) rotateZ(12deg) translate(-180px); }
    .orbit-chip-4 { transform: rotateX(-62deg) rotateZ(12deg) translate(0, 180px); }
}

@media (min-width: 960px) {
    .support-hero {
        padding-top: 170px;
    }

    .support-hero-inner {
        grid-template-columns: 1.1fr 0.9fr;
        gap: 64px;
    }

    .support-grid {
        grid-template-columns: 1fr 1fr;
        align-items: center;
        gap: 80px;
    }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .orbit,
    .orbit-core,
    .support-hero-glow,
    .office-marker,
    .support-form:not([hidden]) {
        animation: none;
    }

    .tilt-card,
    .channel-btn,
    .channel-btn i,
    .support-socials a,
    .contact-badge,
    .form-field input,
    .form-field textarea {
        transition: none;
        transform: none;
    }

    .form-status.is-visible,
    .form-error,
    .form-field input[aria-invalid="true"],
    .form-field textarea[aria-invalid="true"] {
        animation: none;
    }
}
