/*
    Name:       Joseph Medeiros
    Business:   Medeiros Web Design
    Date:       November 11, 2026
    Project:    Concept Site - Cedar Bluff Lake Cabins (fictional business)
    Filename:   styles.css

    Layout plan: mobile-first, lodge-like. The hero uses a <picture>
    element so phones and desktops get different crops (art direction
    from the Responsive Design lesson). Cabin cards show June bookings
    with <progress> bars. The rate table sits in a box with a max-height
    and overflow so it scrolls, and its header cells use position: sticky
    so they stay visible. Drive times use dotted leaders made with a
    border on a growing flex item. Media queries at 576px, 768px, 992px
    and 1200px, in ascending order.

    Colors (WebAIM checked, AA):
      #1C2410 pine dark   #365314 forest   #9A4508 amber (darker than
      #B45309 for small text)   #F7F3EA canvas   #5C5A48 muted
*/

/* ----- Browser reset (universal) ----- */

/* border-box sizing and zero default spacing. */
* {
    box-sizing: border-box;
    margin: 0px;
    padding: 0px;
}

/* ----- Page defaults (element) ----- */

/* Canvas page with pine text. */
body {
    background-color: #F7F3EA;
    color: #1C2410;
    font-family: "Alegreya Sans", sans-serif;
    font-size: 1.12rem;
    line-height: 1.6;
}

/* Responsive images. */
img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Bookish serif headings. */
h1,
h2,
h3 {
    font-family: Alegreya, serif;
    font-weight: 700;
    line-height: 1.08;
}

/* Section titles. */
h2 {
    font-size: clamp(2.1rem, 4.4vw, 3.2rem);
}

/* Amber links. */
a {
    color: #9A4508;
    font-weight: 700;
}

/* Amber focus ring. */
a:focus-visible,
button:focus-visible,
.rate-box:focus-visible,
.menu-check:focus-visible + .menu-icon {
    outline: 3px solid #9A4508;
    outline-offset: 3px;
}

/* Muted intro paragraph. */
.lead {
    color: #5C5A48;
    max-width: 38rem;
    margin: 8px 0px 26px 0px;
}

/* ----- Header (class) ----- */

/* Sticky forest header. */
.site-header {
    position: sticky;
    top: 0px;
    z-index: 20;
    background-color: #1C2410;
    color: #F7F3EA;
}

/* Logo and menu in a row. */
.header-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
}

/* Serif logo. */
.logo {
    font-family: Alegreya, serif;
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1.1;
}

/* Small second line. */
.logo small {
    display: block;
    font-family: "Alegreya Sans", sans-serif;
    font-size: 0.8rem;
    color: #D9C7A0;
}

/* Hidden menu checkbox (opacity keeps it keyboard reachable). */
.menu-check {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

/* Menu button. */
.menu-icon {
    border: 1px solid #D9C7A0;
    padding: 5px 14px;
    cursor: pointer;
}

/* Nav hidden on phones until opened. */
.site-nav {
    display: none;
    width: 100%;
}

/* Opened menu shows nav. */
.menu-check:checked ~ .site-nav {
    display: block;
}

/* No bullets. */
.site-nav ul {
    list-style: none;
    padding-top: 8px;
}

/* Phone nav links. */
.site-nav a {
    display: block;
    color: #F7F3EA;
    font-weight: 400;
    text-decoration: none;
    padding: 9px 0px;
    border-top: 1px solid #34401F;
}

/* Sand color on hover. */
.site-nav a:hover {
    color: #E8C77C;
}

/* Concept notice. */
.concept-note {
    background-color: #365314;
    font-size: 0.85rem;
    text-align: center;
    padding: 4px 16px;
}

/* ----- Hero (class) ----- */

/* The hero is the positioning parent for the text card. */
.hero {
    position: relative;
}

/* The picture's image fills the hero. */
.hero img {
    width: 100%;
    height: 460px;
    object-fit: cover;
}

/* Text card sitting over the bottom of the photo. */
.hero-text {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    background-color: rgba(28, 36, 16, 0.86);
    color: #FFFFFF;
    padding: 22px;
}

/* Headline. */
.hero h1 {
    font-size: clamp(2.4rem, 7vw, 4.6rem);
    margin-bottom: 10px;
}

/* Italic sand part of the headline. */
.hero h1 em {
    font-weight: 500;
    color: #E8C77C;
}

/* Hero paragraph. */
.hero-text p {
    margin-bottom: 16px;
}

/* Amber button. */
.button,
button {
    display: inline-block;
    background-color: #9A4508;
    color: #FFFFFF;
    border: none;
    padding: 12px 26px;
    font-family: Alegreya, serif;
    font-size: 1.15rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

/* Darker on hover. */
.button:hover,
button:hover {
    background-color: #78350F;
}

/* ----- Cabins (class) ----- */

/* Section spacing. */
.cabins {
    padding: 56px 20px;
}

/* Cards wrap. */
.cabin-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

/* One cabin card, styled like a wooden sign: thick top border. */
.cabin {
    flex: 1 1 240px;
    background-color: #FFFFFF;
    border-top: 8px solid #365314;
    padding: 20px;
}

/* Cabin name. */
.cabin h3 {
    font-size: 1.6rem;
}

/* Sleeps line. */
.sleeps {
    color: #5C5A48;
    margin-bottom: 10px;
}

/* Amenity list. */
.amenities {
    list-style: none;
    margin-bottom: 14px;
}

/* Forest icons. */
.amenities i {
    color: #365314;
    width: 22px;
}

/* Label above the bar. */
.cabin label {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
}

/* Full-width bookings bar. */
.cabin progress {
    width: 100%;
    height: 14px;
    accent-color: #9A4508;
}

/* ----- Rates (ID and class) ----- */

/* Forest band. */
#rates {
    display: flex;
    flex-direction: column;
    gap: 26px;
    background-color: #365314;
    color: #FFFFFF;
    padding: 56px 20px;
}

/* Space under the heading. */
.rates-text h2 {
    margin-bottom: 10px;
}

/* Kitchen photo. */
.rates-text img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    margin-top: 18px;
}

/* The rate box scrolls in both directions; its height is limited so the
   sticky header has something to stick through. */
.rate-box {
    max-height: 340px;
    overflow: auto;
    background-color: #FFFFFF;
    color: #1C2410;
}

/* Table. */
.rate-box table {
    width: 100%;
    min-width: 460px;
    border-collapse: collapse;
}

/* Caption for screen readers only (the heading says it). */
.rate-box caption {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* All cells. */
.rate-box th,
.rate-box td {
    padding: 11px 12px;
    text-align: left;
    border-bottom: 1px solid #E8E1D0;
}

/* Header cells stick to the top of the scroll box. */
.rate-box thead th {
    position: sticky;
    top: 0px;
    background-color: #1C2410;
    color: #F7F3EA;
    font-family: Alegreya, serif;
    vertical-align: bottom;
}

/* Months under the season name. */
.rate-box thead span {
    display: block;
    font-family: "Alegreya Sans", sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    color: #D9C7A0;
}

/* Summer column tinted sand. */
.rate-box td:last-child {
    background-color: #FBF3E0;
    font-weight: 700;
}

/* ----- Nearby (class) ----- */

/* Section spacing. */
.nearby {
    padding: 56px 20px;
}

/* Drive list. */
.drive {
    list-style: none;
    margin: 22px 0px;
    max-width: 640px;
}

/* One row: place, dotted leader, time. */
.drive li {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 6px 0px;
}

/* The place name grows and draws the dotted leader. */
.drive span {
    flex-grow: 1;
    border-bottom: 2px dotted #A39C82;
}

/* Drive time in amber. */
.drive strong {
    font-family: Alegreya, serif;
    color: #9A4508;
    white-space: nowrap;
}

/* Porch swing photo. */
.nearby img {
    width: 100%;
    height: 260px;
    object-fit: cover;
}

/* ----- Stay form (class) ----- */

/* Pine band. */
.stay {
    background-color: #1C2410;
    color: #F7F3EA;
    padding: 56px 20px;
}

/* Sand link on dark. */
.stay a {
    color: #E8C77C;
}

/* Form fields wrap. */
.stay-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px;
    margin-top: 20px;
}

/* One field takes the full row on phones. */
.stay-form div {
    flex: 1 1 100%;
}

/* Labels. */
.stay-form label {
    display: block;
    font-weight: 700;
    margin-bottom: 4px;
}

/* Inputs and select. */
.stay-form input,
.stay-form select {
    width: 100%;
    padding: 10px;
    border: none;
    font-family: "Alegreya Sans", sans-serif;
    font-size: 1rem;
    background-color: #FFFFFF;
}

/* Phone line. */
.call {
    margin-top: 16px;
}

/* ----- Footer (class) ----- */

/* Footer continues the pine color. */
.site-footer {
    background-color: #1C2410;
    color: #D9C7A0;
    text-align: center;
    font-size: 0.85rem;
    padding: 0px 20px 24px 20px;
}

/* ----- Small tablets (576px and up) ----- */

@media (min-width: 576px) {

    /* Two form fields per row. */
    .stay-form div {
        flex: 1 1 40%;
    }

    /* The hero text card gets narrower. */
    .hero-text {
        right: auto;
        max-width: 480px;
    }
}

/* ----- Tablets (768px and up) ----- */

@media (min-width: 768px) {

    /* More side padding. */
    .cabins,
    #rates,
    .nearby,
    .stay {
        padding-left: 40px;
        padding-right: 40px;
    }

    /* Wide hero photo (the picture element now loads the wide image). */
    .hero img {
        height: 560px;
    }

    /* Hero card moves up and in. */
    .hero-text {
        left: 40px;
        bottom: 40px;
        padding: 30px;
    }

    /* Drive list and photo side by side. */
    .nearby {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        column-gap: 40px;
    }

    /* Heading row. */
    .nearby h2 {
        flex: 1 1 100%;
    }

    /* List column. */
    .drive {
        flex: 1 1 50%;
    }

    /* Photo column. */
    .nearby img {
        flex: 1 1 40%;
        width: auto;
    }
}

/* ----- Laptops (992px and up) ----- */

@media (min-width: 992px) {

    /* No Menu button on desktop. */
    .menu-icon {
        display: none;
    }

    /* Nav in the header row. */
    .site-nav {
        display: block;
        width: auto;
    }

    /* Links in a row. */
    .site-nav ul {
        display: flex;
        gap: 26px;
        padding-top: 0px;
    }

    /* No dividers on desktop. */
    .site-nav a {
        border-top: none;
    }

    /* Taller hero. */
    .hero img {
        height: 640px;
    }

    /* Rates text and table side by side. */
    #rates {
        flex-direction: row;
        align-items: flex-start;
        gap: 40px;
    }

    /* Text column. */
    .rates-text {
        flex: 1 1 35%;
    }

    /* Table column. */
    .rate-box {
        flex: 1 1 60%;
    }

    /* Form fields in one row with the button at the end. */
    .stay-form div {
        flex: 1 1 15%;
    }
}

/* ----- Wide screens (1200px and up) ----- */

@media (min-width: 1200px) {

    /* Center content at 1140px. */
    .header-inner,
    .cabins,
    #rates,
    .nearby,
    .stay {
        padding-left: calc((100% - 1140px) / 2);
        padding-right: calc((100% - 1140px) / 2);
    }

    /* Hero card lines up with the content. */
    .hero-text {
        left: calc((100% - 1140px) / 2);
    }
}
