/* Young's Storage. Colors come from a storage yard: galvanized siding,
   a painted roll-up door, the yellow of a parking stop. */

:root {
    --galv: #E7EAEB;       /* page: galvanized siding */
    --panel: #FFFFFF;
    --door: #17506A;       /* painted roll-up door; header, headings, links */
    --door-deep: #0F3A4E;
    --stop: #F2B705;       /* parking-stop yellow: the call button only */
    --ink: #1B2327;        /* asphalt; body text */
    --concrete: #8B9599;   /* rules and the apron, never text */

    --font-display: "Big Shoulders Display", "Arial Narrow", "Helvetica Neue", sans-serif;
    --font-body: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", Verdana, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 1rem; }

body {
    margin: 0;
    background: var(--galv);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1.1875rem;   /* 19px: the readers skew older */
    line-height: 1.55;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--door); text-underline-offset: 0.15em; }
a:hover { color: var(--door-deep); }
:focus-visible { outline: 3px solid var(--stop); outline-offset: 3px; }

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 900;
    line-height: 1.02;
    color: var(--door);
    margin: 0 0 0.4em;
    text-wrap: balance;
}
h1 { font-size: clamp(3rem, 8.5vw, 6rem); letter-spacing: -0.005em; }
h2 { font-size: clamp(2.25rem, 5vw, 3.375rem); }
h3 { font-size: 1.9rem; font-weight: 700; }
p { margin: 0 0 1em; max-width: 62ch; }

.container { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }

.skip-link { position: absolute; left: -999rem; }
.skip-link:focus { left: 1rem; top: 1rem; background: var(--panel); padding: 0.5rem 1rem; z-index: 10; }

/* --- buttons --- */

.button {
    display: inline-block;
    font: 700 1.1875rem/1.2 var(--font-body);
    padding: 0.8rem 1.4rem;
    border: 3px solid var(--door);
    border-radius: 4px;
    background: var(--door);
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}
.button:hover { background: var(--door-deep); border-color: var(--door-deep); color: #fff; }
.button--quiet { background: transparent; color: var(--door); }
.button--quiet:hover { background: var(--door); color: #fff; }
.button--call { background: var(--stop); border-color: var(--stop); color: var(--ink); }
.button--call:hover { background: #FFCB2E; border-color: #FFCB2E; color: var(--ink); }

/* --- header --- */

.top { background: var(--door); color: #fff; }
.top__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 2rem;
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
}
.wordmark {
    font: 900 2.1rem/1 var(--font-display);
    color: #fff;
    text-decoration: none;
    margin-right: auto;
}
.wordmark:hover { color: #fff; }
.top__nav { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; margin: 0; padding: 0; }
.top__nav a { color: #fff; text-decoration: none; padding: 0.4rem 0; display: inline-block; }
.top__nav a:hover, .top__nav a[aria-current] { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--stop); }
.top .button--call { padding: 0.55rem 1rem; }

/* --- hero --- */

.hero { padding: clamp(2rem, 6vw, 4.5rem) 0 0; }
.hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: clamp(1.5rem, 4vw, 4rem);
    align-items: end;
}
.hero__text { padding-bottom: clamp(2rem, 6vw, 4.5rem); }
.lede { font-size: 1.4rem; line-height: 1.45; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.hero__photo { margin: 0 0 clamp(2rem, 6vw, 4.5rem); }
.hero__photo img { width: 100%; max-height: 34rem; object-fit: cover; border-radius: 4px; }

/* Drawn row of units, shown until a real photo is chosen. The middle door
   rolls up once on load. */
.units__wall {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5%;
    padding: 9% 5% 0;
    background: var(--panel);
    border-top: 0.9rem solid var(--concrete);   /* roof edge */
}
.unit { position: relative; aspect-ratio: 5 / 6; overflow: hidden; background: var(--door-deep); }
.unit__door {
    position: absolute;
    inset: 0;
    /* horizontal slats of a roll-up door */
    background: repeating-linear-gradient(
        to bottom,
        var(--door) 0 0.62rem,
        var(--door-deep) 0.62rem 0.72rem
    );
}
.unit__door::after {           /* latch */
    content: "";
    position: absolute;
    bottom: 7%;
    left: 50%;
    width: 22%;
    height: 0.45rem;
    translate: -50% 0;
    background: var(--galv);
    border-radius: 2px;
}
.unit__inside {
    position: absolute;
    inset: 0;
    background:
        /* stacked boxes */
        linear-gradient(#C9A26B, #C9A26B) 18% 100% / 34% 22% no-repeat,
        linear-gradient(#B58D58, #B58D58) 62% 100% / 30% 30% no-repeat,
        linear-gradient(#D4B07C, #D4B07C) 24% 72% / 24% 16% no-repeat,
        #0A2836;
}
.unit--open .unit__door { translate: 0 -68%; animation: roll-up 1.4s 0.4s cubic-bezier(0.3, 0, 0.2, 1) backwards; }
@keyframes roll-up { from { translate: 0 0; } }
.units__apron { height: 1.4rem; background: var(--concrete); }

/* --- sections --- */

.offer { background: var(--panel); padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.offer__list { list-style: none; margin: 0 0 1.5rem; padding: 0; border-top: 3px solid var(--door); }
.offer__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
    gap: 0.25rem 2rem;
    padding: 1.4rem 0;
    border-bottom: 1px solid var(--concrete);
}
.offer__row h3 { margin: 0; }
.offer__body p:last-child { margin-bottom: 0; }
.offer__detail { font-weight: 700; }

.find { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.find__grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.find__photo { margin: 0; }
.find__photo img { width: 100%; border-radius: 4px; }
.find__photo figcaption { font-size: 1rem; margin-top: 0.5rem; }
.find__facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.5rem 2.5rem; }
.find__facts dt { font-weight: 700; }
.find__facts dd { margin: 0; font-size: 1.4rem; line-height: 1.4; }
.find__facts dd a, .find__note { font-size: 1.1875rem; }

.photos { padding: clamp(2rem, 5vw, 3.5rem) 0; }
.photos__grid { list-style: none; margin: 0; padding: 0; columns: 3 16rem; column-gap: 1rem; }
.photos__grid li { break-inside: avoid; margin-bottom: 1rem; }
.photos__grid img { width: 100%; border-radius: 4px; }
.photos__grid p { margin: 0.35rem 0 0; font-size: 1rem; }

/* --- footer --- */

.foot { background: var(--ink); color: #fff; padding: 2rem 0; }
.foot__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; }
.foot a { color: #fff; }
.foot p { margin: 0; }
.foot__name { font: 900 1.6rem/1.1 var(--font-display); margin-bottom: 0.4rem !important; }
.foot__login { font-size: 1rem; }

.flash { background: var(--panel); border-left: 0.5rem solid var(--stop); padding: 0.8rem 1rem; margin: 1.25rem 0 0; max-width: none; }

/* --- owner admin (plain on purpose) --- */

.admin { max-width: 46rem; margin: 0 auto; padding: 2rem 1.25rem 3rem; }
.admin h1 { font-size: 3rem; }
.admin h2 { font-size: 2.25rem; margin-top: 2.5rem; }
.admin__menu { list-style: none; padding: 0; margin: 1.5rem 0; }
.admin__menu li { background: var(--panel); padding: 1rem 1.25rem; margin-bottom: 0.75rem; border-left: 0.5rem solid var(--door); }
.admin__menu a { display: block; font-weight: 700; font-size: 1.4rem; }
.admin__item { background: var(--panel); padding: 0.25rem 1.25rem 1.25rem; margin-bottom: 1rem; }
.admin__item--photo { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 1.25rem; padding-top: 1.25rem; }
.admin__item--photo img { width: 100%; border-radius: 4px; }

form.stacked label { display: block; margin: 1rem 0 0.3rem; font-weight: 700; }
form.stacked label.check { font-weight: 400; }
form.stacked input:not([type=checkbox]):not([type=file]),
form.stacked textarea {
    width: 100%;
    padding: 0.6rem 0.7rem;
    font: inherit;
    color: var(--ink);
    background: #fff;
    border: 2px solid var(--concrete);
    border-radius: 4px;
}
form.stacked input[type=checkbox] { width: 1.2rem; height: 1.2rem; vertical-align: -0.15em; margin-right: 0.4rem; }
form.stacked input[type=file] { font: inherit; }
.hint { font-size: 1rem; margin: 0.3rem 0 0; }

/* --- small screens --- */

@media (max-width: 46rem) {
    .hero__grid { grid-template-columns: 1fr; }
    .hero__text { padding-bottom: 0; }
    .offer__row { grid-template-columns: 1fr; }
    .find__grid { grid-template-columns: 1fr; }
    .wordmark { width: 100%; }
    .admin__item--photo { grid-template-columns: 1fr; }
    .admin__item--photo img { max-width: 12rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .unit--open .unit__door { animation: none; }
}
