/* ==========================================================================
   Arffmann Family Domain Design System & CSS
   Premium Glassmorphic Aesthetics, Responsive Layout, Light/Dark Modes
   ========================================================================== */

/* 1. CSS VARIABLES & THEMES */
:root {
    /* Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;

    /* Colors - Dark Theme (Default) */
    --bg-gradient: radial-gradient(circle at 50% -20%, #1e1b4b 0%, #0f172a 60%, #020617 100%);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Interactive Colors (Sky Blue & Earth Green) */
    --accent-sky: #06b6d4;      /* Sky / Ocean Cyan */
    --accent-earth: #10b981;    /* Earth Green */
    --accent-gradient: linear-gradient(135deg, var(--accent-sky) 0%, var(--accent-earth) 100%);
    --accent-glow: rgba(6, 182, 212, 0.15);
    
    /* Glassmorphism Styles */
    --glass-bg: rgba(15, 23, 42, 0.45);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-hover: rgba(255, 255, 255, 0.18);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glass-shadow-hover: 0 12px 40px 0 rgba(6, 182, 212, 0.2);

    /* UI Elements */
    --card-bg: rgba(15, 23, 42, 0.6);
    --input-bg: rgba(15, 23, 42, 0.8);
    --btn-primary-text: #020617;
    
    /* Easing */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme overrides */
body.light-theme {
    --bg-gradient: radial-gradient(circle at 50% -20%, #e0e7ff 0%, #f1f5f9 60%, #e2e8f0 100%);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --accent-sky: #0284c7;      /* Richer Blue for visibility */
    --accent-earth: #059669;    /* Richer Green for visibility */
    --accent-glow: rgba(2, 132, 199, 0.1);
    
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(15, 23, 42, 0.08);
    --glass-border-hover: rgba(15, 23, 42, 0.15);
    --glass-shadow: 0 8px 32px 0 rgba(15, 23, 42, 0.06);
    --glass-shadow-hover: 0 12px 40px 0 rgba(2, 132, 199, 0.12);
    
    --card-bg: rgba(255, 255, 255, 0.8);
    --input-bg: rgba(255, 255, 255, 0.9);
    --btn-primary-text: #ffffff;
}

/* 2. BASE RESET & INITIAL SETUP */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background: var(--bg-gradient);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    transition: background 0.5s var(--ease-out-expo), color 0.5s var(--ease-out-expo);
    position: relative;
}

/* Subtle background glows */
body::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 10%;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.15) 0%, rgba(0,0,0,0) 70%);
    z-index: -1;
    pointer-events: none;
}

body::after {
    content: '';
    position: absolute;
    bottom: 20%;
    right: 10%;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, rgba(0,0,0,0) 70%);
    z-index: -1;
    pointer-events: none;
}

/* 3. LAYOUT & NAVIGATION HEADER */
header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    z-index: 10;
}

.controls-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    box-shadow: var(--glass-shadow);
}

/* Language Toggle Buttons */
.lang-selector {
    display: flex;
    gap: 0.25rem;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: color 0.3s ease, background 0.3s ease;
}

.lang-btn.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.12);
}

body.light-theme .lang-btn.active {
    background: rgba(15, 23, 42, 0.08);
}

/* Theme Toggle Button */
.theme-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.3s ease;
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

body.light-theme .theme-toggle-btn:hover {
    background: rgba(15, 23, 42, 0.05);
}

.theme-icon {
    font-size: 1.15rem;
}

/* 4. MAIN CONTAINER & HERO */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 4rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.centered-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3.5rem;
    min-height: calc(100vh - 200px);
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

/* Row 1: Welcome Header */
.welcome-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.greeting-tag {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-sky);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: inline-block;
    background: linear-gradient(90deg, var(--accent-sky), var(--accent-earth));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#welcome-header-text {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, var(--accent-sky), var(--accent-earth));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Row 2: Logo Row */
.logo-row {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-container {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: crosshair;
}

/* Row 3: Links Row */
.links-row {
    width: 100%;
}

/* 5. QUICK ACCESS LINKS (CARDS) */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 2.2rem;
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
    transition: border 0.4s var(--ease-out-expo), 
                box-shadow 0.4s var(--ease-out-expo), 
                transform 0.4s var(--ease-out-expo);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* Hover effects */
.card:hover {
    transform: translateY(-6px);
    border-color: var(--glass-border-hover);
    box-shadow: var(--glass-shadow-hover);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover::before {
    opacity: 1;
}

.card-content h3 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.5;
}

.card-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--accent-sky);
    transition: gap 0.3s ease;
}

.card:hover .card-footer {
    gap: 0.8rem; /* Slide arrow out on hover */
}

/* Arrow Icon */
.arrow-icon {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.card:hover .arrow-icon {
    transform: translateX(3px);
}

/* 6. EMAIL REQUEST FORM SECTION */
.form-section {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 32px;
    padding: 3.5rem;
    box-shadow: var(--glass-shadow);
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.form-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 2.5rem auto;
}

.form-header h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.8rem;
}

.form-header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.request-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

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

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.request-form input {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 1rem 1.2rem;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    outline: none;
}

.request-form input:focus {
    border-color: var(--accent-sky);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.15);
}

/* Suffix for desired email input */
.email-input-group {
    position: relative;
    width: 100%;
}

.email-input-group input {
    padding-right: 140px; /* Leave space for suffix */
}

.email-suffix {
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.95rem;
    pointer-events: none;
    transition: color 0.3s ease;
}

.email-input-group input:focus + .email-suffix {
    color: var(--accent-sky);
}

/* Button & Feedback */
.form-actions {
    grid-column: span 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.submit-btn {
    background: var(--accent-gradient);
    border: none;
    color: var(--btn-primary-text);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.05rem;
    padding: 1.1rem 2.8rem;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
    transition: transform 0.3s var(--ease-out-expo), 
                box-shadow 0.3s var(--ease-out-expo), 
                filter 0.3s ease;
    width: 100%;
    max-width: 320px;
    text-align: center;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.5);
    filter: brightness(1.05);
}

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

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Feedback message styled with custom glassmorphism */
.form-feedback {
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    width: 100%;
    text-align: center;
    max-width: 500px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    display: none;
}

.form-feedback.visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.form-feedback.success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.form-feedback.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

body.light-theme .form-feedback.success {
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
}

body.light-theme .form-feedback.error {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
}

/* 7. REVEAL AND TRANSITION ANIMATIONS */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.animated-fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Initial load animation for hero elements */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.controls-group {
    animation: slideDown 0.8s var(--ease-out-expo) forwards;
}

.logo-container {
    animation: fadeIn 1.2s var(--ease-out-expo) forwards;
}

.hero-content h1, 
.hero-content p, 
.greeting-tag {
    opacity: 0;
    animation: slideUp 0.8s var(--ease-out-expo) forwards;
}

.greeting-tag { animation-delay: 0.1s; }
.hero-content h1 { animation-delay: 0.2s; }
.hero-content p { animation-delay: 0.3s; }
.cards-grid {
    opacity: 0;
    animation: slideUp 0.8s var(--ease-out-expo) forwards;
    animation-delay: 0.4s;
}

/* 8. FOOTER */
footer {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 2rem;
    border-top: 1px solid var(--glass-border);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    z-index: 5;
}

footer p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

footer a {
    color: var(--accent-sky);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--accent-earth);
    text-decoration: underline;
}

/* 9. RESPONSIVE BREAKPOINTS (MEDIA QUERIES) */

@media (max-width: 992px) {
    .centered-layout {
        gap: 3rem;
        min-height: auto;
        padding-top: 2rem;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    header {
        padding: 1.5rem 1rem;
    }
    
    .centered-layout {
        padding: 0 1rem 3rem 1rem;
        gap: 2.5rem;
    }
    
    #welcome-header-text {
        font-size: 2.5rem;
    }
    
    .logo-container {
        height: 140px;
    }
    
    .cards-grid {
        grid-template-columns: 1fr; /* Stack cards vertically */
        max-width: 450px;
        width: 100%;
    }
}

@media (max-width: 480px) {
    #welcome-header-text {
        font-size: 2.0rem;
    }
    
    .logo-container {
        height: 100px;
    }
}

/* ==========================================================================
   GSAP Typography Studio Styles
   ========================================================================== */

/* Isometric Stack Styles */
.iso-stack {
    display: grid;
    place-items: center;
    height: 150px;
    width: 100%;
    perspective: 1000px;
    transform-style: preserve-3d;
}

.iso-layer {
    grid-area: 1 / 1;
    user-select: none;
    transition: text-shadow 0.3s ease;
    font-family: var(--font-heading);
    font-size: 6.5rem;
    font-weight: 900;
    letter-spacing: 0.03em;
    line-height: 1;
}

.layer-1 { color: #10b981; z-index: 1; } /* Emerald */
.layer-2 { color: #059669; z-index: 2; }
.layer-3 { color: #3b82f6; z-index: 3; } /* Indigo */
.layer-4 { color: #06b6d4; z-index: 4; } /* Cyan */
.layer-5 { color: var(--text-primary); z-index: 5; } /* Base Front */

/* Light theme color adaptations */
body.light-theme .layer-1 { color: #059669; }
body.light-theme .layer-2 { color: #047857; }
body.light-theme .layer-3 { color: #4f46e5; }
body.light-theme .layer-4 { color: #0284c7; }

/* Responsiveness for isometric stack font sizes */
@media (max-width: 768px) {
    .iso-stack {
        height: 110px;
    }
    .iso-layer {
        font-size: 4.5rem;
    }
}

@media (max-width: 480px) {
    .iso-stack {
        height: 80px;
    }
    .iso-layer {
        font-size: 3.0rem;
    }
}
