/*
    Name:       Joseph Medeiros
    Business:   Medeiros Web Design
    Date:       November 11, 2026
    Project:    Concept Site - Switchback Coffee House (fictional business)
    Filename:   styles.css

    Layout plan: mobile-first, cozy cafe. Round hero photo with a tilted
    sticker (position absolute + transform rotate). The drinks menu flows
    through CSS columns like a printed menu, with dotted leaders made from
    a border. The brew guide is a sideways row that uses scroll-snap so
    each card lands neatly. Roast level dots and the punch card are styled
    list items. Media queries at 576px, 768px, 992px and 1200px.

    Colors (WebAIM checked, AA):
      #24170F espresso   #6F4E37 coffee   #A14F05 amber (darker than
      #D97706 so text passes on cream)   #F6EFE6 cream   #6B5A4C muted
*/

/* ----- Browser reset (universal) ----- */

/* border-box sizing and zero default spacing. */
* {
    box-sizing: border-box;
    margin: 0px;
    padding: 0px;
}

/* ----- Page defaults (element) ----- */

/* Cream page with espresso text. */
body {
    background-color: #F6EFE6;
    color: #24170F;
    font-family: "DM Sans", sans-serif;
    font-size: 1.05rem;
    line-height: 1.6;
}

/* Responsive images. */
img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Display serif headings. */
h1,
h2,
h3 {
    font-family: "DM Serif Display", serif;
    font-weight: 400;
    line-height: 1.05;
}

/* Section titles. */
h2 {
    font-size: clamp(2.2rem, 4.5vw, 3.4rem);
}

/* Amber links. */
a {
    color: #A14F05;
    font-weight: 700;
}

/* Amber focus ring. */
a:focus-visible,
button:focus-visible,
.brew-row:focus-visible,
.menu-check:focus-visible + .menu-icon {
    outline: 3px solid #A14F05;
    outline-offset: 3px;
}

/* Muted intro text. */
.lead {
    color: #6B5A4C;
    margin: 8px 0px 26px 0px;
}

/* ----- Header (class) ----- */

/* Espresso header. */
.site-header {
    background-color: #24170F;
    color: #F6EFE6;
}

/* Logo and menu in a row. */
.header-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
}

/* Serif logo. */
.logo {
    font-family: "DM Serif Display", serif;
    font-size: 1.8rem;
    line-height: 1;
}

/* Small caps second line. */
.logo small {
    display: block;
    font-family: "DM Sans", sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #E8B77A;
}

/* 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 #E8B77A;
    color: #F6EFE6;
    border-radius: 999px;
    padding: 6px 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: #F6EFE6;
    font-weight: 600;
    text-decoration: none;
    padding: 9px 0px;
    border-top: 1px solid #4A3426;
}

/* Gold on hover. */
.site-nav a:hover {
    color: #E8B77A;
}

/* Concept notice. */
.concept-note {
    background-color: #6F4E37;
    font-size: 0.85rem;
    text-align: center;
    padding: 4px 16px;
}

/* ----- Hero (class) ----- */

/* Phone hero stacks. */
.hero {
    display: flex;
    flex-direction: column;
    gap: 34px;
    padding: 44px 20px 56px 20px;
}

/* Small uppercase line above the headline. */
.kicker {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.8rem;
    font-weight: 700;
    color: #A14F05;
    margin-bottom: 10px;
}

/* Headline. */
.hero h1 {
    font-size: clamp(3rem, 9vw, 5.6rem);
    margin-bottom: 18px;
}

/* Italic amber part of the headline. */
.hero h1 em {
    color: #6F4E37;
}

/* Hero paragraph. */
.hero-text > p {
    max-width: 30rem;
    margin-bottom: 22px;
}

/* Rounded espresso button. */
.button {
    display: inline-block;
    background-color: #24170F;
    color: #F6EFE6;
    border-radius: 999px;
    padding: 13px 26px;
    text-decoration: none;
}

/* Coffee brown on hover. */
.button:hover {
    background-color: #6F4E37;
}

/* Photo wrapper is the parent for the sticker. */
.hero-photo {
    position: relative;
    max-width: 440px;
    margin: 0px auto;
}

/* The photo is cropped to a circle. */
.hero-photo img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    border: 10px solid #FFFFFF;
}

/* Round sticker tilted over the edge of the photo. */
.sticker {
    position: absolute;
    right: 0px;
    bottom: 10px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: #24170F;
    color: #F6EFE6;
    text-align: center;
    font-size: 0.8rem;
    line-height: 1.2;
    padding-top: 34px;
    transform: rotate(-12deg);
}

/* Bold second line on the sticker. */
.sticker strong {
    display: block;
    color: #E8B77A;
    font-size: 0.95rem;
}

/* ----- Drinks menu (class) ----- */

/* White band. */
.drinks {
    background-color: #FFFFFF;
    padding: 56px 20px;
}

/* One column on phones; more columns at larger sizes. */
.menu-columns {
    column-count: 1;
    column-gap: 48px;
    column-rule: 1px solid #E7DCCF;
}

/* A drink group never splits between columns. */
.menu-group {
    break-inside: avoid;
    margin-bottom: 26px;
}

/* Group title with a short amber underline. */
.menu-group h3 {
    font-size: 1.6rem;
    border-bottom: 3px solid #A14F05;
    display: inline-block;
    margin-bottom: 8px;
}

/* One drink row: name, dotted leader, price. */
.menu-group dl div {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 5px 0px;
}

/* Drink name. */
.menu-group dt {
    font-weight: 600;
}

/* Price pushed right, with a dotted line on its left edge. */
.menu-group dd {
    flex: 1 1 auto;
    text-align: right;
    border-bottom: 2px dotted #C9B8A6;
    white-space: nowrap;
    color: #6F4E37;
    font-weight: 700;
}

/* Latte photo under the menu. */
.latte {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 26px;
}

/* ----- Brew guide (ID and class) ----- */

/* Coffee-brown band. */
#brew {
    background-color: #6F4E37;
    color: #FFFFFF;
    padding: 56px 0px 56px 20px;
}

/* Light intro text. */
#brew .lead {
    color: #F1E3D3;
}

/* The row scrolls sideways and snaps each card into place. */
.brew-row {
    list-style: none;
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 4px 20px 18px 0px;
}

/* One card. flex-shrink 0 keeps the cards from squeezing. */
.brew-card {
    flex: 0 0 240px;
    scroll-snap-align: start;
    background-color: #F6EFE6;
    color: #24170F;
    border-radius: 16px;
    padding: 22px;
}

/* Brew method name. */
.brew-card h3 {
    font-size: 1.5rem;
}

/* Big ratio number. */
.ratio {
    font-family: "DM Serif Display", serif;
    font-size: 2.6rem;
    color: #A14F05;
    line-height: 1.2;
}

/* ----- Beans (class) ----- */

/* Photo then text on phones. */
.beans {
    display: flex;
    flex-direction: column;
}

/* Bean photo. */
.beans > img {
    width: 100%;
    height: 260px;
    object-fit: cover;
}

/* Text column padding. */
.beans-text {
    padding: 44px 20px;
}

/* Bag list. */
.bags {
    list-style: none;
    margin-top: 20px;
}

/* One bag. */
.bags li {
    border-bottom: 1px solid #E0D2C2;
    padding: 12px 0px;
}

/* Bag name. */
.bags h3 {
    font-size: 1.4rem;
}

/* Roast row: five dots then the words. */
.roast {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-top: 4px;
}

/* One empty dot. */
.roast span {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #6F4E37;
}

/* Light roast fills the first dot. */
.roast-1 span:nth-child(1) {
    background-color: #6F4E37;
}

/* Medium roast fills the first three dots. */
.roast-3 span:nth-child(-n+3) {
    background-color: #6F4E37;
}

/* Dark roast fills all five dots. */
.roast-5 span {
    background-color: #6F4E37;
}

/* Note under the bags. */
.note {
    margin-top: 14px;
    color: #6B5A4C;
}

/* ----- Visit (class) ----- */

/* Espresso band. */
.visit {
    display: flex;
    flex-direction: column;
    gap: 30px;
    background-color: #24170F;
    color: #F6EFE6;
    padding: 56px 20px;
}

/* Gold link on dark. */
.visit a {
    color: #E8B77A;
}

/* Hours table. */
.hours table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0px;
}

/* Table caption as a label. */
.hours caption {
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.8rem;
    font-weight: 700;
    color: #E8B77A;
    padding-bottom: 6px;
}

/* Table cells. */
.hours th,
.hours td {
    text-align: left;
    padding: 8px 0px;
    border-bottom: 1px solid #4A3426;
}

/* Day names. */
.hours th {
    font-weight: 600;
}

/* Times on the right. */
.hours td {
    text-align: right;
}

/* Punch card looks like a paper card. */
.punch {
    background-color: #F6EFE6;
    color: #24170F;
    border-radius: 12px;
    padding: 22px;
    max-width: 420px;
}

/* Card title. */
.punch h3 {
    font-size: 1.6rem;
}

/* The holes wrap in rows. */
.holes {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

/* One hole, drawn as a dashed circle with its number. */
.holes li {
    width: 48px;
    height: 48px;
    line-height: 44px;
    text-align: center;
    border: 2px dashed #6F4E37;
    border-radius: 50%;
    font-weight: 700;
}

/* Punched holes are filled in. */
.holes .punched {
    background-color: #6F4E37;
    border-style: solid;
    color: #FFFFFF;
}

/* The free drink spot. */
.holes .free {
    background-color: #A14F05;
    border-color: #A14F05;
    color: #FFFFFF;
    font-size: 0.8rem;
}

/* Barista photo. */
.barista {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 12px;
}

/* ----- Footer (class) ----- */

/* Footer. */
.site-footer {
    text-align: center;
    font-size: 0.85rem;
    color: #6B5A4C;
    padding: 22px 20px;
}

/* ----- Small tablets (576px and up) ----- */

@media (min-width: 576px) {

    /* Menu in two columns. */
    .menu-columns {
        column-count: 2;
    }

    /* Wider brew cards. */
    .brew-card {
        flex: 0 0 270px;
    }
}

/* ----- Tablets (768px and up) ----- */

@media (min-width: 768px) {

    /* More side padding. */
    .hero,
    .drinks,
    .visit {
        padding-left: 40px;
        padding-right: 40px;
    }

    /* Brew band keeps its right edge open for the scroll row. */
    #brew {
        padding-left: 40px;
    }

    /* Beans photo and text side by side. */
    .beans {
        flex-direction: row;
    }

    /* Photo fills its half top to bottom. */
    .beans > img {
        width: 45%;
        height: auto;
    }

    /* Text takes the other half. */
    .beans-text {
        flex: 1 1 55%;
        padding: 56px 40px;
    }

    /* Hours and punch card side by side, photo below. */
    .visit {
        flex-direction: row;
        flex-wrap: wrap;
    }

    /* Hours and punch card each about half. */
    .hours,
    .punch {
        flex: 1 1 40%;
    }
}

/* ----- 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;
    }

    /* Hero text and round photo side by side. */
    .hero {
        flex-direction: row;
        align-items: center;
        gap: 60px;
        padding-top: 70px;
        padding-bottom: 80px;
    }

    /* Text column. */
    .hero-text {
        flex: 1 1 55%;
    }

    /* Photo column. */
    .hero-photo {
        flex: 1 1 40%;
    }

    /* Bigger sticker. */
    .sticker {
        width: 140px;
        height: 140px;
        padding-top: 42px;
        font-size: 0.9rem;
    }

    /* Menu columns on the left, latte photo floated right. */
    .latte {
        float: right;
        width: 34%;
        height: 420px;
        margin: 0px 0px 10px 40px;
    }

    /* Contain the float. */
    .drinks {
        display: flow-root;
    }

    /* Hours, punch card and photo in one row. */
    .hours,
    .punch,
    .barista {
        flex: 1 1 28%;
    }

    /* Photo matches the row height. */
    .barista {
        height: auto;
        min-height: 300px;
    }
}

/* ----- Wide screens (1200px and up) ----- */

@media (min-width: 1200px) {

    /* Center content at 1140px. */
    .header-inner,
    .hero,
    .drinks,
    .visit {
        padding-left: calc((100% - 1140px) / 2);
        padding-right: calc((100% - 1140px) / 2);
    }

    /* Brew row starts in line with the content. */
    #brew {
        padding-left: calc((100% - 1140px) / 2);
    }
}
