/* VARIABLES */
:root {
    /* Colors */
    --color-background: #F7F0DE;
    --color-text: #764221;
    --color-accent: #BD4626;
    --color-contrast: #393124;
    --color-border: rgba(136, 59, 7, 0.25);
    /* Typography */
    --text-logo: 2rem; 
    --text-h1: 2.5rem;
    --text-h2: 2rem;
    --text-h3: 1.125rem;
    --text-body: 1.125rem;
    --text-small: 1rem;
}
/* Dark theme */
@media (prefers-color-scheme: dark) {
    :root {
        --color-background: #393124;
        --color-text: #E6C195;
        --color-accent: #F07554;
        --color-contrast: #F7F0DE;
        --color-border: rgba(246, 189, 135, 0.25);
        
    }
}

/* FONTS */
@font-face {
    font-family: 'e-Ukraine';
    src: url('../fonts/e-Ukraine-Light.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'e-Ukraine';
    src: url('../fonts/e-Ukraine-Bold.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
}
@font-face {
    font-family: 'KyivRegion';
    src: url('../fonts/KyivRegion-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html, body {
    font-size: 100%;
    -webkit-text-size-adjust: 100%; /* Prevents automatic font size adjustment in some mobile browsers */
}
ul, 
ol {
    list-style-type: none;
    padding: 0;
    margin: 0;
}
address {
    font-style: normal;
}

/* BASE */
body {
    background-color: var(--color-background);
    color: var(--color-text);   
}
a, a:visited {
    color: var(--color-accent);
    text-decoration: none;
}
a:hover {
    color: var(--color-contrast);
}

/* TYPOGRAPHY */
body {
    font-family: 'e-Ukraine', sans-serif;
    font-size: var(--text-body);
    line-height: 150%;
}
.small {
    font-size: var(--text-small);
}
#logo {
    font-family: "KyivRegion", sans-serif;
    font-size: var(--text-logo);
    line-height: 100%;
}
h1 {
    font-size: var(--text-h1);
    line-height: 110%;
}
h2 {
    font-size: var(--text-h2);
    line-height: 120%;
}
h3 {
    font-size: var(--text-h3);
    line-height: 150%;
}

/* LAYOUT */

body {
    padding: 32px;
    max-width: 1680px;
    margin: 0 auto;
}

/* Header */
header {
    margin-bottom: 32px;
}
header h1 {
    margin-bottom: 16px;
    padding-left: 50%;
}

header .container {
    display: flex;
    gap: 16px;
}
header summary {
    flex: 2;
}
header summary p {
    max-width: 30rem;
}
header nav, 
header address {
    flex: 1;
}

/* Main */
main {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Video */
#video {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio (9 / 16 * 100) */
    height: 0;
    overflow: hidden;
}
#video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* About */
#about {
    display: flex;
    gap: 16px;
}
#about div {
    flex: 1;
    overflow: hidden;
}
#about .primary {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 22.5rem;
}
#about .secondary img {
    width: 100%;
    height: auto;
}

/* Photos */
#photos {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
#photos a {
    display: block;
    width: 128px;
    height: 128px;
    overflow: hidden;
}
#photos a img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Pricing */
#pricing h2 {
    margin-bottom: 16px;
}
#pricing table {
    width: 75%;
    table-layout: fixed;
    border-collapse: collapse;
    margin-bottom: -16px;
}
#pricing table tr {
    border-top: 1px solid var(--color-border);
}
#pricing table th,
#pricing table td {
    text-align: left;
    vertical-align: top;
    padding: 16px 16px 16px 0;
}
#pricing table .main {
    width: 66.6%;
}

/* Rules */
#rules {
    margin-left: 50%;
    font-size: var(--text-small);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Contact */
#contact {
    margin-right: 50%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Directions */
#directions {
    margin-left: 50%;
}
#directions p {
    font-size: var(--text-small);
}

/* Footer */
footer {
    font-size: var(--text-small);
    display: flex;
    margin-top: 32px;
    /* gap: 16px; */
}
footer nav,
footer div {
    flex: 1;
}
footer nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

/* COMPACT LAYOUT */
@media (max-width: 820px) {
    body {
        padding: 16px;
        font-size: var(--text-small);
    }

    /* Header */
    header {
        margin-bottom: 24px;
    }
    header h1 {
        padding: 0;
    }
    header .container {
        flex-direction: column;
    }
    header nav {
        order: -1;
    }
    header nav ul {
        display: flex;
        gap: 16px;
    }

    /* Main */
    main {
        gap: 24px;
    }

    /* About */
    #about {
        flex-direction: column;
    }
    #about .primary {
        min-width: 0;
    }
    #about .spacer {
        display: none;
    }
    #about .secondary {
        max-width: 400px;
    }

    /* Photos */
    #photos a {
        width: 72px;
        height: 72px;
    }

    /* Pricing */
    #pricing table {
        width: 100%;
    }
    #pricing table .main {
        width: 50%;
    }

    /* Misc */
    #rules,
    #contact,
    #directions {
        margin: 0;
    }

    /* Footer */
    footer {
        margin-top: 24px;
        flex-direction: column;
        gap: 16px;
    }

  }