/* ============================================================
   Motie Design Studio — interior design one-pager
   Fonts: Roboto (headings), Open Sans (body), Caveat (polaroid captions).
   Colors: dark section #423f3e, body text #666, headings #333.
   ============================================================ */

:root {
    --dark: #423f3e;
    --dark-soft: #4d4a49;
    --text: #666666;
    --heading: #333333;
    --line: #e3e1df;
    --white: #ffffff;
    --nav-h: 82px;
    --shadow: 0 8px 30px rgba(0,0,0,.08);
    --hand: 'Caveat', cursive;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scrollbar-gutter: stable; }

body {
    font-family: 'Open Sans', Arial, sans-serif;
    font-weight: 300;
    font-size: 16px;
    line-height: 1.75;
    color: var(--text);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    /* Full-bleed blocks use 100vw, which includes the scrollbar, so on browsers
       with classic scrollbars the document ends up ~8px wider than the viewport.
       clip (not hidden) drops that without creating a scroll container, so the
       fixed header and smooth scrolling keep working. It has to be on body:
       overflow on html propagates to the viewport and does nothing here. */
    overflow-x: clip;
}

img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container { width: min(1180px, 92%); margin: 0 auto; }

section[id], footer[id] { scroll-margin-top: 100px; }

/* ---------- Fixed navigation ---------- */
#site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    transition: background-color .35s ease, box-shadow .35s ease;
}

#site-header.scrolled {
    background: #000;
    box-shadow: 0 2px 18px rgba(0,0,0,.35);
}

/* While the page is scrolled only the logo remains: a black chip around it, the
   rest of the bar (and the header itself) transparent. Stays that way scrolling
   in either direction — the nav links only return at the top of the page. */
#mainNav, .nav-toggle { transition: opacity .3s ease; }

#site-header.nav-hidden {
    background: transparent;
    box-shadow: none;
}

/* The links leave the tab order as well as the screen — opacity alone keeps
   them focusable. */
#site-header.nav-hidden #mainNav {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .3s ease, visibility 0s linear .3s;
}

/* The hamburger is the only route into the menu on a phone, so it stays put:
   scrolling mid-page must not strand the visitor without navigation. */
#site-header.nav-hidden .nav-toggle {
    opacity: 1;
    pointer-events: auto;
}

/* 22px of black around the wordmark; negative left margin keeps it in place,
   align-self pins the box to the very top of the viewport (no strip above it) */
#site-header.nav-hidden .brand {
    background: #000;
    padding: 22px;
    margin-left: -22px;
    align-self: flex-start;
}

.nav-wrap {
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
}

.brand {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 1.45rem;
    letter-spacing: .18em;
    color: var(--white);
    text-transform: uppercase;
    line-height: 1.2;
    white-space: nowrap;
    transition: background-color .3s ease;
}

.brand span {
    display: block;
    font-size: .62rem;
    font-weight: 300;
    letter-spacing: .34em;
    opacity: .85;
}

#mainNav ul {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

#mainNav a {
    font-size: 15px;
    font-weight: 300;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--white);
    padding: .4rem 0;
    position: relative;
    white-space: nowrap;
    transition: opacity .25s ease;
}

#mainNav a::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 100%; height: 1px;
    background: var(--white);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s ease;
}

#mainNav a:hover { opacity: .9; }
#mainNav a:hover::after { transform: scaleX(1); }

.nav-toggle {
    display: none;
    background: none;
    border: 0;
    cursor: pointer;
    width: 34px; height: 30px;
    flex-direction: column;
    justify-content: space-between;
    padding: 4px 0;
}

.nav-toggle span {
    height: 2px;
    background: var(--white);
    transition: transform .3s ease, opacity .3s ease;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ---------- Hero carousel ---------- */
.hero {
    position: relative;
    height: min(760px, 100vh);
    min-height: 520px;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
}

.hero-slides, .hero-slide { position: absolute; inset: 0; }

.hero-slide {
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease;
    will-change: opacity, transform;
}

/* Each slide enters with its own Ken Burns direction */
.hero-slide.active {
    opacity: 1;
    animation: heroMotion 9s cubic-bezier(.25, .65, .35, 1) forwards;
}

.hero-slide:nth-child(1) { transform-origin: 22% 62%; }
.hero-slide:nth-child(2) { transform-origin: 78% 38%; }
.hero-slide:nth-child(3) { transform-origin: 50% 80%; }

@keyframes heroMotion {
    from { transform: scale(1.22) translate3d(0, 0, 0); }
    to   { transform: scale(1.04) translate3d(0, -1.5%, 0); }
}

/* gradient: contrasty dark top-right corner fading down to transparent */
.hero-slides::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(242deg, rgba(0,0,0,.82) 0%, rgba(0,0,0,.42) 34%, rgba(0,0,0,0) 66%),
        linear-gradient(rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 42%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: calc(var(--nav-h) + 2.6rem) 6% 0;
    text-align: right;
    width: 100%;
}

.hero-content h1 {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: clamp(1.9rem, 3.7vw, 3.15rem);
    line-height: 1.12;
    max-width: 15ch;
    margin-left: auto;
    text-transform: uppercase;
    color: var(--white);
    letter-spacing: 0;
    text-shadow: 0 1px 2px rgba(0,0,0,.75), 0 6px 26px rgba(0,0,0,.5);
}

/* ---------- Section headings ---------- */
.section-heading {
    font-family: 'Roboto', sans-serif;
    font-weight: 100;
    font-size: clamp(1.8rem, 3.1vw, 2.4rem);
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--heading);
    text-align: center;
    margin-bottom: 2.6rem;
}

.dark-section .section-heading { color: var(--white); }

.overline {
    font-family: 'Roboto', sans-serif;
    font-size: .95rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: .3em;
    color: #cfc7c0;
    margin-bottom: .9rem;
}

.center-overline {
    font-family: 'Roboto', sans-serif;
    font-size: .9rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: .32em;
    text-align: center;
    /* 5.2:1 on white and 4.6:1 on the cream section: the old #a09890 was
       2.5-2.8:1, under the 4.5:1 floor for 14px text. */
    color: #746b63;
    margin-bottom: .5rem;
}

/* ---------- Light / dark sections ---------- */
.dark-section {
    background: var(--dark);
    color: #d9d6d4;
    padding: clamp(2.5rem, 6vh, 5.5rem) 0;
}

.section-light {
    background: var(--white);
    padding: clamp(2.5rem, 6vh, 5.5rem) 0;
}

/* ---------- Category cards ("Ką projektuojame") ---------- */
.categories {
    background: #f3f1ee;
    padding: clamp(2.5rem, 6vh, 5.5rem) 0;
}

.categories .section-heading { margin-bottom: 2.8rem; }

.cats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.cat-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    box-shadow: 0 4px 18px rgba(0,0,0,.05);
    overflow: hidden;
}

.cat-card figure {
    margin: 0;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #e6e3df;
}

.cat-card figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cat-body { padding: 1.25rem 1.3rem 1.4rem; }

.cat-body h3 {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 1.02rem;
    line-height: 1.35;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--heading);
}

/* ---------- About us ---------- */
/* About: dark block ends here; the polaroid band below is its own light section */

/* Full-bleed polaroid strip on a white wall — own section so it fits one screen */
.about-band {
    background: var(--white);
    padding: 0 0 clamp(2.5rem, 6vh, 5.5rem);
    /* flow-root: keeps the desk's top margin inside the section instead of
       collapsing out of it (a collapsed margin would show the page background
       as a stripe between the two sections) */
    display: flow-root;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr minmax(260px, 380px);
    gap: clamp(2rem, 6vw, 6rem);
    align-items: center;
}

.about-text { order: 1; }
.about-photo { order: 2; position: relative; }

.about-photo::after {
    content: '';
    position: absolute;
    inset: 18px -18px -18px 18px;
    border: 1px solid rgba(255,255,255,.25);
    z-index: 0;
}

.about-photo img {
    position: relative;
    z-index: 1;
    width: 100%;
    aspect-ratio: 3 / 3.9;
    object-fit: cover;
    box-shadow: var(--shadow);
}

.about-text h2 {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: clamp(1.9rem, 3.2vw, 2.5rem);
    color: var(--white);
    margin-bottom: 1.4rem;
}

.about-text p { margin-bottom: 1.1rem; }

.about-text .about-closing {
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-size: 1.15rem;
    color: #efe9e3;
    margin-top: 1.6rem;
    margin-bottom: 0;
}

.ig-inline {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: var(--white);
    font-size: .95rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255,255,255,.45);
    padding-bottom: .12rem;
    margin-left: .4rem;
    transition: border-color .3s ease, color .3s ease;
}

.ig-inline svg { flex: none; }

.ig-inline:hover { border-color: var(--white); }

/* ---------- Polaroids: loose scattered pile ---------- */
.polaroid-desk {
    margin-top: clamp(0.5rem, 1vw, 0.9rem);
    width: 100vw;
    margin-left: calc(50% - 50vw);
    /* top/bottom padding is what keeps the cards' drop shadows inside the clip:
       14px offset + 30px blur reaches ~44px below a card, so the bottom needs
       more room than the top or overflow:hidden slices the shadow off flat */
    padding: clamp(0.7rem, 1.2vw, 1rem) 0 clamp(4rem, 5.4vw, 4.6rem);
    position: relative;
    overflow: hidden;
}

.polaroid-fan {
    position: relative;
    z-index: 2;
    width: min(1260px, 96%);
    height: clamp(400px, 48vw, 620px);
    margin: 0 auto;
}

.polaroid {
    position: absolute;
    background: #fff;
    padding: clamp(6px, .75vw, 10px) clamp(6px, .75vw, 10px) clamp(5px, .6vw, 8px);
    box-shadow: 0 14px 30px rgba(35,22,10,.45);
    cursor: pointer;
    transition: transform .35s ease, box-shadow .35s ease;
}

.polaroid img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: #ddd;
}

.polaroid span {
    display: block;
    font-family: var(--hand);
    font-size: clamp(0.88rem, 1.45vw, 1.2rem);
    line-height: 1.25;
    color: #3a3835;
    text-align: center;
    padding: .45rem .1rem .15rem;
}

/* Scattered across the full width: left/top taken from the mockup, widths in vw so the
   cards shrink with the viewport, z-index = pile order */
.polaroid.p1  { left: 34%; top: 16%; width: min(18vw, 230px);   transform: rotate(-2deg);  z-index: 6; }
.polaroid.p2  { left: 37%; top: 41%; width: min(14.5vw, 185px); transform: rotate(10deg);  z-index: 11; }
.polaroid.p3  { left: 21%; top: 11%; width: min(14.8vw, 190px); transform: rotate(-12deg); z-index: 4; }
.polaroid.p4  { left: 54%; top: 45%; width: min(15.6vw, 200px); transform: rotate(-16deg); z-index: 10; }
.polaroid.p5  { left: 46%; top: 4%;  width: min(13.7vw, 175px); transform: rotate(-7deg);  z-index: 8; }
.polaroid.p6  { left: 34%; top: 1%;  width: min(14.1vw, 180px); transform: rotate(9deg);   z-index: 7; }
.polaroid.p7  { left: 41%; top: 66%; width: min(14.8vw, 190px); transform: rotate(-5deg);  z-index: 1; }
/* Side cards — fill the width */
.polaroid.p8  { left: 18%; top: 36%; width: min(13.7vw, 175px); transform: rotate(18deg);  z-index: 5; }
.polaroid.p9  { left: 55%; top: 14%; width: min(14.1vw, 180px); transform: rotate(12deg);  z-index: 5; }
.polaroid.p10 { left: 26%; top: 64%; width: min(13.3vw, 170px); transform: rotate(9deg);   z-index: 2; }
.polaroid.p11 { left: 60%; top: 65%; width: min(14.8vw, 190px); transform: rotate(4deg);   z-index: 2; }

.polaroid:hover {
    transform: rotate(0deg) translateY(-8px) scale(1.06);
    box-shadow: 0 26px 48px rgba(35,22,10,.55);
    z-index: 20;
}

@media (max-width: 640px) {
    .polaroid-fan {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.4rem;
        height: auto;
    }
    .polaroid {
        position: static;
        width: auto;
        flex: 0 1 calc(50% - .7rem);
    }
    .polaroid:nth-child(odd) { transform: rotate(-3deg); }
    .polaroid:nth-child(even) { transform: rotate(2deg); }
    .polaroid span { font-size: 1.05rem; }
}

/* ---------- Projects gallery ---------- */
.gallery, .process { border-top: 1px solid var(--line); }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.g-item {
    position: relative;
    margin: 0;
    overflow: hidden;
    background: #ececea;
}

.g-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform .7s ease;
}

.g-item figcaption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 1.4rem 1.1rem .95rem;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: .95rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--white);
    background: linear-gradient(transparent, rgba(0,0,0,.72));
    transform: translateY(8px);
    opacity: 0;
    transition: opacity .4s ease, transform .4s ease;
}

.g-item::after {
    content: '\f067';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    background: rgba(30,26,23,.18);
    opacity: 0;
    transition: opacity .4s ease;
}

.g-item:hover img { transform: scale(1.07); }
.g-item:hover figcaption { opacity: 1; transform: none; }
.g-item:hover::after { opacity: 1; }

/* The cut-off is applied by script.js (two rows, measured from the real column
   count) so that hidden photos are never requested. */

.gallery-more {
    display: flex;
    justify-content: center;
    margin-top: 2.4rem;
}

/* ---------- How we work ---------- */
.process .section-heading { margin-bottom: 3rem; }

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.step {
    position: relative;
    background: var(--white);
    border: 1px solid var(--line);
    padding: 2.1rem 1.7rem 1.6rem;
    transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
    overflow: hidden;
}

.step:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: #cfccc8;
}

.step-num {
    position: absolute;
    top: .2rem;
    right: .9rem;
    font-family: 'Roboto', sans-serif;
    font-weight: 100;
    font-size: 4.2rem;
    line-height: 1;
    color: var(--dark);
    opacity: .09;
    pointer-events: none;
}

.step-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--dark);
    color: var(--white);
    font-size: 1.25rem;
    margin-bottom: 1.15rem;
    transition: background-color .3s ease;
}

.step:hover .step-icon { background: var(--dark-soft); }

.step h3 {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 1.16rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--heading);
    margin-bottom: .5rem;
    position: relative;
}

.step p {
    font-size: .95rem;
    line-height: 1.6;
    margin: 0;
    position: relative;
}

.step-points {
    display: flex;
    flex-wrap: wrap;
    gap: .42rem;
    margin-top: 1rem;
    position: relative;
}

.step-points li {
    font-size: .7rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--text);
    border: 1px solid var(--line);
    padding: .2rem .55rem;
    background: #faf9f7;
}

/* ---------- Contact ---------- */
.contact {
    background: var(--white);
    border-top: 1px solid var(--line);
    padding: clamp(2.5rem, 6vh, 5.5rem) 0 2rem;
}

.contact-intro {
    text-align: center;
    max-width: 720px;
    margin: 0 auto clamp(2.6rem, 5vw, 4rem);
}

.contact-intro h2 {
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-size: clamp(1.7rem, 3.4vw, 2.5rem);
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--heading);
    margin-bottom: .9rem;
}

.contact-intro > p:not(.center-overline) {
    font-size: 1.05rem;
    margin-bottom: 0;
}

.btn-outline {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: .14em;
    padding: .85rem 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    cursor: pointer;
    background: transparent;
    color: var(--heading);
    border: 1px solid #b9b6b3;
    transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}

.btn-outline:hover { border-color: var(--dark); color: var(--dark); }

.contact-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: clamp(2.5rem, 7vw, 6rem);
    align-items: start;
}

.contact-form .field { margin-bottom: 1.05rem; }

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.05rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    font-family: 'Open Sans', sans-serif;
    font-weight: 300;
    font-size: 1rem;
    color: var(--heading);
    background: #f5f4f2;
    border: 1px solid transparent;
    padding: .85rem 1.1rem;
    outline: none;
    resize: vertical;
    transition: border-color .3s ease, background-color .3s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #9b9894; }

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--dark);
    background: var(--white);
}

.btn-submit {
    background: var(--dark);
    color: var(--white);
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 17px;
    text-transform: uppercase;
    letter-spacing: .18em;
    border: 1px solid var(--dark);
    padding: .85rem 2.6rem;
    cursor: pointer;
    transition: background-color .3s ease, color .3s ease;
}

.btn-submit:hover { background: transparent; color: var(--dark); }

.form-status {
    margin-top: .8rem;
    font-size: .95rem;
    color: #5a7d5a;
    min-height: 1.2em;
}

.form-status.error { color: #a4544c; }

/* character counter under the message box */
.char-count {
    display: block;
    margin-top: .35rem;
    text-align: right;
    font-size: .78rem;
    letter-spacing: .02em;
    color: #9b9894;
    font-variant-numeric: tabular-nums;
}

.char-count.near { color: #a4544c; }

.contact-info { display: grid; gap: .95rem; align-content: start; }

.c-block h3 {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .2em;
    color: #75726e;
    margin-bottom: .05rem;
}

.c-block p { color: var(--heading); line-height: 1.5; }
.c-block a:hover { text-decoration: underline; }

.social {
    display: flex;
    gap: .6rem;
    margin-top: .3rem;
}

.social a {
    width: 38px; height: 38px;
    border: 1px solid #b9b6b3;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--heading);
    font-size: .95rem;
    transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}

.social a:hover {
    background: var(--dark);
    border-color: var(--dark);
    color: var(--white);
}

.copyright {
    text-align: center;
    font-size: .9rem;
    margin-top: 2.6rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--line);
    color: #75726e;
}

/* ---------- Reveal animation ---------- */
.reveal {
    opacity: 0;
    transform: translateY(34px);
    transition: opacity .8s ease, transform .8s ease;
}

.reveal.in {
    opacity: 1;
    transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    #mainNav ul { gap: 1.1rem; }
    #mainNav a { font-size: 13.5px; letter-spacing: .03em; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
    .cats-grid { grid-template-columns: repeat(2, 1fr); }
    .steps-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
    .about-grid { grid-template-columns: 1fr; }
    .about-photo { max-width: 380px; margin: 0 auto; }
    .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    /* 44px is the smallest comfortable touch target; the icon stays the same. */
    .nav-toggle { display: flex; width: 44px; height: 44px; justify-content: center; }

    #mainNav {
        position: fixed;
        top: var(--nav-h);
        left: 0;
        right: 0;
        background: rgba(0,0,0,.94);
        transform: translateY(-130%);
        transition: transform .35s ease;
        padding: 1rem 0 1.6rem;
    }

    #mainNav.open { transform: translateY(0); }

    #mainNav ul {
        flex-direction: column;
        gap: 0;
        text-align: center;
    }

    #mainNav li { width: 100%; }
    #mainNav a {
        display: block;
        padding: .8rem 0;
        font-size: 15px;
    }
    #mainNav a::after { display: none; }

    .hero-content h1 { letter-spacing: .01em; }
    .gallery-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .cats-grid { grid-template-columns: 1fr; }
    .steps-grid { grid-template-columns: 1fr; }
    .field-row { grid-template-columns: 1fr; gap: 0; }
    .polaroid { flex-basis: calc(50% - 1.2rem); }
}

/* ---------- Static-site additions (lightbox, form guards) ---------- */

.g-item { cursor: pointer; }

.g-item:focus-visible {
    outline: 2px solid var(--dark);
    outline-offset: 3px;
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.btn-submit:disabled {
    opacity: .6;
    cursor: progress;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    background: rgba(18, 15, 13, .94);
}

.lightbox[hidden] { display: none; }

.lb-figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .9rem;
}

.lb-figure img {
    max-width: min(1100px, 88vw);
    max-height: 82vh;
    object-fit: contain;
    background: #1e1a17;
}

.lb-figure figcaption {
    font-size: .85rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .72);
}

.lightbox button {
    background: none;
    border: 0;
    color: var(--white);
    font-size: 2rem;
    line-height: 1;
    padding: .6rem 1rem;
    cursor: pointer;
    opacity: .65;
    transition: opacity .25s ease;
}

.lightbox button:hover { opacity: 1; }

.lb-close { position: absolute; top: 1rem; right: 1.2rem; font-size: 2.4rem; }

@media (max-width: 640px) {
    .lightbox { padding: 1rem; gap: .25rem; }
    .lightbox button { font-size: 1.5rem; padding: .4rem .5rem; }
    .lb-figure img { max-height: 74vh; }
}
