/* =========================================================
   CRISP Masonry
   Palette taken from the business card + site-sign yellow.
   To switch the yellow to brick red: --yellow: #A8402A; --on-yellow: #fff;
   ========================================================= */
:root {
  --black: #1D1B1C;      /* the card's black */
  --white: #FFFFFF;
  --yellow: #FFC20E;     /* construction yellow */
  --on-yellow: #1D1B1C;
  --mortar: #E6E2DA;     /* mortar joints / section ground */
  --concrete: #6F6B65;   /* secondary text */
  --line: #CFCAC1;
  --red: #B23A24;
  --wrap: 1200px;
  --joint: 10px;         /* mortar joint width in the brick layouts */
  --font: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; font-family: var(--font); font-size: 18px; line-height: 1.55; color: var(--black); background: var(--white); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 500; line-height: 1.08; letter-spacing: -0.015em; }
h2 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h3 { font-size: 1.4rem; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--black); outline-offset: 3px; }
.yellow :focus-visible, .dark :focus-visible { outline-color: var(--white); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .6em; padding: .95em 1.6em; border: 2px solid var(--black); border-radius: 2px; font: 500 1rem/1 var(--font); text-decoration: none; cursor: pointer; background: transparent; color: var(--black); transition: background .15s, color .15s; }
.btn svg { width: 1.1em; height: 1.1em; }
.btn-black { background: var(--black); color: var(--white); }
.btn-black:hover { background: transparent; color: var(--black); }
.btn-line:hover { background: var(--black); color: var(--white); }
.btn-accent { background: var(--yellow); color: var(--on-yellow); border-color: var(--yellow); }
.btn-accent:hover { background: var(--black); border-color: var(--black); color: var(--white); }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 2px solid var(--black); }
.header-inner { display: flex; align-items: center; gap: 28px; height: 70px; }
.brand { display: block; color: var(--black); line-height: 0; }
.brand svg { height: 40px; width: auto; }
.nav { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.nav a { text-decoration: none; font-size: 1rem; }
.nav a:not(.btn):hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.nav .btn { padding: .7em 1.1em; }
.header-phone { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 500; white-space: nowrap; }
.header-phone svg { width: 18px; height: 18px; }
.menu-btn { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--black); }
.menu-btn svg { width: 28px; height: 28px; }
@media (max-width: 980px) {
  .menu-btn { display: block; }
  .header-phone { margin-left: auto; }
  .header-phone span { display: none; }
  .nav { position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; margin: 0; background: var(--white); border-bottom: 2px solid var(--black); padding: 6px 20px 20px; transform: translateY(-110%); visibility: hidden; transition: transform .25s ease, visibility 0s .25s; z-index: -1; }
  .nav.open { transform: none; visibility: visible; transition: transform .25s ease; }
  .nav a { padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
  .nav .btn { margin-top: 16px; padding: 1em; }
}

/* ---------- hero: the logo is the headline ---------- */
.hero { background: var(--yellow); color: var(--on-yellow); padding: clamp(40px, 7vw, 88px) 0 clamp(40px, 6vw, 72px); overflow: hidden; }
.hero-logo { width: 100%; height: auto; display: block; overflow: visible; }
.hero-logo .trowel { transform-box: fill-box; transform-origin: 8% 6%; animation: trowel-in 1s cubic-bezier(.2, .9, .25, 1.15) .35s both; }
@keyframes trowel-in {
  0%   { transform: translate(38%, -55%) rotate(-28deg); opacity: 0; }
  35%  { opacity: 1; }
  100% { transform: none; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .hero-logo .trowel { animation: none; } html { scroll-behavior: auto; } }
.hero-foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px 48px; align-items: end; margin-top: clamp(32px, 5vw, 56px); }
.hero-lead { font-size: clamp(1.15rem, 2.2vw, 1.5rem); line-height: 1.4; max-width: 34ch; margin: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 760px) { .hero-foot { grid-template-columns: 1fr; } .hero-actions .btn { flex: 1 1 auto; } }

/* ---------- credential band ---------- */
.dark { background: var(--black); color: var(--white); }
.creds { padding: clamp(48px, 7vw, 84px) 0; }
.creds p { font-size: clamp(1.45rem, 3.3vw, 2.35rem); line-height: 1.3; max-width: 36ch; margin: 0; font-weight: 400; }
.creds strong { font-weight: 400; }

/* ---------- sections ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 48px; align-items: end; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head p { color: var(--concrete); margin: 0; max-width: 46ch; font-size: 1.05rem; }
@media (max-width: 760px) { .section-head { grid-template-columns: 1fr; } .filters { justify-content: flex-start; } }
.mortar { background: var(--mortar); }

/* ---------- services: laid in running bond ---------- */
.wall { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--joint); }
.brick { background: var(--white); padding: 30px 28px 28px; display: flex; flex-direction: column; min-height: 100%; }
.brick.a { grid-column: 1 / span 5; } .brick.b { grid-column: 6 / span 5; } .stub.one { grid-column: 11 / span 2; }
.stub.two { grid-column: 1 / span 2; } .brick.c { grid-column: 3 / span 5; } .brick.d { grid-column: 8 / span 5; }
.stub { background: var(--yellow); min-height: 60px; }
.stub.two { background: var(--black); }
.brick h3 { margin-bottom: 14px; }
.brick ul { list-style: none; padding: 0; margin: 0 0 22px; }
.brick li { padding: 7px 0; border-top: 1px solid var(--mortar); color: #3c3936; font-size: 1rem; }
.brick .quote-link { margin-top: auto; align-self: flex-start; background: none; border: 0; padding: 0 0 2px; font: 500 1rem var(--font); cursor: pointer; border-bottom: 2px solid var(--yellow); color: var(--black); }
.brick .quote-link:hover { border-bottom-color: var(--black); }
@media (max-width: 860px) {
  .wall { grid-template-columns: 1fr; }
  .brick.a, .brick.b, .brick.c, .brick.d { grid-column: auto; }
  .brick:nth-of-type(odd) { margin-right: 14%; } .brick:nth-of-type(even) { margin-left: 14%; }
  .stub { display: none; }
}
.services-note { margin-top: 28px; color: var(--concrete); }
.services-note a { color: var(--black); font-weight: 500; }

/* ---------- gallery ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.chip { background: var(--white); color: var(--black); border: 2px solid var(--black); border-radius: 2px; padding: .45em 1em; font: 500 .95rem var(--font); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--black); color: var(--white); }
.gallery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 28px; }
.gallery-grid .project:first-child { grid-column: 1 / -1; }
.gallery-grid .project:first-child .ba { aspect-ratio: 16 / 9; }
@media (max-width: 760px) { .gallery-grid { grid-template-columns: 1fr; } .gallery-grid .project:first-child .ba { aspect-ratio: 4 / 3; } }
.project-body { padding-top: 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 20px; align-items: start; }
.project h3 { font-size: 1.3rem; }
.project-meta { color: var(--concrete); font-size: .95rem; }
.project p { grid-column: 1 / -1; margin: 6px 0 0; color: #3c3936; font-size: 1rem; max-width: 62ch; }
.project .expand { grid-row: 1; grid-column: 2; background: none; border: 0; padding: 0 0 2px; font: 500 .95rem var(--font); cursor: pointer; border-bottom: 2px solid var(--yellow); }
.gallery-empty { border: 2px dashed var(--line); padding: 56px 24px; text-align: center; color: var(--concrete); }
.gallery-empty strong { display: block; color: var(--black); font-size: 1.35rem; font-weight: 500; margin-bottom: 6px; }
.gallery-more { text-align: center; margin-top: 40px; }

/* before / after — the handle is the trowel from the logo */
.ba { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--mortar); user-select: none; --pos: 50%; touch-action: pan-y; }
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ba .ba-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: var(--yellow); pointer-events: none; }
.ba-grip { position: absolute; top: 50%; left: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: var(--yellow); border: 3px solid var(--black); display: grid; place-items: center; transition: transform .15s; }
.ba-grip svg { width: 40px; height: 26px; color: var(--black); }
.ba:active .ba-grip, .ba:focus-within .ba-grip { transform: scale(1.08); }
.ba input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; }
.ba-label { position: absolute; bottom: 12px; padding: 5px 10px; font-size: .85rem; font-weight: 500; pointer-events: none; }
.ba-label.l { left: 12px; background: var(--black); color: var(--white); }
.ba-label.r { right: 12px; background: var(--yellow); color: var(--on-yellow); }

dialog.lightbox { width: min(1120px, 100% - 24px); max-height: calc(100% - 24px); padding: 0; border: 2px solid var(--black); background: var(--white); color: var(--black); border-radius: 2px; overflow: auto; }
dialog.lightbox::backdrop { background: rgba(29, 27, 28, .88); }
.lightbox .ba { aspect-ratio: 3 / 2; }
.lightbox-body { padding: 18px 22px 24px; }
.lightbox-close { position: absolute; top: 10px; right: 10px; z-index: 5; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--black); background: var(--white); font-size: 26px; line-height: 1; cursor: pointer; }

/* ---------- process: one course, laid in order ---------- */
.course { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--joint); background: var(--mortar); border: var(--joint) solid var(--mortar); }
.course li { background: var(--white); padding: 26px 24px 24px; }
.course .n { display: block; font-size: 3.4rem; line-height: 1; font-weight: 400; margin-bottom: 18px; }
.course li:nth-child(odd) .n { color: var(--black); }
.course h3 { font-size: 1.2rem; margin-bottom: 8px; }
.course p { color: var(--concrete); font-size: 1rem; margin: 0; }
@media (max-width: 900px) { .course { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .course { grid-template-columns: 1fr; } }

/* ---------- about + the business card ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 80px); align-items: center; }
.about-copy h2 { margin-bottom: 26px; }
.about-copy p { max-width: 54ch; }
.towns { margin-top: 30px; padding-top: 22px; border-top: 2px solid var(--black); }
.towns h3 { font-size: 1.15rem; margin-bottom: 10px; }
.towns ul { list-style: none; padding: 0; margin: 0; columns: 3; column-gap: 20px; }
.towns li { padding: 3px 0; }
.towns p { margin: 12px 0 0; color: var(--concrete); font-size: .98rem; }
@media (max-width: 480px) { .towns ul { columns: 2; } }

.bizcard { display: grid; grid-template-columns: 30% 70%; aspect-ratio: 1.74; width: 100%; max-width: 560px; justify-self: center; box-shadow: 0 30px 50px -28px rgba(29, 27, 28, .55); transform: rotate(-2.5deg); transition: transform .3s ease; }
.bizcard:hover { transform: rotate(0); }
.bizcard-logo { background: var(--white); position: relative; overflow: hidden; container-type: size; }
.bizcard-logo svg { position: absolute; top: 50%; left: 50%; width: 84cqh; height: auto; transform: translate(-50%, -50%) rotate(-90deg); }
.bizcard-info { background: var(--black); color: var(--white); padding: 6% 7%; display: flex; flex-direction: column; justify-content: center; gap: 4%; }
.bizcard-info a, .bizcard-info span { display: flex; align-items: center; gap: 14px; text-decoration: none; font-size: clamp(.82rem, 2.3vw, 1.08rem); letter-spacing: .02em; word-break: break-word; }
.bizcard-info a:hover { color: var(--yellow); }
.bizcard-info svg { width: 1.35em; height: 1.35em; flex: none; }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } .bizcard { transform: none; } }

/* ---------- quote ---------- */
.yellow { background: var(--yellow); color: var(--on-yellow); }
.quote-grid { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
.quote-aside { position: sticky; top: 100px; }
.quote-aside h2 { margin-bottom: 18px; }
.quote-aside ul { list-style: none; padding: 0; margin: 26px 0; }
.quote-aside li { padding: 12px 0; border-top: 2px solid var(--black); }
.quote-aside li strong { display: block; font-weight: 500; }
.quote-aside .call { font-size: 1.5rem; font-weight: 500; text-decoration: none; border-bottom: 3px solid var(--black); }
@media (max-width: 980px) { .quote-grid { grid-template-columns: 1fr; } .quote-aside { position: static; } }

.form { background: var(--white); color: var(--black); border: 2px solid var(--black); padding: clamp(22px, 4vw, 40px); }
.form fieldset { border: 0; padding: 0; margin: 0 0 36px; }
.form legend { display: flex; align-items: center; gap: 12px; font-size: 1.3rem; font-weight: 500; margin-bottom: 18px; padding: 0; }
.form legend .step { width: 34px; height: 34px; background: var(--yellow); display: grid; place-items: center; font-size: 1rem; flex: none; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .row { grid-template-columns: 1fr; } }
.field { margin-bottom: 16px; display: flex; flex-direction: column; min-width: 0; }
.field > label, .field > .label { font-weight: 500; font-size: 1rem; margin-bottom: 6px; }
.opt { color: var(--concrete); font-weight: 400; }
.req { color: var(--red); }
.hint { font-size: .9rem; color: var(--concrete); margin-top: 5px; }
.form input[type=text], .form input[type=email], .form input[type=tel], .form input[type=password], .form select, .form textarea { width: 100%; font: 400 1rem var(--font); color: var(--black); padding: .8em .9em; border: 2px solid var(--line); border-radius: 2px; background: var(--white); }
.form select { appearance: none; -webkit-appearance: none; background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D1B1C' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 12px center / 18px no-repeat; padding-right: 40px; }
.form textarea { min-height: 130px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--black); box-shadow: 0 0 0 3px var(--yellow); }
.invalid input, .invalid select, .invalid textarea { border-color: var(--red) !important; }
.error-msg { color: var(--red); font-size: .9rem; margin-top: 5px; display: none; }
.invalid .error-msg { display: block; }

.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span { display: inline-flex; align-items: center; gap: 8px; padding: .6em 1em; border: 2px solid var(--line); border-radius: 2px; font-size: 1rem; cursor: pointer; background: var(--white); }
.choice input:checked + span { background: var(--black); border-color: var(--black); color: var(--white); }
.choice input:checked + span::before { content: ""; width: 9px; height: 9px; background: var(--yellow); }
.choice input:focus-visible + span { box-shadow: 0 0 0 3px var(--yellow); border-color: var(--black); }

.dropzone { display: block; border: 2px dashed var(--black); padding: 28px; text-align: center; cursor: pointer; background: #FFF8DF; }
.dropzone:hover, .dropzone.drag { background: #FFEFB0; }
.dropzone svg { width: 36px; height: 36px; margin: 0 auto 8px; }
.dropzone strong { display: block; font-size: 1.1rem; font-weight: 500; }
.dropzone input { display: none; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; margin-top: 12px; }
.thumb { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--mortar); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--black); color: var(--white); cursor: pointer; font-size: 16px; line-height: 1; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-submit { display: flex; flex-direction: column; gap: 12px; }
.form-submit .btn { width: 100%; padding: 1.15em; font-size: 1.1rem; }
.form-note { font-size: .9rem; color: var(--concrete); text-align: center; margin: 0; }
.form-alert { padding: 14px 16px; background: #FBE9E5; color: #6E1E10; font-size: 1rem; display: none; border-left: 4px solid var(--red); }
.form-alert.show { display: block; }
.form-success { text-align: center; padding: 34px 6px; }
.form-success .tick { width: 96px; height: 62px; margin: 0 auto 20px; color: var(--black); }
.form-success h3 { font-size: 1.8rem; margin-bottom: 12px; }
.form-success p { color: var(--concrete); max-width: 44ch; margin-inline: auto; }

/* ---------- footer ---------- */
.site-footer { padding: 64px 0 110px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; }
.footer-logo { width: 220px; color: var(--white); }
.site-footer h4 { font-size: 1rem; font-weight: 500; margin: 0 0 12px; color: var(--yellow); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: 4px 0; color: #C9C5BE; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--yellow); }
.footer-bottom { margin-top: 48px; padding-top: 20px; border-top: 1px solid #3A3738; color: #8F8A84; font-size: .9rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }
@media (min-width: 761px) { .site-footer { padding-bottom: 48px; } }

.mobile-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: none; grid-template-columns: 1fr 1fr; border-top: 2px solid var(--black); padding-bottom: env(safe-area-inset-bottom); background: var(--black); }
.mobile-bar a { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 15px 8px; text-decoration: none; font-weight: 500; font-size: 1.05rem; background: var(--white); color: var(--black); }
.mobile-bar a.q { background: var(--yellow); }
.mobile-bar svg { width: 18px; height: 18px; }
@media (max-width: 760px) { .mobile-bar { display: grid; } }
