/* =========================================================
   ASIAN ALLIANCE PAGE
   Uses the same tokens as the main AETECH site so the two
   feel like one company.
========================================================= */

:root {
  --navy-950: #061426;
  --navy-900: #0b1728;
  --navy-800: #14213d;
  --accent: #fca311;
  --accent-deep: #d78800;
  --accent-hover: #ffb52e;
  --paper: #eef3f8;
  --white: #ffffff;
  --line: #cdd7e4;
  --ink-soft: #4a5a72;
  --error: #b3261e;

  --radius-card: 14px;
  --radius-field: 10px;
  --radius-pill: 25px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background-color: var(--navy-950);
  color: var(--white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

header.site,
footer.site-footer {
  line-height: normal;
}

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

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 2000;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--navy-800);
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
}

/* =========================================================
   JOIN: ONE SCREEN
   Left = pitch, right = compact form card.
   To change the picture, edit the url() below.
   To make the tint lighter/darker, change the 0.xx numbers.
========================================================= */

main {
  overflow: clip;
}

.join {
  --join-tint-left: 0.96; /* tint strength on the left (behind the text) */
  --join-tint-right: 0.6; /* tint strength on the right (behind the form) */

  background-image:
    linear-gradient(
      100deg,
      rgba(6, 20, 38, var(--join-tint-left)) 0%,
      rgba(
          6,
          20,
          38,
          calc((var(--join-tint-left) + var(--join-tint-right)) / 2)
        )
        45%,
      rgba(6, 20, 38, var(--join-tint-right)) 100%
    ),
    url("../assets/alliancebg.jpg");

  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding: 128px 0 64px; /* top clears the floating topbar */
  background-color: var(--navy-950);
  background-image: linear-gradient(
    100deg,
    rgba(6, 20, 38, 0.96) 0%,
    rgba(6, 20, 38, 0.86) 45%,
    rgba(6, 20, 38, 0.6) 100%,
    url("../assets/alliancebg.jpg")
  );
  /* To add a photo: put assets/alliancebg.jpg in the repo and add
     ", url('../assets/alliancebg.jpg')" after the gradient above. */
  background-size: cover;
  background-position: 30% center;
  background-repeat: no-repeat;
}

.join-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 560px);
  align-items: stretch;
  gap: clamp(40px, 6vw, 96px);
  width: min(1240px, 92%);
  margin: 0 auto;
}

/* ---------- Left: pitch ---------- */

.forum-tag {
  display: inline-block;
  margin-bottom: 24px;
  padding: 7px 16px;
  border: 1px solid rgba(252, 163, 17, 0.55);
  border-radius: var(--radius-pill);
  background: rgba(6, 20, 38, 0.5);
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

.join-intro h1 {
  margin-bottom: 22px;
  font-size: clamp(44px, 5.2vw, 76px);
  line-height: 0.98;
  font-weight: 300;
  letter-spacing: -3px;
}

.join-intro h1 span {
  display: block;
  color: var(--accent);
  font-weight: 500;
}

.join-lede {
  max-width: 520px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 17px;
  line-height: 1.7;
}

/* left column matches the form's height:
   text lines up with the card's top, the map with its bottom */
.join-intro {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
}

.reach {
  flex: 1 1 0; /* fills all the space left under the paragraph */
  min-height: 0;
  width: 100%;
  overflow: hidden;
}

/* ---------- Right: compact form card ---------- */

.join-card {
  width: 100%;
  padding: 28px 30px 26px;
  background-color: var(--white);
  color: var(--navy-800);
  border-radius: var(--radius-card);
  border-top: 4px solid var(--accent);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  outline: none;
}

.card-head {
  margin-bottom: 18px;
}

.card-head h2 {
  margin-bottom: 6px;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.card-head p {
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.5;
}

.group {
  min-width: 0;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}

.group legend {
  float: left; /* lets the legend sit in normal flow */
  width: 100%;
  margin: 0 0 9px;
  padding: 0;
  color: var(--navy-800);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.9px;
  text-transform: uppercase;
}

.group legend + * {
  clear: both;
}

.hint {
  margin-left: 8px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

/* ---------- Text fields ---------- */

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 12px;
}

.field {
  margin-bottom: 11px;
}

.field label {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 700;
}

.field input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background-color: #f8fafc;
  color: var(--navy-800);
  font-size: 14px;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.field input::placeholder {
  color: #7c8aa0;
}

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

.field input:focus {
  border-color: var(--navy-800);
  background-color: var(--white);
  box-shadow: 0 0 0 3px rgba(252, 163, 17, 0.35);
  outline: none;
}

.field.invalid input {
  border-color: var(--error);
  background-color: #fff6f5;
}

.error {
  margin-top: 4px;
  color: var(--error);
  font-size: 12.5px;
  font-weight: 700;
}

.error:empty {
  display: none;
}

.other-field {
  margin: 10px 0 0;
}

/* ---------- Choices ---------- */

.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choices.rows {
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 2px;
}

.choice {
  position: relative;
}

/* the real checkbox stays in the DOM and keyboard-focusable */
.choice input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

/* chips: areas of contribution (each shows its own checkbox) */
.chips .choice label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px 7px 10px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-pill);
  background-color: #f8fafc;
  font-size: 13px;
  line-height: 1.2;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.chips .choice:hover label {
  border-color: #a9b9ce;
}

.chips .choice input:checked + label {
  border-color: var(--navy-800);
  background-color: #fff6e3;
}

/* rows + consent: small checkbox with plain text */
.rows .choice label,
.consent label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
  font-size: 13.5px;
  line-height: 1.4;
  cursor: pointer;
}

.chips .choice label::before,
.rows .choice label::before,
.consent label::before {
  content: "";
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 2px solid #8fa2bb;
  border-radius: 5px;
  background-color: var(--white);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.chips .choice input:checked + label::before,
.rows .choice input:checked + label::before,
.consent input:checked + label::before {
  border-color: var(--navy-800);
  background-color: var(--navy-800);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='%23FCA311' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 7.5l3 3 6-7'/%3E%3C/svg%3E");
}

.chips .choice label::before {
  flex-basis: 16px;
  width: 16px;
  height: 16px;
  margin-top: 0;
  border-radius: 4px;
  background-size: 11px 11px;
}

.choice input:focus-visible + label {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 8px;
}

/* ---------- Commitment + submit ---------- */

.submit-area {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.commitment {
  margin-bottom: 10px;
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: #f3f6fa;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.5;
}

.commitment strong {
  color: var(--navy-800);
}

.record-note {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.form-status {
  margin: 8px 0;
  font-size: 14px;
  font-weight: 700;
}

.form-status:empty {
  display: none;
}

.form-status.error-state {
  padding: 10px 14px;
  border-radius: 8px;
  background: #fff0ee;
  color: var(--error);
}

.submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  margin-top: 8px;
  padding: 13px 28px;
  border: 0;
  border-radius: var(--radius-pill);
  background-color: var(--accent);
  color: var(--navy-800);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background-color 0.25s ease,
    transform 0.25s ease;
}

.submit:hover {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
}

.submit:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

.submit.sending .submit-label::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 12px;
  border: 2px solid var(--navy-800);
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -2px;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* honeypot: off-screen, not display:none, so bots still fill it */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Success state ---------- */

.success {
  padding: 26px 0 8px;
  outline: none;
}

.success-mark {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin-bottom: 24px;
  border-radius: 50%;
  background-color: var(--navy-800);
  color: var(--accent);
  animation: pop 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

@keyframes pop {
  from {
    transform: scale(0.5);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.success h2 {
  margin-bottom: 12px;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.success p {
  margin-bottom: 24px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.7;
}

.success-link {
  color: var(--navy-800);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 3px;
  text-underline-offset: 5px;
}

.success-link:hover {
  text-decoration-color: var(--navy-800);
}

/* after a successful send: card keeps its height, message sits centred */
@media (min-width: 1021px) {
  .join-card.is-done {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: var(--card-h);
  }
}

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

@media (max-width: 1020px) {
  .join {
    min-height: 0;
    padding: 44px 0 56px;
  }

  .join-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .join-card {
    max-width: 600px;
  }

  .reach {
    flex: none;
    height: auto;
    max-width: 440px;
  }
}

@media (max-width: 600px) {
  .join {
    padding: 104px 0 0;
    background-position: 20% top;
  }

  .join-inner {
    width: 100%;
    gap: 32px;
  }

  .join-intro {
    padding: 0 20px;
  }

  .join-intro h1 {
    letter-spacing: -2px;
  }

  .join-card {
    max-width: none;
    padding: 26px 20px 30px;
    border-radius: var(--radius-card) var(--radius-card) 0 0;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .hint {
    display: block;
    margin: 2px 0 0;
  }
}
