:root {
  --tomato:           hsl(4, 100%, 67%);
  --tomato-light:     hsla(4, 100%, 67%, 0.15);
  --tomato-hover:     hsl(4, 100%, 72%);
  --dark-slate-grey:  hsl(234, 29%, 20%);
  --charcoal-grey:    hsl(235, 18%, 26%);
  --grey:             hsl(231, 7%, 60%);
  --white:            hsl(0, 0%, 100%);
}

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

html,
body {
  height: 100%;
}

body {
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  background-color: var(--charcoal-grey);
  color: var(--dark-slate-grey);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 10px;
}


.grid-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  width: 100%;
  max-width: 928px;
  background: var(--white);
  border-radius: 36px;
  overflow: hidden;
  padding: 24px 24px 24px 0;
}

.text-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 40px 56px 64px;
}

h1 {
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  color: var(--dark-slate-grey);
  margin-bottom: 20px;
}

p {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--dark-slate-grey);
  margin-bottom: 24px;
}


ul {
  list-style: none;
  margin-bottom: 40px;
}

ul li {
  font-size: 16px;
  line-height: 1.5;
  padding-left: 36px;
  margin-bottom: 10px;
  position: relative;
}

ul li:last-child {
  margin-bottom: 0;
}

ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 21px;
  height: 21px;
  background-image: url('assets/images/icon-list.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}


form {
  display: flex;
  flex-direction: column;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

label {
  font-size: 12px;
  font-weight: 700;
  color: var(--dark-slate-grey);
  letter-spacing: 0;
}

.error-text {
  font-size: 12px;
  font-weight: 700;
  color: var(--tomato);
  display: none;
}

.error-text.visible {
  display: block;
}

input[type="email"] {
  width: 100%;
  padding: 16px 24px;
  border: 1px solid var(--grey);
  border-radius: 8px;
  font-size: 16px;
  font-family: 'Roboto', sans-serif;
  color: var(--dark-slate-grey);
  background: var(--white);
  cursor: text;
  transition: border-color 0.2s ease;
  margin-bottom: 24px;
}

input[type="email"]::placeholder {
  color: var(--grey);
}
input[type="email"]:focus {
  border-color: var(--dark-slate-grey);
  outline: none;
}

input[type="email"].error {
  border-color: var(--tomato);
  background-color: var(--tomato-light);
  color: var(--tomato);
}

input[type="email"].error::placeholder {
  color: var(--tomato);
}


button {
  width: 100%;
  padding: 18px 16px;
  background-color: var(--dark-slate-grey);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  font-family: 'Roboto', sans-serif;
  cursor: pointer;
  transition:
    background 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.15s ease;
}

button:hover {
  background: linear-gradient(90deg, #ff5478 0%, #ff6a5b 100%);
  box-shadow: 0 8px 24px hsla(4, 100%, 67%, 0.45);
}

button:active {
  transform: translateY(1px);
}


.img-section {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.img-section img {
  width: 100%;
  height: 100%;
  max-height: 580px;
  object-fit: cover;
  border-radius: 16px;
  display: block;
}


.success-card {
  display: none;
  flex-direction: column;
  justify-content: center;
  max-width: 504px;
  width: 100%;
  background: var(--white);
  border-radius: 36px;
  padding: 64px;
}

.success-card.visible {
  display: flex;
}

.check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 40px;
  flex-shrink: 0;
}

.check img {
  width: 64px;
  height: 64px;
}

.success-card h1 {
  font-size: 56px;
  line-height: 1;
  margin-bottom: 24px;
}

.success-card p {
  margin-bottom: 40px;
}

.success-card p strong {
  font-weight: 700;
}


@media (max-width: 900px) {
  .grid-container {
    grid-template-columns: 1fr;
    max-width: 540px;
    border-radius: 36px;
    padding: 0;
    gap: 0;
  }

  .img-section {
    order: -1;
  }

  .img-section img {
    border-radius: 16px 16px 0 0;
    max-height: 300px;
    object-fit: cover;
    width: 100%;
  }

  .text-section {
    padding: 40px 40px 40px 40px;
  }

  h1 {
    font-size: 40px;
  }
}

@media (max-width: 768px) {
  body {
    padding: 0;
    align-items: stretch;
    background-color: var(--white);
    min-height: 100vh;
    min-height: 100dvh;
  }

  .grid-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    max-width: 100%;
    border-radius: 0;
    box-shadow: none;
    grid-template-rows: auto 1fr;
    grid-template-columns: 1fr;
    overflow: visible;
    padding: 0;
    box-sizing: border-box;
  }

  .img-section {
    width: 100%;
    order: -1;
    height: 284px;
    overflow: hidden;
  }

  .img-section img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0 0 16px 16px;
  }

  .img-section img#hero-img {
    content: url('assets/images/illustration-sign-up-mobile.svg');
  }

  .text-section {
    padding: 0px 24px 0px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  h1 {
    font-size: 40px;
    margin-bottom: 16px;
  }

  p {
    font-size: 16px;
    margin-bottom: 20px;
  }

  ul {
    margin-bottom: 32px;
  }

  ul li {
    font-size: 16px;
  }

  .success-card {
    min-height: 100vh;
    border-radius: 0;
    max-width: 100%;
    padding: 200px 24px 40px 24px;
    justify-content: center;
  }

  .success-card h1 {
    font-size: 40px;
    margin-bottom: 24px;
  }

  .success-card button {
    margin-top: auto;
    position:absolute;
    bottom: 40px;
    left: 24px;
    right: 24px;
    width: calc(100% - 48px);
  }
}