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

/* Prevent font size inflation */
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

/* Remove default margin in favour of better control in authored CSS */
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin-block-end: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role="list"],
ol[role="list"] {
  list-style: none;
}

/* Set core body defaults */
body {
  line-height: 1.5;
  min-height: 100vh;
  font-family: "Karla", sans-serif;
  margin: 0;

  color: var(--Grey-900-darker);
  background-color: var(--Green-200-lighter);
}

/* Set shorter line heights on headings and interactive elements */
h1,
h2,
h3,
h4,
button,
input,
label {
  line-height: 1.1;
}

/* Balance text wrapping on headings */
h1,
h2,
h3,
h4 {
  text-wrap: balance;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
  color: currentColor;
}

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

/* Make sure textareas without a rows attribute are not tiny */
/* textarea:not([rows]) {
  min-height: 10em;
} 

removed to edit height of message textarea 
*/

/* Anything that has been anchored to should have extra scroll margin */
:target {
  scroll-margin-block: 5ex;
}

:root {
  /* ### Primary */

  --Green-200-lighter: hsl(148, 38%, 91%);
  --Green-600-medium: hsl(169, 82%, 27%);
  --Red: hsl(0, 66%, 54%);

  /* ### Neutral */

  --White: hsl(0, 0%, 100%);
  --Grey-500-medium: hsl(186, 15%, 59%);
  --Grey-900-darker: hsl(187, 24%, 22%);

  /* spacing / typo system */
  /* Typography System */
  --font-size-4: 0.25rem; /* 4px */
  --font-size-8: 0.5rem; /* 8px */
  --font-size-10: 0.625rem; /* 10px */
  --font-size-12: 0.75rem; /* 12px */
  --font-size-14: 0.875rem; /* 14px */
  --font-size-16: 1rem; /* 16px */
  --font-size-18: 1.125rem; /* 18px */
  --font-size-20: 1.25rem; /* 20px */
  --font-size-24: 1.5rem; /* 24px */
  --font-size-30: 1.875rem; /* 30px */
  --font-size-36: 2.25rem; /* 36px */
  --font-size-44: 2.75rem; /* 44px */
  --font-size-52: 3.25rem; /* 52px */
  --font-size-62: 3.875rem; /* 62px */
  --font-size-74: 4.625rem; /* 74px */
  --font-size-86: 5.375rem; /* 86px */
  --font-size-98: 6.125rem; /* 98px */

  /*Clamping/Scaling Typo scale */

  --clamp-font-20: clamp(1.25rem, 2vw, 1.5rem); /* 20px → scales to 24px */
  --clamp-font-24: clamp(1.5rem, 2.5vw, 1.875rem); /* 24px → scales to 30px */
  --clamp-font-30: clamp(1.875rem, 3vw, 2.25rem); /* 30px → scales to 36px */
  --clamp-font-36: clamp(2.25rem, 3.5vw, 2.75rem); /* 36px → scales to 44px */
  --clamp-font-44: clamp(2.75rem, 4vw, 3.25rem); /* 44px → scales to 52px */
  --clamp-font-52: clamp(3.25rem, 5vw, 3.875rem); /* 52px → scales to 62px */
  --clamp-font-62: clamp(3.875rem, 6vw, 4.625rem); /* 62px → scales to 74px */
  --clamp-font-74: clamp(4.625rem, 7vw, 5.375rem); /* 74px → scales to 86px */
  --clamp-font-86: clamp(5.375rem, 8vw, 6.125rem); /* 86px → scales to 98px */
  --clamp-font-98: clamp(6.125rem, 9vw, 7rem); /* 98px → scales to 112px */

  /* Clamp variations */
  --clamp-font-24-v2: clamp(1.5rem, 2.5vw, 2.75rem); /* 24px → scales to 44px */
  --clamp-font-24-v3: clamp(1.5rem, 3vw, 3rem); /* 24px → scales to 48px */

  /* Spacing System */
  --spacing-2: 0.125rem; /* 2px */
  --spacing-4: 0.25rem; /* 4px */
  --spacing-8: 0.5rem; /* 8px */
  --spacing-12: 0.75rem; /* 12px */
  --spacing-16: 1rem; /* 16px */
  --spacing-24: 1.5rem; /* 24px */
  --spacing-32: 2rem; /* 32px */
  --spacing-48: 3rem; /* 48px */
  --spacing-64: 4rem; /* 64px */
  --spacing-80: 5rem; /* 80px */
  --spacing-96: 6rem; /* 96px */
  --spacing-128: 8rem; /* 128px */
}

.flex {
  display: flex;
}

.grid {
  display: grid;
}

.container {
  margin: 0 auto;
}

.visually-hidden {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

.hidden {
  display: none;
}

.active {
  display: block;
}

.two-col {
  grid-template-columns: repeat(2, 1fr);
}

.three-col {
  grid-template-columns: repeat(3, 1fr);
}

.valid {
  border: 1px solid var(--Green-600-medium);
}

.invalid {
  border: 1px solid var(--Red);
}
/* Utilities above */

.contact-form-section {
  margin: var(--spacing-24) 0;
  position: relative;
}

.contact-form__success {
  color: var(--White);
  background-color: var(--Grey-900-darker);

  max-width: 300px;
  padding: var(--spacing-24);

  border-radius: 11px;

  position: absolute;

  justify-self: center;
  top: 1%;

  transition: all 0.3s ease-in-out;
}

.success-msg__container {
  align-items: center;

  gap: var(--spacing-8);
}

.success-msg__heading {
  font-size: var(--font-size-18);
  font-weight: 700;
}

.success-paragraph {
  font-weight: 400;
}

.contact-form {
  max-width: 337px;
  padding: var(--spacing-24);
  border-radius: 15px;

  background-color: var(--White);
}

.contact-form__heading {
  margin: 0 0 var(--spacing-32) 0;
}

.contact-form__group {
  border: none;
  padding: 0;
  margin: var(--spacing-8) 0 var(--spacing-16) 0;
}

.required {
  color: var(--Green-600-medium);
}

.contact-form__input {
  width: 100%;
  border-radius: 7px;
  border: 1px solid var(--Grey-500-medium);
  cursor: pointer;

  margin-block-start: var(--spacing-4);
  font-size: var(--font-size-30);
}

.contact-form__input.valid {
  border: 1px solid var(--Green-600-medium);
}

.contact-form__input.invalid {
  border: 1px solid var(--Red);
}

.contact-form__error {
  color: var(--Red);
}

.contact-form__radio-group {
  margin-block-start: var(--spacing-16);
  gap: var(--spacing-12);
}

input[type="radio"] {
  margin: 0;
}

.contact-form__radio {
  /* width: 100%; */
  align-items: center;
  cursor: pointer;

  border: 1px solid var(--Grey-500-medium);
  border-radius: 7px;

  gap: var(--spacing-12);
  padding: var(--spacing-12) 0 var(--spacing-12) var(--spacing-24);

  accent-color: var(--Green-600-medium);
}

.contact-form__radio:has(input[type="radio"]:checked) {
  background-color: var(--Green-200-lighter);
  border: 1px solid var(--Green-600-medium);
}

.contact-form__textarea {
  border: 1px solid var(--Grey-500-medium);
  border-radius: 7px;

  margin-block-start: var(--spacing-12);
  /* aspect-ratio: 1 / 1; */
  height: 250px;
}

.contact-form__textarea.valid {
  border: 1px solid var(--Green-600-medium);
}
.contact-form__textarea.invalid {
  border: 1px solid var(--Red);
}

.contact-form__checkbox-group {
  margin: 0;
}

.contact-form__checkbox {
  margin: var(--spacing-24) 0 var(--spacing-8);
  gap: var(--spacing-12);
  cursor: pointer;

  accent-color: var(--Green-600-medium);
}

input[type="checkbox"] {
  margin: 0;
}

.contact-form__submit {
  display: inline-block;
  border: none;
  cursor: pointer;
  width: 100%;

  margin-block-start: var(--spacing-32);
  padding: var(--spacing-16) 0;

  border-radius: 7px;

  color: var(--White);
  background-color: var(--Green-600-medium);
}

.contact-form__submit:hover {
  background-color: hsl(169, 82%, 15%);
}

@media (min-width: 48em) {
  .contact-form {
    max-width: 550px;
    padding: var(--spacing-32);
  }

  .contact-form-section {
    margin: var(--spacing-80) 0;
  }

  .contact-form__success {
    top: -5%;
    max-width: 100%;
  }
}

@media (min-width: 90em) {
  .contact-form-section {
    margin: var(--spacing-128) 0;
  }

  .contact-form {
    max-width: 750px;
  }

  .contact-form__success {
    top: -13%;
  }

  .contact-form__full-name {
    grid-template-columns: repeat(2, 1fr);

    gap: var(--spacing-16);
  }

  .contact-form__radio-group {
    grid-template-columns: repeat(2, 1fr);

    gap: var(--spacing-16);
  }

  .contact-form__text area {
    max-height: 125px;
  }
}
