/*
    Name:       Joseph Medeiros
    Business:   Medeiros Web Design
    Date:       November 12, 2026
    Project:    Concept Site - Dog-Eared Books (fictional business)
    Filename:   styles.css

    Layout plan: mobile-first, warm paper and old-library type. The hero
    opens with a shelf of book spines: one flex row of spans, each given
    its own height, width and color with :nth-child() so no two neighbors
    match, and their titles set with writing-mode: vertical-rl and turned
    180 degrees so they read bottom to top, like real spines.
    Staff picks are lined index cards (a repeating-linear-gradient makes
    the ruled lines) with a dog-eared top corner made by a ::after
    triangle. Event dates look like tear-off calendar pages, and the book
    club uses the native <progress> element, restyled. Media queries at
    576px, 768px, 992px and 1200px, in ascending order.

    Colors (WebAIM checked, AA):
      #1F1410 ink   #7C2D12 rust (9.5:1 on white)   #1E3A8A navy (10.4:1)
      #FBF6EC paper   #5C4F45 muted
*/

/* ----- Browser reset (universal) ----- */

/* border-box sizing and zero default spacing. */
* {
    box-sizing: border-box;
    margin: 0px;
    padding: 0px;
}

/* ----- Page defaults (element) ----- */

/* Paper page with ink text. */
body {
    background-color: #FBF6EC;
    color: #1F1410;
    font-family: "Libre Franklin", sans-serif;
    font-size: 1rem;
    line-height: 1.65;
}

/* Responsive images. */
img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Bookish serif headings. */
h1,
h2,
h3 {
    font-family: "Libre Caslon Text", serif;
    font-weight: 700;
    line-height: 1.15;
}

/* Section titles. */
h2 {
    font-size: clamp(1.9rem, 4vw, 2.7rem);
    margin-bottom: 8px;
}

/* Italic words in rust. */
h1 em,
.logo em {
    font-weight: 400;
    color: #7C2D12;
}

/* Navy links. */
a {
    color: #1E3A8A;
    font-weight: 600;
}

/* Rust focus ring. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
.menu-check:focus-visible + .menu-icon {
    outline: 3px solid #7C2D12;
    outline-offset: 3px;
}

/* Lead text. */
.lead {
    color: #5C4F45;
    max-width: 40rem;
    margin-bottom: 26px;
}

/* Small notes. */
.small {
    font-size: 0.85rem;
    color: #5C4F45;
    margin-top: 16px;
}

/* ----- Header (class) ----- */

/* Sticky paper header with a double rule. */
.site-header {
    position: sticky;
    top: 0px;
    z-index: 20;
    background-color: #FBF6EC;
    border-bottom: 4px double #7C2D12;
}

/* Logo and menu row. */
.header-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
}

/* Serif logo. */
.logo {
    font-family: "Libre Caslon Text", serif;
    font-weight: 700;
    font-size: 1.5rem;
}

/* Hidden menu checkbox, still keyboard reachable. */
.menu-check {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

/* Menu button. */
.menu-icon {
    border: 1px solid #1F1410;
    padding: 4px 12px;
    cursor: pointer;
}

/* Nav hidden on phones until opened. */
.site-nav {
    display: none;
    width: 100%;
}

/* Checked menu shows the 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: #1F1410;
    font-weight: 400;
    text-decoration: none;
    padding: 9px 0px;
    border-top: 1px solid #E8DCC6;
}

/* Rust underline on hover. */
.site-nav a:hover {
    text-decoration: underline;
    text-decoration-color: #7C2D12;
}

/* Concept notice. */
.concept-note {
    background-color: #F1E6D2;
    font-size: 0.8rem;
    text-align: center;
    padding: 3px 16px;
}

/* ----- Hero shelf (class) ----- */

/* Hero spacing. */
.hero {
    padding: 36px 20px 56px 20px;
}

/* The shelf: spines in a row standing on a wooden board. */
.shelf {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 150px;
    overflow: hidden;
    border-bottom: 14px solid #7C4A22;
    padding: 0px 8px;
    margin-bottom: 36px;
}

/* A spine: vertical title reading bottom to top, colored band near the top. */
.spine {
    flex: 0 0 34px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #7C2D12;
    color: #FBF6EC;
    border-radius: 3px 3px 0px 0px;
    font-family: "Libre Caslon Text", serif;
    font-size: 0.7rem;
    white-space: nowrap;
    letter-spacing: 0.04em;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    background-image: linear-gradient(0deg, transparent 10%, rgba(251, 246, 236, 0.35) 10%, rgba(251, 246, 236, 0.35) 13%, transparent 13%);
}

/* Every second spine: navy and taller. */
.spine:nth-child(2n) {
    background-color: #1E3A8A;
    height: 136px;
}

/* Every third spine: green and wider. */
.spine:nth-child(3n) {
    background-color: #365314;
    flex-basis: 44px;
    height: 110px;
}

/* Every fourth spine: cream with dark text. */
.spine:nth-child(4n) {
    background-color: #E8D5B0;
    color: #1F1410;
    height: 128px;
}

/* Every fifth spine: dark and thin, leaning. */
.spine:nth-child(5n) {
    background-color: #1F1410;
    flex-basis: 26px;
    height: 118px;
    transform: rotate(174deg);
    margin-left: 6px;
}

/* Every seventh spine: mustard. */
.spine:nth-child(7n) {
    background-color: #A16207;
    height: 140px;
}

/* Text and photo stack on phones. */
.hero-row {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* Headline. */
.hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    margin-bottom: 14px;
}

/* Hero paragraph. */
.hero-text p {
    max-width: 32rem;
    margin-bottom: 22px;
}

/* Hero photo. */
.hero-row img {
    width: 100%;
    height: 280px;
    object-fit: cover;
}

/* Rust button. */
.button,
button {
    display: inline-block;
    background-color: #7C2D12;
    color: #FFFFFF;
    border: none;
    padding: 11px 22px;
    font-family: "Libre Franklin", sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

/* Navy on hover. */
.button:hover,
button:hover {
    background-color: #1E3A8A;
}

/* ----- Staff picks (ID and class) ----- */

/* Section on a cork-colored band. */
#picks {
    background-color: #E9DCC3;
    padding: 56px 20px;
}

/* Cards wrap. */
.talkers {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

/* An index card with ruled lines and room for the folded corner. */
.talker {
    position: relative;
    flex: 1 1 100%;
    background-color: #FFFEF8;
    background-image: repeating-linear-gradient(180deg, transparent 0px, transparent 27px, #BFD3EA 27px, #BFD3EA 28px);
    background-position: 0px 52px;
    border-top: 3px solid #E57373;
    padding: 16px 20px 18px 20px;
    box-shadow: 2px 4px 10px rgba(31, 20, 16, 0.18);
}

/* Odd cards tilt left. */
.talker:nth-child(odd) {
    transform: rotate(-1.2deg);
}

/* Even cards tilt right. */
.talker:nth-child(even) {
    transform: rotate(1deg);
}

/* Dog-eared corner: a triangle in the page color covers the corner,
   and its shadow side looks like the folded flap. */
.talker::after {
    content: "";
    position: absolute;
    top: -3px;
    right: 0px;
    width: 34px;
    height: 34px;
    background-image: linear-gradient(225deg, #E9DCC3 50%, #E2D4B4 50%, #D2C09A 100%);
    box-shadow: -2px 2px 3px rgba(31, 20, 16, 0.15);
}

/* Genre label. */
.genre {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #7C2D12;
}

/* Book title. */
.talker h3 {
    font-size: 1.35rem;
    margin: 4px 0px 6px 0px;
}

/* Handwritten-style note in italic serif. */
.note {
    font-family: "Libre Caslon Text", serif;
    font-style: italic;
    line-height: 28px;
}

/* Who picked it. */
.by {
    font-size: 0.85rem;
    color: #5C4F45;
    margin-top: 8px;
}

/* ----- Events (class) ----- */

/* Text and photo stack on phones. */
.events {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 56px 20px;
}

/* Event list. */
.event-list {
    list-style: none;
    margin-top: 16px;
}

/* Date page beside the event text. */
.event-list li {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: 14px 0px;
    border-bottom: 1px dashed #C9B79A;
}

/* Tear-off calendar page. */
.date {
    flex: 0 0 74px;
    text-align: center;
    background-color: #FFFFFF;
    border: 1px solid #C9B79A;
    box-shadow: 0px 3px 0px #E8DCC6, 0px 6px 0px #D8C8AA;
}

/* Month band at the top with a perforated edge. */
.mon {
    display: block;
    background-color: #7C2D12;
    color: #FFFFFF;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 2px 0px;
    border-bottom: 3px dotted #FBF6EC;
}

/* Big day number. */
.day {
    display: block;
    font-family: "Libre Caslon Text", serif;
    font-weight: 700;
    font-size: 2rem;
    line-height: 1.4;
}

/* Event title. */
.event-list h3 {
    font-size: 1.2rem;
}

/* Reader photo. */
.events > img {
    width: 100%;
    height: 280px;
    object-fit: cover;
}

/* ----- Book club (class) ----- */

/* Navy band. */
.club {
    background-color: #1E3A8A;
    color: #FBF6EC;
    padding: 56px 20px;
}

/* Lead text is light on navy. */
.club .lead {
    color: #DBE3F5;
}

/* Progress labels and bars. */
.progress-rows {
    max-width: 640px;
}

/* Each label above its bar. */
.progress-rows label {
    display: block;
    margin-top: 14px;
}

/* Restyled progress bar. */
progress {
    display: block;
    width: 100%;
    height: 16px;
    border: 2px solid #FBF6EC;
    background-color: #142A66;
    margin-top: 4px;
    appearance: none;
}

/* Track in WebKit browsers. */
progress::-webkit-progress-bar {
    background-color: #142A66;
}

/* Filled part in WebKit browsers. */
progress::-webkit-progress-value {
    background-color: #E8D5B0;
}

/* Filled part in Firefox. */
progress::-moz-progress-bar {
    background-color: #E8D5B0;
}

/* Join form in a row that wraps. */
.club-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
    margin-top: 30px;
}

/* Label full width. */
.club-form label {
    flex: 1 1 100%;
    font-weight: 600;
}

/* Email field. */
.club-form input {
    flex: 1 1 220px;
    font: inherit;
    padding: 10px 12px;
    border: none;
}

/* Cream button on navy. */
.club-form button {
    background-color: #E8D5B0;
    color: #1F1410;
}

/* Hover on navy. */
.club-form button:hover {
    background-color: #FFFFFF;
}

/* Focus ring is light on navy. */
.club-form input:focus-visible,
.club-form button:focus-visible {
    outline-color: #E8D5B0;
}

/* ----- Visit (class) ----- */

/* Photos and text stack on phones. */
.visit {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 56px 20px;
}

/* Two photos side by side. */
.visit-photos {
    display: flex;
    gap: 10px;
}

/* Each photo half. */
.visit-photos img {
    width: 50%;
    height: 220px;
    object-fit: cover;
}

/* Hours table. */
.hours {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0px 18px 0px;
}

/* Caption. */
.hours caption {
    text-align: left;
    font-weight: 600;
    color: #5C4F45;
    padding-bottom: 6px;
}

/* Cells with dotted leaders under them. */
.hours th,
.hours td {
    text-align: left;
    padding: 8px 0px;
    border-bottom: 1px dotted #A8957A;
}

/* Days in regular weight. */
.hours th {
    font-weight: 400;
}

/* Times at the right. */
.hours td {
    text-align: right;
    font-weight: 600;
}

/* ----- Footer (class) ----- */

/* Footer. */
.site-footer {
    background-color: #1F1410;
    color: #DDD0BC;
    font-size: 0.85rem;
    text-align: center;
    padding: 24px 16px;
}

/* ----- Small tablets (576px and up) ----- */

@media (min-width: 576px) {

    /* Two cards per row. */
    .talker {
        flex: 1 1 40%;
    }

    /* Taller shelf. */
    .shelf {
        height: 170px;
    }

    /* Taller spines. */
    .spine {
        height: 140px;
    }
}

/* ----- Tablets (768px and up) ----- */

@media (min-width: 768px) {

    /* More side padding. */
    .hero,
    #picks,
    .events,
    .club,
    .visit {
        padding-left: 40px;
        padding-right: 40px;
    }

    /* Events beside the photo. */
    .events {
        flex-direction: row;
        align-items: center;
        gap: 40px;
    }

    /* Events column. */
    .events-text {
        flex: 1 1 55%;
    }

    /* Photo column. */
    .events > img {
        width: 45%;
        height: 420px;
    }

    /* Photos beside the hours. */
    .visit {
        flex-direction: row;
        align-items: center;
        gap: 40px;
    }

    /* Photos column. */
    .visit-photos {
        flex: 1 1 55%;
    }

    /* Hours column. */
    .visit-text {
        flex: 1 1 45%;
    }

    /* Taller visit photos. */
    .visit-photos img {
        height: 320px;
    }
}

/* ----- Laptops (992px and up) ----- */

@media (min-width: 992px) {

    /* No Menu button. */
    .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: 24px;
        padding-top: 0px;
    }

    /* No dividers on desktop. */
    .site-nav a {
        border-top: none;
    }

    /* Hero text beside the photo. */
    .hero-row {
        flex-direction: row;
        align-items: center;
        gap: 50px;
    }

    /* Text column. */
    .hero-text {
        flex: 1 1 50%;
    }

    /* Photo column. */
    .hero-row img {
        width: 50%;
        height: 380px;
    }

    /* Four cards in a row. */
    .talker {
        flex: 1 1 20%;
    }
}

/* ----- Wide screens (1200px and up) ----- */

@media (min-width: 1200px) {

    /* Center content at 1140px. */
    .header-inner,
    .hero,
    #picks,
    .events,
    .club,
    .visit {
        padding-left: calc((100% - 1140px) / 2);
        padding-right: calc((100% - 1140px) / 2);
    }
}
