﻿/* ===========================
   Contact Page (Beamy)
   File: /Styles/contact/contact.css
   =========================== */

:root {
    --beamy: #7D85D0;
    --beamyDark: #2b2f52;
    --ink: #1f1f1f;
    --radiusLg: 34px;
    --radiusMd: 22px;
    --contactTopPad: 185px;
    --contactBottomPad: 150px;
}

/* ===========================
   GLOBAL SAFETY (prevents “hanging off”)
   =========================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

img, svg, video, canvas {
    max-width: 100%;
    height: auto;
    display: block;
}

input, select, textarea, button {
    max-width: 100%;
}

/* Prevent long strings from forcing overflow */
.contactPage * {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* ===========================
   BODY / PAGE SPACING
   =========================== */
body {
    font-family: 'Times New Roman', sans-serif;
    background: url("../../Images/registerBackground2.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Room for fixed navbar + footer */
.PageBody {
    min-height: 100vh;
    padding-top: var(--contactTopPad);
    padding-bottom: var(--contactBottomPad);
    width: 100%;
}

/* ===========================
   PAGE WRAPPER
   =========================== */
.contactPage {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 40px 18px;
}

    .contactPage,
    .contactPage * {
        font-family: 'Times New Roman', sans-serif !important;
        text-align: left !important;
    }

/* ===========================
   RISE-UP ANIMATION
   =========================== */
.reveal-item {
    opacity: 0;
    transform: translateY(28px);
    will-change: transform, opacity;
}

body.page-loaded .reveal-item {
    animation: riseUp 720ms cubic-bezier(.2,.9,.2,1) forwards;
    animation-delay: var(--d, 0ms);
}

@keyframes riseUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal-item {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ===========================
   SHELL + CARD
   =========================== */
.contactShell {
    position: relative;
    width: 100%;
    max-width: 980px;
    padding: 44px 18px;
    border-radius: var(--radiusLg);
    background: rgba(255,255,255,0.20);
    border: 1px solid rgba(255,255,255,0.18);
    box-shadow: 0 28px 90px rgba(0,0,0,0.14);
    margin: 0 auto;
    overflow: hidden;
}

    .contactShell::before {
        content: "";
        position: absolute;
        inset: 10px;
        border-radius: 28px;
        background: radial-gradient(circle at 30% 25%, rgba(255,255,255,0.50) 0%, rgba(255,255,255,0.08) 38%, rgba(255,255,255,0.00) 70%);
        pointer-events: none;
        filter: blur(12px);
        opacity: 0.75;
    }

.contactCard {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    background: rgba(255,255,255,0.68);
    backdrop-filter: blur(14px);
    border-radius: var(--radiusMd);
    padding: 28px 26px 22px;
    box-shadow: 0 22px 70px rgba(0,0,0,0.16);
    overflow: hidden;
}

/* ===========================
   HEADER
   =========================== */
.contactBadge {
    display: inline-block;
    letter-spacing: .35em;
    text-transform: uppercase;
    padding: 9px 12px;
    border-radius: 999px;
    border: 1px solid rgba(125,133,208,0.35);
    background: rgba(125,133,208,0.14);
    font-weight: 800;
    margin-bottom: 14px;
}

/* ✅ Animated gradient title */
.contactTitle {
    margin: 0 0 8px;
    font-size: clamp(1.7rem, 3.2vw, 2.7rem);
    font-family: 'New Machiato';
    line-height: 1.12;
    /* Keep your gradient but animate it */
    background: linear-gradient(90deg, var(--beamy), #777B7E, var(--beamy));
    background-size: 260% 100%;
    background-position: 0% 50%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: beamyGradientFlow 6s ease-in-out infinite;
}

@keyframes beamyGradientFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .contactTitle {
        animation: none !important;
        background-position: 50% 50%;
    }
}

.contactSub {
    margin: 0 0 16px;
    line-height: 1.6;
    opacity: .9;
    max-width: 62ch;
}

/* ===========================
   ALERTS
   =========================== */
.contactAlert {
    border-radius: 14px;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid rgba(0,0,0,0.08);
}

.contactAlert--error {
    background: rgba(176,0,32,.10);
    border-color: rgba(176,0,32,.40);
    color: #7a0015;
}

.contactAlert--success {
    background: rgba(0,176,120,.10);
    border-color: rgba(0,176,120,.22);
    color: #0a5b43;
}

/* ===========================
   FORM
   =========================== */
.contactForm {
    display: grid;
    gap: 12px;
    width: 100%;
}

.contactLabel {
    font-size: 14px;
    font-weight: 800;
    color: var(--ink);
    margin-top: 4px;
}

.contactInput {
    width: 100%;
    min-width: 0;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.12);
    background: rgba(255,255,255,0.82);
    font-size: 15px;
    padding: 12px 14px;
    outline: none;
}

.contactSelect {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, rgba(43,47,82,0.75) 50%), linear-gradient(135deg, rgba(43,47,82,0.75) 50%, transparent 50%), linear-gradient(to right, rgba(0,0,0,0.06), rgba(0,0,0,0.06));
    background-position: calc(100% - 18px) calc(50% - 4px), calc(100% - 12px) calc(50% - 4px), calc(100% - 40px) 50%;
    background-size: 6px 6px, 6px 6px, 1px 60%;
    background-repeat: no-repeat;
    padding-right: 48px;
}

.contactTextarea {
    height: 140px;
    resize: none;
    line-height: 1.4;
}

.contactInput:focus {
    border-color: rgba(125,133,208,0.65);
    box-shadow: 0 0 0 4px rgba(125,133,208,0.18);
}

/* ===========================
   GRIDS
   =========================== */
.contactGrid2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
}

.contactGrid4 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
}

/* ===========================
   PREFERRED REPLY CHECKS
   =========================== */
.contactReplyPref {
    width: 100%;
    display: grid;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(255,255,255,0.55);
    border: 1px solid rgba(0,0,0,0.06);
}

.contactCheck {
    display: grid;
    grid-template-columns: 18px 1fr;
    column-gap: 10px;
    row-gap: 2px;
    align-items: start;
    padding: 10px 10px;
    border-radius: 14px;
    background: rgba(255,255,255,0.65);
    border: 1px solid rgba(0,0,0,0.06);
}

    .contactCheck input {
        margin-top: 3px;
        width: 16px;
        height: 16px;
    }

.contactCheckTitle {
    font-weight: 900;
    color: #2b2f52;
    line-height: 1.15;
}

.contactCheckDesc {
    grid-column: 2;
    font-size: 12px;
    opacity: .82;
    line-height: 1.35;
}

/* ===========================
   BUTTON
   =========================== */
.contactBtn {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    border: none;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: .04rem;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(90deg, var(--beamy), #9aa2e9, var(--beamy));
    box-shadow: 0 18px 40px rgba(125,133,208,0.35);
}

    .contactBtn:active {
        transform: translateY(1px);
    }

/* ===========================
   RESPONSIVE BREAKPOINTS
   =========================== */
@media (max-width: 900px) {
    :root {
        --contactTopPad: 150px;
        --contactBottomPad: 120px;
    }

    .contactPage {
        padding: 34px 14px;
    }

    .contactShell {
        padding: 26px 14px;
        border-radius: 28px;
    }

    .contactCard {
        padding: 22px 18px 18px;
        border-radius: 20px;
    }

    .contactGrid4 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    :root {
        /* ✅ Move it higher on mobile */
        --contactTopPad: 108px; /* was 135px */
        --contactBottomPad: 96px; /* was 110px */
    }

    body {
        background-attachment: scroll;
    }

    /* ✅ Also reduce extra space above the card */
    .contactPage {
        padding: 16px 12px; /* was 28px 12px */
    }

    .contactShell {
        padding-top: 16px; /* was 26px */
        padding-bottom: 18px;
    }

        .contactShell::before {
            inset: 8px;
            border-radius: 20px;
        }

    .contactGrid2 {
        grid-template-columns: 1fr;
    }

    .contactBadge {
        letter-spacing: .28em;
    }

    .contactTitle {
        font-size: clamp(1.55rem, 7vw, 2.2rem);
    }

    .contactInput {
        font-size: 16px;
    }

    .contactTextarea {
        height: 128px;
    }
}

@media (max-width: 420px) {
    .contactCard {
        padding: 18px 14px 14px;
    }

    .contactShell {
        padding: 16px 10px; /* slightly tighter */
    }
}
