/* =====================================================================
   "6 Reasons to Choose NASR" (homepage, .rx inside #why-choose-new)
   Six reason cards around a central dial. Every description is visible; the
   dial lights each reason in turn (pointing at a card takes over).
   Behaviour: assets/js/reasons-showcase.js
   ===================================================================== */

.rx {
    --rx-gold: #C9A438;
    --rx-gold-hi: #E7CF86;
    --rx-ink: #111A2E;
    --rx-text: #475569;
    --rx-muted: #64748B;
    --rx-card: #FFFFFF;
    --rx-line: rgba(17, 26, 46, 0.08);
    --rx-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --rx-gold-grad: linear-gradient(135deg, #E7CF86 0%, #C9A438 55%, #A7832A 100%);
    --rx-step: 3.6s;
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px minmax(0, 1fr);
    align-items: center;
    gap: 0 3.4rem;
    max-width: 1240px;
    margin: 0 auto;
    padding: 1rem clamp(0px, 2vw, 1.25rem) 0.5rem;
}
html.dark-mode .rx {
    --rx-ink: #F1F5F9;
    --rx-text: #C2CDDB;
    --rx-muted: #AAB8CA;
    --rx-card: #121D33;
    --rx-line: rgba(255, 255, 255, 0.08);
}

/* reason accents (kept from the original coloured arrows) */
.rx-card[data-rx="0"] { --c: #6BA539; --c2: #9CCC65; }
.rx-card[data-rx="1"] { --c: #2E8B3E; --c2: #66BB6A; }
.rx-card[data-rx="2"] { --c: #00796B; --c2: #26A69A; }
.rx-card[data-rx="3"] { --c: #00727D; --c2: #26C6DA; }
.rx-card[data-rx="4"] { --c: #1565C0; --c2: #42A5F5; }
.rx-card[data-rx="5"] { --c: #00838F; --c2: #4DD0E1; }

.rx-col { display: grid; gap: 1.15rem; }

/* ---------- Cards ---------- */
.rx-card {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 1rem;
    padding: 1.2rem 1.3rem 1.25rem;
    border-radius: 20px;
    border: 1px solid var(--rx-line);
    background: var(--rx-card);
    box-shadow: 0 1px 2px rgba(17, 26, 46, 0.04), 0 18px 36px -26px rgba(17, 26, 46, 0.4);
    transition: transform 0.55s var(--rx-ease), box-shadow 0.5s var(--rx-ease), border-color 0.4s ease, background 0.4s ease;
    outline: none;
}
.rx-card::before {
    /* soft accent wash */
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: radial-gradient(140% 120% at 0% 0%, color-mix(in srgb, var(--c) 12%, transparent), transparent 60%);
    opacity: 0;
    transition: opacity 0.45s ease;
}
.rx-col--left .rx-card::before { background: radial-gradient(140% 120% at 100% 0%, color-mix(in srgb, var(--c) 12%, transparent), transparent 60%); }

/* connector from each card to the dial */
.rx-card::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 3.4rem;
    height: 2px;
    background: linear-gradient(90deg, rgba(201, 164, 56, 0.15), rgba(201, 164, 56, 0.5), rgba(201, 164, 56, 0.15));
    transition: background 0.4s ease, box-shadow 0.4s ease;
}
.rx-col--left .rx-card::after { left: 100%; }
.rx-col--right .rx-card::after { right: 100%; }
.rx-spark {
    position: absolute;
    top: calc(50% - 4px);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--rx-gold-hi);
    box-shadow: 0 0 10px 2px rgba(201, 164, 56, 0.85);
    opacity: 0;
    pointer-events: none;
}
.rx-col--left .rx-spark { left: 100%; }
.rx-col--right .rx-spark { right: 100%; }
.rx-card.is-on .rx-spark { opacity: 1; animation: rx-run-r 1.2s ease-in-out infinite; }
.rx-col--right .rx-card.is-on .rx-spark { animation-name: rx-run-l; }
@keyframes rx-run-r { from { transform: translateX(0); } to { transform: translateX(3.2rem); } }
@keyframes rx-run-l { from { transform: translateX(0); } to { transform: translateX(-3.2rem); } }

.rx-card:hover,
.rx-card:focus-visible,
.rx-card.is-on {
    border-color: color-mix(in srgb, var(--c) 55%, transparent);
    box-shadow: 0 2px 4px rgba(17, 26, 46, 0.05), 0 30px 56px -30px color-mix(in srgb, var(--c) 70%, rgba(17, 26, 46, 0.6)), 0 0 0 4px color-mix(in srgb, var(--c) 10%, transparent);
}
.rx-card.is-on { transform: scale(1.035); }
.rx-col--left .rx-card.is-on { transform: translateX(-6px) scale(1.035); }
.rx-col--right .rx-card.is-on { transform: translateX(6px) scale(1.035); }
.rx-card:hover::before,
.rx-card.is-on::before { opacity: 1; }
.rx-card.is-on::after { background: var(--rx-gold-grad); box-shadow: 0 0 10px rgba(201, 164, 56, 0.7); }
.rx-card:focus-visible { outline: 2px solid var(--rx-gold); outline-offset: 3px; }

/* icon tile */
.rx-ico {
    position: relative;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    color: #FFFFFF;
    background: linear-gradient(145deg, var(--c2), var(--c));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 12px 22px -12px var(--c);
    transition: transform 0.6s var(--rx-ease);
}
.rx-ico svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.rx-ico::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 20px;
    border: 1.5px solid var(--c2);
    opacity: 0;
    pointer-events: none;
}
.rx-card:hover .rx-ico,
.rx-card.is-on .rx-ico { transform: rotate(-8deg) scale(1.08); }
.rx-card.is-on .rx-ico::after { animation: rx-ping 1.6s ease-out infinite; }
@keyframes rx-ping { 0% { opacity: 0.9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.35); } }

.rx-body { min-width: 0; }
.rx-kicker {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--c);
}
html.dark-mode .rx-kicker { color: var(--c2); }
.rx-title {
    margin: 0 0 0.35rem !important;
    font-size: 1.12rem !important;
    line-height: 1.3 !important;
    font-weight: 700;
    color: var(--rx-ink) !important;
}
.rx-text {
    margin: 0 !important;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--rx-text);
}

/* progress bar while a reason is lit */
.rx-bar {
    position: absolute;
    left: 1.3rem;
    right: 1.3rem;
    bottom: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    overflow: hidden;
    background: transparent;
}
.rx-bar b {
    display: block;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, var(--c), var(--c2));
    transform: scaleX(0);
    transform-origin: left;
}
.rx-card.is-on .rx-bar b { animation: rx-fill var(--rx-step) linear forwards; }
.rx.is-paused .rx-card.is-on .rx-bar b { animation: none; transform: scaleX(1); }
@keyframes rx-fill { to { transform: scaleX(1); } }

/* ---------- Central dial ---------- */
.rx-hub {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.rx-dial {
    position: relative;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 50% 35%, #FFFFFF 0%, #F7F3EA 60%, #EFE8D8 100%);
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.9), 0 30px 60px -30px rgba(17, 26, 46, 0.45), 0 0 0 10px rgba(201, 164, 56, 0.07);
}
html.dark-mode .rx-dial {
    background: radial-gradient(circle at 50% 35%, #1A2848 0%, #111A2E 60%, #0A1222 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 30px 60px -30px rgba(0, 0, 0, 0.9), 0 0 0 10px rgba(201, 164, 56, 0.08);
}
.rx-dial::before {
    /* slow rotating dashed orbit */
    content: '';
    position: absolute;
    inset: -22px;
    border-radius: 50%;
    border: 1.5px dashed rgba(201, 164, 56, 0.4);
    animation: rx-orbit 40s linear infinite;
}
@keyframes rx-orbit { to { transform: rotate(360deg); } }
.rx-prog { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.rx-prog circle { fill: none; stroke-width: 6; }
.rx-track { stroke: rgba(201, 164, 56, 0.16); }
.rx-fill {
    stroke: url(#rx-grad);
    stroke-linecap: round;
    stroke-dasharray: 80 498;
    stroke-dashoffset: 0;
    opacity: 0;
    transition: stroke-dashoffset 0.9s var(--rx-ease), opacity 0.4s ease;
    filter: drop-shadow(0 0 4px rgba(201, 164, 56, 0.6));
}
.rx-six {
    position: relative;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 8.5rem;
    font-weight: 700;
    line-height: 1;
    margin-top: -0.6rem;
    background: var(--rx-gold-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 10px 14px rgba(167, 131, 42, 0.35));
    /* as before: one full turn, then a pause (every 6s) */
    animation: rx-six-turn 6s infinite;
}
@keyframes rx-six-turn {
    0% { transform: rotate(0deg); animation-timing-function: ease-in-out; }
    16.66% { transform: rotate(360deg); }
    100% { transform: rotate(360deg); }
}
.rx-six-sub {
    position: absolute;
    bottom: 46px;
    left: 0;
    right: 0;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--rx-muted);
}

/* six dots round the dial: one per reason */
.rx-dot {
    --ang: 0deg;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 26px;
    height: 26px;
    margin: -13px 0 0 -13px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    font: inherit;
    font-size: 0.66rem;
    font-weight: 800;
    color: var(--rx-muted);
    background: var(--rx-card);
    box-shadow: 0 0 0 1.5px rgba(201, 164, 56, 0.45), 0 6px 12px -6px rgba(17, 26, 46, 0.5);
    transform: rotate(var(--ang)) translateY(-125px) rotate(calc(-1 * var(--ang)));
    cursor: pointer;
    transition: background 0.35s ease, color 0.35s ease, box-shadow 0.35s ease, scale 0.35s var(--rx-ease);
}
/* each dot sits on the same side as its card: 1-3 left (top to bottom), 4-6 right */
.rx-dot:nth-of-type(1) { --ang: 300deg; }
.rx-dot:nth-of-type(2) { --ang: 270deg; }
.rx-dot:nth-of-type(3) { --ang: 240deg; }
.rx-dot:nth-of-type(4) { --ang: 60deg; }
.rx-dot:nth-of-type(5) { --ang: 90deg; }
.rx-dot:nth-of-type(6) { --ang: 120deg; }
.rx-dot:hover { color: var(--rx-ink); }
.rx-dot:focus-visible { outline: 2px solid var(--rx-gold); outline-offset: 2px; }
.rx-dot.is-on {
    color: #111A2E;
    background: var(--rx-gold-grad);
    box-shadow: 0 0 0 4px rgba(201, 164, 56, 0.2), 0 0 18px rgba(201, 164, 56, 0.8);
    scale: 1.2;
}

.rx-label {
    margin: 2.1rem 0 0 !important;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    line-height: 1.5;
    color: var(--rx-ink);
}
.rx-label strong {
    display: block;
    font-size: 1.6rem;
    letter-spacing: 0.24em;
    background: var(--rx-gold-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ---------- Reveal on scroll (only once JS has armed it) ---------- */
.rx.rx-js .rx-card { opacity: 0; translate: 0 0; }
.rx.rx-js .rx-col--left .rx-card { translate: -46px 0; }
.rx.rx-js .rx-col--right .rx-card { translate: 46px 0; }
.rx.rx-js .rx-hub { opacity: 0; scale: 0.85; }
.rx.rx-js .rx-card,
.rx.rx-js .rx-hub { transition: transform 0.55s var(--rx-ease), box-shadow 0.5s var(--rx-ease), border-color 0.4s ease, opacity 0.8s ease, translate 0.9s var(--rx-ease), scale 0.9s var(--rx-ease); }
.rx.rx-in .rx-card { opacity: 1; translate: 0 0; }
.rx.rx-in .rx-hub { opacity: 1; scale: 1; }
.rx.rx-in .rx-card:nth-child(2) { transition-delay: 0s, 0s, 0s, 0.12s, 0.12s, 0s; }
.rx.rx-in .rx-card:nth-child(3) { transition-delay: 0s, 0s, 0s, 0.24s, 0.24s, 0s; }

/* ---------- Tablet: dial on top, cards in two columns ---------- */
@media (max-width: 1099px) {
    .rx { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.15rem; }
    .rx-hub { grid-column: 1 / -1; grid-row: 1; margin-bottom: 1.6rem; }
    .rx-col { display: contents; }
    .rx-card::after, .rx-spark { display: none; }
    .rx-col--left .rx-card.is-on,
    .rx-col--right .rx-card.is-on { transform: scale(1.02); }
    .rx.rx-js .rx-col--left .rx-card,
    .rx.rx-js .rx-col--right .rx-card { translate: 0 30px; }
    .rx.rx-in .rx-col--left .rx-card,
    .rx.rx-in .rx-col--right .rx-card { translate: 0 0; }
    .rx-label { margin-top: 1.9rem !important; }
}
/* ---------- The card under the cursor grows a little more (mouse only) ---------- */
@media (hover: hover) and (pointer: fine) and (min-width: 1100px) {
    .rx-col--left .rx-card:hover { transform: translateX(-6px) scale(1.07); }
    .rx-col--right .rx-card:hover { transform: translateX(6px) scale(1.07); }
}
@media (hover: hover) and (pointer: fine) and (min-width: 641px) and (max-width: 1099px) {
    .rx-col--left .rx-card:hover,
    .rx-col--right .rx-card:hover { transform: scale(1.05); }
}

/* ---------- Phone: one column ---------- */
@media (max-width: 640px) {
    .rx { grid-template-columns: minmax(0, 1fr); }
    .rx-dial { width: 200px; height: 200px; }
    .rx-dot { width: 24px; height: 24px; margin: -12px 0 0 -12px; transform: rotate(var(--ang)) translateY(-100px) rotate(calc(-1 * var(--ang))); }
    .rx-six { font-size: 6.6rem; }
    .rx-six-sub { bottom: 36px; font-size: 0.6rem; }
    .rx-label { font-size: 0.85rem; }
    .rx-label strong { font-size: 1.35rem; }
    .rx-card { padding: 1.05rem 1.05rem 1.15rem; gap: 0.85rem; }
    .rx-ico { width: 48px; height: 48px; border-radius: 14px; }
    .rx-ico svg { width: 23px; height: 23px; }
    .rx-card.is-on,
    .rx-col--left .rx-card.is-on,
    .rx-col--right .rx-card.is-on { transform: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .rx-dial::before, .rx-six, .rx-card.is-on .rx-spark, .rx-card.is-on .rx-ico::after, .rx-card.is-on .rx-bar b { animation: none !important; }
    .rx-card.is-on .rx-bar b { transform: scaleX(1); }
    .rx.rx-js .rx-card, .rx.rx-js .rx-hub { opacity: 1; translate: none; scale: none; }
}

/* ---------- Dark mode colour restore ----------
   style.css forces every span/strong in dark mode to grey with !important
   (selector weight 0,5,2); give the dial and cards their own colours back.
   ":not(#rx-x)" only adds selector weight; it matches everything. */
html.dark-mode .rx .rx-ico:not(#rx-x) { color: #FFFFFF !important; }
html.dark-mode .rx .rx-kicker:not(#rx-x) { color: var(--c2) !important; }
html.dark-mode .rx .rx-six:not(#rx-x),
html.dark-mode .rx .rx-label strong:not(#rx-x) { color: transparent !important; }
html.dark-mode .rx .rx-six-sub:not(#rx-x) { color: var(--rx-muted) !important; }
