

/* =========================================
   Earplane - Global styles
   ========================================= */

:root {
    color-scheme: light;

    --bg: #f8fafc;
    --surface: #ffffff;
    --text: #1e293b;
    --muted: #64748b;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --border: #e2e8f0;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, sans-serif;
    line-height: 1.6;
}

.container {
    width: min(100% - 2rem, 1100px);
    margin-inline: auto;
}

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

a:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 4px;
}


/* =========================================
   Header
   ========================================= */

   .site-header {
       position: sticky;
       top: 0;
       z-index: 100;
       background: #000;
       color: #fff;
       border-bottom: 1px solid #262626;
   }

   .header-inner {
       display: flex;
       align-items: center;
       gap: 1.5rem;
       min-height: 60px;
   }

   .brand {
       display: flex;
       align-items: center;
       gap: .65rem;
       color: #fff;
       text-decoration: none;
       font-weight: 700;
       white-space: nowrap;
   }

   .brand:hover {
       color: #fff;
   }

   .site-logo {
       width: 38px;
       height: 38px;
       object-fit: contain;
       border-radius: 7px;
   }

   .desktop-nav {
       display: flex;
       align-items: center;
       gap: 1.75rem;
       margin-left: auto;
   }

   .desktop-nav a {
       color: #e5e7eb;
       text-decoration: none;
       font-weight: 500;
   }

   .desktop-nav a:hover {
       color: #fff;
   }

   .desktop-languages {
       display: flex;
       gap: .75rem;
       padding-left: 1rem;
       border-left: 1px solid #444;
   }

   .desktop-languages [aria-current="page"],
   .mobile-languages [aria-current="page"] {
       color: #fff;
       font-weight: 700;
       text-decoration: underline;
       text-underline-offset: 5px;
   }

   /* Hidden on desktop */

   .mobile-menu {
       display: none;
   }

   .mobile-menu summary:focus-visible {
       outline: 3px solid #93c5fd;
       outline-offset: 2px;
       border-radius: 6px;
   }

   /* =========================================
      Mobile header
      ========================================= */

   @media (max-width: 700px) {

       .header-inner {
           min-height: 56px;
           gap: 1rem;
       }

       .brand-name {
           font-size: 1rem;
       }

       .site-logo {
           width: 34px;
           height: 34px;
       }

       .desktop-nav {
           display: none;
       }

       .mobile-menu {
           display: block;
           position: relative;
           margin-left: auto;
       }

       .mobile-menu summary {
           display: flex;
           align-items: center;
           justify-content: center;
           width: 44px;
           height: 44px;
           color: #fff;
           font-size: 1.6rem;
           cursor: pointer;
           list-style: none;
       }

       .mobile-menu summary::-webkit-details-marker {
           display: none;
       }

       .mobile-menu-content {
           position: absolute;
           top: calc(100% + 6px);
           right: 0;
           width: min(280px, calc(100vw - 2rem));
           padding: 1rem;
           background: #171717;
           border: 1px solid #404040;
           border-radius: 10px;
           box-shadow: 0 12px 30px #0005;

           display: flex;
           flex-direction: column;
           gap: .75rem;
       }

       .mobile-menu-content a {
           display: block;
           padding: .5rem;
           color: #e5e7eb;
           text-decoration: none;
           border-radius: 6px;
       }

       .mobile-menu-content a:hover {
           background: #303030;
           color: #fff;
       }

       .mobile-languages {
           display: flex;
           gap: .5rem;
           border-top: 1px solid #404040;
           padding-top: .75rem;
       }
   }


/* =========================================
   Homepage hero / application entrance
   ========================================= */

.hero {
    background: #000;
    color: #fff;
}

/* The entire black area is clickable */

.hero-entry {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: clamp(360px, 65vh, 650px);

    padding: 2.5rem 1rem;

    color: #fff;
    text-decoration: none;
    text-align: center;
}

.hero-entry:hover {
    color: #fff;
}

.hero-logo {
    display: block;
    width: min(48vw, 280px);
    height: auto;
    object-fit: contain;
    margin-bottom: 1.5rem;
}

.hero h1 {
    margin: 0;
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 750;
    line-height: 1.1;
    letter-spacing: -0.04em;
    color: #fff;
}

.hero-subtitle {
    margin: 1rem 0 0;
    color: #d1d5db;
    font-size: clamp(1.25rem, 3vw, 2rem);
    font-weight: 400;
    letter-spacing: .02em;
}

/* Small invitation to enter the arena */

.hero-action {
    display: inline-flex;
    align-items: center;
    gap: .75rem;

    margin-top: 1.75rem;
    padding: .7rem 1.25rem;

    color: #e5e7eb;
    font-size: 1.1rem;

    border: 1px solid #6b7280;
    border-radius: 999px;

    transition:
        border-color .2s ease,
        background-color .2s ease;
}

.hero-entry:hover .hero-action,
.hero-entry:focus-visible .hero-action {
    background: #262626;
    border-color: #fff;
}

.hero-entry:focus-visible {
    outline: 3px solid #93c5fd;
    outline-offset: -5px;
}


/* =========================================
   Homepage informational content
   ========================================= */

.homepage-info {
    padding: 4rem 0 6rem;
    background: var(--bg);
}

.intro-text {
    max-width: 760px;
    margin: 0 auto;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    line-height: 1.7;
    text-align: center;
}

.intro-note {
    margin-top: 1.5rem;
    color: var(--muted);
    text-align: center;
}


/* =========================================
   General buttons
   ========================================= */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: .9rem 1.75rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
}

.button-primary {
    background: var(--primary);
    color: #fff;
}

.button-primary:hover {
    background: var(--primary-hover);
}


/* =========================================
   About and Help pages
   ========================================= */

.content-page {
    padding: 3rem 0 5rem;
}

.page-article {
    max-width: 760px;
    margin-inline: auto;
}

.page-article h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.2;
    margin: 0 0 2rem;
}

.page-body {
    font-size: 1.075rem;
    line-height: 1.8;
}

.page-body h2 {
    font-size: 1.5rem;
    line-height: 1.3;
    margin-top: 2.5rem;
    margin-bottom: .75rem;
}

.page-body p {
    margin-bottom: 1.25rem;
}

.page-body a {
    text-underline-offset: 3px;
}


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

.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-block: 1.5rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-weight: 600;
}

.footer-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 7px;
}

.footer-copy {
    color: var(--muted);
    font-size: .875rem;
}


/* =========================================
   Mobile
   ========================================= */

@media (max-width: 700px) {

    .header-inner {
        flex-wrap: wrap;
        gap: .75rem;
        padding-block: .75rem;
    }

    .main-nav {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-left: 0;
        gap: 1.5rem;
    }

    .language-nav {
        margin-left: auto;
    }

    .hero-entry {
        min-height: 60vh;
        padding: 2.5rem 1rem;
    }

    .hero-logo {
        width: min(55vw, 220px);
    }

    .hero h1 {
        font-size: clamp(2.25rem, 9vw, 3.5rem);
    }

    .homepage-info {
        padding: 3rem 0 4rem;
    }

    .footer-inner {
        flex-wrap: wrap;
    }
}


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

@media (prefers-reduced-motion: reduce) {
    .hero-action {
        transition: none;
    }
}


/* Landscape phones: horizontal hero layout */

@media (orientation: landscape) and (max-height: 500px) {

    .hero-entry {
        flex-direction: row;
        justify-content: center;
        gap: 2.5rem;

        min-height: auto;
        padding: 2rem;
    }

    .hero-logo {
        width: min(28vw, 180px);
        margin: 0;
        flex-shrink: 0;
    }

    .hero h1 {
        font-size: clamp(2rem, 5vw, 3.5rem);
    }

    .hero-subtitle {
        font-size: clamp(1rem, 2.5vw, 1.5rem);
        margin-top: .5rem;
    }

    .hero-action {
        margin-top: 1rem;
    }

    .hero-text {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    @media (orientation: landscape) and (max-height: 500px) {
        .hero-text {
            align-items: flex-start;
            text-align: left;
        }
    }
}

/* Landscape phones: show full navigation */

@media (orientation: landscape) and (max-height: 500px) {

    .desktop-nav {
        display: flex;
        align-items: center;
        gap: 1rem;
        margin-left: auto;
    }

    .desktop-nav a {
        font-size: .9rem;
    }

    .desktop-languages {
        gap: .5rem;
        padding-left: .75rem;
    }

    .mobile-arena,
    .mobile-menu {
        display: none;
    }

    .header-inner {
        flex-wrap: nowrap;
        gap: 1rem;
        min-height: 52px;
    }

    .site-logo {
        width: 32px;
        height: 32px;
    }
}


/* Available exercises */

.exercises-section {
    padding: 4rem 0 5rem;
    text-align: center;
    background: var(--surface);
}

.exercises-section h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin: 0 0 1rem;
}

.exercises-intro {
    max-width: 680px;
    margin: 0 auto 2.5rem;
    color: var(--muted);
    font-size: 1.1rem;
}

.genre-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(min(100%, 200px), 1fr)
    );
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto 2rem;
}

.genre-card {
    padding: 1.5rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
}

.exercises-note {
    color: var(--muted);
    font-size: .9rem;
    margin-top: 1rem;
}

.free-section {
    padding: 3.5rem 0;
    background: var(--bg);
}

.free-inner {
    max-width: 760px;
    text-align: center;
}

.free-inner h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin: 0 0 1rem;
}

.free-inner p {
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1.8;
    margin: 0;
}


/* Contact page */

.contact-page {
    padding: 3rem 1.25rem 5rem;
}

.contact-container {
    max-width: 680px;
    margin: 0 auto;
}

.contact-container h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
}

.contact-intro {
    line-height: 1.7;
    margin-bottom: 2rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.contact-form label {
    font-weight: 600;
    margin-top: .5rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: .85rem 1rem;
    border: 1px solid #aaa;
    border-radius: 8px;
    background: #fff;
    color: #111;
    font: inherit;
}

.contact-form textarea {
    resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.contact-privacy {
    font-size: .9rem;
    line-height: 1.6;
    color: #555;
    margin: 1rem 0;
}

.contact-submit {
    align-self: flex-start;
    padding: .85rem 1.5rem;
    background: #111;
    color: #fff;
    border: 0;
    border-radius: 8px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.contact-submit:hover {
    background: #333;
}

/* Hide honeypot without using display:none */
.contact-honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

@media (max-width: 480px) {
    .contact-page {
        padding-top: 2rem;
    }

    .contact-submit {
        width: 100%;
    }
}
