/* CSS Reset */
/* 1. Use a more-intuitive box-sizing model */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 2. Remove default margin */
* {
  margin: 0;
}

body {
  /* 3. Add accessible line-height */
  line-height: 1.5;
  /* 4. Improve text rendering */
  -webkit-font-smoothing: antialiased;
}

/* 5. Improve media defaults */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

/* 6. Inherit fonts for form controls */
input,
button,
textarea,
select {
  font: inherit;
}

/* 7. Avoid text overflows */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* 8. Improve line wrapping */
p {
  text-wrap: pretty;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}

/*
    9. Create a root stacking context
  */
#root,
#__next {
  isolation: isolate;
}

/* Variables */
@font-face {
  font-family: 'Dream Avenue'; /*a name to be used later*/
  src: url('../fonts/dream-avenue.ttf'); /*URL to font*/
}

:root {
  --beige-100: #f5f5f3;
  --beige-200: #e4e2dd;
  --beige-300: #dbd9d2;
  --beige-400: #d3cfc7;
  --beige-500: #c1bdb1;

  --black: #000000;

  --gold: #977a1c;

  /* Colors */
  --lightest: var(--beige-100);
  --main-bg: var(--beige-200);
  --secondary-bg: var(--beige-300);
  --tertiary-bg: var(--beige-400);
  --inv-bg: var(--beige-500);
  --main-text: var(--black);
  --accent: var(--gold);
  --border-dk: var(--black);

  /* Spacing */
  --gutter: 2rem;
  --padding: var(--gutter);
  --fluid-space-y: clamp(3rem, 2.5185rem + 1.9753vw, 4rem);
  --white-space: clamp(6rem, 5.037rem + 3.9506vw, 8rem);
  --content-width: 1200px;

  /* Other */
  --main-br: 15px;
  --font: clamp(1.0063rem, 0.9424rem + 0.2556vw, 1.15rem);
}

/* Globals */
body {
  background-color: var(--main-bg);
  color: var(--main-text);
  font-family: 'Quicksand', sans-serif;
  margin: 0 auto;

  font-size: var(--font);
}

h1 {
  font-family: 'Dream Avenue';
  font-size: 4em;
  font-weight: 400;
}

h2 {
  font-family: 'Dream Avenue';
  font-weight: 500;
  font-size: 2.5em;
}

h3 {
  font-size: 1.25em;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  font-weight: 600;
}

h4 {
  font-size: 1.15em;
}

h5 {
  font-size: 1.15em;
  font-weight: 500;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  all: unset;
}

address {
  font-style: normal;
}

/* Utility */
.card {
  display: flex;
  flex-direction: column;
  gap: var(--gutter);

  background-color: var(--main-bg);
  border-radius: var(--main-br);
  padding-bottom: var(--padding);
}

.clickable:hover {
  color: var(--accent);
}

.button--primary {
  cursor: pointer;
  padding: 1rem;
  background: transparent;
  font-weight: 600;
  border: 2px var(--border-dk) solid;
  border-radius: var(--main-br);

  &:hover {
    border: 2px solid var(--accent);
  }
}

.sr-only {
  display: none;
}

.unclickable {
  pointer-events: none;
  user-select: none;
}

.accent {
  color: var(--accent);
  font-weight: 600;
}

.whitespace {
  width: 100%;
  height: var(--white-space);
}

.divider {
  width: 100%;
  height: var(--white-space);
  background-repeat: no-repeat;
  background-size: auto;
}

.divider--secondary {
  background-image: url('../images/wavy-steps-1.svg');
  background-color: var(--secondary-bg);
}

.divider--tertiary {
  background-image: url('../images/wavy-steps-2.svg');
  background-color: var(--tertiary-bg);
}

.card__img {
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
}

.card__content {
  display: grid;
  gap: var(--gutter);
  padding-inline: var(--padding);
}

.card a {
  display: inline-flex;
  font-weight: 600;
}

.card button {
  background: var(--main-bg);
}

/* Page */

.content {
  max-width: var(--content-width);
  padding-inline: var(--gutter);
  margin-inline: auto;
}

/* Header */
.nav {
  display: flex;
  justify-content: space-between;

  max-width: var(--content-width);
  padding: var(--padding);
  margin-inline: auto;

  letter-spacing: 0.4em;
  text-transform: uppercase;
  font-weight: 600;
}

.nav__item {
  all: unset;
}

.nav__link {
  &:hover {
    color: var(--accent);
  }
}

.nav__link--active {
  color: var(--accent);
}

.mobile-toggle {
  display: none;
}

@media (max-width: 600px) {
  .nav {
    position: fixed;
    top: -300px;
    flex-direction: column;
    gap: 1rem;
    padding-top: 6rem;
    z-index: 1000;
    background: var(--main-bg);
    width: 100%;

    transition: transform 0.5s ease-in-out;
  }

  .nav[data-visible='true'] {
    transform: translateY(100%);
    transition: transform 0.5s ease-in-out;
  }

  .mobile-toggle {
    position: fixed;
    display: flex;

    justify-content: flex-end;
    width: 100%;
    z-index: 9999;

    cursor: pointer;
  }

  .mobile-toggle__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 3rem;
    margin-top: 1rem;
    margin-right: 1rem;
    aspect-ratio: 1;
    z-index: 9999;
  }

  .inner__left {
    height: 0.2rem;
    width: 80%;
    border-radius: var(--main-br);
    background-color: var(--main-text);

    transition: transform 0.5s ease-in-out;
  }

  .inner__right {
    height: 0.2rem;
    width: 80%;
    border-radius: var(--main-br);
    background-color: var(--main-text);

    transition: transform 0.5s ease-in-out;
  }

  .mobile-toggle[aria-expanded='true'] {
    .inner__left {
      transform: rotate(-45deg) translate(-4px, 4px);
      transition: transform 0.5s ease-in-out;
    }

    .inner__right {
      transform: rotate(45deg) translate(-4px, -4px);
      transition: transform 0.5s ease-in-out;
    }
  }
}

/* Footer */
footer {
  background-color: var(--inv-bg);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;

  max-width: var(--content-width);
  margin-inline: auto;
  padding: var(--padding);

  font-weight: 500;
  font-size: 1em;
}

.footer__email,
.footer__phone {
  text-decoration: underline;
}

.footer__socials {
  display: flex;
  gap: 0.5rem;
}

.social__link {
  cursor: pointer;

  svg {
    width: 32px;
    height: 32px;
  }

  svg:hover {
    fill: var(--accent);
  }
}
