/* ============================================================
   GLOBAL
   ============================================================ */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --background: #080914;
    --background-secondary: #101225;

    --card: rgba(255, 255, 255, 0.045);
    --card-border: rgba(255, 255, 255, 0.11);

    --text: #f6f7ff;
    --muted: #9296b4;
    --muted-dark: #626783;

    --primary: #00e5ff;
    --primary-secondary: #667cff;

    --danger: #ff5577;
    --success: #38e7a4;

    --input: rgba(5, 7, 20, 0.55);
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;

    font-family:
        Inter,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    color: var(--text);

    background:
        radial-gradient(
            circle at 50% 0%,
            #171b3c 0%,
            var(--background) 55%
        );

    overflow-x: hidden;
}


/* ============================================================
   BACKGROUND
   ============================================================ */

.ambient-glow {
    position: fixed;

    width: 420px;
    height: 420px;

    border-radius: 50%;

    pointer-events: none;

    filter: blur(130px);

    opacity: 0.22;

    z-index: 0;
}

.glow-one {
    top: -160px;
    left: -100px;

    background: #00d9ff;

    animation: floatOne 14s ease-in-out infinite alternate;
}

.glow-two {
    right: -120px;
    bottom: -150px;

    background: #713cff;

    animation: floatTwo 17s ease-in-out infinite alternate;
}


/* ============================================================
   PAGE
   ============================================================ */

.page-container {
    position: relative;
    z-index: 1;

    width: 100%;
    max-width: 960px;

    margin: 0 auto;

    padding: 60px 20px;
}


/* ============================================================
   CARD
   ============================================================ */

.card {
    width: 100%;

    padding: 46px;

    background: rgba(13, 15, 32, 0.76);

    border: 1px solid var(--card-border);

    border-radius: 28px;

    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);

    box-shadow:
        0 30px 100px rgba(0, 0, 0, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);

    animation: fadeIn 0.8s ease-out;
}


/* ============================================================
   HEADER
   ============================================================ */

.page-header {
    display: flex;
    align-items: center;
    gap: 22px;

    margin-bottom: 30px;
}

.brand-mark {
    flex-shrink: 0;

    width: 62px;
    height: 62px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 18px;

    font-size: 29px;
    font-weight: 800;

    color: #07101b;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--primary-secondary)
        );

    box-shadow:
        0 10px 35px rgba(0, 229, 255, 0.2);
}

h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.05;
    letter-spacing: -1.5px;

    background:
        linear-gradient(
            135deg,
            #ffffff 20%,
            #b6bbd7 100%
        );

    -webkit-background-clip: text;
    background-clip: text;

    -webkit-text-fill-color: transparent;
}

.subtitle {
    margin-top: 10px;

    max-width: 680px;

    color: var(--muted);

    font-size: 1rem;
    line-height: 1.6;
}


/* ============================================================
   NOTICE
   ============================================================ */

.notice {
    display: flex;
    gap: 13px;
    align-items: flex-start;

    padding: 15px 17px;

    margin-bottom: 34px;

    background: rgba(0, 229, 255, 0.045);

    border: 1px solid rgba(0, 229, 255, 0.12);

    border-radius: 13px;
}

.notice-icon {
    width: 22px;
    height: 22px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    font-size: 12px;
    font-weight: 800;

    color: #07101b;

    background: var(--primary);
}

.notice p {
    color: #a9aec9;

    font-size: 0.88rem;
    line-height: 1.5;
}


/* ============================================================
   FORM SECTIONS
   ============================================================ */

.form-section {
    padding: 30px 0;

    border-top: 1px solid rgba(255, 255, 255, 0.075);
}

.form-section:first-of-type {
    border-top: 0;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    gap: 20px;

    margin-bottom: 22px;
}

.section-number {
    display: block;

    margin-bottom: 7px;

    color: var(--primary);

    font-family: monospace;
    font-size: 0.72rem;
    font-weight: 700;

    letter-spacing: 2px;
}

.section-heading h2 {
    font-size: 1.2rem;
    letter-spacing: -0.2px;
}

.section-heading p {
    margin-top: 7px;

    color: var(--muted);

    font-size: 0.88rem;
    line-height: 1.5;
}

.required-label,
.optional-label {
    flex-shrink: 0;

    padding: 5px 9px;

    border-radius: 7px;

    font-size: 0.68rem;
    font-weight: 700;

    letter-spacing: 0.7px;
    text-transform: uppercase;
}

.required-label {
    color: #73eeff;
    background: rgba(0, 229, 255, 0.08);
    border: 1px solid rgba(0, 229, 255, 0.12);
}

.optional-label {
    color: #a1a5c2;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.07);
}


/* ============================================================
   FIELDS
   ============================================================ */

.field {
    position: relative;

    margin-bottom: 15px;
}

.field:last-child {
    margin-bottom: 0;
}

.field label {
    display: block;

    margin-bottom: 8px;

    color: #cdd0e2;

    font-size: 0.82rem;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;

    color: var(--text);

    font-family: inherit;
    font-size: 0.95rem;

    background: var(--input);

    border: 1px solid rgba(255, 255, 255, 0.1);

    border-radius: 11px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

input,
select {
    height: 50px;

    padding: 0 15px;
}

textarea {
    min-height: 190px;

    padding: 15px;

    resize: vertical;

    line-height: 1.6;
}

input::placeholder,
textarea::placeholder {
    color: #555a78;
}

input:focus,
select:focus,
textarea:focus {
    background: rgba(5, 7, 20, 0.78);

    border-color: rgba(0, 229, 255, 0.55);

    box-shadow:
        0 0 0 3px rgba(0, 229, 255, 0.07),
        0 0 25px rgba(0, 229, 255, 0.04);
}

select {
    appearance: none;

    cursor: pointer;

    background-image:
        linear-gradient(45deg, transparent 50%, #8990ad 50%),
        linear-gradient(135deg, #8990ad 50%, transparent 50%);

    background-position:
        calc(100% - 20px) 21px,
        calc(100% - 15px) 21px;

    background-size:
        5px 5px,
        5px 5px;

    background-repeat: no-repeat;
}

select option {
    color: #ffffff;
    background: #111326;
}


/* ============================================================
   DYNAMIC ITEMS
   ============================================================ */

.dynamic-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dynamic-item {
    position: relative;

    padding: 17px;

    background: rgba(255, 255, 255, 0.025);

    border: 1px solid rgba(255, 255, 255, 0.075);

    border-radius: 14px;

    animation: itemIn 0.25s ease-out;
}

.dynamic-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 14px;
}

.dynamic-item-title {
    color: #858aa8;

    font-size: 0.7rem;
    font-weight: 700;

    letter-spacing: 1px;
    text-transform: uppercase;
}

.dynamic-item-grid {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 13px;
}

.remove-button {
    border: 0;

    color: #777c99;

    background: transparent;

    font-size: 0.75rem;

    cursor: pointer;

    transition:
        color 0.2s ease,
        background 0.2s ease;
}

.remove-button:hover {
    color: var(--danger);
}

.service-toggle {
    display: flex;
    align-items: center;
    gap: 9px;

    margin-top: 13px;

    color: #989db9;

    font-size: 0.8rem;

    cursor: pointer;
}

.service-toggle input {
    width: 16px;
    height: 16px;

    accent-color: var(--primary);

    cursor: pointer;
}

.service-name-field {
    display: none;

    margin-top: 13px;
}

.service-name-field.visible {
    display: block;

    animation: itemIn 0.2s ease-out;
}


/* ============================================================
   BUTTONS
   ============================================================ */

.button-row {
    display: flex;
    flex-wrap: wrap;

    gap: 10px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 42px;

    padding: 0 15px;

    border-radius: 10px;

    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button:active {
    transform: translateY(0);
}

.button-secondary {
    color: #b7bbd1;

    background: rgba(255, 255, 255, 0.035);

    border: 1px solid rgba(255, 255, 255, 0.09);
}

.button-secondary:hover {
    color: #ffffff;

    background: rgba(255, 255, 255, 0.065);

    border-color: rgba(255, 255, 255, 0.16);
}

.add-button {
    margin-top: 14px;
}

.add-button span {
    color: var(--primary);

    font-size: 1.1rem;
}


/* ============================================================
   CHARACTER COUNTER
   ============================================================ */

.character-counter {
    margin-top: 6px;

    color: var(--muted-dark);

    text-align: right;

    font-size: 0.7rem;
}


/* ============================================================
   FORM ACTION
   ============================================================ */

.form-actions {
    padding-top: 32px;

    border-top: 1px solid rgba(255, 255, 255, 0.075);

    text-align: center;
}

.button-primary {
    width: 100%;
    min-height: 56px;

    color: #06111a;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            #667cff
        );

    border: 0;

    font-size: 0.95rem;

    box-shadow:
        0 12px 35px rgba(0, 229, 255, 0.12);
}

.button-primary:hover {
    box-shadow:
        0 15px 45px rgba(0, 229, 255, 0.2);
}

.send-arrow {
    font-size: 1.2rem;
}

.form-footnote {
    margin-top: 12px;

    color: var(--muted-dark);

    font-size: 0.72rem;
}


/* ============================================================
   VALIDATION
   ============================================================ */

.field-error {
    border-color: rgba(255, 85, 119, 0.8) !important;

    box-shadow:
        0 0 0 3px rgba(255, 85, 119, 0.06) !important;
}

.validation-message {
    margin-top: 7px;

    color: #ff718d;

    font-size: 0.75rem;
}


/* ============================================================
   SUCCESS
   ============================================================ */

.success-message {
    display: flex;
    align-items: flex-start;
    gap: 14px;

    margin-top: 20px;
    padding: 17px;

    background: rgba(56, 231, 164, 0.055);

    border: 1px solid rgba(56, 231, 164, 0.18);

    border-radius: 13px;
}

.success-icon {
    width: 28px;
    height: 28px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    color: #061810;

    background: var(--success);

    font-weight: 900;
}

.success-message strong {
    font-size: 0.9rem;
}

.success-message p {
    margin-top: 4px;

    color: #8fae9f;

    font-size: 0.78rem;
    line-height: 1.5;
}


/* ============================================================
   FOOTER
   ============================================================ */

.footer {
    display: flex;
    justify-content: space-between;

    margin-top: 35px;
    padding-top: 20px;

    color: #4f546f;

    border-top: 1px solid rgba(255, 255, 255, 0.055);

    font-size: 0.68rem;
    letter-spacing: 0.5px;
}


/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(25px);
    }

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

@keyframes itemIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

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

@keyframes floatOne {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(100px, 80px) scale(1.15);
    }
}

@keyframes floatTwo {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(-80px, -60px) scale(1.2);
    }
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 700px) {

    .page-container {
        padding: 25px 12px;
    }

    .card {
        padding: 28px 20px;

        border-radius: 20px;
    }

    .page-header {
        align-items: flex-start;
    }

    .brand-mark {
        width: 48px;
        height: 48px;

        border-radius: 14px;

        font-size: 22px;
    }

    .section-heading {
        flex-direction: column;

        gap: 10px;
    }

    .required-label,
    .optional-label {
        align-self: flex-start;
    }

    .dynamic-item-grid {
        grid-template-columns: 1fr;
    }

    .button-row {
        flex-direction: column;
    }

    .button-row .button {
        width: 100%;
    }

    .footer {
        flex-direction: column;
        gap: 7px;
    }
}


/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
