/* Reset (from you-rock) */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd,
ul,
ol {
  margin: 0;
}

ul[role="list"],
ol[role="list"],
ul,
ol {
  list-style: none;
}

html:focus-within {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  line-height: 1.5;
}

a:not([class]) {
  text-decoration-skip-ink: auto;
}

img,
picture {
  display: block;
}

input,
button,
textarea,
select {
  font: inherit;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Custom font faces */
@font-face {
  font-family: "Baloo 2";
  src: url("./fonts/Baloo2-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Baloo 2";
  src: url("./fonts/Baloo2-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Baloo 2";
  src: url("./fonts/Baloo2-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Baloo 2";
  src: url("./fonts/Baloo2-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Baloo 2";
  src: url("./fonts/Baloo2-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("./fonts/Manrope-VariableFont_wght.ttf") format("truetype");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

/* Base styles (from you-rock) */
:root {
  --color-primary: #ffba7c;
  --color-secondary: #573353;
  --color-tertiary: #29319f;
  --color-background-primary: #ffffff;
  --color-background-secondary: #fff3e9;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-base: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --font-heading: "Baloo 2", sans-serif;
  --font-body: "Manrope", sans-serif;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-background-secondary);
  color: var(--color-secondary);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
}

img {
  max-width: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.button {
  border: 0;
  border-radius: 8px;
  padding: var(--space-base);
  text-decoration: none;
  color: var(--color-secondary);
  font-weight: 600;
  display: inline-block;
  text-align: center;
}

.button__primary {
  background-color: var(--color-primary);
}

p {
  margin-bottom: var(--space-sm);
}

.card {
  background-color: var(--color-background-primary);
  border-radius: var(--space-base);
  padding: var(--space-lg);
}

.section__title {
  margin-bottom: var(--space-base);
}

/* Page layout */
.background {
  min-height: 100dvh;
}

.wrapper {
  display: grid;
  grid-template-columns:
    [full-start] minmax(1em, 1fr) [main-start] minmax(0, 40em)
    [main-end] minmax(1em, 1fr) [full-end];
  padding: var(--space-xl) 0 var(--space-xl);
  row-gap: var(--space-lg);
}

.wrapper > * {
  grid-column: main;
}

.header {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  padding: var(--space-base) 0;
  align-items: center;
}

.header__title {
  justify-self: center;
  grid-column: 2;
}

.intro h2 {
  font-size: var(--text-2xl);
  margin-top: var(--space-lg);
}

.gallery__list {
  height: 350px;
  display: grid;
  gap: var(--space-base);
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.gallery__item {
  border-radius: 16px;
  overflow: hidden;
  background-color: var(--color-background-secondary);
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery__list {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: var(--space-base);
  padding-bottom: var(--space-sm);
}

.gallery__item {
  flex: 0 0 80%;
  scroll-snap-align: center;
}
