@import url("../styles.css?v=32");

:root {
  --bad: #ff7b7b;
  --required: #ff5f5f;
}

/* Page shell */

main.page,
main {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 46px;
}

[hidden] {
  display: none !important;
}

/* Header compatibility */

.site-nav {
  width: min(var(--max), calc(100% - 32px));
  min-height: 86px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-logo,
.brand-mark {
  width: 68px;
  height: 68px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand-mark {
  display: grid;
  place-items: center;
  overflow: hidden;
  text-indent: -999px;
  background-image: url("../assets/old-tyme-strength-logo.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* Hero */

.join-hero {
  display: block;
  padding: 16px 0 28px;
}

.join-hero .hero-copy {
  max-width: 880px;
}

.join-hero h1 {
  max-width: 12.5ch;
  margin-bottom: 26px;
  font-size: clamp(3.4rem, 6.1vw, 5.7rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
  overflow-wrap: normal;
  word-break: normal;
}

.join-hero .hero-card {
  margin-top: 28px;
  max-width: 100%;
}

.join-hero .hero-card h2 {
  max-width: 100%;
  margin-bottom: 12px;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.join-hero .hero-card > span {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.join-hero .hero-card > p {
  display: block;
  max-width: 720px;
  margin-bottom: 0;
}

/* Form shell */

.join-form {
  display: grid;
  gap: 24px;
  padding-top: 12px;
}

.form-card {
  padding: clamp(26px, 3.4vw, 42px);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(29, 34, 41, 0.96) 0%, rgba(21, 24, 29, 0.98) 100%);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow);
}

/* Form card headers */

.form-card .section-head {
  display: block;
  margin-bottom: 24px;
}

.form-card .section-head .kicker,
.form-card .section-head .eyebrow {
  margin-bottom: 14px;
}

.form-card .section-head h2 {
  max-width: 820px;
  margin-bottom: 14px;
  text-align: left;
  font-size: clamp(2rem, 3.7vw, 3rem);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.form-card .section-head p {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
  text-align: left;
}

/* Notice card */

.notice-card,
.contact-permission-card {
  margin-top: 22px;
  padding: 20px 22px;
  border-radius: 18px;
  border: 1px solid rgba(114, 214, 138, 0.32);
  background:
    linear-gradient(180deg, rgba(114, 214, 138, 0.09), rgba(114, 214, 138, 0.04)),
    rgba(255, 255, 255, 0.035);
}

.contact-permission-card {
  border-color: rgba(255, 197, 92, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 197, 92, 0.08), rgba(255, 197, 92, 0.035)),
    rgba(255, 255, 255, 0.03);
}

.notice-card strong,
.contact-permission-card h3 {
  display: block;
  margin: 0 0 8px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.notice-card p,
.contact-permission-card p {
  max-width: 860px;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.6;
}

.notice-card p + p,
.contact-permission-card p + p {
  margin-top: 10px;
}

.contact-permission-card + .choice-card,
.contact-permission-card + .parq-card,
.choice-card + .contact-permission-card {
  margin-top: 18px;
}

/* Form grid and fields */

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 22px;
  align-items: start;
}

.field {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(56px, auto) 1.4rem;
  align-content: start;
  gap: 0;
}

.field > span {
  display: block;
  margin-bottom: 10px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 950;
  line-height: 1.25;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.field > input,
.field > select,
.field > textarea {
  margin: 0;
}

.field > small {
  display: block;
  min-height: 1.4rem;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.2;
}

.field > small.is-good {
  color: var(--good);
}

.field > small.is-bad {
  color: var(--bad);
}

.field:not(:has(> small))::after {
  content: "";
  display: block;
  height: 1.4rem;
  margin-top: 8px;
}

.field.wide,
.choice-card.wide {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  min-height: 56px;
  padding: 15px 16px;
  font-size: 1rem;
}

textarea {
  min-height: 150px;
  line-height: 1.55;
}

/* Choice cards */

.choice-list {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.choice-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-height: 74px;
  padding: 22px 24px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.075);
  color: var(--muted);
  font-weight: 850;
  line-height: 1.45;
}

.choice-card:hover {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.14);
}

.choice-card:has(input:checked) {
  border-color: rgba(255, 255, 255, 0.075);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: none;
}

.choice-card span {
  display: block;
  max-width: 920px;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.65;
  letter-spacing: 0;
  text-transform: none;
}

.form-card > .choice-card {
  margin-top: 18px;
}

.form-card > .choice-card + .choice-card {
  margin-top: 16px;
}

.form-card .choice-list + .field {
  margin-top: 22px;
}

/* Custom radio and checkbox controls */

.choice-card input[type="radio"],
.choice-card input[type="checkbox"],
.parq-card input[type="radio"],
.parq-card input[type="checkbox"] {
  flex: 0 0 auto;
  accent-color: var(--good);
}

.choice-card input[type="radio"],
.parq-card input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  min-height: 20px;
  margin-top: 4px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: #101317;
}

.choice-card input[type="radio"]::before,
.parq-card input[type="radio"]::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--good);
  box-shadow: 0 0 14px rgba(114, 214, 138, 0.5);
  transform: scale(0);
  transition: transform 120ms ease;
}

.choice-card input[type="radio"]:checked,
.parq-card input[type="radio"]:checked {
  border-color: var(--good);
}

.choice-card input[type="radio"]:checked::before,
.parq-card input[type="radio"]:checked::before {
  transform: scale(1);
}

.choice-card input[type="checkbox"],
.parq-card input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  min-height: 20px;
  margin-top: 4px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 6px;
  background: #101317;
}

.choice-card input[type="checkbox"]::before,
.parq-card input[type="checkbox"]::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--good);
  box-shadow: 0 0 14px rgba(114, 214, 138, 0.5);
  transform: scale(0);
  transition: transform 120ms ease;
}

.choice-card input[type="checkbox"]:checked,
.parq-card input[type="checkbox"]:checked {
  border-color: var(--good);
}

.choice-card input[type="checkbox"]:checked::before,
.parq-card input[type="checkbox"]:checked::before {
  transform: scale(1);
}

/* PAR-Q cards */

.parq-list {
  display: grid;
  gap: 20px;
  margin-top: 18px;
  margin-bottom: 26px;
}

.parq-card {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
  margin: 0;
  padding: 24px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.075);
}

.parq-card legend {
  display: block;
  width: 100%;
  max-width: 100%;
  float: left;
  margin: 0 0 12px;
  padding: 0;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: none;
}

.parq-card::after {
  content: "";
  display: block;
  clear: both;
}

.parq-card label {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: auto;
  min-width: 160px;
  min-height: 52px;
  margin: 0;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.075);
  color: var(--muted);
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: none;
}

.parq-card input[type="radio"] {
  margin-top: 0;
}

.child-contact-options label {
  width: 100%;
  min-width: 0;
  border-radius: 16px;
  line-height: 1.5;
}

/* Health declaration spacing */

.form-card:has(input[name="parq_health_declaration_accepted"]) {
  padding-bottom: clamp(34px, 4vw, 50px);
}

.form-card:has(input[name="parq_health_declaration_accepted"]) > .choice-card {
  margin-top: 16px;
}

.form-card:has(input[name="parq_health_declaration_accepted"]) .choice-card span {
  max-width: 900px;
  line-height: 1.6;
}

/* Agreement spacing */

.form-card:has(input[name="parq_declaration_accepted"]) {
  padding-bottom: clamp(34px, 4vw, 50px);
}

.form-card:has(input[name="parq_declaration_accepted"]) .field.wide {
  margin-top: 24px;
}

.form-card:has(input[name="parq_declaration_accepted"]) .field.wide > span {
  margin-bottom: 12px;
}

.form-card:has(input[name="parq_declaration_accepted"]) .field.wide input {
  min-height: 60px;
}

.form-card:has(input[name="parq_declaration_accepted"]) .full-width {
  margin-top: 26px;
  min-height: 58px;
}

.form-card:has(input[name="parq_declaration_accepted"]) .form-error {
  margin-top: 22px;
  margin-bottom: 0;
}

.form-card:has(input[name="parq_declaration_accepted"]) .choice-card span {
  max-width: 900px;
  line-height: 1.6;
}

/* Required marks: incomplete only */

.field:has(input:required:invalid) > span::after,
.field:has(select:required:invalid) > span::after,
.field:has(textarea:required:invalid) > span::after,
.choice-card:has(input[type="checkbox"]:required:not(:checked)) span::after,
.choice-card:has(input[type="radio"]:required:not(:checked)) span::after,
.parq-card:has(input[type="radio"]:required:not(:checked)) legend::after {
  content: " *";
  color: var(--required);
  font-weight: 950;
}

/* Required hover/focus tooltip: incomplete only */

.field:has(input:required:invalid):hover::before,
.field:has(select:required:invalid):hover::before,
.field:has(textarea:required:invalid):hover::before,
.field:has(input:required:invalid):focus-within::before,
.field:has(select:required:invalid):focus-within::before,
.field:has(textarea:required:invalid):focus-within::before,
.choice-card:has(input[type="checkbox"]:required:not(:checked)):hover::before,
.choice-card:has(input[type="checkbox"]:required:not(:checked)):focus-within::before,
.choice-card:has(input[type="radio"]:required:not(:checked)):hover::before,
.choice-card:has(input[type="radio"]:required:not(:checked)):focus-within::before,
.parq-card:has(input[type="radio"]:required:not(:checked)):hover::before,
.parq-card:has(input[type="radio"]:required:not(:checked)):focus-within::before {
  content: "Required field";
  position: absolute;
  right: 18px;
  top: -18px;
  z-index: 10;
  padding: 6px 10px;
  border: 1px solid rgba(255, 95, 95, 0.55);
  border-radius: 999px;
  background: #2a1111;
  color: #ffd4d4;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.field:has(input:required:invalid):hover input,
.field:has(select:required:invalid):hover select,
.field:has(textarea:required:invalid):hover textarea,
.field:has(input:required:invalid):focus-within input,
.field:has(select:required:invalid):focus-within select,
.field:has(textarea:required:invalid):focus-within textarea {
  border-color: rgba(255, 95, 95, 0.72);
  box-shadow: 0 0 0 4px rgba(255, 95, 95, 0.1);
}

.choice-card:has(input:required:invalid):hover,
.parq-card:has(input:required:invalid):hover {
  border-color: rgba(255, 95, 95, 0.45);
}

/* When JavaScript marks a section complete, hide required marks/tooltips */

.form-card.is-complete .field > span::after,
.form-card.is-complete .choice-card span::after,
.form-card.is-complete .parq-card legend::after {
  content: none !important;
}

.form-card.is-complete .field::before,
.form-card.is-complete .choice-card::before,
.form-card.is-complete .parq-card::before {
  content: none !important;
}

/* Error and submit */

.form-error {
  margin: 16px 0;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 123, 123, 0.35);
  background: rgba(255, 123, 123, 0.1);
  color: #ffd0d0;
  font-weight: 900;
}

.full-width {
  width: 100%;
}

/* Footer: match homepage */

.site-footer {
  display: none;
}

.footer {
  background: #050607;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
  padding: 0;
  width: 100%;
}

.footer-inner {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin: 0 auto;
  padding: 28px 0 36px;
  width: min(1120px, calc(100% - 32px));
}

.footer p {
  margin: 0;
}

.footer strong {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.footer span {
  color: var(--muted);
  font-size: 1rem;
  margin-left: 8px;
}

.footer a {
  color: rgba(255, 255, 255, 0.82);
  font-size: 1rem;
  font-weight: 800;
  text-decoration: none;
}

.footer a strong {
  color: inherit;
  font-size: 1rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: none;
}

.footer a:hover,
.footer a:focus-visible {
  color: #ffffff;
  outline: none;
  text-decoration: underline;
}

/* Desktop / half-screen */

@media (max-width: 1180px) {
  main.page,
  main,
  .site-nav {
    width: min(var(--max), calc(100% - 28px));
  }

  .join-hero h1 {
    max-width: 13ch;
    font-size: clamp(3.2rem, 6.6vw, 5rem);
    line-height: 1;
  }
}

/* Tablet */

@media (max-width: 900px) {
  .site-nav {
    min-height: auto;
    padding: 16px 0;
    align-items: flex-start;
  }

  .join-hero h1 {
    max-width: 12ch;
    font-size: clamp(3rem, 8.5vw, 4.25rem);
    line-height: 1;
    letter-spacing: -0.05em;
  }

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

/* Mobile / coarse pointer */

@media (pointer: coarse) {
  .field:hover::before,
  .choice-card:hover::before,
  .parq-card:hover::before {
    content: none !important;
  }
}

@media (max-width: 760px) {
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer span {
    display: inline;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .field {
    grid-template-rows: auto minmax(52px, auto) auto;
  }

  .field:not(:has(> small))::after {
    display: none;
  }

  .choice-list {
    gap: 14px;
  }

  .choice-card {
    min-height: 0;
    padding: 18px;
    gap: 14px;
  }

  .choice-card span {
    max-width: none;
    font-size: 0.98rem;
    line-height: 1.6;
  }

  .parq-card {
    padding: 18px;
  }

  .parq-card legend {
    margin-bottom: 16px;
    font-size: 1rem;
    line-height: 1.45;
  }

  .parq-card label {
    width: 100%;
    min-width: 0;
  }

  .form-card:has(input[name="parq_declaration_accepted"]) .field.wide {
    margin-top: 20px;
  }

  .form-card:has(input[name="parq_declaration_accepted"]) .full-width {
    margin-top: 22px;
  }
}

/* Phone */

@media (max-width: 640px) {
  .site-header {
    position: static;
  }

  main.page,
  main,
  .site-nav {
    width: min(100%, calc(100% - 24px));
  }

  .site-nav {
    flex-direction: column;
    gap: 14px;
  }

  .brand {
    width: 100%;
  }

  .brand-mark,
  .brand-logo {
    width: 56px;
    height: 56px;
  }

  .brand strong {
    font-size: 0.9rem;
    letter-spacing: 0.12em;
  }

  .brand small,
  .brand span span {
    font-size: 0.8rem;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
    gap: 10px;
  }

  .nav-links a {
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
  }

  main.page,
  main {
    padding-top: 22px;
    padding-bottom: 34px;
  }

  .join-hero {
    padding: 10px 0 22px;
    overflow: hidden;
  }

  .join-hero h1 {
    max-width: 100%;
    font-size: clamp(2.55rem, 10vw, 3.35rem);
    line-height: 1.02;
    letter-spacing: -0.045em;
  }

  .join-hero .hero-card h2 {
    font-size: clamp(1.9rem, 8vw, 2.45rem);
  }

  .hero-actions,
  .button-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .btn,
  .button {
    width: 100%;
  }

  .hero-card,
  .form-card {
    width: 100%;
    padding: 18px;
    border-radius: 20px;
  }

  .join-form {
    gap: 16px;
  }
}

/* Narrow phones */

@media (max-width: 430px) {
  main.page,
  main,
  .site-nav,
  .footer-inner {
    width: min(100%, calc(100% - 20px));
  }

  .join-hero h1 {
    max-width: 100%;
    font-size: clamp(2.25rem, 9.6vw, 3rem);
    line-height: 1.04;
    letter-spacing: -0.035em;
  }

  .eyebrow,
  .kicker {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
  }

  .hero-card,
  .form-card {
    padding: 16px;
  }

  .footer strong,
  .footer span,
  .footer p,
  .footer a {
    font-size: 0.88rem;
  }
}

/* required-group-complete-fix-v1 */

.field.is-complete-control > span::after,
.choice-card.is-complete-control span::after,
.choice-card.is-radio-group-complete span::after,
.parq-card.is-radio-group-complete legend::after {
  content: none !important;
}

.field.is-complete-control::before,
.choice-card.is-complete-control::before,
.choice-card.is-radio-group-complete::before,
.parq-card.is-radio-group-complete::before {
  content: none !important;
  display: none !important;
}

.choice-card.is-radio-group-complete:hover,
.parq-card.is-radio-group-complete:hover {
  border-color: rgba(255, 255, 255, 0.075) !important;
}

.field.is-incomplete-control > span::after {
  content: " *";
  color: var(--required);
  font-weight: 950;
}

/* /required-group-complete-fix-v1 */

/* gym-rules-list-v1 */

.rules-list {
  display: grid;
  gap: 14px;
  margin-top: 22px;
  margin-bottom: 26px;
}

.rules-list > div {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.075);
}

.rules-list strong {
  color: var(--text);
  font-size: 1rem;
  font-weight: 950;
  line-height: 1.25;
}

.rules-list span {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.6;
}

@media (max-width: 760px) {
  .rules-list {
    gap: 12px;
    margin-top: 18px;
    margin-bottom: 22px;
  }

  .rules-list > div {
    padding: 16px;
  }

  .rules-list span {
    font-size: 0.98rem;
    line-height: 1.55;
  }
}

/* /gym-rules-list-v1 */