/* Membership module — extends styles.css (loaded first, supplies the colour tokens).
   Written unminified so text, spacing and colours stay easy to edit. */

.page-head{background:linear-gradient(135deg,#022d1b,#056b39 60%,#0a8b4f);color:#fff;padding:64px 0 72px}
.page-head h1{font-family:Arial Black,Arial,sans-serif;font-size:clamp(2.1rem,4.4vw,3.4rem);line-height:1.1;letter-spacing:-1.5px;margin:0 0 16px}
.page-head p{color:rgba(255,255,255,.88);max-width:640px;margin:0;font-size:1.06rem}

/* ---- tabs ---- */
.tabs{display:flex;gap:10px;flex-wrap:wrap;margin:-34px auto 0;position:relative;z-index:2}
.tab{flex:1 1 240px;background:#fff;border:2px solid var(--line);border-radius:14px;padding:18px 22px;
     text-align:left;cursor:pointer;font:inherit;color:inherit;box-shadow:0 12px 30px rgba(0,0,0,.09);transition:border-color .15s,transform .15s}
.tab strong{display:block;font-size:1.02rem;color:var(--gd)}
.tab span{display:block;font-size:.84rem;color:#6b7280;margin-top:3px}
.tab[aria-selected="true"]{border-color:var(--g);transform:translateY(-2px)}
.tab[aria-selected="true"] strong{color:var(--g)}
.tab:hover{border-color:var(--g)}

/* ---- form shell ---- */
.form-wrap{padding:56px 0 90px}
.form-panel[hidden]{display:none}
fieldset{border:0;padding:0;margin:0 0 34px}
legend{font-family:Arial Black,Arial,sans-serif;font-size:1.18rem;color:var(--gd);margin-bottom:6px;padding:0}
.legend-note{color:#6b7280;font-size:.9rem;margin:0 0 20px}

.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.grid.two{grid-template-columns:repeat(2,1fr)}
.span-2{grid-column:span 2}
.span-full{grid-column:1/-1}

/* min-width:0 stops a grid/flex child refusing to shrink below its intrinsic
   width, which is the usual cause of a form scrolling sideways on a phone. */
.field{display:flex;flex-direction:column;min-width:0}
.field label{font-weight:700;font-size:.88rem;margin-bottom:7px}
.field .opt{font-weight:400;color:#6b7280}
.req{color:#b42318}
.hint{font-size:.79rem;color:#6b7280;margin-top:6px}
.hint,.error,.legend-note{overflow-wrap:break-word}

/* line-height and min-height are set explicitly on all three: browsers size a
   <select> from its font-size and ignore line-height, so without this the
   dropdowns render several pixels shorter than the text inputs beside them. */
input,select,textarea{font:inherit}
/* Box model only for text-entry controls. Checkboxes and radios are excluded:
   min-height beats height, so including them would stretch the consent box to
   50px tall while leaving it 24px wide. */
input:not([type="checkbox"]):not([type="radio"]),select,textarea{
       line-height:1.45;color:var(--ink);background-color:#fff;
       border:1.5px solid var(--line);border-radius:9px;padding:12px 13px;width:100%;
       min-height:50px;transition:border-color .15s,box-shadow .15s}
textarea{resize:vertical;min-height:88px;line-height:1.55}

/* Own chevron, so the control is the same height and shape on every browser. */
select{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding-right:40px;
       background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23056b39' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
       background-repeat:no-repeat;background-position:right 14px center;background-size:12px 8px}
input:focus,select:focus,textarea:focus,.tab:focus-visible,.button:focus-visible{
       outline:none;border-color:var(--g);box-shadow:0 0 0 3px rgba(5,107,57,.18)}
.tab:focus-visible,.button:focus-visible{box-shadow:0 0 0 3px rgba(5,107,57,.35)}
/* background-COLOR only — the shorthand would wipe out the chevron image above. */
select:disabled,input:disabled{background-color:#f3f4f6;color:#9ca3af;cursor:not-allowed}
select:disabled{opacity:.7}
input[aria-invalid="true"],select[aria-invalid="true"],textarea[aria-invalid="true"]{border-color:#b42318}
.error{display:none;color:#b42318;font-size:.8rem;margin-top:6px;font-weight:600}
.error.show{display:block}

/* phone with dial-code prefix */
.phone{display:flex;min-width:0}
.phone .dial{display:flex;align-items:center;padding:0 13px;background:var(--soft);border:1.5px solid var(--line);
       border-right:0;border-radius:9px 0 0 9px;font-weight:700;white-space:nowrap;min-width:74px;
       flex:0 0 auto;justify-content:center}
.phone input{border-radius:0 9px 9px 0;min-width:0}

/* consent + submit */
.consent{display:flex;gap:12px;align-items:flex-start;background:var(--soft);border-left:6px solid var(--gold);
       border-radius:12px;padding:18px 20px;margin-bottom:26px}
/* 24px square is the minimum comfortable touch target (WCAG 2.5.8). */
.consent input{width:24px;height:24px;min-height:0;flex:0 0 auto;margin:1px 0 0;accent-color:var(--g)}
.consent label{font-size:.9rem;font-weight:400;line-height:1.55}
.actions-row{display:flex;align-items:center;gap:18px;flex-wrap:wrap}
button.button{border:0;cursor:pointer;font-family:inherit;font-size:1rem}
button.button[disabled]{opacity:.6;cursor:progress}

/* messages */
.form-error{display:none;border-left:6px solid #b42318;background:#fef3f2;color:#912018;
       padding:16px 20px;border-radius:12px;margin-bottom:24px;font-size:.92rem}
.form-error.show{display:block}
.form-error ul{margin:8px 0 0;padding-left:20px}

.success{background:var(--soft);border-left:6px solid var(--g);border-radius:16px;padding:38px}
.success h2{font-family:Arial Black,Arial,sans-serif;color:var(--gd);margin:0 0 12px;font-size:1.7rem}
.success .ref{display:inline-block;background:var(--gd);color:var(--gold);font-weight:900;letter-spacing:2px;
       padding:12px 22px;border-radius:9px;margin:14px 0 20px;font-size:1.1rem}
.success .actions{display:flex;gap:14px;flex-wrap:wrap;margin-top:8px}
.success .mailnote{background:#fff;border:1px dashed var(--g);border-radius:10px;padding:12px 16px;
       font-size:.88rem;color:var(--gd);overflow-wrap:break-word}
.success .mailnote:empty{display:none}

/* The site header is sticky and 82px tall, so anything the script scrolls or
   focuses — an invalid field, the error banner, the success panel — must keep
   clear of it or it lands underneath. */
input,select,textarea,.form-error,.success,.tabs{scroll-margin-top:98px}

/* ------------------------------------------------------------------ mobile */

/* Tablets and small laptops: three columns is too tight for these labels. */
@media(max-width:900px){
  .grid,.grid.two{grid-template-columns:repeat(2,1fr)}
  .span-2{grid-column:span 2}
  .page-head{padding:56px 0 66px}
  .form-wrap{padding:48px 0 76px}
}

/* Large phones and small tablets. */
@media(max-width:720px){
  .grid,.grid.two{grid-template-columns:1fr;gap:15px}
  .span-2,.span-full{grid-column:auto}
  .page-head{padding:44px 0 58px}
  .page-head p{font-size:1rem}
  .form-wrap{padding:40px 0 64px}
  fieldset{margin-bottom:28px}
  .success{padding:26px}
  .success h2{font-size:1.45rem}
  .success .actions .button{flex:1 1 100%;text-align:center}

  /* Full-width primary action — easier to hit with a thumb. */
  .actions-row{flex-direction:column;align-items:stretch;gap:12px}
  .actions-row .button{width:100%;text-align:center;padding:16px 22px}
  .actions-row .hint{text-align:center;margin-top:0}
}

/* Phones: turn the two tab cards into a segmented control so the form starts
   higher up the screen. The descriptions are dropped — the labels carry it. */
@media(max-width:560px){
  .tabs{gap:8px;margin-top:-24px}
  .tab{flex:1 1 0;min-width:0;padding:13px 10px;text-align:center;border-radius:12px;
       box-shadow:0 8px 20px rgba(0,0,0,.08)}
  .tab span{display:none}
  .tab strong{font-size:.9rem;line-height:1.3}
  .tab[aria-selected="true"]{transform:none;background:var(--soft)}

  .page-head{padding:38px 0 52px}
  .form-wrap{padding:34px 0 56px}
  legend{font-size:1.08rem}
  .legend-note{font-size:.86rem;margin-bottom:16px}
  .consent{padding:16px;gap:11px}
  .consent label{font-size:.86rem}
  .success{padding:22px;border-radius:14px}
  .success .ref{font-size:1rem;letter-spacing:1.5px;padding:11px 16px;word-break:break-all}
  .form-error{padding:14px 16px;font-size:.88rem}
}

/* Small phones (iPhone SE and similar, 320–380px). */
@media(max-width:400px){
  .tab strong{font-size:.84rem}
  .phone .dial{min-width:62px;padding:0 9px;font-size:.94rem}
  .field label{font-size:.85rem}
  input,select,textarea{padding:11px 12px}
  select{padding-right:36px;background-position:right 11px center}
  .success h2{font-size:1.3rem}
}

/* Stop iOS inflating text when a phone is rotated to landscape. */
@media(max-width:900px){
  body{-webkit-text-size-adjust:100%;text-size-adjust:100%}
}
