:root {
    color-scheme: dark;
    --clock-size: 70px;
}

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

@font-face {
    font-family: "Quicksand";
    src: url("assets/fonts/Quicksand-Regular.ttf") format("truetype");
    font-display: swap;
}

@font-face {
    font-family: "Cinzel";
    src: url("assets/fonts/Cinzel-Regular.ttf") format("truetype");
    font-display: swap;
}

html, body {
    min-height: 100vh;
    margin: auto;
    font-family: "Quicksand", sans-serif;
    font-optical-sizing: auto;
    font-weight: normal;
    font-style: normal;
    overflow-x: hidden;
    color: #FBF6EE;
    background-color: #2B3844;
    background-attachment: fixed;
}

section {
    text-align: center;
    position: relative;
    padding-bottom: 80px;
}

h1 {
    font-family: "Cinzel", serif;
    font-optical-sizing: auto;
    font-size: 60pt;
    font-weight: normal;
    font-style: normal;
    white-space: nowrap;
    user-select: none;
}

h2 {
    font-family: "Quicksand", serif;
    font-optical-sizing: auto;
    font-size: 36pt;
    font-weight: normal;
    font-style: normal;
    white-space: nowrap;
    user-select: none;
}

footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    text-align: center;
    padding: 10px;
}

.logo {
    width: clamp(150px, 15vw, 600px);
    height: auto;
    margin-right: 20px;
    user-select: none;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    gap: 60px;
}

.button-clock-wrapper {
    position: relative;
    margin-top: 50px;
}

.button-container {
    display: inline-block;
    position: relative;
}

.contact-btn {
    padding: 15px 40px;
    font-size: 18px;
    background-color: #FBF6EE;
    color: #2B3844;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: "Quicksand", sans-serif;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 auto;
}

.contact-btn:hover {
    background-color: #e0dbd3;
    box-shadow: 0 0px 10px rgba(251, 246, 238, 0.5);
}

.contact-btn:active {
    transform: translateY(2px);
}

#clock-container {
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    margin-left: 40px;
}

#clock {
    width: var(--clock-size);
    height: var(--clock-size);
    border: calc(var(--clock-size) * 0.0375) solid #FBF6EE;
    border-radius: 50%;
    background-color: rgba(43, 56, 68, 0.8);
    position: relative;
    box-shadow: 0 0 5px rgba(251, 246, 238, 0.5);
}

#hour-hand, #minute-hand, #second-hand {
    position: absolute;
    background-color: #FBF6EE;
    transform-origin: bottom center;
    border-radius: 2px;
}

#hour-hand {
    width: calc(var(--clock-size) * 0.05);
    height: calc(var(--clock-size) * 0.3125);
    top: calc(var(--clock-size) * 0.1875);
    left: calc(var(--clock-size) * 0.475);
}

#minute-hand {
    width: calc(var(--clock-size) * 0.0375);
    height: calc(var(--clock-size) * 0.4);
    top: calc(var(--clock-size) * 0.1);
    left: calc(var(--clock-size) * 0.48125);
}

#second-hand {
    width: calc(var(--clock-size) * 0.025);
    height: calc(var(--clock-size) * 0.4375);
    top: calc(var(--clock-size) * 0.0625);
    left: calc(var(--clock-size) * 0.4875);
    background-color: #ff4444;
}

/* Media queries */

@media screen and (max-width: 1024px) {
    h1 {
        font-size: 48pt;
    }
    
    h2 {
        font-size: 28pt;
    }
    
    .logo {
        width: clamp(120px, 12vw, 400px);
    }
}

@media screen and (max-width: 768px) {
    .container {
        flex-direction: column;
        padding: 20px;
        height: auto;
        margin-top: 40px;
    }
    
    h1 {
        font-size: 24pt;
        white-space: normal;
        margin: 20px 0;
    }
    
    h2 {
        font-size: 18pt;
        white-space: normal;
        padding: 0 20px;
    }
    
    .logo {
        width: clamp(80px, 25vw, 150px);
        margin-right: 0;
    }
}

@media screen and (max-width: 480px) {
    h1 {
        font-size: 28pt;
    }
    
    h2 {
        font-size: 18pt;
    }
    
    .logo {
        width: clamp(60px, 20vw, 120px);
    }
    
    .contact-btn {
        padding: 12px 30px;
        font-size: 16px;
    }
    
    #clock-container {
        position: static;
        margin: 30px auto 0;
        transform: none;
    }
    
    .button-container {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    :root {
        --clock-size: 60px;
    }
    
    section {
        padding-bottom: 100px;
    }
}

/* Utility classes */

.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.fade-in {
    animation: fadeIn 0.2s ease-in;
}

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