/* =========================================================
   DABBIES — SIGNUP
   MONOGRAPH / EDITORIAL SYSTEM
========================================================= */

:root {
  --black: #050505;
  --panel: #0a0a0a;
  --white: #f3f3ef;
  --muted: #858580;
  --dim: #555551;

  --line: rgba(243, 243, 239, 0.14);
  --soft-line: rgba(243, 243, 239, 0.07);

  --danger: #ff7777;
  --success: #b9e4c0;
}


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

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--black);
}

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: "Inter", sans-serif;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}


/* =========================================================
   LOADER
========================================================= */

.signup-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;

  background: var(--black);

  transition:
    opacity 0.7s ease,
    visibility 0.7s ease;
}

.signup-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-inner {
  width: calc(100% - 48px);

  display: flex;
  justify-content: space-between;

  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--muted);
}


/* =========================================================
   HEADER
========================================================= */

.signup-header {
  position: fixed;
  inset: 0 0 auto 0;

  z-index: 100;

  height: 72px;

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;

  padding: 0 28px;

  border-bottom: 1px solid var(--soft-line);

  background: rgba(5, 5, 5, 0.88);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.signup-brand {
  color: var(--white);
  text-decoration: none;

  font-family: "DM Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.13em;
}

.header-center {
  display: flex;
  gap: 28px;

  font-family: "DM Mono", monospace;
  font-size: 8px;
  letter-spacing: 0.1em;

  color: var(--muted);
}

.login-link {
  justify-self: end;

  color: var(--white);
  text-decoration: none;

  font-family: "DM Mono", monospace;
  font-size: 8px;
  letter-spacing: 0.08em;

  transition: opacity 0.25s ease;
}

.login-link span {
  margin-left: 8px;
  font-size: 12px;
}

.login-link:hover {
  opacity: 0.5;
}


/* =========================================================
   MAIN GRID
========================================================= */

.signup-page {
  min-height: 100svh;

  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);

  padding-top: 72px;
}


/* =========================================================
   EDITORIAL SIDE
========================================================= */

.signup-editorial {
  position: relative;

  min-height: calc(100svh - 72px);

  padding: 28px;

  display: flex;
  flex-direction: column;

  border-right: 1px solid var(--soft-line);

  overflow: hidden;
}

.editorial-topline {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;

  font-family: "DM Mono", monospace;
  font-size: 8px;
  letter-spacing: 0.1em;

  color: var(--muted);
}

.editorial-topline span:nth-child(2) {
  text-align: center;
}

.editorial-topline span:last-child {
  text-align: right;
}

.editorial-core {
  position: relative;
  z-index: 2;

  flex: 1;

  display: flex;
  flex-direction: column;
  justify-content: center;

  padding: 50px 0 30px;
}

.coordinate-mark {
  display: flex;
  gap: 18px;

  margin-bottom: 30px;

  font-family: "DM Mono", monospace;
  font-size: 8px;
  letter-spacing: 0.08em;

  color: var(--muted);
}

.editorial-kicker {
  display: block;

  margin-bottom: 22px;

  font-family: "DM Mono", monospace;
  font-size: 8px;
  letter-spacing: 0.13em;

  color: var(--muted);
}

.editorial-title h1 {
  margin: 0;

  font-size: clamp(55px, 6vw, 94px);
  line-height: 0.88;

  font-weight: 500;
  letter-spacing: -0.075em;
}

.editorial-title h1 em {
  color: var(--muted);
  font-style: normal;
}

.editorial-line {
  width: min(100%, 440px);

  margin-top: 38px;
}

.editorial-line span {
  display: block;

  width: 100%;
  height: 1px;

  background: var(--line);
}

.editorial-copy {
  margin-top: 22px;
}

.editorial-copy p {
  max-width: 390px;

  margin: 0;

  font-size: 12px;
  line-height: 1.7;

  color: var(--muted);
}

.editorial-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;

  margin-top: 22px;

  font-family: "DM Mono", monospace;
  font-size: 7px;
  letter-spacing: 0.08em;

  color: var(--dim);
}


/* =========================================================
   ABSTRACT FIELD
========================================================= */

.field-system {
  position: absolute;

  right: -90px;
  bottom: 105px;

  width: 380px;
  height: 380px;

  opacity: 0.85;

  pointer-events: none;
}

.field-grid {
  position: absolute;
  inset: 0;

  background-image:
    linear-gradient(
      to right,
      var(--soft-line) 1px,
      transparent 1px
    ),
    linear-gradient(
      to bottom,
      var(--soft-line) 1px,
      transparent 1px
    );

  background-size: 38px 38px;

  transform: rotate(45deg);
}

.field-center {
  position: absolute;

  top: 50%;
  left: 50%;

  width: 190px;
  height: 190px;

  transform: translate(-50%, -50%);
}

.field-ring {
  position: absolute;

  inset: 0;

  border: 1px solid var(--line);
  border-radius: 50%;
}

.ring-two {
  inset: 30px;

  border-color: rgba(243, 243, 239, 0.09);
}

.field-node {
  position: absolute;

  top: 50%;
  left: 50%;

  width: 7px;
  height: 7px;

  transform: translate(-50%, -50%);

  border: 1px solid var(--white);
  border-radius: 50%;
}

.field-node span {
  position: absolute;

  inset: 2px;

  background: var(--white);
  border-radius: 50%;
}

.field-label {
  position: absolute;

  font-family: "DM Mono", monospace;
  font-size: 7px;
  letter-spacing: 0.1em;

  color: var(--dim);
}

.label-a {
  top: 65px;
  left: 70px;
}

.label-b {
  right: 55px;
  top: 170px;
}

.label-c {
  left: 105px;
  bottom: 50px;
}

.field-index {
  position: absolute;

  left: 15px;
  bottom: 10px;

  font-family: "DM Mono", monospace;
  font-size: 7px;
  letter-spacing: 0.1em;

  color: var(--dim);
}

.editorial-footer {
  position: relative;
  z-index: 2;

  display: flex;
  justify-content: space-between;

  padding-top: 18px;

  border-top: 1px solid var(--soft-line);

  font-family: "DM Mono", monospace;
  font-size: 7px;
  letter-spacing: 0.07em;

  color: var(--dim);
}


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

.signup-form-section {
  min-height: calc(100svh - 72px);

  padding:
    80px
    clamp(35px, 7vw, 110px);

  background: var(--panel);
}

.form-container {
  width: min(100%, 600px);
  margin: 0 auto;
}

.form-intro {
  margin-bottom: 48px;
}

.section-label {
  display: block;

  margin-bottom: 20px;

  font-family: "DM Mono", monospace;
  font-size: 8px;
  letter-spacing: 0.12em;

  color: var(--muted);
}

.form-intro h2 {
  margin: 0;

  font-size: clamp(48px, 5vw, 76px);
  line-height: 0.9;

  font-weight: 500;
  letter-spacing: -0.07em;
}

.form-intro h2 span {
  display: block;
  color: var(--muted);
}

.form-intro p {
  max-width: 440px;

  margin: 26px 0 0;

  font-size: 12px;
  line-height: 1.7;

  color: var(--muted);
}


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

.signup-form {
  width: 100%;
}

.field-group {
  margin-bottom: 26px;
}

.field-group label,
.label-row label {
  display: block;

  margin-bottom: 9px;

  font-family: "DM Mono", monospace;
  font-size: 8px;
  letter-spacing: 0.1em;

  color: var(--muted);
}

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

  margin-bottom: 9px;
}

.label-row label {
  margin: 0;
}

.label-row span {
  font-family: "DM Mono", monospace;
  font-size: 7px;
  letter-spacing: 0.07em;

  color: var(--dim);
}

.field-group input {
  width: 100%;
  height: 54px;

  padding: 0;

  border: 0;
  border-bottom: 1px solid var(--line);

  outline: none;

  border-radius: 0;

  background: transparent;

  color: var(--white);

  font-size: 14px;

  transition:
    border-color 0.25s ease,
    padding 0.25s ease;
}

.field-group input::placeholder {
  color: #4f4f4b;
}

.field-group input:focus {
  border-bottom-color: var(--white);
}

.field-group input:focus::placeholder {
  opacity: 0.35;
}


/* DATE INPUT */

.field-group input[type="date"] {
  color-scheme: dark;
}


/* =========================================================
   PASSWORD
========================================================= */

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 60px;
}

.password-toggle {
  position: absolute;

  top: 50%;
  right: 0;

  transform: translateY(-50%);

  padding: 10px 0;

  border: 0;

  background: transparent;

  color: var(--muted);

  font-family: "DM Mono", monospace;
  font-size: 7px;
  letter-spacing: 0.08em;

  cursor: pointer;
}

.password-toggle:hover {
  color: var(--white);
}

.password-meter {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;

  margin-top: 9px;
}

.password-meter span {
  height: 2px;

  background: #222220;

  transition: background 0.25s ease;
}

.password-meter.weak span:nth-child(1) {
  background: var(--danger);
}

.password-meter.medium span:nth-child(-n + 2) {
  background: #b9a96b;
}

.password-meter.strong span:nth-child(-n + 3) {
  background: #cfcfca;
}

.password-meter.excellent span {
  background: var(--success);
}

.password-hint,
.field-note {
  display: block;

  margin-top: 8px;

  font-family: "DM Mono", monospace;
  font-size: 7px;
  line-height: 1.6;

  color: var(--dim);
}


/* =========================================================
   REFERRAL
========================================================= */

.referral-input-wrap {
  position: relative;
}

.referral-input-wrap input {
  padding-right: 100px;

  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.referral-status {
  position: absolute;

  right: 0;
  top: 50%;

  transform: translateY(-50%);

  font-family: "DM Mono", monospace;
  font-size: 7px;
  letter-spacing: 0.06em;

  color: var(--muted);
}

.referral-status.valid {
  color: var(--success);
}

.referral-status.invalid {
  color: var(--danger);
}


/* =========================================================
   ERRORS
========================================================= */

.field-error {
  display: none;

  margin-top: 8px;

  font-family: "DM Mono", monospace;
  font-size: 7px;
  line-height: 1.5;

  color: var(--danger);
}

.field-error.show {
  display: block;
}


/* =========================================================
   REGISTRATION NOTE
========================================================= */

.registration-note {
  display: grid;
  grid-template-columns: 75px 1fr;
  gap: 18px;

  margin: 34px 0 25px;
  padding: 17px 0;

  border-top: 1px solid var(--soft-line);
  border-bottom: 1px solid var(--soft-line);
}

.registration-note-index {
  font-family: "DM Mono", monospace;
  font-size: 7px;
  letter-spacing: 0.08em;

  color: var(--dim);
}

.registration-note p {
  margin: 0;

  font-size: 10px;
  line-height: 1.6;

  color: var(--muted);
}


/* =========================================================
   CONSENT
========================================================= */

.consent-area {
  margin: 26px 0;
}

.consent-row {
  position: relative;

  display: flex;
  align-items: flex-start;

  gap: 11px;

  cursor: pointer;
}

.consent-row input {
  position: absolute;

  opacity: 0;

  pointer-events: none;
}

.custom-checkbox {
  width: 16px;
  height: 16px;

  flex: 0 0 16px;

  margin-top: 1px;

  border: 1px solid #5b5b57;

  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.consent-row input:checked + .custom-checkbox {
  background: var(--white);
  border-color: var(--white);
}

.consent-row input:checked + .custom-checkbox::after {
  content: "✓";

  display: block;

  color: var(--black);

  font-size: 10px;
  line-height: 14px;

  text-align: center;
}

.consent-text {
  font-size: 10px;
  line-height: 1.6;

  color: var(--muted);
}

.inline-link,
.consent-text a {
  padding: 0;

  border: 0;

  background: transparent;

  color: var(--white);

  text-decoration: underline;
  text-underline-offset: 3px;

  cursor: pointer;

  font-size: inherit;
}

.inline-link:hover,
.consent-text a:hover {
  opacity: 0.55;
}


/* =========================================================
   MESSAGE
========================================================= */

.form-message {
  display: none;

  margin-bottom: 17px;
  padding: 13px 14px;

  border: 1px solid var(--soft-line);

  font-family: "DM Mono", monospace;
  font-size: 8px;
  line-height: 1.6;
}

.form-message.show {
  display: block;
}

.form-message.error {
  border-color: rgba(255, 119, 119, 0.35);
  color: var(--danger);
}

.form-message.success {
  border-color: rgba(185, 228, 192, 0.3);
  color: var(--success);
}


/* =========================================================
   SUBMIT
========================================================= */

.submit-button {
  width: 100%;
  height: 62px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 20px;

  border: 1px solid var(--white);

  background: var(--white);

  color: var(--black);

  cursor: pointer;

  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.1em;

  transition:
    background 0.3s ease,
    color 0.3s ease,
    transform 0.25s ease;
}

.submit-arrow {
  font-size: 18px;
}

.submit-button:hover {
  background: transparent;
  color: var(--white);
}

.submit-button:active {
  transform: scale(0.985);
}

.submit-button.loading {
  pointer-events: none;
  opacity: 0.5;
}


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

.form-footer {
  display: flex;
  justify-content: space-between;

  padding-top: 17px;

  font-family: "DM Mono", monospace;
  font-size: 7px;
  letter-spacing: 0.05em;

  color: var(--dim);
}

.form-footer a {
  color: var(--white);
  text-decoration: none;
}

.form-footer a:hover {
  opacity: 0.5;
}


/* =========================================================
   TERMS MODAL
========================================================= */

.terms-modal {
  position: fixed;
  inset: 0;

  z-index: 1000;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;

  visibility: hidden;
  opacity: 0;

  pointer-events: none;

  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.terms-modal.open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.terms-backdrop {
  position: absolute;
  inset: 0;

  background: rgba(0, 0, 0, 0.8);

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.terms-dialog {
  position: relative;

  width: min(620px, 100%);
  max-height: calc(100svh - 40px);

  display: flex;
  flex-direction: column;

  background: #101010;

  border: 1px solid var(--line);

  transform: translateY(18px);

  transition:
    transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.terms-modal.open .terms-dialog {
  transform: translateY(0);
}

.terms-dialog-header {
  display: flex;
  justify-content: space-between;

  padding: 21px;

  border-bottom: 1px solid var(--soft-line);
}

.terms-dialog-header span {
  font-family: "DM Mono", monospace;
  font-size: 7px;
  letter-spacing: 0.1em;

  color: var(--muted);
}

.terms-dialog-header h2 {
  margin: 9px 0 0;

  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.modal-close {
  width: 34px;
  height: 34px;

  border: 1px solid var(--line);

  background: transparent;

  color: var(--white);

  font-size: 21px;
  line-height: 1;

  cursor: pointer;
}

.modal-close:hover {
  background: var(--white);
  color: var(--black);
}

.terms-dialog-body {
  overflow-y: auto;

  padding: 25px 21px;
}

.terms-lead {
  max-width: 450px;

  margin: 0 0 25px;

  font-size: 14px;
  line-height: 1.6;
}

.terms-point {
  display: grid;
  grid-template-columns: 35px 1fr;
  gap: 14px;

  padding: 17px 0;

  border-top: 1px solid var(--soft-line);
}

.terms-point span {
  font-family: "DM Mono", monospace;
  font-size: 7px;

  color: var(--muted);
}

.terms-point p {
  margin: 0;

  font-size: 11px;
  line-height: 1.6;

  color: #aaa9a5;
}

.terms-age {
  margin-top: 22px;
  padding: 17px;

  border: 1px solid var(--soft-line);
}

.terms-age span {
  display: block;

  font-family: "DM Mono", monospace;
  font-size: 7px;
  letter-spacing: 0.1em;

  color: var(--muted);
}

.terms-age strong {
  display: block;

  margin: 8px 0;

  font-size: 31px;
  font-weight: 500;
}

.terms-age p {
  margin: 0;

  font-size: 10px;
  line-height: 1.5;

  color: var(--muted);
}

.terms-dialog-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;

  border-top: 1px solid var(--soft-line);
}

.terms-dialog-footer a,
.modal-understand {
  min-height: 57px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 0;

  background: transparent;

  color: var(--white);

  font-family: "DM Mono", monospace;
  font-size: 7px;
  letter-spacing: 0.08em;

  text-decoration: none;

  cursor: pointer;
}

.terms-dialog-footer a {
  border-right: 1px solid var(--soft-line);
}

.terms-dialog-footer a:hover {
  background: #171717;
}

.modal-understand {
  background: var(--white);
  color: var(--black);
}

.modal-understand:hover {
  background: #dcdcd7;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1050px) {

  .signup-page {
    grid-template-columns: 1fr;
  }

  .signup-editorial {
    min-height: 720px;

    border-right: 0;
    border-bottom: 1px solid var(--soft-line);
  }

  .signup-form-section {
    min-height: auto;
  }

  .editorial-title h1 {
    font-size: clamp(58px, 11vw, 100px);
  }

  .field-system {
    right: -30px;
  }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

  .signup-header {
    height: 64px;

    grid-template-columns: 1fr auto;

    padding: 0 17px;
  }

  .header-center {
    display: none;
  }

  .login-link {
    font-size: 7px;
  }

  .signup-page {
    padding-top: 64px;
  }

  .signup-editorial {
    min-height: 650px;

    padding: 18px;
  }

  .editorial-core {
    padding-top: 55px;
  }

  .coordinate-mark {
    margin-bottom: 24px;
  }

  .editorial-title h1 {
    font-size: clamp(52px, 16vw, 76px);
  }

  .editorial-copy p {
    max-width: 330px;

    font-size: 11px;
  }

  .editorial-meta {
    gap: 11px;

    font-size: 6px;
  }

  .field-system {
    right: -145px;
    bottom: 75px;

    transform: scale(0.75);
    transform-origin: center;
  }

  .editorial-footer {
    flex-direction: column;
    gap: 8px;

    font-size: 6px;
  }

  .signup-form-section {
    padding:
      60px
      18px
      75px;
  }

  .form-intro {
    margin-bottom: 42px;
  }

  .form-intro h2 {
    font-size: clamp(48px, 15vw, 72px);
  }

  .field-group input {
    height: 52px;
  }

  .registration-note {
    grid-template-columns: 62px 1fr;

    gap: 12px;
  }

  .registration-note p {
    font-size: 9px;
  }

  .terms-modal {
    padding: 10px;
  }

  .terms-dialog {
    max-height: calc(100svh - 20px);
  }

  .terms-dialog-footer {
    grid-template-columns: 1fr;
  }

  .terms-dialog-footer a {
    border-right: 0;
    border-bottom: 1px solid var(--soft-line);
  }

}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

}