@font-face {
  font-family: "Montserrat";
  src: url("./fonts/Montserrat-VariableFont_wght.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --account-background: #ece5d3;
  --account-text: #302d29;
  --account-muted: #74716c;
  --account-border: #c9c0ad;
  --account-accent: #ba9e76;
  --account-accent-hover: #a88b64;
  --account-success: #5f7755;
  --font-sans: "Montserrat", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--account-background);
  color: var(--account-text);
  font-family: var(--font-sans);
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

button,
input {
  font: inherit;
}

.account-layout {
  display: grid;
  grid-template-columns: minmax(0, 59%) minmax(380px, 41%);
  min-height: 100vh;
  min-height: 100svh;
}

.account-panel {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  padding: clamp(58px, 7vh, 78px) clamp(44px, 7vw, 106px) 32px;
}

.account-panel__inner {
  width: min(100%, 680px);
}

.account-home-link {
  position: absolute;
  top: 28px;
  left: 28px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #c7c7c7;
  color: #5e5e5e;
  transition:
    background-color 160ms ease,
    transform 160ms ease;
}

.account-home-link:hover {
  background: #b8b8b8;
  transform: translateX(-2px);
}

.account-home-link:focus-visible,
.password-toggle:focus-visible,
.primary-button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(90, 67, 48, 0.32);
  outline-offset: 3px;
}

.account-home-link svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.account-heading {
  margin-bottom: clamp(20px, 3vh, 30px);
}

.account-heading h1 {
  margin: 0 0 4px;
  font-size: clamp(2rem, 3.1vw, 2.65rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.account-heading p {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.5;
}

.account-form {
  display: grid;
  gap: clamp(18px, 2.3vh, 24px);
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-name-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.form-field label,
.password-toggle {
  color: #65625e;
  font-size: 0.93rem;
}

.form-field input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--account-border);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--account-text);
  padding: 12px 15px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.form-field input:hover {
  border-color: #b5aa95;
}

.form-field input:focus {
  border-color: #9b805e;
  box-shadow: 0 0 0 3px rgba(186, 158, 118, 0.18);
  outline: none;
}

.password-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.password-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0 7px;
}

.password-toggle svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.password-requirements {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 26px;
  margin: 2px 0 0;
  padding: 0;
  color: #97938b;
  font-size: 0.78rem;
  line-height: 1.35;
  list-style: none;
}

.password-requirements li {
  position: relative;
  padding-left: 15px;
}

.password-requirements li::before {
  content: "";
  position: absolute;
  top: 0.45em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.password-requirements li.is-met {
  color: var(--account-success);
}

.checkbox-field {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1.45;
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: #2f2d29;
}

.account-terms {
  margin: 6px 0 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.form-message {
  display: none;
  margin: -10px 0 0;
  font-size: 0.86rem;
  line-height: 1.4;
}

.form-message:not(:empty) {
  display: block;
}

.form-message.is-error {
  color: #9a3e35;
}

.form-message.is-success {
  color: var(--account-success);
}

.primary-button {
  justify-self: start;
  min-width: 230px;
  min-height: 48px;
  border: 0;
  background: var(--account-accent);
  color: #fff;
  cursor: pointer;
  padding: 13px 30px;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  transition:
    background-color 160ms ease,
    transform 160ms ease;
}

.primary-button:hover {
  background: var(--account-accent-hover);
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

.account-success[hidden] {
  display: none;
}

.account-success {
  display: grid;
  align-content: center;
  min-height: min(620px, calc(100svh - 130px));
  max-width: 610px;
  outline: none;
}

.account-success__icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 24px;
  border-radius: 50%;
  background: rgba(95, 119, 85, 0.14);
  color: var(--account-success);
}

.account-success__icon svg {
  width: 30px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.account-success__eyebrow {
  margin: 0 0 10px;
  color: #9e7d55;
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.account-success h2 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 3.1vw, 2.65rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.account-success p {
  max-width: 570px;
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.65;
}

.account-success__note {
  margin-top: 16px !important;
  color: var(--account-muted);
  font-size: 0.85rem !important;
}

.account-success__button {
  width: fit-content;
  margin-top: 30px;
  text-align: center;
  text-decoration: none;
}

.account-image {
  position: sticky;
  top: 0;
  min-width: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: #bba987;
}

.account-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
}

@media (max-width: 980px) {
  .account-layout {
    grid-template-columns: minmax(0, 57%) minmax(320px, 43%);
  }

  .account-panel {
    padding-right: 42px;
    padding-left: 42px;
  }

  .password-requirements {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .account-layout {
    display: flex;
    flex-direction: column-reverse;
  }

  .account-panel {
    padding: 58px 24px 48px;
  }

  .account-home-link {
    top: 18px;
    left: 20px;
  }

  .account-heading {
    margin-bottom: 30px;
  }

  .account-image {
    position: relative;
    width: 100%;
    height: min(34vh, 310px);
  }
}

@media (max-width: 480px) {
  .form-name-row {
    grid-template-columns: 1fr;
  }

  .password-requirements {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .account-form {
    gap: 24px;
  }

  .primary-button {
    width: 100%;
  }
}
