:root {
    /* Tech-Brutalist Palette */
    --color-bg-primary: #050505;
    /* Deep Void */
    --color-bg-secondary: #0a0a0a;
    /* Darker Secondary */

    --color-accent: #ccff00;
    /* Acid Lime - The new signal color */
    --color-accent-dark: #b3e600;
    --color-accent-light: #d9ff33;

    --color-text-primary: #ffffff;
    --color-text-secondary: #888888;
    /* Raw Grey */

    --color-border: #333333;
    /* Raw Border */
    --color-border-hover: #555555;

    --color-error: #ff3333;
    /* Signal Red */
    --color-success: #00ff66;
    /* Signal Green */

    /* Geometry: SHARP */
    --radius-sm: 0px;
    --radius-md: 2px;
    /* Barely perceptible rounding */
    --radius-lg: 0px;

    /* Shadows: Hard, no blur implies depth in brutalism, but we might stick to outlines */
    --shadow-sm: 4px 4px 0px rgba(0, 0, 0, 1);
    --shadow-md: 8px 8px 0px rgba(20, 20, 20, 0.5);

    /* Typography */
    --font-display: 'Space Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --font-body: 'Inter', sans-serif;

    --transition-fast: 100ms cubic-bezier(0.4, 0, 0.2, 1);
    /* Snappy */
    --transition-normal: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: var(--color-text-primary);
}

.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--color-bg-secondary);
    z-index: 1000;
}

.progress-bar {
    height: 100%;
    background: var(--color-accent);
    width: 0%;
    transition: width var(--transition-normal);
    box-shadow: 0 0 15px var(--color-accent);
}

/* Custom Scrollbar for Tech Feel */
::-webkit-scrollbar {
    width: 8px;
    background: var(--color-bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent);
}

.header {
    padding: 40px 20px;
    text-align: center;
    background: linear-gradient(180deg, var(--color-bg-secondary) 0%, var(--color-bg-primary) 100%);
    border-bottom: 1px solid var(--color-border);
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 24px;
}

.badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.header h1 {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--color-text-primary) 0%, var(--color-text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--color-text-secondary);
    font-size: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.main-container {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.form-section {
    margin-bottom: 32px;
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.form-section:nth-child(1) {
    animation-delay: 0.1s;
}

.form-section:nth-child(2) {
    animation-delay: 0.15s;
}

.form-section:nth-child(3) {
    animation-delay: 0.2s;
}

.form-section:nth-child(4) {
    animation-delay: 0.25s;
}

.form-section:nth-child(5) {
    animation-delay: 0.3s;
}

.form-section:nth-child(6) {
    animation-delay: 0.35s;
}

.form-section:nth-child(7) {
    animation-delay: 0.4s;
}

.form-section:nth-child(8) {
    animation-delay: 0.45s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.section-icon {
    font-size: 1.5rem;
}

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.form-card {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    /* Sharp edges */
    padding: 32px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

/* Decorative corner marker for tech feel */
.form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border-top: 2px solid var(--color-accent);
    border-left: 2px solid var(--color-accent);
    opacity: 0.8;
}

.form-card:hover {
    border-color: var(--color-border-hover);
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.required {
    color: var(--color-error);
    margin-left: 2px;
}

input[type="text"],
input[type="number"],
input[type="url"],
textarea,
select {
    width: 100%;
    padding: 16px;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: 0;
    /* Sharp */
    color: var(--color-text-primary);
    font-family: var(--font-mono);
    /* Technical feel for data entry */
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

input::placeholder,
textarea::placeholder {
    color: var(--color-text-secondary);
    opacity: 0.5;
    font-family: var(--font-body);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-accent);
    background: rgba(204, 255, 0, 0.05);
    /* Subtle acid tint */
    box-shadow: none;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

select option {
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

.mb-2 {
    margin-bottom: 8px;
}

.error-message {
    display: block;
    color: var(--color-error);
    font-size: 0.75rem;
    margin-top: 4px;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.error-message.show {
    opacity: 1;
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
}

.radio-label:hover {
    color: var(--color-text-primary);
}

.radio-label input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 18px;
    height: 18px;
    border: 1px solid var(--color-border);
    border-radius: 0;
    /* Sharp */
    transform: rotate(45deg);
    /* Diamond shape */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    margin: 4px;
    /* Space for rotation */
}

.radio-custom::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 0;
    /* Sharp inner */
    background: var(--color-accent);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.radio-label input[type="radio"]:checked+.radio-custom {
    border-color: var(--color-accent);
    box-shadow: 0 0 10px rgba(204, 255, 0, 0.2);
}

.radio-label input[type="radio"]:checked+.radio-custom::after {
    opacity: 1;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
}

.checkbox-group.vertical {
    flex-direction: column;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
}

.checkbox-label:hover {
    color: var(--color-text-primary);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 1px solid var(--color-border);
    border-radius: 0;
    /* Sharp */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.checkbox-custom::after {
    content: '';
    width: 12px;
    height: 12px;
    background: var(--color-accent);
    /* Solid fill instead of checkmark matching diamond style */
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.checkbox-label input[type="checkbox"]:checked+.checkbox-custom {
    background: transparent;
    border-color: var(--color-accent);
    box-shadow: 0 0 10px rgba(204, 255, 0, 0.2);
}

.checkbox-label input[type="checkbox"]:checked+.checkbox-custom::after {
    opacity: 1;
}

.form-group .toggle-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    margin-bottom: 0;
}

.toggle-switch input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    width: 60px;
    height: 30px;
    background: transparent;
    border: 2px solid var(--color-border);
    border-radius: 0;
    /* Sharp */
    position: relative;
    transition: all var(--transition-fast);
}

.toggle-slider::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--color-border);
    border-radius: 0;
    /* Square */
    top: 3px;
    left: 3px;
    transition: transform var(--transition-fast), background var(--transition-fast);
}

.toggle-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    font-family: var(--font-mono);
    text-transform: uppercase;
}

.toggle-switch input[type="checkbox"]:checked+.toggle-slider {
    background: rgba(204, 255, 0, 0.1);
    border-color: var(--color-accent);
}

.toggle-switch input[type="checkbox"]:checked+.toggle-slider::after {
    transform: translateX(30px);
    background: var(--color-accent);
}

.toggle-switch input[type="checkbox"]:checked~.toggle-label {
    color: var(--color-text-primary);
}

#servicosContainer {
    margin-bottom: 16px;
}

.servico-item {
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 12px;
    animation: fadeIn 0.3s ease forwards;
}

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

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

.servico-item.removing {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.servico-grid {
    display: grid;
    grid-template-columns: 1fr 120px 100px 40px;
    gap: 12px;
    align-items: end;
}

@media (max-width: 600px) {
    .servico-grid {
        grid-template-columns: 1fr;
    }

    .btn-remove-servico {
        justify-self: end;
    }
}

.servico-field label {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    margin-bottom: 4px;
}

.servico-field input {
    font-size: 0.875rem;
}

.btn-remove-servico {
    width: 36px;
    height: 36px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-sm);
    color: var(--color-error);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.btn-remove-servico:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--color-error);
    transform: scale(1.05);
}

.btn-add-servico {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-add-servico:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-glow);
}

.btn-add-servico span {
    font-size: 1.25rem;
    font-weight: 600;
}

.conditional-field {
    animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        padding-top: 0;
        margin-top: 0;
    }

    to {
        opacity: 1;
        max-height: 200px;
        padding-top: 20px;
        margin-top: 0;
    }
}

/* ===== INPUT OUTRO (CONDITIONAL) ===== */
.input-outro {
    display: none;
    margin-top: 12px;
    animation: slideDown 0.3s ease forwards;
    padding-left: 32px;
    /* Indent to align with checkboxes visually if desired */
}

.form-footer {
    margin-top: 40px;
    text-align: center;
}

.btn-submit {
    width: 100%;
    padding: 16px 32px;
    background: var(--color-accent);
    color: #000;
    /* Contrast on Acid Lime */
    border: none;
    border-radius: 0;
    /* Sharp */
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
    /* Cyberpunk cut */
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit:hover {
    background: var(--color-accent-dark);
    transform: translateY(-2px);
    box-shadow: 4px 4px 0px rgba(255, 255, 255, 0.2);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loader {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.form-disclaimer {
    color: var(--color-text-secondary);
    font-size: 0.8125rem;
    margin-top: 16px;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 39, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    padding: 20px;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    transform: scale(0.9);
    transition: transform var(--transition-normal);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-icon {
    font-size: 4rem;
    margin-bottom: 24px;
    animation: bounce 0.6s ease;
}

@keyframes bounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

.modal-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.modal-content p {
    color: var(--color-text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

.btn-modal-close {
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-modal-close:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

@media (max-width: 768px) {
    .header {
        padding: 30px 16px;
    }

    .main-container {
        padding: 16px;
    }

    .form-card {
        padding: 20px;
    }

    .radio-group {
        flex-direction: column;
        gap: 12px;
    }

    .modal-content {
        padding: 30px 24px;
    }
}

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

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* ===== BEAMS BACKGROUND ===== */
.beams-bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background-color: #0a0e27;
    overflow: hidden;
}

.beams-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    filter: blur(15px);
}

.beams-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(10, 14, 39, 0.2);
    backdrop-filter: blur(50px);
    animation: pulseOverlay 10s ease-in-out infinite;
}

@keyframes pulseOverlay {

    0%,
    100% {
        opacity: 0.05;
    }

    50% {
        opacity: 0.15;
    }
}