/* ==========================================================================
   Surf Coast Academy — auth.css
   Split-screen sign in / sign up pages. Standalone layout (no site header).
   ========================================================================== */
.page-auth {
  background: var(--white);
}

.auth {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr;
}

/* Visual panel */
.auth__visual {
  position: relative;
  display: none;
  color: var(--paper);
  background: var(--ink);
  isolation: isolate;
  overflow: hidden;
}

.auth__visual > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

.auth__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(12, 12, 10, 0.75) 0%, rgba(12, 12, 10, 0.2) 50%, rgba(12, 12, 10, 0.1) 100%);
  z-index: -1;
}

.auth__visual-inner {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(2rem, 4vw, 3.5rem);
}

.auth__visual .brand {
  color: var(--white);
}

.auth__statement {
  font-size: clamp(2rem, 1.2rem + 2.4vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  max-width: 12ch;
  text-wrap: balance;
}

.auth__statement-sub {
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.75);
  max-width: 34ch;
  font-size: var(--text-md);
}

/* Form panel */
.auth__panel {
  display: flex;
  flex-direction: column;
  padding: clamp(1.25rem, 4vw, 3rem) var(--gutter);
}

.auth__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(2rem, 6vh, 4rem);
}

.auth__back {
  font-size: var(--text-sm);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.auth__back svg {
  width: 1rem;
  height: 1rem;
}

.auth__back:hover {
  color: var(--ink);
}

.auth__form-wrap {
  width: 100%;
  max-width: 420px;
  margin: auto;
  display: grid;
  gap: 1.75rem;
}

.auth__head {
  display: grid;
  gap: 0.5rem;
}

.auth__head p {
  color: var(--muted);
}

.auth__form {
  display: grid;
  gap: 1.25rem;
}

.auth__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  font-size: var(--text-sm);
}

.auth__link {
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-strong);
  transition: text-decoration-color var(--dur-fast) var(--ease-out);
}

.auth__link:hover {
  text-decoration-color: currentColor;
}

/* Password field with toggle */
.password {
  position: relative;
}

.password .input {
  padding-right: 3.25rem;
}

.password__toggle {
  position: absolute;
  right: 0.375rem;
  top: 0.375rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}

.password__toggle:hover {
  color: var(--ink);
  background: var(--paper-2);
}

.password__toggle svg {
  width: 1.125rem;
  height: 1.125rem;
}

.password__toggle .icon-hide {
  display: none;
}

.password__toggle[aria-pressed="true"] .icon-show {
  display: none;
}

.password__toggle[aria-pressed="true"] .icon-hide {
  display: block;
}

/* Strength meter */
.strength {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.15rem;
}

.strength__bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.3rem;
}

.strength__bar {
  height: 3px;
  border-radius: 2px;
  background: var(--line);
  transition: background-color var(--dur) var(--ease-out);
}

.strength__label {
  font-size: var(--text-xs);
  color: var(--muted);
}

.strength[data-level="1"] .strength__bar:nth-child(-n+1) { background: var(--error); }
.strength[data-level="2"] .strength__bar:nth-child(-n+2) { background: #c58a2d; }
.strength[data-level="3"] .strength__bar:nth-child(-n+3) { background: #7a9a3a; }
.strength[data-level="4"] .strength__bar:nth-child(-n+4) { background: var(--accent); }

/* Divider */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* Social buttons */
.social {
  display: grid;
  gap: 0.75rem;
}

.btn-social {
  width: 100%;
  background: var(--white);
  border-color: var(--line-strong);
  color: var(--ink);
  gap: 0.75rem;
}

.btn-social:hover {
  border-color: var(--ink);
  transform: none;
}

.btn-social svg {
  width: 1.125rem;
  height: 1.125rem;
  flex: none;
}

.auth__foot {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--muted);
}

.auth__legal {
  margin-top: auto;
  padding-top: 2rem;
  font-size: var(--text-xs);
  color: var(--muted-2);
  text-align: center;
}

@media (min-width: 900px) {
  .auth {
    grid-template-columns: 5fr 7fr;
  }

  .auth__visual {
    display: block;
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
  }

  .auth__panel {
    padding: clamp(1.5rem, 3vw, 2.5rem) clamp(2rem, 6vw, 6rem);
    min-height: 100vh;
  }
}

@media (min-width: 1280px) {
  .auth {
    grid-template-columns: 1fr 1fr;
  }
}
