/* ========================================
   CSS Reset & Base Styles
   ======================================== */

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

:root {
    /* Color Palette */
    --slate-900: #0f172a;
    --slate-950: #020617;
    --slate-700: #334155;
    --blue-100: #dbeafe;
    --blue-200: #bfdbfe;
    --blue-400: #60a5fa;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --blue-900: #1e3a8a;
    --white: #ffffff;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;

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

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

body {
    font-family: var(--font-family);
    background-color: var(--slate-900);
    color: var(--white);
    overflow-x: hidden;
}

/* ========================================
   Selection Styling
   ======================================== */

::selection {
    background-color: rgba(59, 130, 246, 0.3);
    color: var(--white);
}

::-moz-selection {
    background-color: rgba(59, 130, 246, 0.3);
    color: var(--white);
}

/* ========================================
   Page Container
   ======================================== */

.page-container {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* ========================================
   Background Image & Overlay
   ======================================== */

.background-image {
    position: absolute;
    inset: 0;
    z-index: 0;
    /*background-image: url('christer-223-adj1.jpg');*/
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: brightness(0.6) contrast(1.1) saturate(1.1);
}

.background-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(15, 23, 42, 0.7),
            rgba(15, 23, 42, 0.8),
            rgba(2, 6, 23, 0.95));
    z-index: 10;
}

/* ========================================
   Main Content
   ======================================== */

.main-content {
    position: relative;
    z-index: 20;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* ========================================
   Logo
   ======================================== */

.logo-container {
    position: absolute;
    top: 3rem;
    left: 0;
    right: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-wrapper {
    position: relative;
}

.ambient-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8rem;
    height: 8rem;
    background-color: rgba(96, 165, 250, 0.3);
    filter: blur(3rem);
    border-radius: 50%;
    pointer-events: none;
    mix-blend-mode: screen;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0.7;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.logo-text {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    background: linear-gradient(to right, var(--white), var(--blue-100), var(--blue-400));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 25px 25px rgba(0, 0, 0, 0.5));
    padding: 0.5rem 1rem;
    margin: 0;
    display: inline-block;
    text-align: center;
}

/* ========================================
   Hero Section
   ======================================== */

.hero-section {
    max-width: 80rem;
    margin: 0 auto;
    margin-top: 4rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1.3;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, var(--white), var(--blue-100), var(--blue-400));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 25px 25px rgba(0, 0, 0, 0.5));
    padding-bottom: 1.5rem;
}

.desktop-break {
    display: none;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--blue-200);
    font-weight: 500;
    letter-spacing: 0.05em;
    margin-bottom: 4rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.separator {
    font-size: 0.75rem;
    color: var(--blue-400);
}

/* ========================================
   Contact Section
   ======================================== */

.contact-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 4rem;
}

.contact-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    width: 100%;
}

.flex-break {
    flex-basis: 100%;
    height: 0;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    outline: none;
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-2px);
}

.contact-icon {
    width: 3rem;
    height: 3rem;
    background-color: rgba(37, 99, 235, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue-400);
    transition: all 0.3s ease;
    box-shadow: 0 10px 15px -3px rgba(30, 58, 138, 0.2);
}

.contact-item:hover .contact-icon {
    background: linear-gradient(to bottom right, var(--blue-400), var(--blue-600));
    color: var(--white);
    border-color: var(--blue-400);
    box-shadow: 0 20px 25px -5px rgba(59, 130, 246, 0.5);
}

.contact-icon i,
.contact-icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

.x-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.contact-text {
    font-size: 1.125rem;
    color: var(--blue-100);
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-item:hover .contact-text {
    color: var(--white);
}

/* ========================================
   Footer
   ======================================== */

.footer {
    position: absolute;
    bottom: 1.5rem;
    left: 0;
    right: 0;
    z-index: 30;
    text-align: center;
    pointer-events: none;
}

.footer-text {
    color: var(--slate-700);
    font-size: 0.875rem;
    font-weight: 500;
}

/* ========================================
   Responsive Design
   ======================================== */

/* Small tablet (600px and up) */
@media (min-width: 600px) {
    .logo-text {
        font-size: 2.5rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }
}

/* Tablet (768px and up) */
@media (min-width: 768px) {
    .logo-text {
        font-size: 3rem;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .desktop-break {
        display: block;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }
}

/* Large tablet (900px and up) */
@media (min-width: 900px) {
    .logo-text {
        font-size: 3.5rem;
    }

    .hero-title {
        font-size: 4.5rem;
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }
}

/* Desktop (1024px and up) */
@media (min-width: 1024px) {
    .logo-text {
        font-size: 3.75rem;
    }

    .hero-title {
        font-size: 5rem;
    }
}

/* Large desktop (1280px and up) */
@media (min-width: 1280px) {
    .hero-title {
        font-size: 6rem;
    }
}

/* Mobile adjustments */
@media (max-width: 767px) {
    .logo-container {
        top: 1.5rem;
    }

    .logo-text {
        font-size: 2rem;
    }

    .hero-section {
        margin-top: 6rem;
        padding-top: 2rem;
    }

    .hero-title {
        font-size: 1.5rem;
        padding-bottom: 1rem;
        line-height: 1.4;
    }

    .hero-subtitle {
        font-size: 0.875rem;
        margin-bottom: 2rem;
        gap: 0.5rem;
    }

    .contact-wrapper {
        flex-direction: column;
        width: fit-content;
        margin: 0 auto;
        gap: 1.5rem;
        align-items: flex-start;
    }

    .flex-break {
        display: none;
    }

    .contact-item {
        flex-direction: row;
        text-align: left;
        gap: 0.75rem;
    }

    .contact-text {
        font-size: 0.875rem;
    }

    .contact-icon {
        width: 2.5rem;
        height: 2.5rem;
    }

    .contact-icon i,
    .contact-icon svg {
        width: 1.25rem;
        height: 1.25rem;
    }

    .contact-section {
        margin-bottom: 5rem;
    }
}

/* Small mobile (max 480px) */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .contact-row {
        flex-direction: column;
        gap: 1rem;
    }
}

/* ========================================
   Accessibility
   ======================================== */

/* Focus styles for keyboard navigation */
.contact-item:focus {
    outline: 2px solid var(--blue-400);
    outline-offset: 4px;
    border-radius: 0.5rem;
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .ambient-glow {
        animation: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {

    .hero-title,
    .logo-text {
        filter: none;
        -webkit-text-fill-color: var(--white);
    }

    .contact-icon {
        border-width: 2px;
    }
}

/* ========================================
   Fix for Landscape Tablets (including iPad Pro)
   ======================================== */
@media screen and (min-width: 768px) and (max-height: 1100px) {
    .page-container {
        min-height: 100dvh;
        /* Dynamic viewport height for iOS */
    }

    .main-content {
        justify-content: flex-start;
        padding-top: 7rem;
        min-height: 100dvh;
    }

    .logo-container {
        top: 2rem;
    }

    .logo-text {
        font-size: 2.25rem;
    }

    .hero-section {
        margin-top: 1.5rem;
        max-width: 700px;
        /* Limit width to balance text */
    }

    .hero-title {
        font-size: 2.5rem;
        padding-bottom: 0.5rem;
    }

    .hero-subtitle {
        margin-bottom: 2rem;
        font-size: 1rem;
    }

    .contact-section {
        margin-bottom: 2rem;
    }
}