/* ==========================================================================
   Book Free Trial — embedded section (home page)
   "Elite Altitude Performance Training" visual identity — a high-altitude /
   performance-lab aesthetic layered on top of the site's own dark theme and
   brand blue, not a generic dark SaaS card. Every functional class name below
   (trial-field, trial-btn-primary, trial-class-row, trial-hidden, etc.) is
   read directly by trial-section.js and public/index.html's markup — this
   file only ever changes how things LOOK, never adds/removes/renames a hook.
   ========================================================================== */

:root {
    --alt-cyan: rgba(56, 129, 252, 0.8);
    --alt-violet: #02025E;
    --alt-navy-0: #02025E;
    --alt-navy-1: #02025E;
    --alt-glass-border: rgba(56, 129, 252, 0.22);
}

#book-free-trial {
    position: relative;
    padding: 100px 0;
    scroll-margin-top: 110px; /* fixed navbar offset, for #book-free-trial deep links */
    overflow: hidden;
    isolation: isolate;
}

/* ---------- Atmosphere: contour rings, drifting dust, a faint altitude silhouette ----------
   Purely decorative (aria-hidden, pointer-events:none) and layered behind everything at
   z-index:0 — never intercepts clicks, never shifts layout, safe to strip on narrow screens
   for performance. This is what turns the flat dark background into "high-altitude depth"
   instead of a plain SaaS gradient. */
.trial-atmosphere { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

.trial-contour-rings {
    position: absolute;
    top: 50%; left: 50%;
    width: 1100px; height: 1100px;
    transform: translate(-50%, -50%);
    animation: trialContourDrift 40s ease-in-out infinite;
}
.trial-contour-rings span {
    position: absolute;
    inset: 0;
    margin: auto;
    border-radius: 50%;
    border: 1px solid rgba(56, 129, 252, 0.09);
}
.trial-contour-rings span:nth-child(1) { width: 100%; height: 100%; }
.trial-contour-rings span:nth-child(2) { width: 78%; height: 78%; border-color: rgba(56, 129, 252, 0.07); }
.trial-contour-rings span:nth-child(3) { width: 56%; height: 56%; }
.trial-contour-rings span:nth-child(4) { width: 34%; height: 34%; border-color: rgba(56, 129, 252, 0.06); }
@keyframes trialContourDrift {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.04); }
}

.trial-particles span {
    position: absolute;
    width: 3px; height: 3px;
    border-radius: 50%;
    background: rgba(124, 192, 255, 0.55);
    box-shadow: 0 0 6px 1px rgba(56, 129, 252, 0.35);
    animation: trialParticleFloat linear infinite;
}
.trial-particles span:nth-child(1) { top: 18%; left: 12%; animation-duration: 22s; animation-delay: 0s; }
.trial-particles span:nth-child(2) { top: 62%; left: 8%;  animation-duration: 26s; animation-delay: -4s; }
.trial-particles span:nth-child(3) { top: 30%; left: 88%; animation-duration: 20s; animation-delay: -9s; }
.trial-particles span:nth-child(4) { top: 75%; left: 92%; animation-duration: 24s; animation-delay: -2s; }
.trial-particles span:nth-child(5) { top: 48%; left: 50%; animation-duration: 28s; animation-delay: -13s; }
.trial-particles span:nth-child(6) { top: 85%; left: 40%; animation-duration: 21s; animation-delay: -7s; }
@keyframes trialParticleFloat {
    0%   { transform: translate(0, 0); opacity: 0; }
    10%  { opacity: .8; }
    50%  { transform: translate(18px, -34px); }
    90%  { opacity: .8; }
    100% { transform: translate(-6px, -68px); opacity: 0; }
}

.trial-mountain-silhouette {
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    width: 100%; height: auto;
    opacity: 0.5;
}

@media (max-width: 900px) {
    /* Cheaper on small screens/mobile GPUs — the intro/card content stays identical, only the
       decorative atmosphere layer (which contributes nothing to usability) is trimmed. */
    .trial-contour-rings { width: 700px; height: 700px; }
    .trial-particles span:nth-child(n+5) { display: none; }
}

.trial-container { position: relative; z-index: 1; width: 90%; max-width: 1100px; margin: 0 auto; }

.trial-intro {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 40px;
    animation: trialFadeUp .7s cubic-bezier(.16,1,.3,1) both;
}

.trial-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.22em;
    color: var(--logo-blue);
    text-transform: uppercase;
    padding: 8px 18px;
    border: 1px solid rgba(56, 129, 252, 0.3);
    border-radius: 100px;
    background: rgba(56, 129, 252, 0.08);
    margin-bottom: 24px;
}
.trial-label::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--alt-cyan);
    box-shadow: 0 0 0 3px rgba(56, 129, 252, 0.22);
    flex-shrink: 0;
    animation: trialPulseDot 2.4s ease-in-out infinite;
}
@keyframes trialPulseDot {
    0%, 100% { opacity: 1; } 50% { opacity: .45; }
}

.trial-heading {
    font-family: var(--font-heading);
    font-size: clamp(34px, 5vw, 56px);
    font-weight: 600;
    line-height: 1.08;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: -0.015em;
    margin-bottom: 18px;
}
.trial-heading em {
    font-style: normal;
    background: linear-gradient(100deg, var(--logo-blue), var(--alt-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.trial-sub {
    font-family: var(--font-body);
    font-size: 16.5px;
    line-height: 1.65;
    color: var(--text-secondary);
    font-weight: 300;
    margin-bottom: 22px;
}

/* Technical readout chips — "ALTITUDE / OXYGEN / SESSION", the performance-lab detail the brief
   asked for. Real figures pulled from the site's own altitude-training copy elsewhere, not made
   up: 3,500m altitude and ~45min sessions are the same numbers used in the class-completion
   WhatsApp template. */
.trial-stats-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}
.trial-stat-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    font-family: 'Courier New', monospace;
    font-size: 10.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 6px 12px;
}
.trial-stat-chip b { color: var(--alt-cyan); font-weight: 700; font-size: 11.5px; }

/* ---------- The "Performance Pass" card ----------
   A slow-rotating conic-gradient ring glowing behind the card, clipped to a rounded rect by the
   wrap's overflow:hidden — reads as a premium "powered up" frame instead of a flat box. Pure
   transform animation (no @property), so it degrades gracefully to a static soft border on
   anything that doesn't run the keyframe. */
.trial-card-wrap {
    position: relative;
    max-width: 520px;
    margin: 0 auto;
    border-radius: 28px;
    padding: 1.5px;
    overflow: hidden;
    isolation: isolate;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5), 0 0 90px -25px rgba(56, 129, 252, 0.32);
    animation: trialFadeUp .8s cubic-bezier(.16,1,.3,1) .1s both;
}
.trial-card-wrap::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 250%; height: 250%;
    background: conic-gradient(from 0deg,
        transparent 0deg, var(--logo-blue) 25deg, transparent 70deg,
        transparent 180deg, var(--alt-cyan) 205deg, transparent 250deg, transparent 360deg);
    animation: trialRingSpin 10s linear infinite;
    z-index: 0;
}
@keyframes trialRingSpin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to   { transform: translate(-50%, -50%) rotate(360deg); }
}
@keyframes trialFadeUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}

.trial-card {
    position: relative;
    z-index: 1;
    background:
        radial-gradient(120% 90% at 15% 0%, rgba(56, 129, 252, 0.14), transparent 55%),
        radial-gradient(90% 70% at 100% 100%, rgba(56, 129, 252, 0.08), transparent 60%),
        linear-gradient(165deg, rgba(9, 14, 28, 0.94), var(--alt-navy-0) 90%);
    border: 1px solid var(--alt-glass-border);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border-radius: 26.5px;
    padding: 44px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    overflow: hidden;
}
/* Thin glowing accent line across the top + a soft ambient blue bloom in the corner. */
.trial-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--logo-blue) 40%, var(--alt-cyan) 60%, transparent);
}
.trial-card::after {
    content: '';
    position: absolute;
    top: -90px; right: -90px;
    width: 220px; height: 220px;
    background: radial-gradient(circle, rgba(56, 129, 252, 0.18), transparent 70%);
    pointer-events: none;
}
.trial-card > * { position: relative; z-index: 1; }

/* Small "scan frame" corner brackets — a quiet nod to the QR/check-in theme of what this card
   actually leads to, instead of pure decoration. */
.trial-corner {
    position: absolute;
    width: 18px; height: 18px;
    border: 1.5px solid rgba(124, 192, 255, 0.55);
    z-index: 2;
    pointer-events: none;
}
.trial-corner.tl { top: 14px; left: 14px; border-right: none; border-bottom: none; border-top-left-radius: 8px; }
.trial-corner.tr { top: 14px; right: 14px; border-left: none; border-bottom: none; border-top-right-radius: 8px; }
.trial-corner.bl { bottom: 14px; left: 14px; border-right: none; border-top: none; border-bottom-left-radius: 8px; }
.trial-corner.br { bottom: 14px; right: 14px; border-left: none; border-top: none; border-bottom-right-radius: 8px; }

.trial-hidden { display: none !important; }

.trial-field { margin-bottom: 18px; }
.trial-field-row { display: flex; gap: 14px; }
.trial-field-row .trial-field { flex: 1; min-width: 0; }

.trial-field label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-heading);
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}
.trial-label-icon { color: var(--logo-blue); flex-shrink: 0; opacity: .85; }
.trial-label-icon svg { display: block; width: 13px; height: 13px; }

.trial-field input,
.trial-field textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 13px 14px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 14.5px;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.trial-field input::placeholder,
.trial-field textarea::placeholder { color: var(--text-muted); }

.trial-field input:focus,
.trial-field textarea:focus {
    outline: none;
    border-color: var(--alt-cyan);
    background: rgba(56, 129, 252, 0.05);
    box-shadow: 0 0 0 3px rgba(56, 129, 252, 0.14), 0 0 20px -6px rgba(56, 129, 252, 0.4);
}

.trial-field textarea { resize: vertical; min-height: 60px; }

.trial-err {
    color: #F70C34;
    font-size: 13px;
    margin: 4px 0 0;
    display: none;
    line-height: 1.5;
}
.trial-err.show { display: block; }

.trial-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px;
    margin-top: 22px;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    background: linear-gradient(100deg, #F70C34, #870517);
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    box-shadow: 0 4px 18px rgba(247, 12, 52, 0.35);
    transition: transform .25s cubic-bezier(.16,1,.3,1), box-shadow .25s ease, background .25s ease;
}
.trial-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(247, 12, 52, 0.5);
    background: linear-gradient(100deg, #870517, #F70C34);
}
.trial-btn-primary:disabled { opacity: .5; cursor: default; transform: none; box-shadow: none; }
.trial-btn-arrow { display: inline-block; transition: transform .25s cubic-bezier(.16,1,.3,1); }
.trial-btn-primary:hover .trial-btn-arrow { transform: translateX(4px); }

/* "No payment / no obligation / choose a real class" — small and muted on purpose, a reassurance
   footnote under the CTA, not competing with it for attention. */
.trial-trust-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-top: 16px;
}
.trial-trust-row span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-body);
    font-size: 11.5px;
    color: var(--text-muted);
}
.trial-trust-row span::before {
    content: '✓';
    color: var(--alt-cyan);
    font-weight: 700;
    font-size: 11px;
}

.trial-back {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    margin-bottom: 18px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color .15s ease;
}
.trial-back:hover { color: #fff; }

#tsClassState h3, #tsThanksState h3 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 22px;
    color: #fff;
    margin-bottom: 8px;
}
#tsClassState p.trial-sub-small {
    font-size: 13.5px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Date strip */
.trial-date-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 18px;
}
.trial-date-strip::-webkit-scrollbar { height: 4px; }
.trial-date-strip::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 4px; }
.trial-date-chip {
    flex-shrink: 0;
    min-width: 56px;
    text-align: center;
    padding: 10px 6px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: var(--transition-quick);
}
.trial-date-chip:hover { border-color: rgba(56, 129, 252, 0.4); }
.trial-date-chip.active {
    background: linear-gradient(100deg, var(--logo-blue), #0057c2);
    border-color: transparent;
    box-shadow: 0 6px 18px rgba(56, 129, 252, 0.35);
}
.trial-date-chip .dow { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.trial-date-chip.active .dow { color: rgba(255,255,255,.85); }
.trial-date-chip .dnum { font-size: 16px; font-weight: 700; margin: 2px 0; color: #fff; }
.trial-date-chip .dmon { font-size: 10px; color: var(--text-muted); }
.trial-date-chip.active .dmon { color: rgba(255,255,255,.85); }

/* Class list */
.trial-class-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 340px;
    overflow-y: auto;
    margin-bottom: 6px;
}
.trial-class-row {
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 14px 16px;
    cursor: pointer;
    transition: var(--transition-quick);
    background: rgba(255, 255, 255, 0.02);
}
.trial-class-row:hover { border-color: rgba(56, 129, 252, 0.4); }
.trial-class-row.selected { border-color: var(--alt-cyan); background: rgba(56, 129, 252, 0.08); box-shadow: 0 0 0 1px var(--alt-cyan); }
.trial-class-row.full { opacity: .55; cursor: default; }
.trial-class-row.full:hover { border-color: rgba(255, 255, 255, 0.1); }
.trial-class-row-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.trial-class-title { font-family: var(--font-body); font-weight: 700; font-size: 14.5px; color: #fff; }
.trial-class-time { font-family: 'Courier New', monospace; font-size: 12.5px; color: var(--alt-cyan); white-space: nowrap; }
.trial-class-meta { font-size: 12px; color: var(--text-secondary); margin-top: 3px; }
.trial-class-cap { display: flex; align-items: center; gap: 8px; margin-top: 9px; }
.trial-cap-track { flex: 1; height: 5px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.trial-cap-fill { height: 100%; background: linear-gradient(90deg, var(--logo-blue), var(--alt-cyan)); border-radius: 4px; }
.trial-cap-label { font-size: 11px; color: var(--text-muted); font-family: 'Courier New', monospace; flex-shrink: 0; }
.trial-full-tag { font-size: 11px; font-weight: 700; color: #F70C34; text-transform: uppercase; letter-spacing: .03em; margin-top: 6px; }
.trial-empty-day { text-align: center; color: var(--text-muted); font-size: 13.5px; padding: 26px 10px; }

/* Thanks / QR / Already-used */
#tsThanksState, #tsAlreadyState { text-align: center; }
.trial-check-ic {
    width: 56px; height: 56px; border-radius: 50%;
    background: rgba(56, 129, 252, 0.15); color: var(--alt-cyan);
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; margin: 0 auto 18px;
}
.trial-check-ic.info { background: rgba(255, 159, 10, 0.15); color: #ff9f0a; }
.trial-summary {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 16px;
    text-align: left;
    margin-bottom: 18px;
}
.trial-summary .ts-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; color: #fff; }
.trial-summary .ts-when { color: var(--text-secondary); font-size: 13px; }
.trial-fine { color: var(--text-muted); font-size: 12.5px; margin-bottom: 18px; line-height: 1.6; }
.trial-fine a { color: var(--text-secondary); }
.trial-fine-strong {
    color: #fff;
    font-size: 14.5px;
    font-weight: 500;
    background: rgba(56, 129, 252, 0.1);
    border: 1px solid rgba(56, 129, 252, 0.25);
    border-radius: 12px;
    padding: 14px 16px;
}
/* QR is delivered via email/WhatsApp only — these elements stay in the DOM purely so
   trial-section.js has somewhere to set the src/href, never shown on the page. */
.trial-qr-hidden { display: none; }
#tsAlreadyState p { color: var(--text-secondary); font-size: 14.5px; line-height: 1.65; margin-bottom: 24px; }
#tsAlreadyState h3 { font-family: var(--font-display); font-weight: 600; font-size: 22px; color: #fff; margin-bottom: 10px; }
.trial-btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    box-shadow: none;
    margin-top: 12px;
}
.trial-btn-secondary:hover { box-shadow: none; background: rgba(255, 255, 255, 0.1); transform: translateY(-2px); }

@media (prefers-reduced-motion: reduce) {
    .trial-intro, .trial-card-wrap, .trial-card-wrap::before,
    .trial-contour-rings, .trial-particles span, .trial-label::before { animation: none !important; }
}

@media (max-width: 1100px) {
    #book-free-trial { padding: 82px 0; }
}
@media (max-width: 768px) {
    /* The intro (label+heading+sub) was eating so much vertical space above the actual form
       that by the time someone scrolled down to it, the heading had long scrolled off — the
       section read as two disconnected halves instead of one compact block. Tightened, but
       kept the heading/label sized up enough to still read as a bold section title, not a
       shrunk-down afterthought. */
    #book-free-trial { padding: 64px 0 66px; scroll-margin-top: 88px; }
    .trial-intro { margin: 0 auto 32px; }
    .trial-label { font-size: 11.5px; letter-spacing: 0.16em; padding: 7px 15px; margin-bottom: 14px; }
    .trial-heading { font-size: 36px; line-height: 1.15; margin-bottom: 12px; }
    .trial-sub { font-size: 15px; margin-bottom: 16px; }
    .trial-stat-chip { font-size: 9.5px; padding: 5px 10px; }
    .trial-card { padding: 28px 20px; }
    .trial-field-row { flex-direction: column; gap: 0; }
}
@media (max-width: 480px) {
    #book-free-trial { padding: 52px 0 54px; }
    .trial-intro { margin: 0 auto 24px; }
    .trial-label { font-size: 10.5px; padding: 6px 13px; margin-bottom: 12px; }
    .trial-heading { font-size: 29px; margin-bottom: 10px; }
    .trial-sub { font-size: 14px; line-height: 1.58; }
    .trial-stats-row { gap: 6px; }
    .trial-card { padding: 24px 16px; border-radius: 18px; }
    .trial-check-ic, .trial-check-ic.info { width: 48px; height: 48px; font-size: 22px; margin-bottom: 14px; }
}
