/* ========================================
   Fonts
   ======================================== */

@font-face {
  font-family: 'Geologica';
  src: url('../fonts/Geologica-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Geologica';
  src: url('../fonts/Geologica-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ========================================
   Variables
   ======================================== */

:root {
  --color-core-carbon: #273238;
  --color-urban-grey: #3B4A50;
  --color-guiding-teal: #214F57;
  --color-alloy-surface: #9EA7AD;
  --color-individual-path: #181D21;
  --color-focused-light: #F1F4F3;

  --font: 'Geologica', Arial, Helvetica, sans-serif;
  --fw-light: 300;
  --fw-medium: 500;
}

/* ========================================
   Reset & Base
   ======================================== */

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

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  display: flex;
  flex-direction: column;
  font: 16px/1.6 var(--font);
  font-weight: var(--fw-light);
  color: var(--color-core-carbon);
  background-color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  display: block;
  border: 0;
}

a {
  color: var(--color-guiding-teal);
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.8;
}

/* ========================================
   Typography
   ======================================== */

/* Mobile base */
.h1, h1 {
  font-size: 32px;
  line-height: 1;
  font-weight: var(--fw-medium);
}

.h2, h2 {
  font-size: 28px;
  line-height: 1;
  font-weight: var(--fw-medium);
}

.h3, h3 {
  font-size: 24px;
  line-height: 1.2;
  font-weight: var(--fw-medium);
}

.h4, h4 {
  font-size: 20px;
  line-height: 1.2;
  font-weight: var(--fw-medium);
}

.h5, h5 {
  font-size: 18px;
  line-height: 1.4;
  font-weight: var(--fw-medium);
}

/* ========================================
   Container
   ======================================== */

.container {
  width: 100%;
  max-width: 1920px;
  padding-right: 16px;
  padding-left: 16px;
  margin-right: auto;
  margin-left: auto;
  overflow: hidden;
}

/* ========================================
   Button
   ======================================== */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  font: 14px/1 var(--font);
  font-weight: var(--fw-light);
  text-decoration: none;
  padding: 0 58px 0 28px;
  height: 50px;
  border: none;
  cursor: pointer;
  transition-property: opacity;
  transition: 0.3s;
}

.btn--primary {
  color: #fff;
  background-color: var(--color-core-carbon);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M11.6443 15L17.25 9L11.6443 3L10.5 4.09251L14.9614 9L10.5 13.9075L11.6443 15Z' fill='%23FFF'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M0.75 9.83329L15.75 9.83329L15.75 8.16663L0.75 8.16663L0.75 9.83329Z' fill='%23FFF'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 28px center;
}

.btn--primary:hover {
  opacity: 0.8;
}

.btn--primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ========================================
   Hero
   ======================================== */

.hero {
  position: relative;
  height: 100dvh;
  background: var(--color-urban-grey);
}

.hero__logo {
  display: none;
  position: absolute;
  top: 24px;
  right: 16px;
  z-index: 2;
  font-family: var(--font);
  font-weight: var(--fw-medium);
  font-size: 18px;
  letter-spacing: 2px;
  color: #fff;
  text-decoration: none;
}

.hero__logo img {
  height: 20px;
}

.hero__brand-hint {
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: 2;
  font-size: 12px;
  line-height: 1;
  color: var(--color-alloy-surface);
}

.hero__cta {
  margin-top: 24px;
  align-self: center;
}

.hero__img-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero__img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
          to top,
          rgba(24, 29, 33, 0.75) 0%,
          rgba(24, 29, 33, 0.25) 40%,
          transparent 65%
  );
}

.hero__img-wrap picture,
.hero__img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 100%;
  width: 100%;
  text-align: center;
  color: #fff;
  padding-top: 48px;
  padding-bottom: 5%;
}

.hero__content-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-bottom: 42px;
  margin-bottom: 8px;
}

.hero__title h1 {
  font-size: 32px;
  line-height: 1;
  font-weight: var(--fw-medium);
}

.hero__text {
  font-size: 14px;
  line-height: 1.4;
  margin-top: 16px;
  color: var(--color-alloy-surface);
}

/* ========================================
   Text block
   ======================================== */

.text-block {
  padding-top: 48px;
  padding-bottom: 48px;
}

.text-block__content {
  max-width: 83.333%;
}

.text-block__content p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-urban-grey);
}

/* ========================================
   Form section
   ======================================== */

.form-section {
  position: relative;
  background-color: var(--color-focused-light);
}

.form-section__layout {
  display: flex;
  align-items: center;
  flex-direction: column-reverse;
  gap: 32px;
}

.form-section__wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 0px;
  padding-bottom: 48px;
}

.form-section__visual {
  height: auto;
}

.form-section__visual-image {
  width: 100%;
  object-fit: contain;
  max-width: 460px;
  transform: translateX(15%);
  height: 100%;
}

.form-section__success {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  background-color: var(--color-focused-light);
  z-index: 1;
}

.form-section__success[hidden] {
  display: none;
}

.form-section__back {
  margin-top: 12px;
}

.btn--primary.form-section__back {
  background-image: none;
  padding-right: 28px;
}

.form-section__title {
  font-size: 28px;
  line-height: 1;
  margin-bottom: 12px;
  font-weight: var(--fw-medium);
  color: var(--color-core-carbon);
}

.form-section__subtitle {
  font-size: 14px;
  line-height: 1.4;
  color: var(--color-urban-grey);
  margin-bottom: 12px;
}

/* ========================================
   Form
   ======================================== */

.form__fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.form__group {
  position: relative;
}

.form__input {
  width: 100%;
  padding: 16px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: var(--fw-light);
  color: var(--color-core-carbon);
  background-color: #fff;
  border: 1px solid var(--color-alloy-surface);
  border-radius: 0;
  transition: border-color 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}

.form__input::placeholder {
  color: var(--color-alloy-surface);
}

.form__input:hover {
  border-color: var(--color-urban-grey);
}

.form__input:focus {
  outline: none;
  border-color: var(--color-guiding-teal);
}

.form__input--invalid {
  border-color: #e74c3c;
}

/* Checkboxes */

.form__checkboxes {
  display: flex;
  flex-direction: column;
  gap: 12px
}

.form__checkbox-group {
}

.form__checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.4;
  color: var(--color-urban-grey);
}

.form__checkbox a {
  color: var(--color-guiding-teal);
  text-decoration: underline;
}

.form__checkbox a:hover {
  opacity: 0.8;
}

.form__checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.form__checkbox-mark {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: 1px solid var(--color-alloy-surface);
  background: #fff;
  position: relative;
  margin-top: 1px;
  transition-property: background-color, border-color, opacity;
  transition: 0.2s;
}

.form__checkbox-mark:hover {
  opacity: 0.8;
}

.form__checkbox input[type="checkbox"]:checked + .form__checkbox-mark {
  background-color: var(--color-core-carbon);
  border-color: var(--color-core-carbon);
}

.form__checkbox input[type="checkbox"]:checked + .form__checkbox-mark::after {
  content: '';
  position: absolute;
  top: 7px;
  left: 12px;
  width: 7px;
  height: 12px;
  border: solid var(--color-focused-light);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.form__checkbox-mark--invalid {
  border-color: #e74c3c;
}

.form__checkbox-text {
  user-select: none;
}

/* Error messages */

.form__error {
  display: block;
  font-size: 12px;
  color: #e74c3c;
  margin-top: 4px;
}

.form__error:empty {
  display: none;
}

/* Submit */

.form__submit {
  margin-top: 24px;
}

/* Form messages */

.form__message {
  display: none;
  text-align: center;
  padding: 16px;
  margin-top: 24px;
  font-size: 14px;
}

.form__message--success {
  color: var(--color-guiding-teal);
  background-color: rgba(33, 79, 87, 0.1);
}

.form__message--error {
  color: #e74c3c;
  background-color: rgba(231, 76, 60, 0.08);
}

.form__message--visible {
  display: block;
}

/* ========================================
   Tablet (768px+)
   ======================================== */

@media (min-width: 768px) {
  .container {
    padding-right: 20px;
    padding-left: 20px;
  }

  .form__fields {
    flex-direction: row;
    gap: 16px;
  }

  .form__group {
    flex: 1;
  }

  .hero__logo {
   display: unset;
  }
}

/* ========================================
   Desktop (1024px+)
   ======================================== */

@media (min-width: 1024px) {
  .hero__logo {
    top: 32px;
    right: 20px;
    font-size: 20px;
  }

  .hero__logo img {
    height: 24px;
  }

  .hero__cta {
    margin-top: 36px;
  }

  .hero__content-wrap {
    padding-bottom: 0;
    margin-bottom: 0;
  }

  .hero__title h1 {
    font-size: 52px;
  }

  .hero__text {
    font-size: 20px;
    line-height: 1.4;
    margin-top: 16px;
  }

  .form-section__layout {
    flex-direction: row;
    gap: 48px;
  }

  .form-section__wrap {
    flex: 1;
    min-width: 0;
    margin-right: auto;
  }

  .form-section__visual {
    display: flex;
    justify-content: flex-end;
    flex: 1;
    min-width: 0;
    height: 100%;
  }

  .form-section__visual-image {
    transform: none;
  }

  .hero__brand-hint {
  bottom: 40px;
    left: 40px;
  }
}

/* ========================================
   Large desktop (1200px+)
   ======================================== */

@media (min-width: 1200px) {
  .container {
    padding-left: 80px;
    padding-right: 80px;
  }

  .hero__logo {
    right: 80px;
  }

  .hero__logo img {
    height: 30px;
  }

  /* Typography scale */
  .h1, h1 {
    font-size: 48px;
  }

  .h2, h2 {
    font-size: 40px;
  }

  .h3, h3 {
    font-size: 32px;
  }

  .h4, h4 {
    font-size: 28px;
  }

  .h5, h5 {
    font-size: 24px;
  }

  .h6, h6 {
    font-size: 20px;
  }

  .hero__content {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .hero__title h1 {
    font-size: 64px;
  }

  .hero__text {
    font-size: 22px;
    margin-top: 24px;
  }

  .hero__content-wrap {
    margin-bottom: 32px;
  }

  .text-block {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .text-block__content p {
    font-size: 18px;
    line-height: 1.4;
  }

  .form-section__wrap {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .form-section__title {
    font-size: 40px;
  }

  .form-section__layout {
    overflow: hidden;
    height: fit-content;
  }

  .form-section__visual-image {
    max-width: 480px;
  }

}

/* ========================================
   Extra large (1700px+)
   ======================================== */

@media (min-width: 1700px) {
  body {
    font-size: 18px;
  }

  .container {
    padding-left: 240px;
    padding-right: 240px;
  }

  .hero__logo {
    right: 240px;
    top: 34px;
  }

  .h1, h1 {
    font-size: 56px;
  }

  .h2, h2 {
    font-size: 48px;
  }

  .h3, h3 {
    font-size: 36px;
  }

  .h4, h4 {
    font-size: 32px;
  }

  .h5, h5 {
    font-size: 28px;
  }

  .h6, h6 {
    font-size: 24px;
  }

  .hero__content {
    padding-top: 96px;
    padding-bottom: 96px;
  }

  .hero__title h1 {
    font-size: 64px;
  }

  .hero__text {
    font-size: 18px;
    margin-top: 28px;
  }

  .btn {
    font-size: 16px;
    padding: 20px 52px 20px 28px;
  }

  .btn--primary {
    background-size: 20px 20px;
    background-position: right 24px center;
  }

  .text-block {
    padding-top: 96px;
    padding-bottom: 96px;
  }

  .text-block__content p {
    font-size: 20px;
  }

  .form-section__title {
    font-size: 48px;
  }

  .form-section__subtitle {
    font-size: 16px;
    margin-bottom: 24px;
  }

  .form__input {
    font-size: 18px;
  }

  .form__checkbox {
    font-size: 14px;
  }

  .form__message {
    font-size: 16px;
  }

  .form__fields {
    margin-bottom: 12px;
  }
}
