@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap');

:root {
    /* Fonts */
    --font-en: 'Poppins', sans-serif;
    --font-ar: 'IBM Plex Sans Arabic', sans-serif;

    /* Dark Theme (Default) */
    --bg-color: #0a0e17;
    --text-primary: #ffffff;
    --text-secondary: #a0a8b8;
    --accent-color: #00f2ea;
    --accent-secondary: #ff0055;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --content-bg: rgba(10, 14, 23, 0.6);
    --input-bg: rgba(255, 255, 255, 0.05);
    --success-color: #00f2ea;
    --error-color: #ff0055;
}

/* Light Theme Variables */
body.light-theme {
    --bg-color: #f0f4f8;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --accent-color: #007bff; /* Darker blue for visibility on light */
    --accent-secondary: #d53f8c;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.1);
    --content-bg: rgba(255, 255, 255, 0.85);
    --input-bg: rgba(0, 0, 0, 0.05);
    --success-color: #28a745;
    --error-color: #dc3545;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-ar); /* Default Arabic Font */
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* LTR Support override */
[dir="ltr"] {
    font-family: var(--font-en);
}

/* Icons */
.arrow-icon {
    transition: transform 0.3s;
}

[dir="rtl"] .arrow-icon {
    transform: rotate(0deg); /* Left arrow for RTL naturally points left */
}

[dir="ltr"] .arrow-icon {
    transform: rotate(180deg); /* Flip left arrow to point right */
}

/* Background Animations */
.tech-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.grid-overlay {
    position: absolute;
    width: 200%;
    height: 200%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    transform: perspective(500px) rotateX(60deg) translateY(-100px) translateZ(-200px);
    animation: gridMove 20s linear infinite;
}

/* Adjust grid for light theme visibility */
body.light-theme .grid-overlay {
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
}

@keyframes gridMove {
    0% { transform: perspective(500px) rotateX(60deg) translateY(0) translateZ(-200px); }
    100% { transform: perspective(500px) rotateX(60deg) translateY(40px) translateZ(-200px); }
}

.glowing-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: floatOrb 10s ease-in-out infinite alternate;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: var(--accent-color);
    top: -50px;
    left: -50px;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--accent-secondary);
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

@keyframes floatOrb {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, 50px); }
}

.code-snippets {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.code-line {
    position: absolute;
    font-family: 'Courier New', monospace;
    color: var(--accent-color);
    opacity: 0.15;
    font-size: 1.2rem;
    white-space: nowrap;
    animation: floatCode 8s ease-in-out infinite;
}

/* Darker code snippets for light mode */
body.light-theme .code-line {
    opacity: 0.3;
}

@keyframes floatCode {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* Top Controls Area */
.top-controls {
    position: absolute;
    top: 30px;
    right: 30px; /* Default LTR pos, overridden for RTL below if needed, but flex handles it */
    z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* RTL Positioning */
[dir="rtl"] .top-controls {
    right: auto;
    left: 30px;
}

.control-btn, .language-switch button {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover, .language-switch button:hover {
    color: var(--accent-color);
}

.language-switch button.active {
    color: var(--accent-color);
}

.divider {
    color: var(--text-secondary);
    opacity: 0.5;
    margin: 0 5px;
}

/* Main Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.content-wrapper {
    text-align: center;
    max-width: 700px;
    background: rgb(255 255 255 / 16%);

    
    backdrop-filter: blur(15px);
    padding: 60px 40px;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    transition: background-color 0.5s, box-shadow 0.5s;
}

/* Logo */
.logo-area {
    margin-bottom: 30px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.pulse-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(0, 242, 234, 0.7)); }
    70% { transform: scale(1.05); filter: drop-shadow(0 0 20px rgba(0, 242, 234, 0)); }
    100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(0, 242, 234, 0)); }
}

.brand-name {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Typography */
h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
    /* Gradient text effect */
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.highlight {
    color: var(--accent-color);
    -webkit-text-fill-color: var(--accent-color);
    text-shadow: 0 0 20px rgba(0, 242, 234, 0.2);
}

/* Adjust text shadow for light mode readability */
body.light-theme .highlight {
    text-shadow: none;
}

p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.6;
}

/* Form */
.subscribe-form {
    max-width: 500px;
    margin: 0 auto 40px;
}

.input-group {
    display: flex;
    background: var(--input-bg);
    border-radius: 50px;
    padding: 5px;
    border: 1px solid var(--glass-border);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.input-group:focus-within {
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(0, 242, 234, 0.2);
}

input[type="email"] {
    flex: 1;
    background: transparent;
    border: none;
    padding: 15px 25px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
}

input[type="email"]::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

button[type="submit"] {
    background: linear-gradient(90deg, var(--accent-color), #00c2bb);
    color: #fff; /* Keep white for contrast on button */
    border: none;
    padding: 12px 30px;
    border-radius: 40px;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}
button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Adjust button text for visibility if accent is light */
body.light-theme button[type="submit"] {
    color: #fff;
    background: linear-gradient(90deg, var(--accent-color), #0062cc);
}


button[type="submit"]:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 242, 234, 0.4);
}

.form-message {
    margin-top: 15px;
    font-size: 0.9rem;
    min-height: 1.5em; /* Prevent layout shift */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.form-message.success {
    color: var(--success-color);
    opacity: 1;
}

.form-message.error {
    color: var(--error-color);
    opacity: 1;
}

/* Social Links */
.social-links {
    margin-bottom: 30px;
}

.social-links a {
    color: var(--text-secondary);
    font-size: 1.5rem;
    margin: 0 15px;
    transition: color 0.3s, transform 0.3s;
}

.social-links a:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}

/* Footer */
footer {
    font-size: 0.9rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

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

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    .content-wrapper {
        padding: 40px 20px;
        margin-top: 30px;
    }
    
    .input-group {
        flex-direction: column;
        border-radius: 20px;
        background: transparent;
        border: none;
        gap: 15px;
    }
    
    input[type="email"] {
        background: var(--input-bg);
        border: 1px solid var(--glass-border);
        border-radius: 50px;
        width: 100%;
        text-align: center;
    }
    
    button[type="submit"] {
        width: 100%;
        justify-content: center;
    }
}
.language-switch button.active {
    display: none;
}

.language-switch .divider {
    display: none;
}


#headline {
  font-family: "Cairo", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  line-height: 1.5;
}

