/* ==========================================================================
   Turnstile (anti-spam) container
   ========================================================================== */
.turnstile-container {
    display: flex;
    justify-content: center;
}

.turnstile-container:not(:empty) {
    margin-bottom: 1rem;
}

/* ==========================================================================
   Variables & Theme Setup
   ========================================================================== */
:root {
    --color-primary-gold: #d59e51;
    --color-accent-gold: #f0b055;
    --color-primary-hover: #e2ae66;
    --color-dark-purple: #3d357e;
    --color-dark-bg: #1b1815;

    --color-text-light: #ffffff;
    --color-text-muted: rgba(255, 255, 255, 0.78);
    --color-text-dark: #1e1e1e;
    --color-input-text: #3c3c3c;
    --color-border: #9c9c9c;
    --color-border-focus: #d59e51;

    --font-sans: 'Manrope', system-ui, -apple-system, sans-serif;
    --font-serif: 'Gambetta', Georgia, serif;
    --header-height: 76px;

    --transition-speed: 0.3s;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);

    /* Fluid spacing tokens */
    --space-section-x: clamp(20px, 5vw, 48px);
    --space-section-y: clamp(36px, 7vh, 88px);
}

/* ==========================================================================
   Resets & Base Styles
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    height: 100%;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    /* clip guards horizontal overflow without breaking the sticky header */
    overflow-x: clip;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text-light);
    background-color: var(--color-dark-bg);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    /* clip overrides hidden where supported (does not create a scroll container) */
    overflow-x: clip;
    width: 100%;
    max-width: 100%;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

img {
    max-width: 100%;
    display: block;
}

::selection {
    background-color: rgba(213, 158, 81, 0.85);
    color: #fff;
}

/* ==========================================================================
   Background System
   ========================================================================== */
.page-background {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.bg-image {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    filter: brightness(0.92);
    animation: zoomBackground 24s ease-out infinite alternate;
}

.bg-overlay-multiply {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    mix-blend-mode: multiply;
}

.bg-overlay-gradients {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0) 40%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 60%),
        radial-gradient(circle at 75% 35%, rgba(61, 53, 126, 0.35) 0%, rgba(0, 0, 0, 0) 55%),
        linear-gradient(rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.35) 100%);
}

@keyframes zoomBackground {
    0% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1.1);
    }
}

/* ==========================================================================
   Typography & Common Elements
   ========================================================================== */
h1,
h2,
h3 {
    font-family: var(--font-sans);
    font-weight: 500;
}

.btn {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.78125rem;
    letter-spacing: 2.2px;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 3px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform var(--transition-speed) var(--ease-out-expo),
        box-shadow var(--transition-speed) var(--ease-out-expo),
        background-color var(--transition-speed) var(--ease-out-expo);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    white-space: nowrap;
}

/* Shine sweep effect */
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg,
            transparent 25%,
            rgba(255, 255, 255, 0.45) 50%,
            transparent 75%);
    transform: translateX(-130%);
    transition: transform 0.7s var(--ease-out-expo);
    pointer-events: none;
    z-index: 2;
}

.btn:hover::after {
    transform: translateX(130%);
}

.btn__text {
    position: relative;
    z-index: 1;
}

.btn--header {
    background-color: var(--color-primary-gold);
    color: var(--color-text-dark);
    height: 42px;
    padding: 0 26px;
}

.btn--header:hover {
    background-color: var(--color-primary-hover);
    box-shadow: 0 6px 18px rgba(213, 158, 81, 0.45);
    transform: translateY(-2px);
}

.btn--hero {
    background-color: var(--color-primary-gold);
    color: var(--color-text-dark);
    height: 54px;
    padding: 0 34px;
    align-self: flex-start;
}

.btn--hero:hover {
    background-color: var(--color-primary-hover);
    box-shadow: 0 10px 28px rgba(213, 158, 81, 0.5);
    transform: translateY(-3px);
}

.btn--submit {
    background-color: var(--color-primary-gold);
    color: var(--color-text-dark);
    height: 54px;
    width: 100%;
}

.btn--submit:hover {
    background-color: var(--color-primary-hover);
    box-shadow: 0 10px 26px rgba(213, 158, 81, 0.45);
    transform: translateY(-2px);
}

.btn--submit:active,
.btn--hero:active,
.btn--header:active {
    transform: translateY(0) scale(0.99);
}

.btn:disabled {
    cursor: not-allowed;
}

.btn__spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(30, 30, 30, 0.25);
    border-top-color: var(--color-text-dark);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
    position: absolute;
    z-index: 1;
}

.btn.is-loading .btn__text {
    visibility: hidden;
    opacity: 0;
}

.btn.is-loading .btn__spinner {
    display: block;
}

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

/* ==========================================================================
   Header Component
   ========================================================================== */
.header {
    width: 100%;
    background-color: rgba(61, 53, 126, 0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: background-color 0.4s var(--ease-out-expo),
        box-shadow 0.4s var(--ease-out-expo);
    animation: headerDrop 0.8s var(--ease-out-expo) both;
}

.header.is-scrolled {
    background-color: rgba(61, 53, 126, 0.92);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

@keyframes headerDrop {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }

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

.header__container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 14px var(--space-section-x);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.header__logo {
    height: clamp(34px, 4.5vw, 46px);
    display: block;
    object-fit: contain;
}

/* ==========================================================================
   Main Hero Layout
   ========================================================================== */
.hero-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-section-y) var(--space-section-x);
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: clamp(40px, 6vw, 96px);
    align-items: center;
    width: 100%;
}

.hero-text-section {
    display: flex;
    flex-direction: column;
    gap: clamp(20px, 3vh, 34px);
    min-width: 0;
}

.location-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    align-self: flex-start;
    padding: 7px 14px;
    border: 1px solid rgba(240, 176, 85, 0.35);
    border-radius: 100px;
    background: rgba(240, 176, 85, 0.08);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.location-badge__icon {
    width: 15px;
    height: 15px;
}

.location-badge__text {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 11.5px;
    color: var(--color-accent-gold);
    letter-spacing: 2.2px;
    text-transform: uppercase;
}

.location-badge__dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: var(--color-accent-gold);
}

.hero-title {
    font-size: clamp(1.75rem, 1rem + 3vw, 3.5rem);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--color-text-light);
    text-wrap: balance;
}

.hero-title--italic {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 600;
    background: linear-gradient(100deg, var(--color-accent-gold) 0%, var(--color-primary-gold) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--color-accent-gold);
}

.hero-subtitle {
    font-size: clamp(0.95rem, 0.85rem + 0.4vw, 1.0625rem);
    font-weight: 400;
    line-height: 1.65;
    color: var(--color-text-muted);
    max-width: 46ch;
}

/* ==========================================================================
   Form Card Section (Right Side)
   ========================================================================== */
.form-card-section {
    display: flex;
    justify-content: flex-end;
    min-width: 0;
}

.form-card {
    background-color: rgba(27, 24, 21, 0.32);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: clamp(32px, 3.5vw, 52px) clamp(24px, 3vw, 46px);
    width: 100%;
    max-width: 460px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    gap: clamp(24px, 3vh, 32px);
    position: relative;
    overflow: hidden;
    animation: floatCard 7s ease-in-out infinite;
}

@keyframes floatCard {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-7px);
    }
}

.form-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 70% 30%, rgba(213, 158, 81, 0.18) 0%, rgba(0, 0, 0, 0) 50%);
    pointer-events: none;
    z-index: 0;
}

.form-card__header {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-card__title {
    font-size: clamp(1.3rem, 1.1rem + 0.7vw, 1.55rem);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.form-card__subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.6;
}

.lead-form {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

input[name="mail"] {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

.form-group__label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.4px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    transition: color 0.25s ease;
}

.form-group:focus-within .form-group__label {
    color: var(--color-accent-gold);
}

.form-group__input-wrapper,
.form-group__select-wrapper {
    position: relative;
    width: 100%;
}

.form-group__input,
.form-group__select {
    width: 100%;
    height: 50px;
    background-color: var(--color-text-light);
    color: var(--color-text-dark);
    font-family: var(--font-sans);
    font-weight: 500;
    /* 16px prevents iOS auto-zoom on focus */
    font-size: 16px;
    padding: 0 18px;
    border-radius: 4px;
    border: 1px solid rgba(156, 156, 156, 0.6);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
    outline: none;
}

.form-group__input::placeholder {
    color: var(--color-border);
}

.form-group__input:focus,
.form-group__select:focus {
    border-color: var(--color-primary-gold);
    box-shadow: 0 0 0 3px rgba(213, 158, 81, 0.22);
}

.form-group__select-wrapper {
    display: flex;
    align-items: center;
}

.form-group__select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 46px;
    cursor: pointer;
    color: var(--color-text-dark);
    font-weight: 600;
}

.form-group__select:invalid,
.form-group__select option[value=""] {
    color: var(--color-input-text);
    font-weight: 500;
}

.form-group__select-icon {
    position: absolute;
    right: 18px;
    width: 12px;
    height: 8px;
    pointer-events: none;
    transition: transform var(--transition-speed) ease;
}

.form-group__select:focus+.form-group__select-icon {
    transform: rotate(180deg);
}

.form-card__disclaimer {
    position: relative;
    z-index: 1;
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-muted);
    text-align: center;
    line-height: 1.5;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.form-card__disclaimer svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.form-group__input.is-invalid,
.form-group__select.is-invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.22) !important;
    animation: shake 0.4s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* ==========================================================================
   Scroll / Load Reveal Animations
   ========================================================================== */
[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-out-expo),
        transform 0.8s var(--ease-out-expo);
    transition-delay: var(--reveal-delay, 0s);
    will-change: opacity, transform;
}

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

/* ==========================================================================
   Notification System
   ========================================================================== */
.notification-container {
    position: fixed;
    top: 96px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 400px;
    width: calc(100% - 48px);
}

.toast {
    pointer-events: auto;
    padding: 16px 20px;
    border-radius: 6px;
    background-color: rgba(30, 27, 24, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    border-left: 4px solid transparent;
    color: var(--color-text-light);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    animation: toastSlideIn 0.45s var(--ease-out-expo) forwards;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast--success {
    border-left-color: #10b981;
}

.toast--success .toast__icon {
    color: #10b981;
}

.toast--error {
    border-left-color: #ef4444;
}

.toast--error .toast__icon {
    color: #ef4444;
}

.toast__icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast__message {
    line-height: 1.4;
}

.toast__close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    transition: color 0.2s ease;
}

.toast__close:hover {
    color: var(--color-text-light);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(-18px);
    }

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

.toast.is-hiding {
    opacity: 0;
    transform: translateY(-14px);
}

/* ==========================================================================
   Responsive Media Queries
   ========================================================================== */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: clamp(36px, 6vh, 56px);
        text-align: center;
        max-width: 560px;
        margin: 0 auto;
    }

    .location-badge {
        align-self: center;
    }

    .hero-subtitle {
        max-width: 52ch;
        margin: 0 auto;
    }

    .btn--hero {
        align-self: center;
    }

    .form-card-section {
        justify-content: center;
    }

    .form-card {
        max-width: 520px;
        text-align: left;
    }
}

@media (max-width: 600px) {
    .form-card {
        animation: none;
        max-width: 100%;
    }

    .notification-container {
        top: 16px;
        right: 12px;
        left: 12px;
        width: auto;
    }

    .btn--hero {
        width: 100%;
    }
}

@media (max-width: 360px) {
    .header__container {
        padding: 12px 16px;
    }

    .btn--header {
        padding: 0 18px;
        letter-spacing: 1.5px;
    }
}

/* Short landscape screens: let content scroll naturally */
@media (max-height: 640px) and (min-width: 1025px) {
    .hero-container {
        align-items: flex-start;
    }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {

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

    [data-reveal] {
        opacity: 1;
        transform: none;
    }

    .bg-image,
    .form-card {
        animation: none;
    }
}
