/*
    Name:       Joseph Medeiros
    Business:   Medeiros Web Design
    Date:       November 12, 2026
    Project:    Concept Site - Plank & Tile Flooring (fictional business)
    Filename:   styles.css

    Layout plan: mobile-first, warm showroom feel with a serif headline
    font. Each install pattern (straight, diagonal, chevron, stacked tile)
    is drawn with layered linear-gradients, no images. The compare table
    has rating bars made with a hard-stop gradient, and the number is
    always written next to the bar. The free-sample form counts the boxes
    you check with CSS counters: every input:checked increments a counter
    that a paragraph after the boxes prints with ::before. Media queries
    at 576px, 768px, 992px and 1200px, in ascending order.

    Colors (WebAIM checked, AA):
      #1C140D espresso text   #78350F walnut (9.4:1 on white)
      #0F766E teal accent (5.5:1)   #FAF6F0 cream   #57534E 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: #FAF6F0;
    color: #1C140D;
    font-family: Figtree, sans-serif;
    font-size: 1.02rem;
    line-height: 1.65;
}

/* Responsive images. */
img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Serif headings. */
h1,
h2 {
    font-family: "Libre Baskerville", serif;
    font-weight: 700;
    line-height: 1.2;
}

/* Section titles. */
h2 {
    font-size: clamp(1.6rem, 3.4vw, 2.4rem);
    margin-bottom: 10px;
}

/* Italic accents in the walnut color. */
h1 em,
.logo em {
    font-weight: 400;
    color: #78350F;
}

/* Walnut links. */
a {
    color: #78350F;
    font-weight: 600;
}

/* Teal focus ring. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
.menu-check:focus-visible + .menu-icon {
    outline: 3px solid #0F766E;
    outline-offset: 3px;
}

/* Lead text. */
.lead {
    color: #57534E;
    max-width: 40rem;
    margin-bottom: 26px;
}

/* ----- Header (class) ----- */

/* Sticky cream header with a plank-colored bottom edge. */
.site-header {
    position: sticky;
    top: 0px;
    z-index: 20;
    background-color: #FAF6F0;
    border-bottom: 4px solid #78350F;
}

/* 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 Baskerville", serif;
    font-weight: 700;
    font-size: 1.35rem;
}

/* Small caps line under the logo. */
.logo small {
    display: block;
    font-family: Figtree, sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #57534E;
}

/* Hidden menu checkbox, still keyboard reachable. */
.menu-check {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

/* Menu button. */
.menu-icon {
    border: 2px solid #78350F;
    color: #78350F;
    font-weight: 600;
    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: #1C140D;
    text-decoration: none;
    padding: 9px 0px;
    border-top: 1px solid #E7DCCB;
}

/* Walnut on hover. */
.site-nav a:hover {
    color: #78350F;
}

/* Concept notice. */
.concept-note {
    background-color: #F1E8DA;
    font-size: 0.8rem;
    text-align: center;
    padding: 3px 16px;
}

/* ----- Hero (class) ----- */

/* Text then photo on phones. */
.hero {
    display: flex;
    flex-direction: column;
}

/* Hero text area. */
.hero-text {
    padding: 44px 20px 36px 20px;
}

/* Small label over the headline. */
.kicker {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #0F766E;
    margin-bottom: 12px;
}

/* Headline. */
.hero h1 {
    font-size: clamp(2rem, 5.4vw, 3.4rem);
    margin-bottom: 16px;
}

/* Hero paragraph. */
.hero-text p:not(.kicker) {
    max-width: 32rem;
    margin-bottom: 22px;
}

/* Photo sits on a strip of planks drawn with gradients. */
.hero > img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-bottom: 18px solid #78350F;
}

/* Walnut button. */
.button,
button {
    display: inline-block;
    background-color: #78350F;
    color: #FFFFFF;
    border: 2px solid #78350F;
    padding: 11px 24px;
    font-family: Figtree, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

/* Teal on hover. */
.button:hover,
button:hover {
    background-color: #0F766E;
    border-color: #0F766E;
}

/* Light button for the dark band. */
.button-light {
    background-color: #FAF6F0;
    color: #1C140D;
    border-color: #FAF6F0;
}

/* ----- Patterns (ID and class) ----- */

/* Section with a plank texture band on top. */
#patterns {
    padding: 56px 20px;
    background-color: #FFFFFF;
}

/* Swatches wrap. */
.swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
}

/* Each swatch is a full row on phones. */
.swatch {
    flex: 1 1 100%;
}

/* Texture square. */
.tex {
    height: 180px;
    border: 1px solid #A8A29E;
    margin-bottom: 10px;
}

/* Straight boards: rows every 24px, end joints every 120px. */
.straight {
    background-color: #B07440;
    background-image:
        repeating-linear-gradient(90deg, transparent 0px, transparent 118px, #5C2E0E 118px, #5C2E0E 120px),
        repeating-linear-gradient(0deg, #B07440 0px, #B07440 22px, #5C2E0E 22px, #5C2E0E 24px);
}

/* Diagonal: the same boards turned 45 degrees. */
.diagonal {
    background-color: #C08552;
    background-image: repeating-linear-gradient(45deg, #C08552 0px, #C08552 20px, #6B3A16 20px, #6B3A16 22px, #A86B39 22px, #A86B39 42px, #6B3A16 42px, #6B3A16 44px);
}

/* Chevron: four triangles per tile make the zigzag. */
.chevron {
    background-color: #C9915C;
    background-image:
        linear-gradient(135deg, #8B5A2B 25%, transparent 25%),
        linear-gradient(225deg, #8B5A2B 25%, transparent 25%),
        linear-gradient(315deg, #8B5A2B 25%, transparent 25%),
        linear-gradient(45deg, #8B5A2B 25%, transparent 25%);
    background-position: -20px 0px, -20px 0px, 0px 0px, 0px 0px;
    background-size: 40px 40px;
}

/* Stacked tile with grout lines. */
.tile {
    background-color: #E7E5E4;
    background-image:
        repeating-linear-gradient(90deg, transparent 0px, transparent 58px, #A8A29E 58px, #A8A29E 60px),
        repeating-linear-gradient(0deg, transparent 0px, transparent 58px, #A8A29E 58px, #A8A29E 60px);
}

/* Caption text. */
.swatch figcaption {
    font-size: 0.95rem;
}

/* Pattern name on its own line. */
.swatch strong {
    display: block;
    font-family: "Libre Baskerville", serif;
    font-size: 1.1rem;
}

/* ----- Compare (class) ----- */

/* Text and table stack on phones. */
.compare {
    display: flex;
    flex-direction: column;
    gap: 26px;
    padding: 56px 20px;
}

/* Installer photo. */
.compare-text img {
    margin-top: 18px;
    height: 220px;
    width: 100%;
    object-fit: cover;
}

/* Ratings table. */
.ratings {
    width: 100%;
    border-collapse: collapse;
    background-color: #FFFFFF;
    font-size: 0.92rem;
}

/* Caption. */
.ratings caption {
    text-align: left;
    color: #57534E;
    padding-bottom: 8px;
}

/* Cells. */
.ratings th,
.ratings td {
    text-align: left;
    padding: 10px 5px;
    border-bottom: 1px solid #E7DCCB;
}

/* Header row in walnut. */
.ratings thead th {
    background-color: #78350F;
    color: #FFFFFF;
}

/* Rating track: a 50px bar beside the number. */
.bar {
    display: inline-block;
    width: 36px;
    height: 10px;
    vertical-align: middle;
    margin-right: 4px;
    background-color: #E7E5E4;
    border: 1px solid #A8A29E;
}

/* 1 of 5 filled. */
.r1 {
    background-image: linear-gradient(90deg, #0F766E 20%, transparent 20%);
}

/* 2 of 5 filled. */
.r2 {
    background-image: linear-gradient(90deg, #0F766E 40%, transparent 40%);
}

/* 3 of 5 filled. */
.r3 {
    background-image: linear-gradient(90deg, #0F766E 60%, transparent 60%);
}

/* 4 of 5 filled. */
.r4 {
    background-image: linear-gradient(90deg, #0F766E 80%, transparent 80%);
}

/* 5 of 5 filled. */
.r5 {
    background-color: #0F766E;
}

/* ----- Samples (class) ----- */

/* Pale teal band. */
.samples {
    background-color: #ECF6F4;
    padding: 56px 20px;
}

/* Sample checkboxes wrap; the counter starts at zero here. */
.sample-grid {
    border: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    counter-reset: picked;
}

/* Legend. */
.sample-grid legend {
    font-weight: 600;
    margin-bottom: 10px;
}

/* Checkboxes hidden but focusable. */
.sample-grid input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

/* Every checked box adds one to the counter. */
.sample-grid input:checked {
    counter-increment: picked;
}

/* Each sample is a white tag. */
.sample-grid label {
    flex: 1 1 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #FFFFFF;
    border: 2px solid #D6D3D1;
    padding: 10px 12px;
    cursor: pointer;
}

/* Picked tags get a teal border and a check. */
.sample-grid input:checked + label {
    border-color: #0F766E;
    font-weight: 600;
}

/* Check mark after a picked sample. */
.sample-grid input:checked + label::after {
    content: "\2713";
    margin-left: auto;
    color: #0F766E;
}

/* Keyboard focus on a sample. */
.sample-grid input:focus-visible + label {
    outline: 3px solid #0F766E;
    outline-offset: 2px;
}

/* Color chip for each sample. */
.chip {
    flex: 0 0 34px;
    height: 34px;
    border: 1px solid #A8A29E;
}

/* White oak chip. */
.oak {
    background-image: repeating-linear-gradient(100deg, #D9B98A 0px, #D9B98A 6px, #C9A574 6px, #C9A574 8px);
}

/* Hickory chip. */
.hickory {
    background-image: repeating-linear-gradient(100deg, #A0612B 0px, #A0612B 5px, #7C4A22 5px, #7C4A22 8px);
}

/* Driftwood gray chip. */
.gray {
    background-image: repeating-linear-gradient(100deg, #A8A29E 0px, #A8A29E 6px, #8C8681 6px, #8C8681 8px);
}

/* Walnut chip. */
.walnut {
    background-image: repeating-linear-gradient(100deg, #5C3A21 0px, #5C3A21 6px, #3F2716 6px, #3F2716 8px);
}

/* Slate chip. */
.slate {
    background-color: #44403C;
}

/* Marble chip with a vein. */
.marble {
    background-color: #F5F5F4;
    background-image: linear-gradient(120deg, transparent 45%, #A8A29E 47%, transparent 50%);
}

/* Oatmeal carpet chip with dots. */
.oat {
    background-color: #D6C7A8;
    background-image: radial-gradient(#BFAE8B 1px, transparent 1.5px);
    background-size: 4px 4px;
}

/* Blue carpet chip with dots. */
.navy {
    background-color: #1E3A5F;
    background-image: radial-gradient(#2F5584 1px, transparent 1.5px);
    background-size: 4px 4px;
}

/* Running total printed from the counter. */
.bag-count {
    flex: 1 1 100%;
    font-family: "Libre Baskerville", serif;
    font-size: 1.15rem;
    padding-top: 8px;
}

/* The count itself, in a teal circle. */
.bag-count::before {
    content: counter(picked);
    display: inline-block;
    width: 38px;
    height: 38px;
    line-height: 38px;
    text-align: center;
    border-radius: 50%;
    background-color: #0F766E;
    color: #FFFFFF;
    margin-right: 10px;
}

/* Name field and button. */
.pickup {
    margin-top: 18px;
}

/* Label above the field. */
.pickup label {
    display: block;
    font-weight: 600;
}

/* Name field. */
.pickup input {
    width: 100%;
    max-width: 360px;
    font: inherit;
    padding: 10px 12px;
    border: 2px solid #A8A29E;
    margin: 4px 12px 12px 0px;
}

/* ----- Measure (class) ----- */

/* Room drawing and text stack on phones. */
.measure {
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 70px 20px 56px 20px;
}

/* The room is a box with plank lines; dimensions sit on its edges. */
.room {
    position: relative;
    height: 220px;
    margin: 20px 10px 0px 34px;
    border: 5px solid #1C140D;
    background-color: #E9D2B4;
    background-image: repeating-linear-gradient(0deg, transparent 0px, transparent 20px, #C9A574 20px, #C9A574 21px);
}

/* A dimension label. */
.dim {
    position: absolute;
    font-weight: 600;
    background-color: #FAF6F0;
    padding: 0px 6px;
}

/* Width along the top edge with a line through it. */
.dim-w {
    top: -36px;
    left: 0px;
    right: 0px;
    text-align: center;
    border-bottom: 2px solid #0F766E;
    background-color: transparent;
}

/* Length turned sideways along the left edge. */
.dim-l {
    top: 50%;
    left: -46px;
    transform: rotate(-90deg);
}

/* Room name in the middle. */
.room-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #FFFFFF;
    border: 2px solid #1C140D;
    padding: 6px 14px;
    text-align: center;
    font-family: "Libre Baskerville", serif;
}

/* Measure steps. */
.measure-text ol {
    padding-left: 22px;
    margin: 12px 0px 20px 0px;
}

/* Spacing between steps. */
.measure-text li {
    padding: 4px 0px;
}

/* ----- Visit band (class) ----- */

/* Photo behind a dark overlay with text on top. */
.visit {
    position: relative;
    color: #FFFFFF;
}

/* Carpet photo fills the band. */
.visit img {
    width: 100%;
    height: 340px;
    object-fit: cover;
}

/* Text sits over the photo on a dark panel. */
.visit-text {
    position: absolute;
    left: 0px;
    right: 0px;
    bottom: 0px;
    background-color: rgba(28, 20, 13, 0.85);
    padding: 26px 20px;
}

/* Paragraph spacing. */
.visit-text p {
    margin-bottom: 16px;
}

/* ----- Footer (class) ----- */

/* Footer. */
.site-footer {
    background-color: #1C140D;
    color: #D6CFC4;
    font-size: 0.85rem;
    text-align: center;
    padding: 24px 16px;
}

/* ----- Small tablets (576px and up) ----- */

@media (min-width: 576px) {

    /* Two swatches per row. */
    .swatch {
        flex: 1 1 40%;
    }

    /* Two samples per row. */
    .sample-grid label {
        flex: 1 1 40%;
    }

    /* Taller hero photo. */
    .hero > img {
        height: 380px;
    }
}

/* ----- Tablets (768px and up) ----- */

@media (min-width: 768px) {

    /* More side padding. */
    .hero-text,
    #patterns,
    .compare,
    .samples,
    .measure {
        padding-left: 40px;
        padding-right: 40px;
    }

    /* Table cells keep bar and number on one line once there's room. */
    .ratings td {
        white-space: nowrap;
        padding: 12px 10px;
    }

    /* Room drawing beside the steps. */
    .measure {
        flex-direction: row;
        align-items: flex-start;
    }

    /* Drawing column. */
    .room {
        flex: 1 1 45%;
        margin-top: 40px;
    }

    /* Steps column. */
    .measure-text {
        flex: 1 1 55%;
    }

    /* Visit text box on the left over the photo. */
    .visit-text {
        right: auto;
        bottom: 40px;
        left: 40px;
        width: 420px;
    }

    /* Taller carpet photo. */
    .visit img {
        height: 420px;
    }
}

/* ----- 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 left, photo right, full height. */
    .hero {
        flex-direction: row;
        align-items: stretch;
    }

    /* Text column. */
    .hero-text {
        flex: 1 1 48%;
        padding-top: 90px;
        padding-bottom: 90px;
        align-self: center;
    }

    /* Photo column. */
    .hero > img {
        width: 52%;
        height: auto;
        min-height: 560px;
    }

    /* Four swatches in a row. */
    .swatch {
        flex: 1 1 20%;
    }

    /* Compare text beside the table. */
    .compare {
        flex-direction: row;
        align-items: center;
        gap: 50px;
    }

    /* Text column. */
    .compare-text {
        flex: 1 1 38%;
    }

    /* Table column. */
    .ratings {
        flex: 1 1 62%;
        font-size: 1rem;
    }

    /* Four samples per row. */
    .sample-grid label {
        flex: 1 1 22%;
    }
}

/* ----- Wide screens (1200px and up) ----- */

@media (min-width: 1200px) {

    /* Center content at 1140px. */
    .header-inner,
    #patterns,
    .compare,
    .samples,
    .measure {
        padding-left: calc((100% - 1140px) / 2);
        padding-right: calc((100% - 1140px) / 2);
    }

    /* Hero text starts at the content edge. */
    .hero-text {
        padding-left: calc((100% - 1140px) / 2);
        padding-right: 50px;
    }
}
