/* ============================================================
   PADEL LOGAN — membership application form
   Loads after site.css. Nothing here is hidden behind JS: the
   form renders complete with scripting disabled.
   ============================================================ */

/* ── HERO ── */
.j-hero {
    position: relative; background: var(--mgc-ink);
    background-image: linear-gradient(rgba(15,59,89,0.82), rgba(15,59,89,0.92)), url('/assets/img/hero-1280.jpg');
    background-image: linear-gradient(rgba(15,59,89,0.82), rgba(15,59,89,0.92)), image-set(url('/assets/img/hero-1280.webp') type('image/webp'), url('/assets/img/hero-1280.jpg') type('image/jpeg'));
    background-size: cover; background-position: center;
    padding: 10rem 2.5rem 4rem; color: var(--cream);
}
.j-hero-inner { max-width: 1140px; margin: 0 auto; }
.j-eyebrow {
    display: inline-flex; align-items: center; gap: 0.7rem;
    font-family: 'Barlow Condensed', sans-serif; font-size: 0.75rem; font-weight: 700;
    letter-spacing: 0.28em; text-transform: uppercase; color: var(--white); margin-bottom: 1.2rem;
}
.j-eyebrow::before { content: ''; width: 2.2rem; height: 1px; background: var(--white); opacity: 0.55; }
.j-title {
    font-family: 'Cormorant Garamond', serif; font-weight: 300;
    font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.05; color: var(--white); margin-bottom: 1.2rem;
}
.j-title em { font-style: italic; }
.j-sub { font-size: 0.95rem; line-height: 1.8; max-width: 58ch; color: var(--cream-dim); }

/* ── FORM SHELL ── */
.j-main { background: var(--white); padding: 4.5rem 2.5rem 6rem; }
.j-form { max-width: 780px; margin: 0 auto; }

/* preview banner, shown only while no Formspree ID is configured */
.j-preview-note {
    margin-bottom: 2.6rem; padding: 1rem 1.2rem;
    border-left: 3px solid var(--green-court); background: rgba(30,111,148,0.07);
    font-size: 0.85rem; line-height: 1.65; color: var(--green-deep);
}
.j-preview-note strong { font-weight: 500; }

/* ── SECTIONS ── */
.j-sec { padding-top: 3.2rem; margin-top: 3.2rem; border-top: 1px solid var(--border-dark); }
.j-sec:first-of-type { padding-top: 0; margin-top: 0; border-top: 0; }
.j-sec-head { display: flex; align-items: baseline; gap: 0.9rem; margin-bottom: 0.5rem; }
.j-sec-num {
    font-family: 'Barlow Condensed', sans-serif; font-size: 0.8rem; font-weight: 700;
    letter-spacing: 0.18em; color: var(--green-court);
}
.j-sec-title {
    font-family: 'Cormorant Garamond', serif; font-weight: 400;
    font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.2; color: var(--green-deep);
}
.j-sec-note { font-size: 0.84rem; line-height: 1.7; color: var(--body-grey); margin-bottom: 1.8rem; max-width: 60ch; }
.j-sec-body { display: flex; flex-direction: column; gap: 1.4rem; }

/* two-up grid that collapses on small screens */
.j-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.j-grid-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 1.4rem; }

/* ── TIER SELECTOR ── */
.tier-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.tier-opt {
    position: relative; display: block; cursor: pointer;
    border: 1.5px solid rgba(15,59,89,0.25); border-radius: 3px;
    padding: 1.6rem 1.3rem; text-align: center;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.tier-opt:hover { border-color: var(--green-court); }
.tier-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.tier-opt-flag {
    display: block;
    font-family: 'Barlow Condensed', sans-serif; font-size: 0.66rem; font-weight: 700;
    letter-spacing: 0.24em; text-transform: uppercase; color: var(--green-court);
}
.tier-opt-name {
    display: block;
    font-family: 'Barlow Condensed', sans-serif; font-size: 1.5rem; font-weight: 800;
    letter-spacing: 0.06em; text-transform: uppercase; color: var(--green-deep); margin: 0.3rem 0 0.5rem;
}
.tier-opt-price {
    display: block;
    font-family: 'Barlow Condensed', sans-serif; font-size: 2.1rem; font-weight: 800;
    color: var(--green-deep); line-height: 1;
}
.tier-opt-price sup { font-size: 0.45em; vertical-align: super; }
.tier-opt-term { display: block; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--body-grey); margin-top: 0.45rem; }
.tier-opt-golf { display: block; font-size: 0.78rem; line-height: 1.55; color: var(--body-grey); margin-top: 0.9rem; }
.tier-opt:has(input:checked) {
    border-color: var(--green-court); background: rgba(30,111,148,0.05);
    box-shadow: 0 0 0 1px var(--green-court), 0 18px 40px -22px rgba(15,59,89,0.55);
}
.tier-opt input:focus-visible ~ .tier-opt-flag { outline: 2px solid var(--green-court); outline-offset: 3px; }

/* ── INCLUSIONS PANEL ── */
.incl-panel {
    margin-top: 1.6rem; border: 1px solid var(--border-dark); border-radius: 3px;
    background: rgba(30,111,148,0.04); padding: 1.6rem 1.5rem;
}
.incl-panel-title {
    font-family: 'Barlow Condensed', sans-serif; font-size: 0.78rem; font-weight: 700;
    letter-spacing: 0.2em; text-transform: uppercase; color: var(--green-deep); margin-bottom: 1rem;
}
.incl-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem 1.6rem; }
.incl-row { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.83rem; line-height: 1.5; color: var(--green-deep); }
.incl-tick { flex-shrink: 0; width: 1rem; height: 1rem; margin-top: 0.18rem; color: var(--green-court); }
.incl-tick svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 3; }
.incl-val { margin-left: auto; font-weight: 500; color: var(--green-court); white-space: nowrap; }
.incl-row.is-golf { font-weight: 500; }
.incl-row.is-golf .incl-text { color: var(--green-court); }

/* ── DECLARATION ── */
.j-terms-list { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.6rem; }
.j-terms-list li {
    position: relative; padding-left: 1.4rem; font-size: 0.83rem; line-height: 1.65; color: var(--body-grey);
}
.j-terms-list li::before {
    content: ''; position: absolute; left: 0; top: 0.6rem;
    width: 5px; height: 5px; border-radius: 50%; background: var(--green-court);
}
.j-sign-row { display: grid; grid-template-columns: 2fr 1fr; gap: 1.4rem; align-items: end; }
.j-sign-input {
    font-family: 'Cormorant Garamond', serif; font-style: italic;
    font-size: 1.35rem; letter-spacing: 0.02em;
}
.j-sign-note { font-size: 0.76rem; line-height: 1.6; color: var(--body-grey); margin-top: 0.7rem; }

/* ── SUBMIT ── */
.j-submit-wrap { margin-top: 2.8rem; display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.j-submit { min-width: 18rem; text-align: center; border-width: 1.5px; }
.j-form-error {
    display: none; width: 100%; padding: 1rem 1.2rem; border-left: 3px solid var(--error);
    background: rgba(192,57,43,0.07); color: var(--error); font-size: 0.85rem; line-height: 1.6;
}
.j-form-error.show { display: block; }

/* ── SUCCESS ── */
.j-success { display: none; max-width: 780px; margin: 0 auto; text-align: center; padding: 2rem 0 1rem; }
.j-success.show { display: block; }
.j-success-mark {
    width: 4.2rem; height: 4.2rem; margin: 0 auto 1.8rem; border-radius: 50%;
    border: 1.5px solid var(--green-court); display: flex; align-items: center; justify-content: center;
    color: var(--green-court);
}
.j-success-mark svg { width: 2rem; height: 2rem; fill: none; stroke: currentColor; stroke-width: 2.4; }
.j-success h2 {
    font-family: 'Cormorant Garamond', serif; font-weight: 300;
    font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1.15; color: var(--green-deep); margin-bottom: 1rem;
}
.j-success h2 em { font-style: italic; }
.j-success p { font-size: 0.92rem; line-height: 1.8; color: var(--body-grey); max-width: 52ch; margin: 0 auto 1rem; }
.j-success-actions { margin-top: 2rem; display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── PAYMENT STEP ──────────────────────────────────────────────
   Hand-off to Stripe's hosted checkout on the confirmation screen.
   Hidden until join.js confirms the chosen tier has a link. */
.j-pay[hidden] { display: none; }
.j-pay {
    margin: 2.2rem auto 1.6rem; max-width: 34rem; text-align: left;
    border: 1.5px solid var(--green-deep); border-radius: 4px;
    padding: 1.8rem 1.8rem 1.6rem; background: #ffffff;
}
.j-pay-step {
    display: inline-block; font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase;
    color: var(--green-court); margin-bottom: 0.7rem;
}
.j-pay-h {
    font-family: 'Cormorant Garamond', serif; font-weight: 300; font-style: italic;
    font-size: 1.6rem; line-height: 1.2; color: var(--green-deep); margin-bottom: 0.6rem;
}
.j-success .j-pay-lead { margin: 0 0 1.3rem; text-align: left; max-width: none; font-size: 0.86rem; line-height: 1.7; }
.j-pay-row {
    display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
    padding: 0.9rem 0 1.1rem; border-top: 1px solid rgba(15,59,89,0.14);
    border-bottom: 1px solid rgba(15,59,89,0.14); margin-bottom: 1.2rem;
}
/* the row is a flex container, so these have to be blocks in their own
   right or the tier name and term collapse onto one line */
.j-pay-tier { display: block; }
.j-pay-tier-name { display: block; font-size: 0.94rem; color: var(--green-deep); }
.j-pay-tier-term {
    display: block; margin-top: 0.25rem; font-size: 0.7rem;
    letter-spacing: 0.1em; text-transform: uppercase; color: var(--body-grey);
}
.j-pay-amount {
    font-family: 'Cormorant Garamond', serif; font-weight: 300;
    font-size: 1.9rem; line-height: 1; color: var(--green-deep); white-space: nowrap;
}
.j-pay-btn { display: block; width: 100%; text-align: center; }

/* preview state: the panel is real, the gateway behind it is not connected yet */
.j-pay.is-preview { border-style: dashed; }
.j-pay-flag[hidden] { display: none; }
.j-pay-flag {
    display: inline-block; margin-left: 0.6rem; padding: 0.2rem 0.5rem; border-radius: 2px;
    background: rgba(143,84,15,0.10); color: #8F540F;
    font-size: 0.6rem; letter-spacing: 0.16em; text-transform: uppercase;
}
.j-pay-note[hidden] { display: none; }
.j-success .j-pay-note {
    text-align: left; max-width: none; margin: 1rem 0 0; padding: 0.85rem 1rem;
    background: var(--cream); border-left: 2px solid var(--green-court);
    font-size: 0.78rem; line-height: 1.65;
}
.j-success .j-pay-fine,
.j-success .j-pay-alt {
    text-align: left; max-width: none; font-size: 0.74rem; line-height: 1.65; margin: 1rem 0 0;
}
.j-success .j-pay-alt { margin-top: 0.6rem; }
@media (max-width: 600px) {
    .j-pay { padding: 1.4rem 1.2rem; }
    .j-pay-row { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
}

/* ── RESPONSIVE ── */
@media (max-width: 860px) {
    .tier-choices { grid-template-columns: 1fr; }
    .incl-list { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .j-hero { padding: 8rem 1.5rem 3rem; }
    .j-main { padding: 3rem 1.5rem 4rem; }
    .j-grid-2, .j-grid-3, .j-sign-row { grid-template-columns: 1fr; }
    .j-sec { padding-top: 2.4rem; margin-top: 2.4rem; }
    .j-submit, .j-submit-wrap .btn-ghost { width: 100%; }
    .choice { width: 100%; }
}

/* Responsive hero art. The photo sits under an 80-93%% navy overlay, so it
   compresses hard with no visible change (max channel difference 11/255).
   Phones get the 800px WebP at 72KB in place of a 257KB 1280px JPEG.
   The plain url() line stays first as the fallback for anything without
   image-set(); browsers that understand it take the second declaration. */
@media (max-width: 800px) {
    .j-hero {
        background-image: linear-gradient(rgba(15,59,89,0.82), rgba(15,59,89,0.92)), url('/assets/img/hero-800.jpg');
        background-image: linear-gradient(rgba(15,59,89,0.82), rgba(15,59,89,0.92)), image-set(url('/assets/img/hero-800.webp') type('image/webp'), url('/assets/img/hero-800.jpg') type('image/jpeg'));
    }
}

/* The pay button is the only action on the confirmation screen, so it is
   filled rather than outlined like the site's other primary buttons. Solid
   brand navy: white on #0F3B59 is roughly 10:1, well clear of AA. */
.j-pay-btn.btn-primary {
    background: var(--green-deep);
    color: #ffffff;
    border-color: var(--green-deep);
}
.j-pay-btn.btn-primary:hover,
.j-pay-btn.btn-primary:focus-visible {
    background: #0A2C44;
    border-color: #0A2C44;
    color: #ffffff;
}
