/* 
  SPACING SYSTEM (px)
  2 / 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64 / 80 / 96 / 128

  FONT SIZE SYSTEM (px)
  10 / 12 / 14 / 16 / 18 / 20 / 24 / 30 / 36 / 44 / 52 / 62 / 74 / 86 / 98
*/

/* ============================================================
   CUSTOM PROPERTIES
   ============================================================ */
:root {
  /* 
    COLOR SYSTEM
  */
  --color-blue-500: hsl(223, 87%, 63%);
  --color-blue-200: hsl(223, 100%, 88%);
  --color-red-400: hsl(354, 100%, 66%);
  --color-gray-400: hsl(0, 0%, 59%);
  --color-blue-950: hsl(209, 33%, 12%);

  /* 
    TYPOGRAPHY SYSTEM
  */
  --ff-libre: "Libre Franklin", sans-serif;
  --fw-300: 300;
  --fw-600: 600;
  --fw-700: 700;

  /* 
    LAYOUT SYSTEM
  */
  --max-width: 1200px;
  --section-padding-x: clamp(24px, 6vw, 80px);
}

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

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

button {
  cursor: pointer;
  font-family: inherit;
}

/* ============================================================
   BASE
   ============================================================ */

html {
  scroll-behavior: smooth;
}

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

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--ff-libre);
  font-size: 20px;
  padding: 20px 10px;
  background-color: #fff;
}

.main {
  max-width: 600px;
  width: 100%;
  gap: 32px;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

.logo {
  margin: 0 auto 24px;
}

h1 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: var(--fw-300);
  color: var(--color-gray-400);
}

h1 strong {
  color: var(--color-blue-950);
  font-weight: var(--fw-700);
}

.subtitle {
  font-size: 16px;
  margin-top: 12px;
  margin-bottom: 24px;
  color: var(--color-blue-950);
}

/* ============================================================
   FORM
   ============================================================ */

.form {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
}

.form input {
  flex: 1;
  min-width: 10px;
  padding: 16px 15px;
  border-radius: 999px;
  border: 1px solid var(--color-gray-400);
  outline: none;
  font-size: 14px;
  color: var(--color-gray-400);
}

.form input::placeholder {
  color: var(--color-gray-400);
}

.form input:focus {
  border-color: var(--color-blue-500);
}

/* ERROR STATE */
.form input.error {
  border-color: var(--color-red-400);
}

.error-message {
  width: 100%;
  font-size: 12px;
  color: var(--color-red-400);
  text-align: left;
  margin-top: 6px;
  padding-left: 20px;
}

/* BUTTON */
.form button {
  padding: 16px 60px;
  border-radius: 999px;
  border: none;
  background: var(--color-blue-500);
  color: white;
  font-weight: var(--fw-600);
  font-size: 14px;
  box-shadow: 0 6px 12px rgba(79, 125, 243, 0.4);
  transition: 0.2s ease;
}

.form button:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

/* ============================================================
   ILLUSTRATION
   ============================================================ */

.illustration {
  margin-top: 40px;
}

.illustration img {
  width: 100%;
  max-width: 600px;
}

/* ============================================================
   FOOTER
   ============================================================ */

footer {
  margin-top: 20px;
  text-align: center;
}

.socials {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.socials a {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--color-blue-200);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-blue-500);
  transition: 0.2s ease;
}

.socials a:hover {
  background: var(--color-blue-500);
  color: white;
}

footer p {
  font-size: 12px;
  color: var(--color-gray-400);
}

@media (max-width: 500px) {
  .form {
    flex-direction: column;
    align-items: stretch;
  }

  .form button {
    width: 100%;
  }

  .error-message {
    text-align: center;
    padding-left: 0;
  }
}
