:root {
  --paper: #f4f1ea;
  --tint: #e8e3d8;
  --ink: #1c1b18;
  --ink-soft: #3b3933;
  --muted: #6a655b;
  --line: #d9d3c6;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --wrap: min(100% - 2 * var(--gutter), 72rem);

  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 1.5rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -3rem;
  left: 1rem;
  z-index: 10;
  padding: 0.5rem 0.9rem;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* Header */

.site-header {
  width: var(--wrap);
  margin-inline: auto;
  padding-block: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 2rem;
}

.brand {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.75rem;
  text-decoration: none;
}

.brand-name {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.brand-trade {
  color: var(--muted);
  font-size: 0.9375rem;
}

.site-nav {
  display: flex;
  gap: 1.75rem;
  font-size: 0.9375rem;
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:hover {
  text-decoration: underline;
}

/* Hero */

.hero {
  width: var(--wrap);
  margin-inline: auto;
  padding-block: clamp(2rem, 6vw, 5rem) clamp(3.5rem, 8vw, 6.5rem);
  display: grid;
  gap: 2.5rem;
}

.hero-text {
  container-type: inline-size;
}

/* Sized to the column so it always breaks as "Painting and / decorating, / inside and out." */
.hero h1 {
  font-size: clamp(2.5rem, 1rem + 3.6vw, 4.25rem);
  font-size: min(4.25rem, 14.5cqi);
  line-height: 1.02;
  letter-spacing: -0.025em;
}

.hero-text p {
  max-width: 36ch;
  margin-top: 1.5rem;
  color: var(--ink-soft);
  font-size: 1.125rem;
}

.hero-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.hero-call {
  color: var(--ink-soft);
}

.button {
  display: inline-block;
  padding: 0.9rem 1.5rem;
  border-radius: 2px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s;
}

.button:hover {
  background: #000;
}

.hero-image {
  margin: 0;
}

.hero-image img {
  width: 100%;
  background: var(--tint);
}

.hero-image figcaption {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.875rem;
}

@media (min-width: 56rem) {
  .hero {
    grid-template-columns: 5fr 7fr;
    align-items: center;
    gap: 4rem;
  }
}

/* Sections */

.section {
  width: var(--wrap);
  margin-inline: auto;
  padding-block: clamp(3rem, 7vw, 5.5rem);
  border-top: 1px solid var(--line);
  display: grid;
  gap: 1.5rem 4rem;
}

.section h2 {
  font-size: clamp(1.9rem, 1.3rem + 2vw, 2.6rem);
}

.section-body {
  max-width: 40rem;
}

.section-body > h3 {
  font-size: clamp(1.3rem, 1.1rem + 0.6vw, 1.5rem);
}

.section-body > h3 + p {
  margin-top: 0.75rem;
}

@media (min-width: 56rem) {
  .section {
    grid-template-columns: 4fr 8fr;
  }
}

/* Before and after photos */

.shots {
  grid-column: 1 / -1;
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.shot {
  position: relative;
  margin: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--tint);
}

.shot a,
.shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.shot img {
  object-fit: cover;
  transition: transform 0.4s ease;
}

.shot a:hover img {
  transform: scale(1.02);
}

.shot figcaption {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.15rem 0.55rem;
  border-radius: 2px;
  background: var(--paper);
  font-size: 0.8125rem;
  line-height: 1.5;
  pointer-events: none;
}

@media (min-width: 56rem) {
  .shots {
    grid-template-columns: 2fr 1fr 2fr;
    grid-template-rows: auto auto;
    grid-auto-flow: column;
  }

  .shot--big {
    grid-row: span 2;
  }

  .shot:not(.shot--big) {
    aspect-ratio: auto;
  }
}

/* Services */

.services {
  max-width: none;
  display: grid;
  gap: 2rem 3rem;
}

.services h3 {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.services ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.services li {
  padding-block: 0.65rem;
  border-top: 1px solid var(--line);
}

.services li:last-child {
  border-bottom: 1px solid var(--line);
}

.services-note {
  color: var(--muted);
}

@media (min-width: 40rem) {
  .services {
    grid-template-columns: 1fr 1fr;
  }

  .services-note {
    grid-column: 1 / -1;
  }
}

/* Contact */

.contact-list {
  margin: 2rem 0 0;
}

.contact-list div {
  display: grid;
  gap: 0.15rem 1rem;
  padding-block: 0.9rem;
  border-top: 1px solid var(--line);
}

@media (min-width: 40rem) {
  .contact-list div {
    grid-template-columns: 8.5rem 1fr;
  }
}

.contact-list div:last-child {
  border-bottom: 1px solid var(--line);
}

.contact-list dt {
  color: var(--muted);
}

.contact-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

/* Footer */

.site-footer {
  width: var(--wrap);
  margin-inline: auto;
  padding-block: 1.5rem 2.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  color: var(--muted);
  font-size: 0.875rem;
}

/* Photo viewer */

.lightbox {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.lightbox::backdrop {
  background: rgb(18 17 15 / 0.92);
}

.lightbox img {
  width: 100%;
  height: 100%;
  max-width: none;
  padding: clamp(1rem, 4vw, 3rem);
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid rgb(244 241 234 / 0.4);
  border-radius: 2px;
  background: transparent;
  color: var(--paper);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}

html:has(.lightbox[open]) {
  overflow: hidden;
}
