@font-face {
    font-family: 'Nougat-Normal';
    src: url('./fonts/Nougat-Normal.woff2') format('woff2'),
        url('./fonts/Nougat-Normal.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@import url('https://fonts.googleapis.com/css2?family=Literata:ital,opsz,wght@0,7..72,200..900;1,7..72,200..900&display=swap');

:root {
    --primary-bg: hsl(201, 26%, 24%);
    --logo-color: hsl(201, 45%, 82%);
    --highlight-bg: hsl(201, 45%, 85%);
    --panel-bg: rgba(0, 0, 0, 0.7);
    --text-color: white;
    --text-display: hsl(201, 26%, 24%);
    --bright-yellow: #FFD400;
    --accent-color: #ff6b6b;
    --fade-color: hsl(201, 25%, 50%);
    --border-radius: 0.5rem;
    --font-fam-display: "Nougat-Normal", "Fira Sans", sans-serif;
    --font-fam: "Epilogue", "Fira Sans", sans-serif;
}

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

* {
    margin: 0;
    padding: 0;
}

body {
    font-size: 1.3rem;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    font-family: var(--font-fam);
    color: var(--primary-bg);
    background-color: var(--highlight-bg);
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

input, button, textarea, select {
    font: inherit;
}

ol, ul {
    list-style: none;
}

a {
    color: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
}

/* LAYOUT */
main {
    position: relative;
    z-index: 10;
    padding-left: 1rem;
    padding-bottom: 2rem;
}

.container {
    max-width: 45vw;
}

.content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.top-block {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0 1rem;
}

/* SECTIONS - Fixed the height issue */
section {
    margin: 0 0.8rem;
    padding-bottom: 3rem;
    display: flex; 

    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out, visibility 0.3s ease-out;
}

section.hidden {
    display: none;
}

section.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* TYPOGRAPHY */
p {
    font-size: 1.2rem;
}

h1, h2, h3 {
    color: var(--text-display);
}

h1 {
    font-size: 4rem;
}

h3 {
    font-size: 1.5rem;
}

header h1 {
    font-size: 8rem;
    font-family: var(--font-fam-display);
    line-height: 8rem;
    margin-bottom: -25px;
    display: none; /* Hidden by default, shown on mobile */
}

header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* header h3 {
    padding-bottom: 1rem;
    border-bottom: 1px var(--primary-bg) solid;
} */

/* NAVIGATION */
nav ul {
    display: flex;
    flex-direction: row;
    gap: 2rem;
}

nav a {
    color: var(--fade-color)
}

nav a.active {
    color: var(--primary-bg);
}

a.header-link {
    text-decoration: none;
}

a.title {
    display: block;
}

#tools a:not(.title-link)::after {
    content: " ⇒"
}

/* LOGO */
.logo-container {
    position: fixed;
    height: 100vh;
    width: calc(100vh * 63 / 72);
    top: 0;
    left: 0;
    z-index: -1;
    overflow: hidden;
    isolation: isolate;
}

.logo {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: multiply;
}

.logo path {
    fill: var(--logo-color);
}

.particle-overlay {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    pointer-events: none;
    mix-blend-mode: overlay;
}

.particle {
    pointer-events: none;
    fill: var(--highlight-bg);
}

/* HEAT WAVE EFFECT */
.heat-wave-container {
    height: auto;
}

.heat-wave-text {
    /* font-size: clamp(3rem, 20cqw, 8rem); */
    font-size: 6.8rem;
    fill: var(--text-display);
    font-family: var(--font-fam-display);
    filter: none;
    transition: filter 0.3s ease;
}

.heat-wave-svg {
    width: 100%;
    /* height: 120px; */
}

.heat-wave-container:hover .heat-wave-text,
.heat-wave-container.active .heat-wave-text {
    filter: url(#heatwave);
}

#reset {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    
    /* Remove any inherited styles */
    font: inherit;
    color: inherit;
    text-align: inherit;
    text-decoration: none;
    
    /* Remove focus outline if handled elsewhere */
    outline: none;
    
    transition: opacity 0.2s ease, transform 0.1s ease;
}

#reset:hover {
    opacity: 0.8;
}

#reset:active {
    transform: scale(0.98);
}

#reset:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    border-radius: var(--border-radius);
}

#reset {
    padding: 1rem;
    padding-top: 0rem;
    display: none;
    gap: 1rem;

    /* this aligns boxes inside flexBox */
    justify-content: center;
    align-items: center;

    /* this applies only to the text itself within its box */
    text-align: center;
}

#reset svg {
    width: 100%; /* or specific size */
    height: auto;
    pointer-events: none; /* prevents image from interfering with button clicks */
}

#reset svg {
    width: 28px;
    transform: rotate(-90deg);

    background: none;
    background-color: transparent;
}

#reset path {
    fill: var(--primary-bg); /* color for the SVG paths */
}

html.is-scrollable #reset {
    display: flex;
}

/* RESPONSIVE */
@media (width < 758px) {
    .container {
        max-width: 100vw;
    }

    main {
        padding-left: 0;
        padding-right: 1rem;
    }

    nav ul {
        justify-content: space-around;
        flex-wrap: wrap;
    }

    header a{
        display: flex;
        flex-direction: column;
        gap: 1.6rem;
    }

    header h1 {
        display: block;
        font-size: 6rem;
        letter-spacing: 0.2rem;
        line-height: normal;
    }

    header h3 {
        font-size: 1.3rem;
    }
    .heat-wave-svg {
        display: none;
    }
}

@media (width < 390px) {
    header h1 {
        font-size: 6rem;
        line-height: 6rem;
        margin-top: -1.2rem;
    }

    .header-link {
        display: flex;
        flex-direction: column;
        gap: 1.4rem;
    }

    nav ul {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-around;
        font-size: 1.2rem;
    }
}