/*
    Name:       Joseph Medeiros
    Business:   Medeiros Web Design
    Date:       November 12, 2026
    Project:    Concept Site - Turnkey Locksmith (fictional business)
    Filename:   styles.css

    Theme: keys and pins. The header is a brass key lying on its
    side: a round bow with a hole on the left, and the blade's teeth
    cut along the bottom edge with clip-path. The hero photo is seen
    through a keyhole cut into a brass door plate (clip-path polygon
    with a round top). Services hang as key tags on a pegboard (a
    radial-gradient dot grid), each tag with a split ring. The
    signature explains rekeying with two drawn lock cylinders: five
    pins at different heights before and after. The footer is a
    brushed steel strike plate with two screw holes.

    Mobile-first; media queries at 576px, 768px, 992px and 1200px.

    Colors (WebAIM contrast checked, AA):
      #1A1305 text on #FFFBEB page (18.3:1)
      #8D5606 brass text (6.3:1 on the page)
      #FFFFFF on #A16207 brass buttons (5.0:1)
      #FFFFFF on #1F2937 charcoal (14.7:1)
      #1A1305 on #E9C46A light brass (11.2:1)
*/

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

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

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

/* Warm cream page. */
body {
    background-color: #FFFBEB;
    color: #1A1305;
    font-family: "IBM Plex Sans", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
}

/* Photos never spill out. */
img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Squared technical headings. */
h1,
h2,
h3 {
    font-family: "Chakra Petch", Arial, sans-serif;
    font-weight: 700;
    line-height: 1.08;
}

/* Section titles. */
h2 {
    font-size: clamp(1.7rem, 4.5vw, 2.6rem);
    color: #8D5606;
    margin-bottom: 12px;
}

/* Links in brass. */
a {
    color: #8D5606;
}

/* Charcoal outline for keyboard users. */
a:focus-visible,
button:focus-visible,
.menu-check:focus-visible + .key-row .menu-icon {
    outline: 3px solid #1F2937;
    outline-offset: 3px;
}

/* ----- Key header (class) ----- */

/* Brass blade with teeth cut along the bottom. */
.key {
    position: relative;
    background-image: linear-gradient(180deg, #E9C46A 0%, #C99A2E 55%, #A16207 100%);
    padding: 14px 16px 30px 16px;
    clip-path: polygon(0% 0%, 100% 0%, 100% 70%, 96% 100%, 92% 76%, 88% 100%, 84% 82%, 80% 100%, 74% 74%, 70% 100%, 66% 84%, 62% 100%, 56% 78%, 52% 100%, 0% 100%);
}

/* Hidden checkbox that keeps focus. */
.menu-check {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

/* Bow and menu in a row. */
.key-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* The bow: the round end of the key with the name on it. */
.bow {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: "Chakra Petch", Arial, sans-serif;
    font-weight: 700;
    font-size: 1.6rem;
    color: #1A1305;
}

/* Second word lighter. */
.bow span:last-child {
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

/* Hole in the bow for the key ring. */
.bow-hole {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #FFFBEB;
    border: 5px solid #8D5606;
}

/* Menu button. */
.menu-icon {
    background-color: #1F2937;
    color: #FFFFFF;
    font-weight: 600;
    padding: 4px 12px;
    cursor: pointer;
}

/* Nav hidden on phones until opened. */
.blade {
    display: none;
}

/* Open menu shows the nav. */
.menu-check:checked ~ .blade {
    display: block;
}

/* Nav list. */
.blade ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 10px;
}

/* Nav links. */
.blade a {
    color: #1A1305;
    font-weight: 600;
    text-decoration: none;
}

/* Underline on hover. */
.blade a:hover {
    text-decoration: underline;
}

/* ----- Concept note (class) ----- */

/* Small note. */
.concept {
    font-size: 0.8rem;
    padding: 6px 16px;
}

/* ----- Keyhole hero (class) ----- */

/* Plate then words on phones. */
.keyhole-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 26px;
    padding: 24px 16px 60px 16px;
}

/* Brass door plate around the keyhole. */
.plate {
    background-image: linear-gradient(135deg, #E9C46A, #A16207);
    border-radius: 24px;
    padding: 26px 40px;
}

/* Photo cut into a keyhole: round top, flared slot below. */
.plate img {
    width: 240px;
    height: 360px;
    object-fit: cover;
    clip-path: polygon(30% 38%, 22% 30%, 18% 20%, 20% 10%, 30% 3%, 42% 0%, 58% 0%, 70% 3%, 80% 10%, 82% 20%, 78% 30%, 70% 38%, 82% 100%, 18% 100%);
}

/* Words. */
.kh-text {
    max-width: 560px;
}

/* Headline. */
.kh-text h1 {
    font-size: clamp(2.2rem, 6vw, 3.8rem);
    margin-bottom: 14px;
}

/* Hero paragraph. */
.kh-text p {
    margin-bottom: 22px;
}

/* Brass button with a notched right end like a key tip. */
.brass-btn,
button {
    display: inline-block;
    background-color: #A16207;
    color: #FFFFFF;
    font-family: "Chakra Petch", Arial, sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    text-decoration: none;
    border: none;
    padding: 12px 34px 12px 22px;
    clip-path: polygon(0% 0%, 88% 0%, 100% 50%, 88% 100%, 0% 100%);
    cursor: pointer;
}

/* Button hover. */
.brass-btn:hover,
button:hover {
    background-color: #1F2937;
}

/* ----- Key board (ID) ----- */

/* Pegboard: tan board with rows of holes. */
#board {
    background-color: #D9C49A;
    background-image: radial-gradient(circle, #8C7650 0px, #8C7650 3px, transparent 4px);
    background-size: 26px 26px;
    padding: 56px 16px;
}

/* Title on a strip so it reads over the holes. */
#board h2 {
    display: inline-block;
    background-color: #FFFBEB;
    padding: 4px 14px;
}

/* Key tags hang in a row and wrap. */
.pegs {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 22px 16px;
    margin-top: 10px;
}

/* One tag: a rounded tag with a hole at the top. */
.ktag {
    position: relative;
    flex: 1 1 100%;
    background-color: #FFFBEB;
    border: 3px solid #A16207;
    border-radius: 40px 40px 10px 10px;
    padding: 46px 18px 18px 18px;
    text-align: center;
}

/* Split ring at the top of the tag. */
.ring {
    position: absolute;
    top: -14px;
    left: 50%;
    width: 30px;
    height: 30px;
    margin-left: -15px;
    border: 4px solid #6B7280;
    border-radius: 50%;
}

/* Tag hole under the ring. */
.ktag::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 50%;
    width: 14px;
    height: 14px;
    margin-left: -7px;
    border-radius: 50%;
    background-color: #D9C49A;
    border: 2px solid #A16207;
}

/* Tag title. */
.ktag h3 {
    font-size: 1.3rem;
    margin-bottom: 4px;
}

/* Price on the tag. */
.cost {
    margin-top: 8px;
    font-family: "Chakra Petch", Arial, sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: #8D5606;
}

/* ----- Pin diagram (class) ----- */

/* Section spacing. */
.pins {
    padding: 56px 16px;
}

/* Intro text. */
.intro {
    max-width: 44rem;
    margin-bottom: 24px;
}

/* Two cylinders stack on phones. */
.cylinders {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 26px;
}

/* One cylinder figure. */
.cyl {
    background-color: #1F2937;
    color: #FFFFFF;
    border-radius: 12px;
    padding: 20px;
}

/* Lock housing with a shear line across the middle. */
.pin-row {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 160px;
    background-image: linear-gradient(180deg, transparent 49%, #E9C46A 49%, #E9C46A 51%, transparent 51%);
    border: 2px solid #6B7280;
    border-radius: 8px;
    padding: 0px 10px;
}

/* One pin: brass bottom pin topped by a steel driver pin. */
.pin {
    width: 22px;
    height: var(--h);
    background-image: linear-gradient(180deg, #9CA3AF 0%, #9CA3AF 30%, #E9C46A 30%, #E9C46A 100%);
    border-radius: 11px 11px 0px 0px;
}

/* Pin heights. */
.h30 {
    --h: 30%;
}

/* Pin height 35. */
.h35 {
    --h: 35%;
}

/* Pin height 40. */
.h40 {
    --h: 40%;
}

/* Pin height 45. */
.h45 {
    --h: 45%;
}

/* Pin height 50. */
.h50 {
    --h: 50%;
}

/* Pin height 55. */
.h55 {
    --h: 55%;
}

/* Pin height 60. */
.h60 {
    --h: 60%;
}

/* Pin height 65. */
.h65 {
    --h: 65%;
}

/* Pin height 70. */
.h70 {
    --h: 70%;
}

/* New-pins cylinder: brass border to set it apart. */
.new {
    border: 3px solid #E9C46A;
}

/* Caption under each cylinder. */
.cyl figcaption {
    margin-top: 10px;
    font-weight: 600;
}

/* Two photos. */
.pin-photos {
    display: flex;
    gap: 10px;
}

/* Each photo. */
.pin-photos img {
    width: 50%;
    height: 220px;
    object-fit: cover;
}

/* ----- Locked out (class) ----- */

/* Charcoal band; photo then call box. */
.locked {
    display: flex;
    flex-direction: column;
    gap: 24px;
    background-color: #1F2937;
    color: #FFFFFF;
    padding: 56px 16px;
}

/* Padlock photo. */
.locked img {
    height: 260px;
    object-fit: cover;
}

/* Title in light brass on charcoal. */
.locked h2 {
    color: #E9C46A;
}

/* Big phone number. */
.phone {
    font-family: "Chakra Petch", Arial, sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 7vw, 3rem);
}

/* Phone link white. */
.phone a {
    color: #FFFFFF;
}

/* Call-back form box. */
.cb-form fieldset {
    border: 2px solid #E9C46A;
    padding: 18px;
    margin-top: 18px;
}

/* Form title. */
.cb-form legend {
    padding: 0px 8px;
    font-weight: 600;
}

/* Labels. */
.cb-form label {
    display: block;
    margin-top: 10px;
}

/* Inputs. */
.cb-form input {
    width: 100%;
    font-family: "IBM Plex Sans", Arial, sans-serif;
    font-size: 1rem;
    padding: 9px;
    border: none;
}

/* Submit spacing. */
.cb-form button {
    margin-top: 16px;
}

/* ----- Strike plate footer (class) ----- */

/* Brushed steel with two screw holes. */
.strike {
    background-color: #D1D5DB;
    background-image: radial-gradient(circle at 24px 50%, #4B5563 0px, #4B5563 6px, transparent 7px), radial-gradient(circle at calc(100% - 24px) 50%, #4B5563 0px, #4B5563 6px, transparent 7px), repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.35) 0px, rgba(255, 255, 255, 0.35) 1px, transparent 1px, transparent 3px);
    color: #1A1305;
    font-size: 0.82rem;
    text-align: center;
    padding: 26px 50px;
}

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

@media (min-width: 576px) {

    /* Two tags per row. */
    .ktag {
        flex: 1 1 45%;
    }
}

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

@media (min-width: 768px) {

    /* Keyhole beside the words. */
    .keyhole-hero {
        flex-direction: row;
        justify-content: center;
        gap: 50px;
    }

    /* Cylinders side by side. */
    .cylinders {
        flex-direction: row;
    }

    /* Each cylinder. */
    .cyl {
        flex: 1 1 50%;
    }

    /* Photo beside the call box. */
    .locked {
        flex-direction: row;
        align-items: center;
    }

    /* Each half. */
    .locked img,
    .call-box {
        width: 50%;
    }

    /* Taller photo. */
    .locked img {
        height: 440px;
    }
}

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

@media (min-width: 992px) {

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

    /* Bow left, nav along the blade. */
    .key {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 16px 40px 34px 40px;
        clip-path: polygon(0% 0%, 100% 0%, 100% 70%, 98% 100%, 96% 76%, 94% 100%, 92% 82%, 90% 100%, 87% 74%, 85% 100%, 83% 84%, 81% 100%, 78% 78%, 76% 100%, 0% 100%);
    }

    /* Nav always shown. */
    .blade {
        display: block;
        padding-right: 26%;
    }

    /* Nav in a row. */
    .blade ul {
        flex-direction: row;
        gap: 26px;
        padding-top: 0px;
    }

    /* Bigger keyhole. */
    .plate img {
        width: 300px;
        height: 450px;
    }

    /* Five tags in a row. */
    .ktag {
        flex: 1 1 17%;
    }

    /* Wider sections. */
    #board,
    .pins,
    .locked {
        padding-left: 40px;
        padding-right: 40px;
    }
}

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

@media (min-width: 1200px) {

    /* Content in a 1140px column. */
    #board,
    .pins,
    .locked {
        padding-left: calc((100% - 1140px) / 2);
        padding-right: calc((100% - 1140px) / 2);
    }
}
