@import url("fonts.css");

/* Root variables */
:root {
    /* Color variables */
    --background-color: #f7f7f7;
    --text-color: #0e1721;
    --button-bg-color: #0e1721;
    --button-border-color: #f7f7f7;
    --button-text-color: #f7f7f7;
    --link-color: #ff21ff;
    --error-color: #fedd4d;
    --notification-color: #ff21ff;

    /* Typography font-family */
    --font-primary: "FK Grotesk", sans-serif;
    --font-secondary: "American Grotesk Compressed", sans-serif;

    /* Typography font-sizes */
    --font-size-base: clamp(1rem, 1vw + 0.6rem, 1.25rem);
    --font-size-h1: clamp(1.7rem, 1.8vw + 1.2rem, 2.3rem);
    --font-size-h2: clamp(1.4rem, 1.6vw + 0.9rem, 2rem);
    --font-size-h3: clamp(1.3rem, 1.4vw + 0.8rem, 1.75rem);
    --font-size-small: 82.5%;

    /* Typography line-height */
    --line-height-base: 1.5;
    --line-height-h1: 1.25;
    --line-height-h2: 1.325;
    --line-height-h3: 1.35;

    /* Layout */
    --max-width-content: 1200px; /* Max width for larger screens */
}

/* Global Reset & Typography */
* {
    margin: 0;
    padding: 0;
    border: 0;
    box-sizing: border-box;
}

/* Base layout and typography scaling */
html,
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    font-family: var(--font-primary);
    color: var(--text-color);
    line-height: var(--line-height-base);
    background-color: var(--background-color);
    max-width: 100%;
}

html {
    font-size: var(--font-size-base);
}

body {
    margin: 0 auto;
    max-width: var(--max-width-content);
    padding: 1rem; /* Adding some padding for better balance */
}

body.full-screen {
    position: fixed;
    max-width: 100%;
}

/* Full-screen mode */
body.full-screen #iframe {
    z-index: 1;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100dvh;
}

body.full-screen #header {
    display:none;
}

/* Conditional content display */
body:not(.is-mobile) #instructions,
body:not(.is-mobile) #start-button {
    display: none;
}

/* Error Message Styling */
#error-message {
    font-style: italic;
    background-color: var(--error-color);
    padding: 1rem;
}


/* Notification Message Styling */
#notification-message {
    font-style: italic;
    background-color: var(--notification-color);
    padding: 1rem;
}

/* Header Styling */
#header {
    position: relative;
    display: flex;
    justify-content: space-between; /* Horizontal centering */
    align-items: center; /* Vertical centering */
    width: 100%;
    max-width: var(--max-width-content);
}

/* Main content area */
#main {
    flex: 1;
}

/* Typography styles */
h1 {
    font-family: var(--font-secondary);
    font-size: var(--font-size-h1);
    line-height: var(--line-height-h1);
    margin-bottom: 0.5rem;
}

h2 {
    font-family: var(--font-secondary);
    font-size: var(--font-size-h2);
    line-height: var(--line-height-h2);
    margin-bottom: 0.5rem;
}

h3 {
    font-family: var(--font-secondary);
    font-size: var(--font-size-h3);
    line-height: var(--line-height-h3);
    margin-bottom: 0.5rem;
}

.small {
    font-size: var(--font-size-small);
}

a {
    color: var(--link-color);
    text-decoration: none;
}

/* Button styles */
#action-button,
.button,
button {
    width: 100%;
    display: block;
    font-family: inherit;
    font-size: inherit;
    text-align: center;
    padding: 1rem;
    border: 1px solid var(--button-border-color);
    background-color: var(--button-bg-color);
    color: var(--button-text-color);
    text-transform: uppercase;
    cursor: pointer;
}

/* Section styling */
section {
    padding: 1rem 0;
}

section div:not(:last-child),
p:not(:last-child) {
    margin-bottom: 1rem;
}

section:last-of-type {
    padding-top: 0;
}

/* Logo in h1 */
img {
    height: clamp(2rem, 1.8vw + 1rem, 3rem);
}

/* Footer Styling */
#footer {
    position: sticky;
    bottom: 0;
    padding: 1rem 0;
    background-color: var(--background-color);
    max-width: var(--max-width-content);
}

/* Iframe styling */
iframe {
    width: 100%;
    height: 90vh;
    touch-action: none;
    pointer-events: none;
}

/* Hide scrollbars */
::-webkit-scrollbar {
    display: none;
}