/* ==========================================================================
   register-stepper.css — styles for the reusable "Register Interest" stepper
   (one-question-at-a-time funnel component, markup built by register-stepper.js).

   HOW TO EMBED
   ------------
   1. <link rel="stylesheet" href="/assets/register-stepper.css">
   2. Drop a mount element on the page, e.g. <div id="register-interest"></div>
   3. <script src="/assets/register-stepper.js"></script> then:
      window.RegisterStepper.init({ mount: '#register-interest' });

   Everything is scoped under .rs / .rs-* so the component can never clash with
   page styles. Colours and fonts are defined ON .rs as --rs-* tokens:

   --rs-navy-deep  #0f1720   deep navy background context
   --rs-navy       #1a2332   navy surface (borders/shadows context)
   --rs-cream      #f5f0ea   primary text
   --rs-gold       #c9a86c   accent
   --rs-gold-light #dbb87a   accent hover
   --rs-error      #e2988a   error salmon
   --rs-serif      'Cormorant Garamond', Georgia, serif   questions / titles
   --rs-sans       'Inter', system-ui, sans-serif         everything else

   No imports, no external fonts — the host page loads the fonts itself.
   ========================================================================== */

.rs {
    /* ---- tokens ---- */
    --rs-navy-deep: #0f1720;
    --rs-navy: #1a2332;
    --rs-cream: #f5f0ea;
    --rs-gold: #c9a86c;
    --rs-gold-light: #dbb87a;
    --rs-error: #e2988a;
    --rs-serif: 'Cormorant Garamond', Georgia, serif;
    --rs-sans: 'Inter', system-ui, sans-serif;

    position: relative;
    width: 100%;
    color: var(--rs-cream);
    font-family: var(--rs-sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.rs *,
.rs *::before,
.rs *::after { box-sizing: border-box; }

/* --------------------------------------------------------------------------
   Visually-hidden helper (screen-reader-only text, e.g. the live step counter)
   -------------------------------------------------------------------------- */

.rs .rs-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* Native [hidden] must always win, even over display rules below. */
.rs [hidden] { display: none !important; }

/* --------------------------------------------------------------------------
   Progress indicator — centred row of thin gold bars (copy of .ri-progress)
   -------------------------------------------------------------------------- */

.rs-progress {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
}

.rs-bar {
    width: 26px;
    height: 2px;
    background: rgba(255,255,255,0.18);
    transition: background 0.3s;
}

.rs-bar.active { background: var(--rs-gold); }

/* --------------------------------------------------------------------------
   Steps — one visible at a time, soft fade between them
   -------------------------------------------------------------------------- */

.rs-step { display: none; }

.rs-step.is-active {
    display: grid;
    gap: 1.5rem;
    animation: rsFade 0.45s ease;
}

@keyframes rsFade {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

.rs-question {
    margin: 0;
    font-family: var(--rs-serif);
    font-size: 1.7rem;
    font-weight: 500;
    color: #ffffff;
    line-height: 1.25;
}

.rs-question:focus { outline: none; }

.rs-hint {
    margin: -0.75rem 0 0;
    font-size: 0.82rem;
    color: rgba(245,240,234,0.55);
}

/* --------------------------------------------------------------------------
   Option cards (apartment types, timelines, continuation methods)
   -------------------------------------------------------------------------- */

.rs-cards {
    display: grid;
    gap: 0.75rem;
}

.rs-cards.cols { grid-template-columns: 1fr 1fr; }

.rs-method-grid { gap: 1rem; }

.rs-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 0;
    color: #ffffff;
    font-family: var(--rs-sans);
    font-size: 0.9rem;
    text-align: start;
    cursor: pointer;
    transition: border-color 0.3s, background 0.3s, transform 0.3s, color 0.3s;
}

.rs-card:hover {
    border-color: var(--rs-gold);
    transform: translateY(-2px);
}

.rs-card:focus-visible {
    outline: 2px solid var(--rs-gold);
    outline-offset: 2px;
}

.rs-card.selected {
    border-color: var(--rs-gold);
    background: rgba(201,168,108,0.1);
    color: var(--rs-gold-light);
}

/* Site visit renders visible but dead until launches. */
.rs-card:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.rs-card:disabled:hover {
    border-color: rgba(255,255,255,0.15);
    transform: none;
}

.rs-card-main {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
}

.rs-card-title { line-height: 1.35; }

.rs-card-note {
    font-size: 0.74rem;
    color: rgba(245,240,234,0.55);
    line-height: 1.5;
}

/* Small tags riding on a card title: the Google Meet badge / Coming soon chip */
.rs-badge,
.rs-chip {
    display: inline-block;
    margin-inline-start: 0.5rem;
    padding: 0.15rem 0.5rem;
    border: 1px solid var(--rs-gold);
    vertical-align: middle;
    font-size: 0.6rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--rs-gold);
}

.rs-chip {
    border-color: rgba(255,255,255,0.3);
    color: rgba(245,240,234,0.6);
}

.rs-mark {
    flex-shrink: 0;
    font-size: 0.8rem;
    color: var(--rs-gold);
    opacity: 0;
    transition: opacity 0.3s;
}

.rs-card.selected .rs-mark { opacity: 1; }

/* --------------------------------------------------------------------------
   Details fields
   -------------------------------------------------------------------------- */

.rs-fields {
    display: grid;
    gap: 1.25rem;
    margin: 0;
}

.rs-field {
    display: grid;
    gap: 0.45rem;
}

.rs-label {
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(245,240,234,0.6);
}

.rs-input {
    width: 100%;
    padding: 0.95rem 1rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(245,240,234,0.18);
    border-radius: 4px;
    color: var(--rs-cream);
    font-family: var(--rs-sans);
    font-size: 0.9rem;
    transition: border-color 0.3s;
}

.rs-input::placeholder { color: rgba(245,240,234,0.35); }

.rs-input:focus {
    outline: none;
    border-color: var(--rs-gold);
}

/* Honeypot — real humans never see this; bots that fill it get dropped. */
.rs-hp {
    position: absolute;
    top: -9999px;
    inset-inline-start: -9999px;
    height: 0;
    overflow: hidden;
}

/* --------------------------------------------------------------------------
   Error line + offline fail box
   -------------------------------------------------------------------------- */

.rs-error {
    display: none;
    margin: 0;
    color: var(--rs-error);
    font-size: 0.78rem;
    line-height: 1.5;
}

.rs-error.show { display: block; }

.rs-fail {
    margin: 0.25rem 0 0;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(201,168,108,0.35);
    background: rgba(201,168,108,0.06);
    font-size: 0.82rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.75);
}

.rs-fail a {
    color: var(--rs-gold);
    text-decoration: none;
}

.rs-fail a:hover { color: var(--rs-gold-light); }

/* --------------------------------------------------------------------------
   Actions row: back link-style button + the gold continue button
   -------------------------------------------------------------------------- */

.rs-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.25rem;
}

.rs-back {
    background: none;
    border: none;
    padding: 0.5rem 0;
    color: rgba(255,255,255,0.55);
    font-family: var(--rs-sans);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.3s;
}

.rs-back:hover { color: var(--rs-gold); }

.rs-back:focus-visible {
    outline: 2px solid var(--rs-gold);
    outline-offset: 2px;
}

.rs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 0 2rem;
    background: var(--rs-gold);
    border: 1px solid var(--rs-gold);
    border-radius: 4px;
    color: var(--rs-navy-deep);
    font-family: var(--rs-sans);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: background 0.3s, border-color 0.3s;
}

.rs-btn:hover {
    background: var(--rs-gold-light);
    border-color: var(--rs-gold-light);
}

.rs-btn:focus-visible {
    outline: 2px solid var(--rs-gold);
    outline-offset: 2px;
}

.rs-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.rs-next { min-width: 190px; flex-shrink: 0; }

/* Ghost variant — quiet secondary actions (slots retry). */
.rs-btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 1.5rem;
    background: transparent;
    border: 1px solid rgba(201,168,108,0.5);
    border-radius: 4px;
    color: var(--rs-gold);
    font-family: var(--rs-sans);
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
}

.rs-btn-ghost:hover {
    background: var(--rs-gold);
    color: var(--rs-navy-deep);
}

.rs-btn-ghost:focus-visible {
    outline: 2px solid var(--rs-gold);
    outline-offset: 2px;
}

.rs-retry { justify-self: start; }

/* --------------------------------------------------------------------------
   Inline time picker (virtual-meeting step)
   -------------------------------------------------------------------------- */

.rs-picker {
    display: grid;
    gap: 1rem;
    padding-top: 0.25rem;
}

.rs-picker-title {
    margin: 0;
    font-family: var(--rs-serif);
    font-size: 1.25rem;
    font-weight: 500;
    color: #ffffff;
}

.rs-status,
.rs-time-status {
    margin: 0;
    font-size: 0.82rem;
    color: rgba(245,240,234,0.66);
}

/* Horizontal strip of day chips — scrolls sideways on narrow screens. */
.rs-day-row {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.35rem;
    -webkit-overflow-scrolling: touch;
}

.rs-time-wrap {
    display: grid;
    gap: 0.65rem;
}

.rs-time-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.rs-chip-day,
.rs-chip-time {
    padding: 0.55rem 0.8rem;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 0;
    color: var(--rs-cream);
    font-family: var(--rs-sans);
    font-size: 0.76rem;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.3s, background 0.3s, color 0.3s;
}

.rs-chip-day:hover,
.rs-chip-time:hover { border-color: var(--rs-gold); }

.rs-chip-day:focus-visible,
.rs-chip-time:focus-visible {
    outline: 2px solid var(--rs-gold);
    outline-offset: 2px;
}

.rs-chip-day.selected,
.rs-chip-time.selected {
    border-color: var(--rs-gold);
    background: rgba(201,168,108,0.1);
    color: var(--rs-gold-light);
}

.rs-tz {
    margin: 0;
    font-size: 0.72rem;
    color: rgba(245,240,234,0.45);
}

.rs-confirm { width: 100%; }

/* --------------------------------------------------------------------------
   Success panel (lead + meeting variants)
   -------------------------------------------------------------------------- */

.rs-success {
    display: none;
    text-align: center;
}

.rs.is-done .rs-progress,
.rs.is-done .rs-step,
.rs.is-done .rs-fail { display: none; }

.rs.is-done .rs-success {
    display: block;
    animation: rsFade 0.45s ease;
}

.rs-success-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 1.25rem;
    border: 1px solid var(--rs-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--rs-gold);
    font-size: 1.1rem;
}

.rs-success-title {
    margin: 0 0 0.5rem;
    font-family: var(--rs-serif);
    font-size: 2rem;
    font-weight: 500;
    color: #ffffff;
}

.rs-success-text {
    margin: 0 0 1.25rem;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.65);
    line-height: 1.7;
}

.rs-summary {
    margin: 0 0 1.75rem;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    color: var(--rs-gold-light);
}

.rs-cta-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
}

.rs-cta-row .rs-btn { width: 100%; }

.rs-alt {
    margin: 1.25rem 0 0;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.45);
}

.rs-alt a {
    color: var(--rs-gold);
    text-decoration: none;
}

.rs-alt a:hover { color: var(--rs-gold-light); }

/* --------------------------------------------------------------------------
   Responsive — collapse to a single comfortable column on phones
   -------------------------------------------------------------------------- */

@media (max-width: 640px) {
    .rs-question { font-size: 1.35rem; }

    .rs-cards.cols,
    .rs-method-grid { grid-template-columns: 1fr; }

    .rs-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .rs-actions .rs-back { align-self: center; }

    .rs-next,
    .rs-actions .rs-btn { width: 100%; min-width: 0; }
}

/* --------------------------------------------------------------------------
   Reduced motion — kill the step fade and card movement
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .rs-step.is-active { animation: none; }

    .rs-card,
    .rs-bar,
    .rs-back,
    .rs-btn,
    .rs-btn-ghost,
    .rs-chip-day,
    .rs-chip-time,
    .rs-input,
    .rs-mark {
        transition: none;
    }

    .rs-card:hover { transform: none; }
}
