:root {
  --yellow: #EEDAA7;
  --green: #8EB1A2;
  --pink: #F2AFA0;
  --light-red: #874E4C;
  --dark-red: #4D1117;
  --blue: #204590;
  --font-color: #161616;

  --spacing-sm: 6px;
  --spacing-md: 24px;
  --spacing-lg: 48px;
  --spacing-xl: 92px;

  --font-size-xs: clamp(16px, 1vw, 18px);
  --font-size-sm: clamp(18px, 1vw, 20px);
  --font-size-md: clamp(28px, 2vw, 32px);
  --font-size-lg: clamp(32px, 3vw, 48px);

  --font-family-body: Serapion;
  --font-family-heading: Serapion;
}

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

*:not(dialog) {
  margin: 0;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    interpolate-size: allow-keywords;
  }
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--green);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
}

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

h1 {
  line-height: 1.1;
  font-size: var(--font-size-lg);
}

h2 {
  font-size: var(--font-size-md);
}

p, a {
  text-wrap: pretty;
  font-size: var(--font-size-sm);
  font-family: var(--font-family-body);
  color: var(--font-color);
}

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

#root,
#__next {
  isolation: isolate;
}

main {
  min-height: 100svh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
}

main.clamped {
  max-height: 100svh;
  overflow: hidden;
}

main > * {
  flex-shrink: 0;   /* Prevents elements from shrinking */
  flex-grow: 0;     /* Prevents elements from growing beyond their original size */
  max-width: 100%;  /* Prevents elements from exceeding the width */
  max-height: 100%; /* Prevents elements from exceeding the height */
  overflow: hidden; /* Prevents internal overflow */
}

img {
  object-fit: contain;
  object-position: center;
  max-width: 100%;
  max-height: 100%;
}

.hero-img {
  width: 100%;
  height: auto;
}

a {
  text-decoration: underline;
  color: black;
  -webkit-tap-highlight-color: transparent !important;
  background-color: transparent;
}

@media (min-width: 765px) {
  main {
    min-height: 100svh;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
  }

  .hero-img {
    height: 100%;
    width: auto;
  }
}
