/*
    Adam Sylvester
    styles.css
    Final Project
    Responsive mobile-first styling (no Bootstrap dependency needed)
*/

/* General reset and accessible defaults */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: #202522; background: #f4f1e8; font-family: Arial, Helvetica, sans-serif; }
img { display: block; max-width: 100%; }
a { color: #235640; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 3px solid #d7a64d;
    outline-offset: 3px;
}
#wrapper { min-height: 100vh; display: flex; flex-direction: column; }
main { width: 100%; max-width: 1240px; margin: 0 auto; padding: 52px 22px 68px; flex: 1; }

/* Navigation shared by all pages */
.site-nav { position: relative; z-index: 20; background: #18332b; color: #fff; }
.nav-inner { max-width: 1400px; margin: auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; padding: 12px 24px; }
.nav-brand { color: #fff; text-decoration: none; font: bold 1.18rem Georgia, 'Times New Roman', serif; padding: 6px 0; letter-spacing: .025em; }
.nav-brand span { display: block; font: 600 .62rem Arial, sans-serif; letter-spacing: .16em; color: #d6ba85; margin-top: 2px; }
.menu-toggle { display: none; background: transparent; border: 1px solid #9aaa91; color: #fff; border-radius: 5px; font: 600 1rem Arial, sans-serif; padding: 9px 13px; cursor: pointer; }
.menu-icon { font-size: 1.25rem; vertical-align: middle; margin-right: 4px; }
.nav-links { display: flex; align-items: center; flex-wrap: wrap; gap: 0; margin: 0; padding: 0; list-style: none; }
.nav-links > li > a, .lessons-dropdown > summary { display: block; padding: 14px 11px; color: #fff; text-decoration: none; font-size: .88rem; font-weight: bold; white-space: nowrap; }
.nav-links a:hover, .nav-links a[aria-current='page'], .lessons-dropdown > summary:hover, .lessons-dropdown[open] > summary { color: #18332b; background: #d2d9c0; }
.lessons-dropdown { position: relative; }
.lessons-dropdown > summary { cursor: pointer; list-style: none; }
.lessons-dropdown > summary::-webkit-details-marker { display: none; }
.lessons-dropdown > summary span { margin-left: 4px; }
.lessons-menu { position: absolute; top: 100%; right: 0; z-index: 30; width: max-content; min-width: 250px; max-width: min(310px, 92vw); max-height: 64vh; overflow-y: auto; margin: 0; padding: 8px 0; list-style: none; background: #fff; border: 1px solid #b8c4b2; border-radius: 0 0 7px 7px; box-shadow: 0 10px 20px #152f2650; }
.lessons-menu a { display: block; padding: 11px 16px; color: #18332b; font-weight: normal; text-decoration: none; font-size: .92rem; white-space: normal; }
.lessons-menu a:hover { background: #e9ece1; }

/* Home hero: the Savannah photo fills the area behind the text */
.home-header { min-height: clamp(430px, 67vh, 720px); display: flex; align-items: center; justify-content: center; padding: 60px 22px; background-image: linear-gradient(90deg, rgba(10, 27, 24, .76), rgba(10, 27, 24, .28)), url('../images/savannah_backdrop.jpg'); background-size: cover; background-position: center center; }
.hero-text { color: #fff; width: 100%; max-width: 760px; text-align: left; }
.eyebrow { text-transform: uppercase; letter-spacing: .22em; font-size: .78rem; font-weight: bold; margin: 0 0 16px; }
.hero-text .eyebrow { color: #e3c58a; }
.hero-text h1 { margin: 0; font: normal clamp(3.5rem, 8.5vw, 6.6rem)/1.03 Georgia, 'Times New Roman', serif; }
.hero-text h2 { margin: 14px 0 20px; font: 400 clamp(1.35rem, 3vw, 2.05rem) Georgia, 'Times New Roman', serif; }
.hero-text > p:not(.eyebrow) { max-width: 610px; font-size: 1.1rem; line-height: 1.7; margin: 0 0 30px; }
.hero-button, .button-link { display: inline-block; padding: 13px 21px; background: #c5a46d; color: #172c24; font-weight: bold; border: 0; border-radius: 4px; text-decoration: none; cursor: pointer; font: 700 1rem Arial, sans-serif; }
.hero-button:hover, .button-link:hover { background: #dfc48e; }

/* Regular pages */
.page-header { text-align: center; background: #e5e9db; padding: 60px 22px 52px; border-bottom: 1px solid #d4dccb; }
.page-header h1 { margin: 0; font: normal clamp(2.5rem, 6vw, 4rem) Georgia, 'Times New Roman', serif; color: #18332b; }
.page-header p { margin: 9px 0 0; font: 1.13rem Georgia, 'Times New Roman', serif; color: #566855; }
.page-title { margin: 0 0 16px; color: #18332b; font: normal clamp(2rem, 4vw, 2.7rem) Georgia, 'Times New Roman', serif; text-align: center; }
.page-intro { max-width: 720px; margin: 0 auto 36px; text-align: center; line-height: 1.7; }
.intro { max-width: 780px; text-align: center; margin: 0 auto 45px; }
.intro h2 { font: normal 2.3rem Georgia, 'Times New Roman', serif; color: #18332b; margin: 0 0 18px; }
.intro p { margin: 0 0 14px; line-height: 1.75; }

/* Home page category cards */
.category-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.category { display: flex; flex-direction: column; overflow: hidden; background: #fff; box-shadow: 0 7px 25px #223c2d22; border-bottom: 5px solid #c5a46d; border-radius: 5px; }
.category > a img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.category-content { padding: 24px; text-align: center; flex: 1; }
.category h2 { margin: 0 0 12px; font: normal 1.6rem Georgia, 'Times New Roman', serif; }
.category h2 a { color: #18332b; text-decoration: none; }
.category h2 a:hover { text-decoration: underline; }
.category p { line-height: 1.6; min-height: 3em; margin-bottom: 17px; }
.card-link { font-weight: bold; text-underline-offset: 4px; }

/* Existing artwork galleries */
.gallery-grid { display: grid; grid-template-columns: 1fr; gap: 22px; align-items: start; }
.gallery-grid figure { margin: 0; background: #fff; overflow: hidden; box-shadow: 0 7px 24px #223c2d24; border: 1px solid #dce2d6; border-radius: 5px; }
.gallery-grid figure img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; background: #f2f1ec; }
.gallery-grid figcaption { text-align: center; padding: 16px; color: #18332b; font: 1.12rem Georgia, 'Times New Roman', serif; }

/* About page with supplied photo */
.about-layout { max-width: 1100px; margin: auto; display: grid; grid-template-columns: 1fr; gap: 0; align-items: stretch; background: #fff; box-shadow: 0 9px 30px #223c2d24; border-radius: 6px; overflow: hidden; }
.about-photo img { width: 100%; height: 100%; min-height: 270px; aspect-ratio: 4 / 3; object-fit: cover; }
.about-page { padding: clamp(28px, 5vw, 65px); border-top: 5px solid #c5a46d; }
.about-page .eyebrow { color: #64745b; }
.about-page h2 { font: normal 2.4rem Georgia, 'Times New Roman', serif; color: #18332b; margin: 0 0 22px; }
.about-page p:not(.eyebrow) { line-height: 1.8; margin: 0 0 22px; }
.about-page a:not(.button-link) { font-weight: bold; word-break: break-word; }

/* The creator section uses the same responsive side-by-side layout as About Elise. */
.creator-layout { margin-top: 38px; }
.creator-photo img { object-position: center 40%; }

/* Demo contact form and SCAD Google Maps embed */
.contact-intro .eyebrow { text-align: center; color: #64745b; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 26px; }
.contact-card { min-width: 0; background: #fff; padding: clamp(22px, 3.5vw, 36px); border-radius: 6px; border-top: 5px solid #c5a46d; box-shadow: 0 6px 23px #223c2d18; }
.contact-card h2 { margin: 0 0 14px; color: #18332b; font: normal 1.8rem Georgia, 'Times New Roman', serif; }
.contact-card p { line-height: 1.6; }
#contact-form { display: flex; flex-direction: column; gap: 11px; margin-top: 26px; }
#contact-form label { font-weight: bold; margin-top: 5px; }
#contact-form input, #contact-form textarea { width: 100%; padding: 12px; border: 1px solid #aebbac; border-radius: 4px; font: inherit; color: #202522; background-color: #fff; }
#contact-form textarea { resize: vertical; }
.submit-button { align-self: flex-start; margin-top: 10px; }
.form-response { padding: 15px; background: #e8f2e6; border-left: 4px solid #447353; border-radius: 3px; color: #18332b; font-weight: bold; }
.form-response[hidden] { display: none; }
.map-container { overflow: hidden; border-radius: 4px; border: 1px solid #d4dccb; background: #e5e9db; margin-top: 18px; }
.map-container iframe { display: block; width: 100%; height: 340px; border: 0; }
.map-note { font-size: .92rem; }

/* Footer with page links, SCAD link, and supplied social icons */
.site-footer { background: #202522; color: #f6f7f3; padding: 48px 22px 20px; }
.footer-columns { max-width: 1240px; margin: auto; display: grid; grid-template-columns: 1fr; gap: 30px; }
.footer-column h2 { font: normal 1.25rem Georgia, 'Times New Roman', serif; margin: 0 0 15px; color: #e0cb9e; }
.footer-column p { color: #e1e5da; font-size: .93rem; line-height: 1.65; margin: 0; }
.footer-column ul { margin: 0; padding: 0; list-style: none; }
.footer-column li { margin-bottom: 11px; }
.footer-column a { color: #f4f7ef; text-decoration: none; font-size: .93rem; }
.footer-column a:hover { color: #e3c58a; text-decoration: underline; }
/* Four social logos: white circular buttons on the dark footer, like the reference. */
.social-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 15px; }
.social-links a { display: inline-flex; width: 42px; height: 42px; flex: 0 0 42px; align-items: center; justify-content: center; border-radius: 50%; background-color: #fff; transition: transform .15s ease, background-color .15s ease; }
.social-links a:hover { transform: translateY(-2px); background-color: #e3c58a; }
.social-links img { width: 24px; height: 24px; object-fit: contain; }
@media (prefers-reduced-motion: reduce) { .social-links a { transition: none; } }
.footer-bottom { max-width: 1240px; margin: 35px auto 0; padding-top: 17px; border-top: 1px solid #667466; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px 20px; font-size: .85rem; color: #d1d7cd; }
.footer-bottom p { margin: 4px 0; }

/* Small mobile devices: show collapsible navigation with a hamburger */
@media (max-width: 850px) {
    .nav-inner { padding: 12px 18px; }
    .menu-toggle { display: block; }
    .nav-links { width: 100%; display: flex; flex-direction: column; align-items: stretch; padding-top: 8px; }
    /* JavaScript adds this class, leaving links visible if scripting is disabled. */
    .js .nav-links { display: none; }
    .js .nav-links.open { display: flex; }
    .nav-links > li { border-top: 1px solid #486457; }
    .nav-links > li > a, .lessons-dropdown > summary { padding: 13px 9px; }
    .lessons-menu { position: static; width: 100%; max-width: none; max-height: 275px; border-radius: 0; box-shadow: none; }
    .home-header { background-position: 54% center; }
}

/* Tablet view */
@media (min-width: 620px) {
    .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .about-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .about-page { border-top: 0; border-left: 5px solid #c5a46d; }
    .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Desktop view */
@media (min-width: 1000px) {
    .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .footer-columns { grid-template-columns: 1.15fr 1fr 1.15fr 1fr; }
}

/* Narrow phones */
@media (max-width: 400px) {
    .hero-text h1 { font-size: 3rem; }
    .home-header { min-height: 500px; padding: 48px 20px; }
    main { padding: 35px 16px 52px; }
}

/* Respect reduced-motion accessibility setting */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

/* Printer-friendly version */
@media print {
    body { background: #fff; color: #000; }
    .site-nav, .site-footer, .hero-button, .button-link { display: none; }
    .home-header { min-height: auto; background: none; padding: 10px; }
    .hero-text { color: #000; }
    main { max-width: none; }
}
