/* ========================================
   Braket Technologies - Modern 2026 Design
   ======================================== */

/* ========================================
   1. CSS Custom Properties
   ======================================== */
:root {
    --color-bg-overlay: rgba(10, 15, 20, 0.55);
    --color-white: #FFFFFF;
    --color-white-90: rgba(255, 255, 255, 0.9);
    --color-white-70: rgba(255, 255, 255, 0.7);
    --color-accent: #10B981;
    --color-accent-hover: #059669;
    --color-glass-bg: rgba(255, 255, 255, 0.08);
    --color-glass-border: rgba(255, 255, 255, 0.15);
    --color-dark-text: #1A1A2E;
    --color-cta-text: #ffffff;
    --color-error: #FF6B6B;
    --color-success: #4AEDC4;

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ========================================
   2. Reset & Base
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    color: var(--color-white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ========================================
   3. Hero Section
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: flex-start;
    padding: clamp(1.5rem, 5vw, 4rem);
    padding-top: clamp(3rem, 10vh, 8rem);
    background: url('../assets/background.jpg') center/cover no-repeat;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .hero {
        background-attachment: fixed;
    }
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(10, 15, 20, 0.7) 0%,
        rgba(10, 15, 20, 0.4) 50%,
        rgba(10, 15, 20, 0.3) 100%
    );
    z-index: 1;
}

.hero__content {
    position: relative;
    z-index: 2;
    max-width: 720px;
}

.hero__heading {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--color-white);
    margin-bottom: 1.5rem;
}

.hero__subtext {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    font-weight: 300;
    line-height: 1.6;
    color: var(--color-white-90);
    max-width: 600px;
    margin-bottom: 2.5rem;
}

.hero__cta {
    display: inline-block;
    padding: 1rem 2.25rem;
    background: var(--color-accent);
    color: var(--color-cta-text);
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.02em;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.3s ease;
}

.hero__cta:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 30px rgba(74, 237, 196, 0.3);
}

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

.hero__logo {
    position: absolute;
    bottom: clamp(1.5rem, 5vw, 4rem);
    left: clamp(1.5rem, 5vw, 4rem);
    z-index: 2;
}

.hero__logo-img {
    height: clamp(4rem, 6vw, 5rem);
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

/* ========================================
   4. Animations
   ======================================== */
.animate-in {
    opacity: 0;
    transform: translateY(24px);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: var(--delay, 0ms);
}

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

/* ========================================
   5. Modal Overlay & Panel
   ======================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.modal-overlay[hidden] {
    display: none;
}

.modal-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    background: var(--color-glass-bg);
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    border: 1px solid var(--color-glass-border);
    border-radius: 1.25rem;
    padding: 2.5rem;
    width: min(90vw, 540px);
    max-height: 90vh;
    overflow-y: auto;
    color: var(--color-white);
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.is-visible .modal {
    transform: translateY(0);
}

.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.modal__title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-white);
}

.modal__close {
    background: transparent;
    border: none;
    color: var(--color-white-70);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.modal__close svg {
    width: 24px;
    height: 24px;
}

.modal__close:hover {
    color: var(--color-white);
}

.modal__close:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ========================================
   6. Form Styles
   ======================================== */
.modal__form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.modal__form[hidden] {
    display: none;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .form-row--two-col {
        flex-direction: row;
    }

    .form-row--two-col .form-group {
        flex: 1;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-white-90);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 100px;
    color: var(--color-white);
    font-family: var(--font-family);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(74, 237, 196, 0.15);
}

.form-group input.is-invalid,
.form-group textarea.is-invalid {
    border-color: var(--color-error);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-error {
    font-size: 0.875rem;
    color: var(--color-error);
    min-height: 1.25rem;
}

.form__submit {
    padding: 1rem 2rem;
    background: var(--color-accent);
    color: var(--color-cta-text);
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.form__submit:hover:not(:disabled) {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
}

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

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

.spinner {
    width: 20px;
    height: 20px;
    animation: rotate 1s linear infinite;
}

.spinner circle {
    stroke: var(--color-dark-text);
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* ========================================
   7. Success State
   ======================================== */
.modal__success {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
}

.modal__success[hidden] {
    display: none;
}

.success-checkmark {
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
}

.success-checkmark__circle {
    stroke: var(--color-success);
    stroke-width: 2;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.success-checkmark__check {
    stroke: var(--color-success);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

.success-text {
    font-size: 2rem;
    font-weight: 600;
    color: var(--color-white);
    margin-bottom: 0.5rem;
}

.success-subtext {
    font-size: 1rem;
    color: var(--color-white-70);
}

/* ========================================
   8. Responsive Breakpoints
   ======================================== */
@media (min-width: 1024px) {
    .hero {
        padding: clamp(2rem, 6vw, 5rem);
        padding-top: clamp(4rem, 12vh, 10rem);
    }

    .modal {
        padding: 3rem;
    }
}

/* ========================================
   9. Reduced Motion (Accessibility)
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    .animate-in {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .hero__cta {
        transition: none;
    }

    .modal,
    .modal-overlay {
        transition-duration: 0.01ms !important;
    }

    .success-checkmark__circle,
    .success-checkmark__check {
        animation: none;
        stroke-dashoffset: 0;
    }
}

/* ========================================
   10. Print Styles
   ======================================== */
@media print {
    .hero__logo,
    .hero__cta,
    .modal-overlay {
        display: none;
    }

    .hero {
        background: none;
        color: #000;
    }

    .hero::before {
        display: none;
    }
}
