/* ==========================================================================
   How To Helsinki - Minimalist Dark Theme
   ========================================================================== */

/* CSS Custom Properties */
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #0f1214;
    --bg-tertiary: #121a1d;
    --text-primary: #ffffff;
    --text-secondary: #8a9ca4;
    --text-muted: #4a5a62;
    --accent-primary: #4CB5CB;
    --accent-secondary: #3A8A9A;
    --accent-dark: #2D5A66;
    --accent-darker: #1a3a42;
    --accent-glow: rgba(76, 181, 203, 0.15);
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

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

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile */
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow: hidden; /* Prevent scrolling */
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

p {
    line-height: 1.6;
}

a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-primary);
}

/* ==========================================================================
   Header
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 2rem 3rem;
    z-index: 100;
    background: linear-gradient(to bottom, var(--bg-primary) 60%, transparent 100%);
}

.logo {
    display: inline-block;
}

.logo-svg,
.logo-img {
    width: 200px;
    height: auto;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0; /* Allow flex shrinking */
    padding: 8rem 2rem 2rem;
    position: relative;
    overflow-y: auto; /* Allow scrolling within hero if needed */
    -webkit-overflow-scrolling: touch;
}

/* Gradient background accents */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 20%, var(--accent-glow) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 80%, rgba(45, 90, 102, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.hero-content {
    text-align: center;
    max-width: 900px;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5.5rem);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    font-weight: 300;
    color: var(--accent-secondary);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    flex-shrink: 0; /* Prevent footer from shrinking */
    padding: 2rem 2rem;
    text-align: center;
    background: linear-gradient(to bottom, transparent 0%, var(--bg-tertiary) 100%);
    border-top: 1px solid var(--accent-darker);
}

.contact {
    margin-bottom: 1.5rem;
}

.contact-details {
    font-size: 1rem;
    color: var(--text-secondary);
}

.contact-details a {
    color: var(--text-secondary);
    transition: color 0.3s ease;
    padding: 0.25rem 0;
    display: inline-block;
}

.contact-details a:hover {
    color: var(--accent-primary);
}

.separator {
    margin: 0 1rem;
    color: var(--accent-dark);
}

.copyright {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.fade-in {
    animation: fadeInUp 1s ease-out forwards;
    opacity: 0;
}

.delay-1 {
    animation-delay: 0.3s;
}

.delay-2 {
    animation-delay: 0.6s;
}

.delay-3 {
    animation-delay: 0.9s;
}

/* Logo animation */
.logo-svg,
.logo-img {
    animation: fadeIn 1s ease-out forwards;
}

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

/* Tablet */
@media (max-width: 768px) {
    .header {
        padding: 1.25rem 1.5rem;
        text-align: center;
        background: var(--bg-primary);
    }

    .logo-svg,
    .logo-img {
        width: 160px;
    }

    .hero {
        padding: 7rem 1.5rem 1rem;
        min-height: 0;
    }

    .hero-title {
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        letter-spacing: 0.1em;
    }

    .footer {
        padding: 1.25rem 1.5rem;
    }

    .contact {
        margin-bottom: 1rem;
    }

    .contact-details {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .separator {
        display: none;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .header {
        padding: 1rem 1rem;
    }

    .logo-svg,
    .logo-img {
        width: 140px;
    }

    .hero {
        padding: 6rem 1rem 0.75rem;
    }

    .hero-title {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 0.85rem;
        letter-spacing: 0.08em;
    }

    .footer {
        padding: 1rem 1rem;
    }

    .contact {
        margin-bottom: 0.75rem;
    }

    .contact-details {
        font-size: 0.85rem;
    }

    .copyright {
        font-size: 0.75rem;
    }
}

/* Small mobile */
@media (max-width: 360px) {
    .header {
        padding: 1rem 0.75rem;
    }

    .logo-svg,
    .logo-img {
        width: 130px;
    }

    .hero {
        padding: 6rem 0.75rem 1rem;
    }

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

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

/* Large screens */
@media (min-width: 1400px) {
    .header {
        padding: 2.5rem 4rem;
    }

    .logo-svg,
    .logo-img {
        width: 220px;
    }
}

/* Landscape mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 5rem 2rem 0.5rem;
        min-height: 0;
    }

    .hero-title {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

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

    .footer {
        padding: 1rem 2rem;
    }
    
    .contact {
        margin-bottom: 0.75rem;
    }
}

/* ==========================================================================
   Subtle Enhancements
   ========================================================================== */

/* Ambient glow effect */
body::after {
    content: '';
    position: fixed;
    bottom: -50%;
    left: -25%;
    width: 150%;
    height: 100%;
    background: radial-gradient(ellipse at center, var(--accent-darker) 0%, transparent 60%);
    opacity: 0.3;
    pointer-events: none;
    z-index: -2;
}

/* Selection styling */
::selection {
    background-color: var(--accent-primary);
    color: var(--bg-primary);
}

::-moz-selection {
    background-color: var(--accent-primary);
    color: var(--bg-primary);
}

/* Focus styles for accessibility */
a:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 4px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .fade-in {
        animation: none;
        opacity: 1;
    }

    .logo-svg,
    .logo-img {
        animation: none;
    }

    html {
        scroll-behavior: auto;
    }
}
