:root {
  --page-gutter: 48px;
  --section-space: 120px;
  --rule: rgba(27, 26, 24, .15);
}

[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--oxblood); outline-offset: 4px; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.shell {
  width: min(calc(100% - var(--page-gutter) * 2), 1440px);
  margin-inline: auto;
}

.page-content, .page-footer { position: relative; z-index: 2; background: var(--ivory); }
.page-content { font-size: 17px; line-height: 1.55; overflow-wrap: anywhere; }
.page-section { padding-block: var(--section-space); border-top: 1px solid var(--rule); }
.paper { background: var(--paper); }
.section-head { margin-bottom: 40px; }
.section-head .mono, .product-number, .step-number { color: var(--oxblood); }

.section-head h1, .section-head h2 {
  margin: 8px 0 0;
  font: 500 clamp(32px, 4.4vw, 64px)/1.04 Oswald, sans-serif;
  text-transform: uppercase;
}

.page-content h3 {
  margin: 0;
  font: 500 22px/1.15 Oswald, sans-serif;
  text-transform: uppercase;
}

.page-content p { margin: 0; }
.page-content .btn { text-align: center; }
.page-content button { font-family: inherit; }
.page-content .more, .footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  width: fit-content;
  padding: 0;
  border-bottom: 0;
  text-decoration: underline;
  text-underline-offset: .25em;
}
.header-nav a, .h-right .tel {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
}

.products {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px 24px;
}
.product { border-bottom: 1px solid var(--rule); padding-bottom: 16px; }
.product-frame {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 2;
  background: var(--paper);
  overflow: hidden;
}
.product-frame img { width: 80%; height: 80%; object-fit: contain; }
.placeholder { padding: 8px; color: var(--muted); text-align: center; }
.draw-slot { position: absolute; inset: 0; pointer-events: none; }
.product-number { margin-top: 16px; }
.product h3 { margin-block: 8px; }
.product p, .process p, .facts dd { color: var(--muted); }

.section-action {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: 32px;
}

.process {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink);
}
.process li { position: relative; padding-top: 24px; }
.step-number { display: block; margin-bottom: 16px; }
.process h3 { margin-bottom: 8px; }

.works {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.work { margin: 0; }
.work img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: var(--paper); }
.work img.work-support { object-position: center 78%; }
.work figcaption { margin-top: 8px; color: var(--muted); }

.dog-layout {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 64px;
}
.dog-frame {
  display: grid;
  place-items: center;
  aspect-ratio: 2 / 3;
  width: min(100%, 448px);
  border: 1px solid var(--rule);
}
.dog-line {
  margin: 0 0 24px;
  max-width: 15ch;
  font: italic 500 clamp(40px, 6vw, 88px)/.95 "Cormorant Garamond", Georgia, serif;
}
.dog-layout .mono { color: var(--muted); }

.contacts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 64px;
}
.form { display: grid; gap: 16px; }
.form > label:not(.consent) { display: grid; gap: 8px; }
.form input:not([type="checkbox"], [type="file"]), .form textarea {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  border: 1px solid var(--muted);
  border-radius: 0;
  padding: 8px 12px;
  background: transparent;
  color: var(--ink);
  font: inherit;
}
.file-field { display: grid; gap: 8px; }
.file-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}
.file-picker {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding-inline: 12px;
  border: 1px solid var(--ink);
  cursor: pointer;
}
.file-picker:hover { background: var(--paper); }
.file-row input:focus-visible + .file-picker {
  outline: 2px solid var(--oxblood);
  outline-offset: 4px;
}
.file-name { color: var(--muted); overflow-wrap: anywhere; }
.form textarea { resize: vertical; }
.form .hint { font-size: 16px; color: var(--muted); }
.form .btn { justify-self: start; border: 0; cursor: pointer; }
.consent { display: flex; align-items: center; gap: 8px; min-height: 44px; padding-block: 8px; cursor: pointer; }
.consent input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--oxblood); cursor: pointer; }
.policy { text-decoration: underline; text-underline-offset: .25em; }
.form-status { color: var(--oxblood); }
.contacts .facts { margin: 0 0 32px; }
.facts { margin: 16px 0 0; }
.facts div {
  display: grid;
  grid-template-columns: minmax(7ch, 112px) minmax(0, 1fr);
  gap: 16px;
  padding-block: 8px;
  border-bottom: 1px solid var(--rule);
}
.facts dt { font-weight: 600; }
.facts dd { margin: 0; }
.contact-phone { font-weight: 600; text-underline-offset: .25em; }

.page-footer { padding-block: 32px; border-top: 1px solid var(--rule); font-size: 16px; }
.footer-layout { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 16px 32px; }
.footer-layout p { margin: 8px 0 0; color: var(--muted); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0 24px; }
.footer-contact { min-height: 46px; display: inline-flex; align-items: center; width: fit-content; }
.copyright { justify-self: end; align-self: center; }

.bottom-bar { display: none; }
.photo-heading { padding-top: calc(var(--section-space) + 40px); border: 0; }
.photo-heading .section-head h1 { font-size: clamp(40px, 5.6vw, 72px); }
.photo-group + .photo-group { margin-top: 64px; }
.photo-group .photo-count { margin: 0 0 8px; color: var(--muted); }
.photo-group h2 { margin: 0 0 24px; font: 500 clamp(28px, 3vw, 32px)/1.04 Oswald, sans-serif; text-transform: uppercase; }
.photo-columns { columns: 3; column-gap: 16px; }
.photo-tile { display: block; break-inside: avoid; margin-bottom: 16px; background: var(--paper); }
.photo-tile img { display: block; width: 100%; height: auto; }
.photo-tile:hover { outline: 1px solid var(--oxblood); outline-offset: 2px; }

.viewer {
  max-width: min(1120px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  width: max-content;
  border: 1px solid var(--ink);
  padding: 8px;
  background: var(--ivory);
  color: var(--ink);
}
.viewer::backdrop { background: rgba(27, 26, 24, .84); }
.viewer-image {
  display: block;
  max-width: min(100%, calc(100vw - 50px));
  max-height: calc(100dvh - 112px);
  width: auto;
  height: auto;
  margin-inline: auto;
  object-fit: contain;
}
.viewer-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding-top: 8px; }
.viewer-controls button { border: 0; cursor: pointer; }
.viewer-close { margin-left: auto; }
.viewer-count { padding-inline: 8px; }

@media (min-width: 768px) {
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
  .products { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 1099px) {
  :root { --page-gutter: 32px; --section-space: 96px; }
  header { padding-inline: var(--page-gutter); }
  .photo-columns { columns: 2; }
  .dog-layout, .contacts-grid { gap: 40px; }
}
@media (max-width: 820px) {
  :root { --page-gutter: 20px; --section-space: 72px; }
  .btn, .page-content .more, .footer-nav a, .footer-contact { min-height: 48px; }
  .btn-sm { padding-inline: 12px; white-space: nowrap; }
  .h-right .tel { display: none; }
  .page-content { font-size: 16px; }
  .page-content h3 { font-size: 20px; }
  .section-head { margin-bottom: 32px; }
  .process, .dog-layout, .contacts-grid, .footer-layout { grid-template-columns: minmax(0, 1fr); }
  .process { gap: 16px; border-top: 0; }
  .process li { padding: 0 0 16px 48px; border-top: 0; border-bottom: 1px solid var(--rule); }
  .step-number { position: absolute; top: 2px; left: 0; margin: 0; }
  .works { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .dog-frame { width: min(100%, 368px); }
  .copyright { justify-self: start; }
  .home-page { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }
  .bottom-bar {
    position: fixed;
    z-index: 41;
    inset: auto 0 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--oxblood);
  }
  .bottom-bar a { min-height: 56px; padding-inline: 8px; text-align: center; }
  .bottom-bar a + a { border-left: 1px solid var(--ivory); }
  .bottom-bar a:focus-visible { outline-color: var(--ivory); outline-offset: -4px; }
  .viewer-controls { gap: 4px; }
  .viewer-controls .btn { padding-inline: 10px; }
}
@media (max-width: 767px) {
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .product h3 { font-size: 16px; }
  .product p { font-size: 14px; }
  .work figcaption { font-size: 13px; }
  .photo-columns { columns: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .lights { display: none; }
  .btn { transition: none; }
}

