/* Mercury33 - Main Styles
   ========================
   Reorganized for easy editing
*/

/* =====================
   CSS Variables (Easy to customize)
   ===================== */
:root {
    /* Colors */
    --color-primary: #FFFFFF;
    --color-secondary: rgba(255, 255, 255, 0.651);
    --color-accent: #9EE26E;
    --color-background: #1E1E1E;
    --color-border: rgba(255, 255, 255, 0.349);
    --color-border-hover: #FFFFFF;
    
    /* Typography */
    --font-family: 'Source Sans Pro', sans-serif;
    --font-size-base: 18px;
    --font-size-h1: 2.5em;
    --font-size-h2: 2em;
    --font-size-body: 1em;
    
    /* Spacing */
    --spacing-unit: 1rem;
    --padding-horizontal: 2.5rem;
    --padding-vertical: 4.5rem;
    --section-spacing: 1.75rem;
    
    /* Layout */
    --container-width: 42rem;
    --viewport-height: calc(var(--vh, 1vh) * 100);
    --background-height: calc(var(--vh, 1vh) * 100);
}

/* =====================
   Reset & Base Styles
   ===================== */
html, body, div, span, h1, h2, h3, p, a, em, img, mark, strong, ul, li, footer, section {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}

*, *:before, *:after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    min-height: var(--viewport-height);
    line-height: 1.0;
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: 300;
    color: var(--color-primary);
    background-color: var(--color-background);
    overflow-x: hidden;
}

/* Background Image */
body::after {
    content: '';
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--background-height);
    z-index: -1;
    background-image: url('../images/bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

a {
    color: inherit;
    text-decoration: underline;
    transition: color 0.25s ease;
}

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

strong {
    font-weight: 600;
}

em {
    font-style: italic;
}

mark {
    background-color: transparent;
    color: var(--color-accent);
    font-weight: 600;
}

/* =====================
   Layout
   ===================== */
#wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: var(--viewport-height);
    position: relative;
    z-index: 1;
    width: 100%;
}

#main {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    position: relative;
}

#main > .inner {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: var(--container-width);
    padding: var(--padding-vertical) var(--padding-horizontal);
}

/* =====================
   Sections
   ===================== */
section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--section-spacing);
}

section.inactive {
    display: none;
}

section.active {
    display: flex;
}

/* =====================
   Typography Styles
   ===================== */
/* Style 1 - Main Heading */
.style1 {
    font-family: var(--font-family);
    font-size: var(--font-size-h1);
    font-weight: 600;
    line-height: 1.375;
    color: var(--color-primary);
}

/* Style 2 - Body Text */
.style2 {
    font-family: var(--font-family);
    font-size: var(--font-size-body);
    font-weight: 300;
    line-height: 1.75;
    color: var(--color-secondary);
}

.style2 a {
    text-decoration: underline;
}

/* Style 3 - Section Heading */
.style3 {
    font-family: var(--font-family);
    font-size: var(--font-size-h2);
    font-weight: 600;
    line-height: 1.375;
    color: var(--color-primary);
}

/* Paragraph spacing */
.style2 .p + .p {
    margin-top: 1rem;
}

/* =====================
   Logo Image
   ===================== */
.image {
    display: block;
}

.image .frame {
    display: block;
}

.image img {
    display: block;
    max-width: 100%;
    height: auto;
}

#image02 {
    width: 21rem;
    max-width: 100%;
}

/* =====================
   Buttons
   ===================== */
.buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    list-style: none;
}

.buttons li {
    max-width: 100%;
}

.buttons .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.5rem;
    height: 2.75rem;
    font-family: var(--font-family);
    font-size: 0.875em;
    font-weight: 600;
    letter-spacing: 0;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid var(--color-border);
    border-radius: 0.375rem;
    background-color: transparent;
    color: var(--color-primary);
    cursor: pointer;
    transition: all 0.25s ease;
}

.buttons .button:hover {
    border-color: var(--color-border-hover);
    color: var(--color-primary);
}

/* Main navigation buttons */
#buttons02 {
    gap: 1rem;
}

/* Back buttons */
#buttons01,
#buttons03,
#buttons04,
#buttons05 {
    gap: 1.5rem;
}

/* =====================
   Footer
   ===================== */
#footer {
    margin-top: auto;
    padding-top: 2rem;
}

#footer .style2 {
    font-size: 0.875em;
    text-align: left;
}

#footer a {
    text-decoration: underline;
}

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

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

/* Tablet */
@media (max-width: 980px) {
    :root {
        --font-size-base: 15px;
        --padding-horizontal: 3rem;
        --padding-vertical: 3.75rem;
    }
    
    .style1 {
        font-size: 2.25em;
    }
    
    .style3 {
        font-size: 1.75em;
    }
}

/* Mobile Landscape */
@media (max-width: 736px) {
    :root {
        --font-size-base: 15px;
        --padding-horizontal: 2rem;
        --padding-vertical: 3rem;
        --section-spacing: 1.5rem;
    }
    
    .style1 {
        font-size: 2em;
    }
    
    .style2 {
        font-size: 1em;
    }
    
    .style3 {
        font-size: 1.5em;
    }
    
    #image02 {
        width: 18rem;
    }
    
    .buttons {
        gap: 0.875rem;
    }
    
    .buttons .button {
        font-size: 0.875em;
    }
}

/* Mobile Portrait */
@media (max-width: 480px) {
    :root {
        --section-spacing: 1.2rem;
    }
}

/* Small Mobile */
@media (max-width: 360px) {
    :root {
        --padding-horizontal: 1.5rem;
        --padding-vertical: 2.625rem;
        --section-spacing: 1rem;
    }
    
    .style1 {
        font-size: 2em;
    }
    
    .style3 {
        font-size: 1.5em;
    }
    
    .buttons {
        gap: 0.75rem;
    }
}

/* =====================
   Loading Animation
   ===================== */
body.is-loading #main {
    opacity: 0;
}

body:not(.is-loading) #main {
    opacity: 1;
    transition: opacity 0.5s ease;
}

/* =====================
   Accessibility
   ===================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
