:root {
  --text: #333;
  --text-strong: #000;
  --line: #e6e6e6;
  --bg: #fff;
  --bg-muted: #f8f8f8;
  --font: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Kaku Gothic ProN", sans-serif;
  --font-latin: "Damion", cursive;
  --content: 940px;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  line-height: 2;
}

img,
iframe {
  display: block;
  max-width: 100%;
}

ul,
dl,
dd {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

a {
  color: inherit;
}

/* Hero */

.hero {
  position: relative;
  display: grid;
  place-items: center;
  height: clamp(420px, 52vw, 720px);
  overflow: hidden;
  color: #fff;
  text-align: center;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.1);
}

.hero__text {
  position: relative;
  padding: 0 16px;
}

.hero__title {
  font-family: var(--font-latin);
  font-size: clamp(72px, 10vw, 120px);
  font-weight: 400;
  line-height: 1.4;
}

.hero__lead {
  font-size: clamp(15px, 1.6vw, 18px);
  font-weight: 700;
  letter-spacing: 0.25em;
  line-height: 1.85;
}

/* Sections */

.section {
  padding: 96px 16px;
}

.section__title {
  margin-bottom: 40px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.section__title--latin {
  letter-spacing: 0.02em;
}

.body-text {
  font-size: 20px;
  line-height: 2;
}

.panel {
  max-width: var(--content);
  margin: 0 auto;
  padding: 24px 32px 28px;
  border: 1px solid var(--line);
}

.panel__title {
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
}

/* Welcome */

.welcome__text {
  max-width: 700px;
  margin: 0 auto 48px;
  letter-spacing: 0.06em;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: var(--content);
  margin: 0 auto 24px;
}

.gallery img,
.shop__photos img {
  width: 100%;
  height: auto;
  aspect-ratio: 300 / 231;
  object-fit: cover;
  border-radius: 2px;
}

.products {
  padding-inline: clamp(24px, 13.5%, 128px);
}

.products .body-text {
  letter-spacing: 0.06em;
}

/* School */

.school {
  position: relative;
  overflow: hidden;
  color: var(--text-strong);
}

.school__bg {
  position: absolute;
  inset: -8px;
  background: url("/images/yarn.webp") center / cover no-repeat;
  filter: grayscale(0.5) blur(2px);
}

.school__inner {
  position: relative;
  max-width: var(--content);
  margin: 0 auto;
}

.school__text {
  margin-bottom: 24px;
}

.courses {
  padding-inline: clamp(24px, 25%, 244px);
  border-color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.55);
}

.course-list > div {
  display: grid;
  grid-template-columns: max-content auto;
  column-gap: 1em;
  font-size: 20px;
  line-height: 2.5;
  letter-spacing: 0.06em;
}

.course-list dd {
  font-variant-numeric: tabular-nums;
}

/* Instagram */

.instagram {
  text-align: center;
}

.instagram__text {
  display: inline-block;
  max-width: 704px;
  margin-bottom: 40px;
  text-align: left;
}

.instagram__feed {
  max-width: 678px;
  margin: 0 auto 32px;
}

.instagram__feed iframe {
  width: 100%;
  min-height: 300px;
  border: 0;
  overflow: hidden;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 32px;
  border: 1px solid var(--text-strong);
  border-radius: 999px;
  color: var(--text-strong);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.6;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.button:hover,
.button:focus-visible {
  background: var(--text-strong);
  color: #fff;
}

.button__icon {
  width: 20px;
  height: 20px;
}

/* Shop */

.shop {
  background: var(--bg-muted);
}

.shop__photos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 754px;
  margin: 0 auto 64px;
}

.shop__detail {
  display: grid;
  grid-template-columns: 390px 1fr;
  gap: 40px;
  max-width: 754px;
  margin: 0 auto;
}

.shop__map iframe {
  width: 100%;
  height: 500px;
  border: 0;
}

.shop__info {
  align-self: center;
}

.shop__info dt {
  font-size: 16px;
  line-height: 2;
}

.shop__info dd {
  margin-bottom: 24px;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.shop__info dd:last-child {
  margin-bottom: 0;
}

.shop__info a {
  text-decoration: none;
}

.shop__info a:hover,
.shop__info a:focus-visible {
  text-decoration: underline;
}

/* Footer */

.footer {
  padding: 24px 16px;
  font-size: 13px;
  text-align: center;
}

/* Tablet */

@media (max-width: 768px) {
  .section {
    padding: 72px 20px;
  }

  .section__title {
    margin-bottom: 28px;
    font-size: 24px;
  }

  .body-text,
  .course-list > div,
  .shop__info dd {
    font-size: 17px;
  }

  .welcome__text {
    letter-spacing: 0.05em;
  }

  .products,
  .courses {
    padding-inline: 24px;
  }

  .shop__detail {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .shop__map iframe {
    height: 360px;
  }
}

/* Mobile */

@media (max-width: 480px) {
  .section {
    padding: 56px 16px;
  }

  .welcome__text br,
  .instagram__text br {
    display: none;
  }

  .gallery {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .gallery li:first-child {
    grid-column: 1 / -1;
  }

  .shop__photos {
    gap: 8px;
    margin-bottom: 40px;
  }

  .course-list > div {
    grid-template-columns: 1fr;
    line-height: 1.8;
    padding: 6px 0;
  }

  .course-list dd {
    font-weight: 500;
  }

  .button {
    padding-inline: 24px;
    font-size: 16px;
  }
}

/* 404 */

.notfound {
  display: grid;
  justify-items: center;
  gap: 24px;
  min-height: 100vh;
  align-content: center;
  text-align: center;
}

.notfound__title {
  color: var(--text);
  font-size: 72px;
}

.notfound .section__title {
  margin-bottom: 0;
}
