/* =========================================================
   Damon's Website — shared stylesheet
   Colors kept from the original design:
     green  #84926a   light  #cdcfcc   dark   #4c4a45
     gold   #efb82a   rust   #b45e33   pine   #1c3b33
     olive  #716a4e
   ========================================================= */

:root {
    --green: #84926a;
    --light: #cdcfcc;
    --dark: #4c4a45;
    --gold: #efb82a;
    --rust: #b45e33;
    --pine: #1c3b33;
    --olive: #716a4e;
    --ink: #2c2e2a;

    --radius-pill: 35px;
    --radius-card: 12px;
    --nav-height: 100px;
    --page-width: 1200px;
}

*,
*::before,
*::after {
    box-sizing: border-box;   /* stops padding from pushing things past the screen edge */
}

html {
    font-family: "Lucida Console", "Courier New", monospace;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background-color: var(--green);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

img {
    max-width: 100%;
    display: block;
}

h1 {
    color: var(--light);
    font-size: clamp(1.8rem, 3.5vw, 3.2rem);
    margin: 0 0 0.5em;
}

p {
    color: var(--light);
    font-size: clamp(1rem, 1.6vw, 1.35rem);
    line-height: 1.5;
}

/* =========================================================
   Buttons — one rounded "pill" style used everywhere
   ========================================================= */

.btn,
.hero-button,
.learn-more {
    display: inline-block;
    padding: 12px 26px;
    border: none;
    border-radius: var(--radius-pill);
    font-family: inherit;
    font-size: 17px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease,
                transform 0.3s ease, box-shadow 0.3s ease;
}

.btn:hover,
.hero-button:hover,
.learn-more:hover,
.btn:focus-visible,
.hero-button:focus-visible,
.learn-more:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

.btn:active,
.hero-button:active,
.learn-more:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* =========================================================
   Navigation bar
   ========================================================= */

.navbar {
    position: sticky;          /* stays at the top but doesn't cover the page */
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    min-height: var(--nav-height);
    padding: 0 20px;
    background-color: var(--green);
}

.logo {
    display: block;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    mix-blend-mode: multiply;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.nav-items {
    list-style: none;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-items li + li {
    border-left: 2px solid var(--dark);
}

.nav-items li a {
    display: block;
    margin: 0 8px;
    padding: 10px 18px;
    border-radius: var(--radius-pill);
    font-size: 22px;
    color: var(--light);
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-items li a:hover,
.nav-items li a:focus-visible {
    color: #222;
    background-color: var(--light);
}

.nav-items li a.active {
    color: #222;
    background-color: rgba(205, 207, 204, 0.6);
}

/* Hamburger button — only shows on small screens */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 52px;
    height: 52px;
    padding: 12px;
    border: none;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.menu-toggle:hover {
    background-color: rgba(205, 207, 204, 0.35);
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    border-radius: 3px;
    background-color: var(--light);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* =========================================================
   Home — hero slideshow
   ========================================================= */

.hero {
    position: relative;
    height: clamp(380px, calc(100vh - var(--nav-height)), 760px);
    overflow: hidden;
    background-color: var(--dark);
}

.hero-slides img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 35%;
    opacity: 0;
    transform: scale(1.06);
    transition: opacity 1.2s ease, transform 6s ease;
}

.hero-slides img.is-active {
    opacity: 1;
    transform: scale(1);
}

/* Dark layer so the text is easy to read (same 50% darken as before) */
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
    pointer-events: none;
}

.hero-text {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(90%, 900px);
    text-align: center;
    color: var(--light);
}

.hero-text h1 {
    font-size: clamp(2rem, 5vw, 4rem);
}

.hero-text p {
    font-size: clamp(1.05rem, 2vw, 1.6rem);
    margin: 0 0 1.4em;
}

.hero-button {
    font-size: clamp(16px, 1.6vw, 22px);
    background-color: var(--green);
    color: var(--light);
}

.hero-button:hover,
.hero-button:focus-visible {
    color: var(--ink);
    background-color: var(--gold);
}

.hero-dots {
    position: absolute;
    z-index: 2;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.hero-dots button {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 2px solid var(--light);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.hero-dots button:hover {
    transform: scale(1.25);
}

.hero-dots button.is-active {
    background-color: var(--gold);
    border-color: var(--gold);
}

/* =========================================================
   Home — "Favorite Spots" and "Contact Me" sections
   ========================================================= */

.middle,
.end {
    display: grid;
    align-items: center;
    gap: 40px;
    padding: 50px max(20px, calc((100% - var(--page-width)) / 2));
}

.middle {
    grid-template-columns: 1fr 2fr;
    background-color: var(--green);
}

.end {
    grid-template-columns: 1fr 1fr;
    background-color: var(--dark);
}

.middle-image img,
.end-image img {
    width: 100%;
    border-radius: var(--radius-card);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.middle-image img {
    max-width: 420px;
}

.middle-content p,
.end-content p {
    margin-top: 0;
}

/* =========================================================
   Footer
   ========================================================= */

footer {
    background-color: var(--green);
    padding: 10px 20px;
}

.footer {
    font-size: 15px;
    text-align: center;
    color: var(--light);
}

/* =========================================================
   About page
   ========================================================= */

.about-me-body {
    background-color: #f2f2f2;
}

.About-me-heading {
    width: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    margin: 40px auto 20px;
}

.About-me-heading h1 {
    font-size: 50px;
    color: #000;
    margin-bottom: 25px;
    position: relative;
}

.About-me-heading h1::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 4px;
    display: block;
    background-color: var(--olive);
}

.About-me-heading p {
    font-size: 18px;
    color: #666;
    margin-bottom: 35px;
}

.container-about {
    width: 90%;
    max-width: var(--page-width);
    margin: 0 auto 60px;
    padding: 10px 20px;
}

.about-about {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.about-image {
    flex: 1;
    overflow: hidden;
    border-radius: 10%;
}

.about-image img {
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

.about-image:hover img {
    transform: scale(1.2);
}

.about-content {
    flex: 1;
}

.about-content h2 {
    font-size: 23px;
    line-height: 1.5;
    margin: 0 0 15px;
    color: #333;
}

.learn-more {
    background-color: var(--rust);
    color: #fff;
    font-size: 19px;
    margin-top: 15px;
}

.learn-more:hover,
.learn-more:focus-visible {
    background-color: var(--pine);
}

/* =========================================================
   Favorite Spots page
   ========================================================= */

.favorite-spots-body {
    background-color: #f0f0f0;
}

.page-heading {
    text-align: center;
    margin: 50px auto 10px;
    padding: 0 20px;
}

.page-heading h1 {
    color: #000;
    font-size: clamp(2rem, 4vw, 3.1rem);
    display: inline-block;
    position: relative;
    margin-bottom: 25px;
}

.page-heading h1::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 100%;
    height: 4px;
    background-color: var(--olive);
}

.page-heading p {
    color: #666;
    font-size: 18px;
    margin: 0;
}

.card-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);   /* rows of 3 */
    gap: 30px;
    max-width: var(--page-width);
    margin: 40px auto 70px;
    padding: 0 20px;
}

.card {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

/* For logo images, show the whole logo instead of cropping it */
.card img.logo-fit {
    object-fit: contain;
    padding: 18px;
    background-color: #fff;
}

.card-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px;
}

.card-content h3 {
    font-size: 26px;
    margin: 0 0 10px;
    color: #222;
}

.card-content p {
    color: #666;
    font-size: 15px;
    line-height: 1.5;
    margin: 0;
    flex: 1;
}

.card-content .btn {
    align-self: flex-start;
    margin-top: 18px;
    background-color: #333;
    color: #fff;
    font-size: 15px;
    padding: 10px 22px;
}

.card-content .btn:hover,
.card-content .btn:focus-visible {
    background-color: var(--rust);
}

/* The empty "add one later" card */
.card-placeholder {
    border: 3px dashed #bbb;
    background-color: #fafafa;
    box-shadow: none;
}

.card-placeholder .placeholder-art {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 10;
    background-color: #e6e6e1;
    color: var(--green);
    font-size: 72px;
    line-height: 1;
}

.card-placeholder .btn {
    background-color: var(--green);
}

.card-placeholder .btn:hover,
.card-placeholder .btn:focus-visible {
    background-color: var(--pine);
}

/* =========================================================
   Contact page
   ========================================================= */

.contact-page {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    gap: 60px;
    width: 85%;
    max-width: 1000px;
    margin: 70px auto;
}

.contact-content h1 {
    color: #000;
    font-size: clamp(2.2rem, 4vw, 3.1rem);
    display: inline-block;
    position: relative;
    margin-bottom: 40px;
}

.contact-content h1::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 100%;
    height: 4px;
    background-color: var(--olive);
}

.contact-content h2 {
    color: #000;
    font-size: 26px;
    margin: 0 0 10px;
}

.contact-content p {
    color: var(--pine);
    font-size: 17px;
    line-height: 1.5;
    margin: 0 0 10px;
}

.contact-content p a {
    color: var(--pine);
    font-weight: bold;
    word-break: break-word;
    text-decoration-color: var(--rust);
    text-underline-offset: 3px;
}

.contact-content p a:hover {
    color: var(--rust);
}

.contact-content .btn {
    margin-top: 20px;
    background-color: var(--rust);
    color: #fff;
}

.contact-content .btn:hover,
.contact-content .btn:focus-visible {
    background-color: var(--pine);
}

.contact-photo {
    width: 100%;
    max-width: 380px;
    justify-self: center;
    overflow: hidden;
    border-radius: 10%;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.contact-photo img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center 30%;
    transition: transform 0.5s ease;
}

.contact-photo:hover img {
    transform: scale(1.08);
}

/* =========================================================
   Responsive — tablets
   ========================================================= */

@media screen and (max-width: 960px) {
    .card-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .nav-items li a {
        font-size: 18px;
        padding: 10px 14px;
        margin: 0 4px;
    }
}

/* =========================================================
   Responsive — phones
   ========================================================= */

@media screen and (max-width: 768px) {
    :root {
        --nav-height: 76px;
    }

    .logo {
        width: 60px;
        height: 60px;
    }

    /* Hamburger menu */
    .menu-toggle {
        display: flex;
    }

    .nav-items {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        padding: 0 16px;
        background-color: var(--green);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease, padding 0.35s ease;
    }

    .nav-items.show {
        max-height: 400px;
        padding: 8px 16px 16px;
    }

    .nav-items li + li {
        border-left: none;
        border-top: 2px solid var(--dark);
    }

    .nav-items li a {
        margin: 6px 0;
        font-size: 20px;
        text-align: center;
    }

    /* Home */
    .middle,
    .end {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
    }

    .middle-image img {
        margin: 0 auto;
    }

    .end-image {
        order: -1;   /* image on top, like the section above */
    }

    /* About */
    .About-me-heading h1 {
        font-size: 36px;
    }

    .About-me-heading p {
        font-size: 17px;
        margin-bottom: 0;
    }

    .container-about {
        width: 100%;
        padding: 20px;
    }

    .about-about {
        flex-direction: column;
        gap: 24px;
    }

    .about-content h2 {
        font-size: 19px;
    }

    .learn-more {
        font-size: 16px;
    }

    /* Favorite Spots */
    .card-container {
        grid-template-columns: 1fr;
        max-width: 460px;
    }

    /* Contact */
    .contact-page {
        grid-template-columns: 1fr;
        width: 88%;
        margin: 40px auto;
        gap: 36px;
        text-align: center;
    }

    .contact-photo {
        max-width: 340px;
    }
}

/* Respect people who turn off animations in their device settings */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
