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

html {
  font-size: 16px;
}

body {
  margin: 0;
  font-family: sans-serif;
  line-height: 1.6;
  color: #111;
  background: #fff;
  overflow-wrap: anywhere;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.wrap {
  width: 100%;
  padding: 16px;
}

main p,
main li,
main dd {
  max-width: 40rem;
}

.site-header,
.site-footer {
  border-bottom: 1px solid #ccc;
}

.site-footer {
  border-bottom: 0;
  border-top: 1px solid #ccc;
  margin-top: 32px;
}

.site-header .wrap,
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px 32px;
}

.site-header .wrap {
  padding-top: 10px;
  padding-bottom: 10px;
}

.site-header .site-name {
  margin-right: auto;
}

.header-ig {
  display: inline-flex;
  flex: 0 0 auto;
  color: inherit;
  text-decoration: none;
  line-height: 0;
}

.header-ig svg {
  display: block;
  width: 16px;
  height: 16px;
}

.site-name,
.site-header nav {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}

.site-name {
  text-decoration: none;
}

nav ul {
  display: flex;
  gap: 16px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

nav a[aria-current="page"] {
  font-weight: 700;
}

.instagram {
  font-size: 0.75rem;
}

h1 {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  margin: 0 0 8px;
}

h2,
h3 {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  margin: 0 0 8px;
}

.lead,
.works h2 {
  font-size: 12px;
}

.lead {
  margin: 0 0 8px;
}

main {
  padding-top: 8px;
  padding-bottom: 8px;
}

section {
  margin: 32px 0;
}

.works {
  margin-top: 0;
}

.ph {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 3 / 4;
  background: #e6e6e6;
  border: 1px solid #ccc;
  color: #555;
  text-decoration: none;
  background:url(../img/dummy.jpg) no-repeat center center/cover;
}

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

.card a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.card .card-title {
  max-width: none;
  font-size: 12px;
  font-weight: 400;
  margin: 8px 0 0;
  text-decoration: underline;
}

.card .card-meta {
  max-width: none;
  margin: 0;
  font-size: 11px;
}

.services {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.services p {
  margin: 0;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 16px 0 24px;
}

.filters fieldset {
  flex: 1 1 240px;
  margin: 0;
  border: 1px solid #ccc;
}

.filters label {
  display: block;
}

.meta {
  margin: 16px 0;
}

.meta div {
  display: flex;
  gap: 16px;
  margin: 0 0 4px;
}

.meta dt {
  min-width: 8rem;
  margin: 0;
  font-weight: 600;
}

.meta dd {
  margin: 0;
}

.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}

table {
  border-collapse: collapse;
  width: 100%;
  max-width: 40rem;
}

th,
td {
  border: 1px solid #ccc;
  padding: 8px;
  text-align: left;
  vertical-align: top;
}

th {
  width: 8rem;
  font-weight: 600;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 40rem;
}

.timeline li {
  display: flex;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid #ccc;
}

.timeline time {
  min-width: 4rem;
  font-weight: 600;
}

.field {
  margin: 0 0 16px;
}

.field > label,
.choices legend {
  display: block;
  margin-bottom: 4px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field textarea {
  display: block;
  width: 100%;
  max-width: 32rem;
  padding: 8px;
  border: 1px solid #111;
  background: #fff;
  color: #111;
  font: inherit;
}

.field textarea {
  min-height: 8rem;
}

.choices {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}

.choices label,
.check label {
  display: block;
}

button {
  font: inherit;
  color: #111;
  background: #fff;
  border: 1px solid #111;
  padding: 8px 16px;
}

@media (max-width: 800px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .site-header .wrap {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "name ig"
      "nav nav";
    align-items: center;
    column-gap: 16px;
    row-gap: 12px;
  }

  .site-header .site-name {
    grid-area: name;
    margin-right: 0;
  }

  .site-header nav {
    grid-area: nav;
  }

  .site-header .header-ig {
    grid-area: ig;
  }

  .site-footer .wrap {
    flex-direction: column;
    align-items: flex-start;
  }

  nav ul {
    flex-direction: column;
    gap: 8px;
  }

  .grid,
  .services,
  .gallery {
    grid-template-columns: 1fr;
  }
}
