/* CSS RESET */
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
    display: block;
}
body {
    line-height: 1;
}
ol, ul {
    list-style: none;
}
blockquote, q {
    quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
    content: '';
    content: none;
}
table {
    border-collapse: collapse;
    border-spacing: 0;
}
/* END CSS RESET */

/* BEGIN CUSTOM CODE written by Jessica Janiszewski */
/* --- Root variables --- */
:root {
    --olive: #78632B;
    --dk-brown: #150F0C;
    --cinnamon: #C7724A;
    --rose: #FAAA88;
    --eggshell: #FBF3DF;
    --off-white: #FFFBF3;

    --heading-fonts: "Poller One", Georgia, serif;
    --body-fonts: "Outfit", Verdana, sans-serif;
}

/* --- Body styles --- */
body {
    font-family: var(--body-fonts);
    font-weight: 300;
    line-height: 1.6;
    font-size: 1.1rem;
    box-sizing: border-box;
    color: var(--dk-brown);
    background-color: var(--off-white);
}

/* --- Skip link styles --- */
#skip {
    position: absolute;
    top: auto;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

#skip:focus {
    position: static;
    width: auto;
    height: auto;
    font-size: 1.1rem;
    font-weight: bold;
	outline: 4px solid var(--cinnamon);
    outline-offset: 0;
}

/* --- Header, main, and footer styles --- */
header, main, footer {
    width: 100%;
    margin: 0 auto;
    background-color: var(--off-white);
}

header, footer {
    max-width: 1280px;
}

header {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    justify-content: space-between;
}

footer {
    text-align: center;
    border-top: 4px solid var(--cinnamon);
    padding: 2rem;
}

/* --- Navigation styles --- */
nav {
    display: grid;
    grid-template-columns: auto auto;
    gap: 1rem;
    justify-content: end;
    align-items: center;
}

nav ul {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    justify-content: space-around;
    justify-items: center;
    margin: 1rem auto;
}

/* --- Button styles --- */
button:focus {
    outline: 4px solid var(--cinnamon);
    outline-offset: 3px;
}

/* --- Dark/light mode toggle styles --- */
nav button {
    display: flex;
    width: auto;
    height: auto;
    padding: 16px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.currentMode {
    display: none;
}

body.dark-theme {
    /* Overrides existing root variable colors */
    --olive: #C7724A;
    --dk-brown: #FFFBF3;
    --cinnamon: #78632B;
    --rose: #FAAA88;
    --eggshell: #23150f;
    --off-white: #150F0C;
}

/* --- Link styles --- */
a {
    display: block;
    padding: 16px;
    color: var(--dk-brown);
    text-decoration: 3px overline underline var(--cinnamon);
    text-underline-offset: 6px;
    font-size: 1.3rem;
}

a:hover {
    text-decoration: 3.5px overline underline var(--dk-brown);
}

a:focus {
    outline: 4px solid var(--cinnamon);
    outline-offset: 2px;
}

/* --- Header logo styles --- */
header > a {
    text-align: center;
    justify-self: start;
    filter: drop-shadow(0px 2px 0px var(--dk-brown));
}

/* --- Image styles --- */
main > img {
    border-top: 4px solid var(--dk-brown);
    border-bottom: 4px solid var(--dk-brown);
}

img {
    display: block;
}

/* --- Heading styles --- */
h1, h2, h3, h4 {
    font-family: var(--heading-fonts);
    font-size: 1.2rem;
}

h4 {
    color: var(--cinnamon);
}

h3 {
    font-size: 1.45rem;
    color: var(--cinnamon);
}

h2 {
    font-size: 1.8rem;
    margin: 0 auto;
    text-align: center;
}

h1 {
    font-size: 2.2rem;
}

/* --- Paragraph styles --- */
p {
    max-width: 50ch;
}

footer p {
    margin: 0 auto;
}

/* --- Div styles (color background) --- */
#cats-div {
    width: 100%;
    background-color: var(--eggshell);
}

#contact-div {
    width: 100%;
    background-color: var(--eggshell);
}

/* --- Content container styles --- */
.content {
    margin: 0 auto;
    padding: 2rem 0;
    max-width: 1280px;
    width: 100%;
}

/* --- About section styles --- */
#about {
    border-bottom: 4px solid var(--cinnamon);
    padding: 4rem 0;
}

#about h2 {
    padding-bottom: 2rem;
}

#about p {
    margin: 0 auto;
    max-width: 100ch;
    padding: 1rem 0;
}

/* --- Cats section styles --- */
#cats {
    border-bottom: 4px solid var(--cinnamon);
}

#cats button {
    background-color: var(--off-white);
    color: var(--dk-brown);
    border: 2px solid var(--dk-brown);
    border-radius: 15px;
    padding: 1rem;
    font-family: var(--body-fonts);
    font-weight: 600;
    font-size: 1.5rem;
    line-height: 1.6;
}

#cats button:hover {
    background-color: var(--dk-brown);
    color: var(--off-white);
}

#cats button.currentCatBtn {
    background-color: var(--dk-brown);
    color: var(--off-white);
}

#cat-control {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 2rem 0;
}

#cats h2 {
    padding: 1rem;
}

#cats h3, #cats h4, #cats p, #cats ul {
    grid-column: 2 / 3;
}

#cats h3 {
    text-decoration: 3px overline underline var(--dk-brown);
    text-underline-offset: 6px;
    color: var(--dk-brown);
    align-self: center;
}

#cats h4 {
    text-decoration: 3px underline var(--cinnamon);
    text-underline-offset: 6px;
    align-self: center;
}

#cats > p {
    margin: 0 auto;
    max-width: 100ch;
    padding: 0.5rem 0;
}

#cats section img {
    justify-self: center;
    grid-column: 1 / 2;
    grid-row: 1 / 6;
}

.currentProfile {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    padding: 2rem 0;
}

/* Hides un-selected cat profiles */
.hiddenProfile {
    display: none;
}

/* --- Guessing game section --- */
#guessing-game {
    padding: 0.5rem 0 0.75rem;
    border-bottom: 4px solid var(--cinnamon);
}

#game {
    margin: 0 auto;
    text-align: center;
}

#game p {
    max-width: 52ch;
    margin: 0 auto;
}

#game h3 {
    position: absolute;
	left: -10000px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

#game form {
    width: 325px;
    margin: 1rem auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

#game input {
    display: inline-block;
    width: 50px;
}

#game label {
    display: inline-block;
    width: auto;
    margin: 0 auto;
}

#game input[type=submit] {
    display: block;
    width: auto;
    height: 60px;
    border: 4px solid var(--dk-brown);
    padding: 0.8rem 1rem 1rem;
    margin-top: 1rem;
    font-weight: 500;
    font-size: 1.3rem;
    cursor: pointer;
}

#gameOutput {
    text-align: center;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
	width: 300px; 
	margin: 0 auto;
}

#gameOutput span {
    display: flex;
    align-items: center;
    justify-content: center;
	width: 20px;
	height: 20px;
	padding: 1rem;
	background-color: var(--dk-brown);
	color: var(--off-white);
    font-weight: 500;
	border-radius: 50%;
	margin: 0.5rem auto;
}

#gameMsg {
    font-size: 1.2rem;
    font-weight: 500;
    text-align: center;
    padding-top: 1rem;
}

/* --- Contact section --- */
#connect {
    padding: 2.5rem 0 2rem;
}

#contact {
    padding-top: 1rem;
}

#contactForm {
    background-color: var(--off-white);
    border-radius: 14px;
    border: 3px solid var(--olive);
    padding: 1.5rem 1.6rem;
}

/* Form styles */
form {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    accent-color: var(--olive);
}

input, label, textarea {
    display: block;
    font-size: 1.1rem;
    font-family: var(--body-fonts);
}

input:focus, textarea:focus, input:focus-within, textarea:focus-within{
    outline: 4px solid var(--olive);
    outline-offset: 2px;
}

input, textarea {
    margin: 0 auto;
    border-color: var(--dk-brown);
    border-style: solid;
    border-width: 2px;
    width: 95%;
    background-color: var(--off-white);
}

input {
    height: 32px;
    color: var(--dk-brown);
}

label {
    font-weight: 500;
    margin: 16px 0 4px 8px;
}

textarea {
    height: 60px;
    color: var(--dk-brown);
}

fieldset {
    border: 2px solid var(--dk-brown);
    padding: 4px 16px 16px 8px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: calc(96% - 24px);
    margin: 1rem auto;
}

legend {
    font-weight: 500;
    grid-column: 1 / -1;
    font-size: 1.1rem;
    padding: 0 8px;
}

fieldset input, fieldset label {
    margin-left: 0;
}

fieldset label:first-of-type {
    grid-column: 1 /2;
    grid-row: 1 /2;
}

fieldset label:last-of-type {
    grid-column: 2 / 3;
    grid-row: 1 /2;
}

input[type=radio] {
    appearance: none;
    opacity: 0;
    margin: 0;
    padding: 0;
    border: none;
    font-size: 0;
    border-radius: 0;
    width: 1px;
    height: 1px;
}

input[type=radio] + label {
    cursor: pointer;
    display: flex;
    align-items: center;
}

input[type=radio] + label::before {
    content: "\00a0";   /* Non-breaking space */
    font-size: 4.5em;
    line-height: 0.44;
    border-radius: 50%;
    display: inline-block;  
    height: 32px;
    width: 35px;
    text-align: center;
    margin-right: 12px;
    border: 2px solid var(--off-white);
    background-color: var(--olive);
    padding-bottom: 2px;
}

input[type=radio]:checked + label::before {
    content: "\2022";
    color: #FFFBF3;
    background: var(--olive);
}

input[type=radio]:focus + label::before {
    box-shadow: 0 0 0 3px var(--dk-brown);
}

#submit-form {
    height: 60px;
    width: 97%;
    background-color: var(--off-white);
    color: var(--dk-brown);
    border: 4px solid var(--dk-brown);
    margin: 32px auto;
    font-weight: 500;
    font-size: 1.3rem;
    cursor: pointer;
}

#submit-form:hover {
    background-color: var(--dk-brown);
    color: var(--off-white);
}

/* Error message styles */
#commentError, #telError, #emailError, #fNameError {
    margin: 16px 0 4px 8px;
    color: #C7724A;
}

.hide {
    display: none;
}

.required {
    font-size: 1.5rem;
    color: #C7724A;
}

.error {
    border-color: #C7724A;
}

/* Submission popup window */
#popup-background {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    z-index: 3;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

#popup-background.hide, #formSubmit.hide {
    display: none;
}

#close-window {
    display: block;
    padding: 0;
	margin: 0;
	box-shadow: none;
	background-color: transparent;
    align-self: end;
}

#close-window svg {
    display: block;
	stroke: var(--dk-brown);
	stroke-width: 2;
	width: 44px;
	height: auto;
}

#close-window:hover svg {
    stroke: var(--cinnamon);
}

#formSubmit {
    width: calc(80% - 32px);
    max-width: calc(675px - 32px);
    margin: 0 auto;
    padding: 1rem;
    background-color: var(--off-white);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

#formSubmit svg {
    width: 35px;
    height: 35px;
}

/* --- Back to top button styles --- */
.block {
    position: relative;
}

.backToTop {
    display: flex;
    align-items: center;
    width: 34px;
    height: 34px;
    background-color: #C7724A;
    border-radius: 50%;
    position: absolute;
    left: calc(100% - 120px);
    top: calc(100% - 100px);
}

.backToTop svg{
    fill: var(--eggshell);
    width: 34px;
    height: 34px;
}

.backToTop:hover{
    background-color: var(--dk-brown);
}

.backToTop:hover svg{
    fill: #C7724A;
}

.backToTop:focus{
    outline: 4px solid var(--dk-brown);
}