/* =========================
   DEALER REGISTRATION (Clean)
========================= */

/* hero wrapper fix */
body:has(.reg-hero) .hero-wrapper { min-height: 0; }

/* =========================
   HERO BACKGROUND
========================= */

.hero-bg.hero-bg--registration{
  position:absolute;
  inset:0;
  z-index:0;
  pointer-events:none;
  overflow:hidden;
  display:flex;
  justify-content:center;
  align-items:flex-start;
}

.hero-bg.hero-bg--registration img{
  width:100%;
  height:100%;
  object-fit:cover;
}

/* bottom fade */
.hero-bg.hero-bg--registration::after{
  content:"";
  position:absolute;
  left:0; right:0; bottom:0;
  height:30px;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0.65) 55%,
    #000 100%
  );
}

/* content above bg */
.site-header,
.reg-hero{
  position:relative;
  z-index:1;
}

/* =========================
   HERO
========================= */

.reg-hero{
  min-height:50vh;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  margin-bottom:40px;
}

.reg-title{
  margin:0;
  font-family:var(--font-heading);
  font-size:60px;
  line-height:1.1;
  letter-spacing:.03em;
  text-transform:uppercase;
  color:#fff;
  display:block;
}

.reg-title__sub{
  display:block;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  line-height: inherit;
}


@media (min-width: 1025px){
  .reg-title{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:8px;
  }
  .reg-title__sub{
    white-space:nowrap;
  }
}

/* Tablet */
@media (max-width:1024px){
  .reg-title{ font-size:34px; }
  .reg-title__sub{ font-size:34px; white-space:normal; }
}

/* =========================
   CONTENT LAYOUT
========================= */

.reg-inner{
  max-width:660px;
  margin-inline:auto;
  padding-bottom:40px;
}

.reg-form{
  display:flex;
  flex-direction:column;
  gap:22px;
}

.reg-form-title{
  margin:0 0 6px;
  text-align:center;
  color:#fff;
  font-size:20px;
  font-weight:600;
  letter-spacing:.02em;
}

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

.reg-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:20px;
  width:100%;
  max-width:620px;
  margin-inline:auto;
}

.reg-field--full{ grid-column:1 / -1; }

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

.reg-field input,
.reg-field select{
  width:100%;
  height:52px;
  background:#0f0f0f;
  border:none;
  border-radius:10px;
  padding:0 16px;
  box-sizing:border-box;
  font-size:16px;
  outline:none;
  color:#a4a4a4;
}

.reg-field input::placeholder{ color:#777; }
.reg-field input:not(:placeholder-shown){ color:#fff; }
.reg-field select:valid{ color:#fff; }

/* date icon support */
.reg-field input.js-date{
  background-image:url('../img/ic.svg');
  background-repeat:no-repeat;
  background-position:right 16px center;
  background-size:16px;
  padding-right:52px;
  cursor:pointer;
}

/* select arrow */
.reg-field select{
  appearance:none;
  background-image:url('../img/arrow.svg');
  background-repeat:no-repeat;
  background-position:right 16px center;
  background-size:12px;
  padding-right:44px;
  cursor:pointer;
}

/* =========================
   ACTIONS
========================= */

.reg-actions{
  display:flex;
  justify-content:flex-start;
  max-width:620px;
  margin-inline:auto;
  margin-top:8px;
  width:100%;
}

.reg-submit{
  width:300px;
  height:52px;
  border:none;
  border-radius:10px;
  cursor:pointer;
  font-family:var(--font-heading);
  font-size:14px;
  color:#fff;
  background: linear-gradient(90deg, #4FC2EB, #7185C1);
}

.reg-submit[disabled]{ opacity:.6; cursor:not-allowed; }

.reg-msg{
  text-align:center;
  font-size:12px;
  min-height:18px;
  color:#cfcfcf;
  max-width:620px;
  margin-inline:auto;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width:768px){
  .reg-hero{
    min-height:40vh;
    margin-bottom:0;
  }

  .reg-inner{ padding-bottom:0; }

  .reg-grid{
    grid-template-columns:1fr;
    max-width:100%;
  }

  .reg-actions{ max-width:100%; }
  .reg-submit{ width:100%; }

  .hero-wrapper{ position:relative; }
}


/* =========================
   REG SUCCESS MODAL
========================= */

.reg-modal{
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
}

.reg-modal.is-open{
  display: block;
}

.reg-modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(2px);
}

.reg-modal__panel{
  position: relative;
  width: min(520px, calc(100% - 40px));
  margin: 120px auto 0;
  background: rgba(0,0,0,.92);
  border-radius: 10px;
  padding: 48px 28px 42px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
  text-align: center;
}

.reg-modal__close{
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.55);
  font-size: 22px;
  cursor: pointer;
}

.reg-modal__close:hover{
  color: #fff;
}

.reg-modal__icon{
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}

.reg-modal__title{
  margin: 0 0 8px;
  font-family: var(--font-heading);
  font-size: 18px;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #fff;
}

.reg-modal__text{
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255,255,255,.8);
}

/* lock scroll when modal open */
body.is-modal-open{
  overflow: hidden;
}
