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

:root {
    --olive: #4A5240;
    --text: #3D3D3D;
    --wall: #EFEDE6;
    --error: #B23B3B;
    --errorBg: rgba(178, 59, 59, 0.08);
    --errorBorder: rgba(178, 59, 59, 0.28);
    --scroll: 0;
}

html, body {
    height: 100%;
}

[lang="ar"] body,
body.rtl {
    direction: rtl;
}

[lang="ar"] .input.icon-email,
body.rtl .input.icon-email,
[lang="ar"] .input.icon-name,
body.rtl .input.icon-name {
    padding-left: 18px;
    padding-right: 46px;
    background-position: calc(100% - 18px) 50%;
}

[lang="ar"] .date-field input[type="date"],
body.rtl .date-field input[type="date"] {
    padding-left: 18px;
    padding-right: 46px;
    background-position: calc(100% - 18px) 50%;
}

[lang="ar"] .date-placeholder,
body.rtl .date-placeholder {
    left: auto;
    right: 46px;
}

[lang="ar"] .field-check,
body.rtl .field-check {
    right: auto;
    left: 18px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Work Sans', 'Inter', sans-serif;
    color: var(--text);
    overflow-x: hidden;
    background: var(--wall);
    letter-spacing: 0.01em;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    width: 100%;
    min-height: 100vh;
    background: var(--wall) url("tree.jpeg") center/cover no-repeat;
    background-attachment: fixed;
    background-size: cover;
    transform: translateY(calc(var(--scroll) * 0.5px)) scale(1.2);
    animation: gentleSway 12s ease-in-out infinite;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 10;
    pointer-events: none;
    background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 400 400" xmlns="http://www.w3.org/2000/svg"><filter id="noiseFilter"><feTurbulence type="fractalNoise" baseFrequency="0.85" numOctaves="4" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noiseFilter)" opacity="0.035"/></svg>');
    opacity: 0.6;
    mix-blend-mode: overlay;
}

@keyframes gentleSway {
    0%, 100% {
        transform: translateY(calc(var(--scroll) * 0.5px)) scale(1.2) translateX(0) rotate(0deg);
    }
    25% {
        transform: translateY(calc(var(--scroll) * 0.5px)) scale(1.2) translateX(2px) rotate(0.5deg);
    }
    50% {
        transform: translateY(calc(var(--scroll) * 0.5px)) scale(1.2) translateX(-2px) rotate(-0.5deg);
    }
    75% {
        transform: translateY(calc(var(--scroll) * 0.5px)) scale(1.2) translateX(2px) rotate(0.5deg);
    }
}

.brand,
.headline,
.tagline p,
.modal-title,
.thank-you h3 {
    font-family: 'Libre Baskerville', 'Cormorant Garamond', serif;
}

.brand {
    letter-spacing: 0.15em;
}

.headline {
    letter-spacing: -0.02em;
}

.tagline p {
    letter-spacing: 0.03em;
}

.language-toggle {
    position: fixed;
    top: 26px;
    right: 26px;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 6px;
}

.lang-btn {
    background: none;
    border: 1px solid rgba(0, 0, 0, 0.25);
    font-size: 13px;
    letter-spacing: 1px;
    color: var(--olive);
    opacity: .75;
    cursor: pointer;
    font-weight: 500;
    padding: 4px 4px;
    border-radius: 999px;
    transition: all 0.25s ease;
}

.lang-btn:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.lang-btn.active {
    opacity: 1;
    border-color: #000;
    background: rgba(0, 0, 0, 0.04);
}

.separator {
    display: none;
}

.hero {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
}

.hero-text {
    max-width: 900px;
    margin-top: 120px;
}

.brand {
    font-size: 18px;
    color: var(--olive);
    margin-bottom: 60px;
    font-weight: 700;
    opacity: .75;
    text-transform: uppercase;
}

.headline {
    font-size: 96px;
    font-weight: 400;
    color: var(--olive);
    line-height: 0.95;
    margin-bottom: 60px;
    letter-spacing: -0.02em;
}

.tagline {
    margin-top: 20px;
}

.tagline p {
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 18px;
    color: var(--olive);
    letter-spacing: 0.03em;
}

.tagline p:last-child {
    margin-bottom: 0;
}

.hero-thank-you {
    margin-top: 160px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.hero-thank-you.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-thank-you p {
    font-family: 'Libre Baskerville', serif;
    font-size: 22px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    text-align: center;
    line-height: 1.5;
}

.hero-social-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 70px;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.6s ease 0.5s forwards;
}

.hero-social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: white;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.hero-social-links a:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

.hero-social-links svg {
    width: 24px;
    height: 24px;
}

.reveal {
    opacity: 0;
    transform: translateY(15px);
    animation: revealIn 1100ms cubic-bezier(.2, .9, .2, 1) forwards;
}

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

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

.scroll-spacer {
    height: 140vh;
}

.scroll-indicator {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    opacity: .85;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    padding: 12px 20px;
}

.scroll-indicator:hover {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

.scroll-text {
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
    transition: all 0.3s ease;
    animation: textBounce 2.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.scroll-indicator:hover .scroll-text {
    color: white;
    animation: none;
}

.scroll-indicator .arrow {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bounce 2.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    backdrop-filter: blur(2px);
    transition: all 0.3s ease;
}

.scroll-indicator:hover .arrow {
    border-color: white;
    background: rgba(255, 255, 255, 0.1);
    animation: none;
    transform: translateY(2px);
}

.scroll-indicator .arrow::after {
    content: "";
    width: 10px;
    height: 10px;
    border-right: 2px solid rgba(255, 255, 255, 0.75);
    border-bottom: 2px solid rgba(255, 255, 255, 0.75);
    transform: rotate(45deg);
    margin-top: -4px;
    transition: all 0.3s ease;
}

.scroll-indicator:hover .arrow::after {
    border-color: white;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
        opacity: 1;
    }
    40% {
        transform: translateY(8px);
        opacity: 0.7;
    }
    60% {
        transform: translateY(4px);
        opacity: 0.85;
    }
}

@keyframes textBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
        opacity: 0.9;
    }
    40% {
        transform: translateY(-4px);
        opacity: 0.7;
    }
    60% {
        transform: translateY(-2px);
        opacity: 0.8;
    }
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    z-index: 1000;
    overflow: hidden;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: rgba(255, 255, 255, 0.94);
    padding: 52px 44px;
    width: 92%;
    max-width: 660px;
    border-radius: 44px;
    position: relative;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.12), 0 10px 30px rgba(0, 0, 0, 0.06);
    transform: translateY(10px) scale(0.985);
    opacity: 0;
    animation: modalIn 320ms ease forwards;
}

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

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.92);
    font-size: 22px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: rotate(90deg);
}

.modal-title {
    font-size: 36px;
    font-weight: 400;
    color: var(--olive);
    margin-bottom: 10px;
}

.modal-subtitle {
    font-size: 16px;
    font-weight: 400;
    color: var(--text);
    opacity: 0.7;
    margin-bottom: 30px;
}

.form-progress {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(74, 82, 64, 0.2);
    transition: all 0.3s ease;
}

.progress-dot.active {
    background: var(--olive);
    transform: scale(1.3);
}

.progress-dot.completed {
    background: var(--olive);
}

.form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 14px;
    row-gap: 6px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.input {
    height: 54px;
    padding: 14px 18px;
    border-radius: 22px;
    border: 1px solid rgba(74, 82, 64, 0.18);
    background-color: rgba(245, 243, 238, 0.85);
    font-size: 15px;
    font-family: 'Work Sans', 'Inter', sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input:focus {
    outline: none;
    background-color: #fff;
    border-color: rgba(74, 82, 64, 0.45);
    box-shadow: 0 12px 30px rgba(74, 82, 64, 0.10);
    transform: translateY(-2px);
}

.input.icon-email,
.input.icon-name {
    padding-left: 46px;
    background-color: rgba(245, 243, 238, 0.85);
    background-repeat: no-repeat;
    background-position: 18px 50%;
    background-size: 18px 18px;
}

.input.icon-email {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='rgba(61,61,61,0.55)' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6h16v12H4z'/%3E%3Cpath d='m4 7 8 6 8-6'/%3E%3C/svg%3E");
}

.input.icon-name {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='rgba(61,61,61,0.55)' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21a8 8 0 0 0-16 0'/%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3C/svg%3E");
}

input[type="date"] {
    color: transparent;
    font-size: 15px;
    -webkit-appearance: none;
    appearance: none;
}

input[type="date"]:focus,
.date-field.has-value input[type="date"] {
    color: var(--text);
}

input[type="date"]::-webkit-datetime-edit {
    color: transparent;
    font-size: 15px;
}

input[type="date"]:focus::-webkit-datetime-edit,
.date-field.has-value input[type="date"]::-webkit-datetime-edit {
    color: var(--text);
    font-size: 15px;
}

.date-field input[type="date"] {
    display: flex;
    align-items: center;
    height: 54px;
    line-height: 1;
    padding: 0 18px 0 46px;
    background-color: rgba(245, 243, 238, 0.85);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='rgba(61,61,61,0.55)' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 18px center;
    background-size: 18px 18px;
    font-size: 15px;
    -webkit-text-fill-color: transparent;
}

.date-field input[type="date"]:focus,
.date-field.has-value input[type="date"] {
    -webkit-text-fill-color: var(--text);
}

input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
}

.date-field {
    position: relative;
}

.date-placeholder {
    position: absolute;
    left: 46px;
    top: 19px;
    font-size: 15px;
    color: rgba(61, 61, 61, 0.55);
    pointer-events: none;
    opacity: 1;
    transition: opacity .15s ease;
    line-height: 1;
}

.date-field.has-value .date-placeholder {
    opacity: 0;
}

.field-check {
    position: absolute;
    right: 18px;
    top: 17px;
    width: 20px;
    height: 20px;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.field.valid .field-check {
    opacity: 1;
    transform: scale(1);
}

.field-check svg {
    width: 20px;
    height: 20px;
}

.field.valid .input {
    padding-right: 46px;
}

.error-text {
    min-height: 16px;
    font-size: 12px;
    color: var(--error);
    opacity: 0;
    transform: translateY(-2px);
    transition: opacity .15s ease, transform .15s ease;
}

.field.has-error .error-text {
    opacity: 1;
    transform: translateY(0);
}

.field.has-error .input {
    border-color: var(--errorBorder);
    background-color: var(--errorBg);
    box-shadow: 0 10px 22px rgba(178, 59, 59, 0.10);
}

.field.has-error .input.icon-email,
.field.has-error .input.icon-name {
    background-repeat: no-repeat;
    background-position: 18px 50%;
    background-size: 18px 18px;
}

.field.has-error.date-field input[type="date"] {
    background-repeat: no-repeat;
    background-position: 18px 50%;
    background-size: 18px 18px;
}

.input:-webkit-autofill,
.input:-webkit-autofill:hover,
.input:-webkit-autofill:focus,
.input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px rgba(245, 243, 238, 0.85) inset !important;
    -webkit-text-fill-color: var(--text) !important;
}

.input.icon-email:-webkit-autofill,
.input.icon-name:-webkit-autofill {
    background-repeat: no-repeat !important;
    background-position: 18px 50% !important;
    background-size: 18px 18px !important;
}

.submit-btn {
    height: 54px;
    border-radius: 999px;
    background: var(--olive);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 14px;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.submit-btn:hover:not(:disabled)::before {
    width: 300px;
    height: 300px;
}

.submit-btn:hover:not(:disabled) {
    background: #3a4230;
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(74, 82, 64, 0.2);
}

.submit-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 8px 20px rgba(74, 82, 64, 0.15);
}

.submit-btn:disabled {
    background: #9CA3AF;
    opacity: 1;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.thank-you {
    text-align: center;
    padding: 10px 0 4px;
}

.thank-you h3 {
    font-size: 46px;
    font-weight: 400;
    color: var(--olive);
    margin-bottom: 18px;
}

.thank-you p {
    font-size: 16px;
    font-weight: 400;
    color: var(--text);
    opacity: 0.7;
}

.social-links-thankyou {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 28px;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.5s ease 0.3s forwards;
}

.social-links-thankyou a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--olive);
    color: white;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.social-links-thankyou a:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(74, 82, 64, 0.25);
    background: #3a4230;
}

.social-links-thankyou svg {
    width: 20px;
    height: 20px;
}

.hidden {
    display: none !important;
}

.rotating-text {
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 0;
    color: var(--olive);
    opacity: 1 !important;
    letter-spacing: 0.03em;
    min-height: 26px;
    position: relative;
    transition: opacity 0.5s ease;
}

@media (max-width: 640px) {
    .headline {
        font-size: 56px;
        margin-bottom: 40px;
        line-height: 1;
    }

    .brand {
        margin-bottom: 40px;
        font-size: 12px;
    }

    .tagline p,
    .rotating-text {
        font-size: 14px !important;
    }

    .hero {
        padding: 40px 20px;
    }

    .hero-text {
        max-width: 100%;
        margin-top: 80px;
    }

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

    .modal-content {
        padding: 38px 24px 34px;
        border-radius: 28px;
        width: 94%;
        max-height: 90vh;
        overflow-y: auto;
    }

    .close-btn {
        width: 34px;
        height: 34px;
        top: 14px;
        right: 14px;
        font-size: 18px;
    }

    .modal-title {
        font-size: 28px;
        margin-bottom: 8px;
        padding-right: 30px;
    }

    .modal-subtitle {
        font-size: 14px;
        margin-bottom: 24px;
    }

    .social-links-thankyou {
        gap: 16px;
    }

    .social-links-thankyou a {
        width: 40px;
        height: 40px;
    }

    .hero-social-links {
        gap: 18px;
    }

    .hero-social-links a {
        width: 46px;
        height: 46px;
    }

    .hero-social-links svg {
        width: 22px;
        height: 22px;
    }

    .hero-thank-you p {
        font-size: 18px;
    }

    .hero-social-links {
        margin-top: 30px;
    }

    input[type="date"],
    input[type="date"]::-webkit-datetime-edit {
        font-size: 16px !important;
    }

    .date-field input[type="date"] {
        height: 54px !important;
        line-height: 1 !important;
        padding: 0 18px 0 46px !important;
        font-size: 16px !important;
        display: flex;
        align-items: center;
    }

    .date-placeholder {
        font-size: 16px !important;
        top: 19px !important;
        transform: none !important;
        line-height: 1 !important;
        left: 46px !important;
    }

    .input {
        font-size: 16px !important;
    }
}

@media (max-width: 1024px) and (min-width: 641px) {
    .headline {
        font-size: 76px;
    }
}