/* ============================================================
   GDVCONNECT — Vacation Club PWA
   style.css | Mobile-first, luxury resort aesthetic
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Jost:wght@300;400;500;600&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
    --gold:       #c9a84c;
    --gold-light: #e8d5a3;
    --dark:       #0d0d0d;
    --dark-2:     #141414;
    --dark-3:     #1e1e1e;
    --white:      #f5f0e8;
    --muted:      #888880;
    --accent:     #4a7c6f;
    --danger:     #c0392b;

    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body:    'Jost', sans-serif;

    --radius:  12px;
    --radius-lg: 20px;
    --shadow:  0 8px 32px rgba(0,0,0,0.45);
    --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    overflow: hidden;
    background: var(--dark);
    color: var(--white);
    font-family: var(--font-body);
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: 100%;
    touch-action: pan-y;
}

/* ── Scrollable wrapper (for pages that need scroll) ───────── */
.page-scroll {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* ════════════════════════════════════════════════════════════
   SCREEN SHIELD (in-app browser blocker)
   ════════════════════════════════════════════════════════════ */
#shield-screen {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--dark);
    z-index: 9999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 30px;
    text-align: center;
}
#shield-screen.active { display: flex; }

.shield-icon {
    font-size: 56px;
    margin-bottom: 24px;
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%       { transform: scale(1.08); opacity: 0.8; }
}

.shield-title {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 300;
    color: var(--gold);
    line-height: 1.2;
    margin-bottom: 16px;
}
.shield-body {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.7;
    max-width: 300px;
    margin-bottom: 36px;
}
.shield-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--gold);
    color: var(--dark);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 16px 32px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
}

/* ════════════════════════════════════════════════════════════
   PWA INSTALL OVERLAY
   ════════════════════════════════════════════════════════════ */
#install-overlay {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--dark-3);
    border-top: 1px solid rgba(201, 168, 76, 0.3);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 28px 24px 40px;
    z-index: 1000;
    box-shadow: 0 -20px 60px rgba(0,0,0,0.7);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
#install-overlay.active { display: block; }

@keyframes slideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.install-handle {
    width: 36px; height: 4px;
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
    margin: 0 auto 20px;
}
.install-title {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 400;
    color: var(--gold);
    margin-bottom: 8px;
}
.install-sub {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 24px;
    line-height: 1.6;
}

/* Android */
#btn-android-install {
    width: 100%;
    background: var(--gold);
    color: var(--dark);
    border: none;
    padding: 16px;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
}
#btn-android-install:active { transform: scale(0.98); }

/* iOS Steps */
.ios-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.ios-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.ios-step-num {
    flex-shrink: 0;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--dark);
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ios-step-text {
    font-size: 14px;
    color: var(--white);
    line-height: 1.5;
    padding-top: 4px;
}
.ios-step-text strong { color: var(--gold-light); }

.ios-arrow {
    text-align: center;
    font-size: 28px;
    color: var(--gold);
    margin-top: 16px;
    animation: bounce 1.5s ease-in-out infinite;
}
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(6px); }
}

.install-dismiss {
    margin-top: 20px;
    width: 100%;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--muted);
    padding: 12px;
    border-radius: var(--radius);
    font-size: 13px;
    cursor: pointer;
}

/* ════════════════════════════════════════════════════════════
   SLIDE DECK
   ════════════════════════════════════════════════════════════ */
#app-wrapper {
    position: fixed;
    inset: 0;
    background: var(--dark);
}

/* Progress bar */
#progress-bar {
    position: fixed;
    top: 0; left: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    transition: width 0.4s ease;
    z-index: 100;
}

/* Header */
#app-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: linear-gradient(to bottom, rgba(13,13,13,0.95), transparent);
    z-index: 50;
}
.header-logo {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 400;
    color: var(--gold);
    letter-spacing: 2px;
    text-transform: uppercase;
}
.slide-counter {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 1px;
}

/* Slide container */
#slide-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0;
    transform: translateX(100%);
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1),
                opacity   0.45s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
}

.slide.active {
    opacity: 1;
    transform: translateX(0);
    z-index: 2;
}
.slide.prev {
    opacity: 0;
    transform: translateX(-100%);
    z-index: 1;
}

/* Slide image */
.slide-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Slide image placeholder (before real images dropped in) */
.slide-placeholder {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.slide-placeholder .ph-num {
    font-family: var(--font-display);
    font-size: 80px;
    font-weight: 300;
    color: rgba(201, 168, 76, 0.15);
    line-height: 1;
}
.slide-placeholder .ph-label {
    font-size: 12px;
    color: rgba(255,255,255,0.2);
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* Gradient overlay on slide */
.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.85) 0%,
        rgba(0,0,0,0.3) 40%,
        transparent 70%
    );
}

/* Slide caption */
.slide-caption {
    position: relative;
    z-index: 3;
    padding: 0 24px 80px;
}
.slide-tag {
    display: inline-block;
    font-size: 10px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--gold);
    border: 1px solid rgba(201,168,76,0.4);
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
}
.slide-title {
    font-family: var(--font-display);
    font-size: 34px;
    font-weight: 300;
    line-height: 1.15;
    color: var(--white);
    margin-bottom: 8px;
}
.slide-desc {
    font-size: 13px;
    color: rgba(245, 240, 232, 0.65);
    line-height: 1.6;
    max-width: 320px;
}

/* Navigation dots */
#dot-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 50;
}
.dot {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    transition: var(--transition);
    cursor: pointer;
}
.dot.active {
    background: var(--gold);
    width: 18px;
    border-radius: 3px;
}

/* Swipe hint */
#swipe-hint {
    position: fixed;
    bottom: 52px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: rgba(255,255,255,0.3);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    white-space: nowrap;
    z-index: 50;
    animation: fadeHint 4s ease forwards;
}
@keyframes fadeHint {
    0%, 60% { opacity: 1; }
    100%     { opacity: 0; }
}

/* ════════════════════════════════════════════════════════════
   FINAL SLIDE — LEAD CAPTURE FORM
   ════════════════════════════════════════════════════════════ */
#slide-form {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateX(100%);
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1),
                opacity   0.45s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    background: var(--dark-2);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
#slide-form.active {
    opacity: 1;
    transform: translateX(0);
}
#slide-form.prev {
    opacity: 0;
    transform: translateX(-100%);
}

.form-inner {
    flex: 1;
    padding: 80px 28px 60px;
    display: flex;
    flex-direction: column;
}

.form-eyebrow {
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 10px;
}
.form-headline {
    font-family: var(--font-display);
    font-size: 38px;
    font-weight: 300;
    line-height: 1.15;
    color: var(--white);
    margin-bottom: 8px;
}
.form-sub {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 36px;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 28px;
}
.field {
    position: relative;
}
.field label {
    display: block;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
}
.field input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius);
    padding: 14px 16px;
    color: var(--white);
    font-family: var(--font-body);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
    -webkit-appearance: none;
}
.field input:focus {
    border-color: var(--gold);
    background: rgba(201,168,76,0.05);
}
.field input::placeholder { color: rgba(255,255,255,0.2); }

/* Consent line */
.consent-line {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 28px;
}
.consent-line input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px; height: 18px;
    accent-color: var(--gold);
    margin-top: 2px;
}
.consent-line label {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.5;
}

/* Submit */
#btn-submit {
    width: 100%;
    background: var(--gold);
    color: var(--dark);
    border: none;
    padding: 18px;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}
#btn-submit:active { transform: scale(0.98); }
#btn-submit:disabled { opacity: 0.5; }

.btn-spinner {
    display: none;
    width: 18px; height: 18px;
    border: 2px solid rgba(0,0,0,0.3);
    border-top-color: var(--dark);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}
@keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }

/* Success state */
#form-success {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-align: center;
    padding: 40px 28px;
}
#form-success.active { display: flex; }

.success-icon {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: rgba(74,124,111,0.15);
    border: 2px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 24px;
}
.success-title {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 300;
    color: var(--white);
    margin-bottom: 12px;
}
.success-body {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.7;
    max-width: 280px;
}

/* Error message */
.field-error {
    font-size: 12px;
    color: #e74c3c;
    margin-top: 5px;
    display: none;
}
.field-error.visible { display: block; }

/* ════════════════════════════════════════════════════════════
   MEMBER PORTAL  (index.php)
   ════════════════════════════════════════════════════════════ */
.portal-body {
    min-height: 100vh;
    background: var(--dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 60px 28px 60px;
    overflow-y: auto;
}

.portal-logo {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 300;
    color: var(--gold);
    letter-spacing: 4px;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 6px;
}
.portal-tagline {
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted);
    text-align: center;
    margin-bottom: 48px;
}

.portal-card {
    width: 100%;
    max-width: 420px;
    background: var(--dark-3);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
}

.portal-section-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 400;
    color: var(--white);
    margin-bottom: 6px;
}
.portal-section-sub {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 28px;
    line-height: 1.5;
}

.portal-field {
    margin-bottom: 16px;
}
.portal-field label {
    display: block;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
}
.portal-field input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius);
    padding: 14px 16px;
    color: var(--white);
    font-family: var(--font-body);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
    -webkit-appearance: none;
}
.portal-field input:focus { border-color: var(--gold); }
.portal-field input::placeholder { color: rgba(255,255,255,0.2); }

.btn-generate {
    width: 100%;
    background: var(--gold);
    color: var(--dark);
    border: none;
    padding: 16px;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 8px;
    transition: var(--transition);
}
.btn-generate:active { transform: scale(0.98); }

/* Result card */
.result-card {
    width: 100%;
    max-width: 420px;
    margin-top: 24px;
    background: var(--dark-3);
    border: 1px solid rgba(201,168,76,0.2);
    border-radius: var(--radius-lg);
    padding: 28px;
    display: none;
}
.result-card.visible { display: block; }

.result-label {
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 12px;
}
.result-link {
    display: block;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius);
    padding: 14px 16px;
    color: var(--gold-light);
    font-size: 13px;
    word-break: break-all;
    margin-bottom: 16px;
    font-family: 'Courier New', monospace;
}
.result-actions {
    display: flex;
    gap: 10px;
}
.btn-copy, .btn-sms {
    flex: 1;
    padding: 12px;
    border-radius: var(--radius);
    border: none;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.5px;
}
.btn-copy {
    background: rgba(255,255,255,0.07);
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.1);
}
.btn-sms {
    background: var(--accent);
    color: var(--white);
}
.btn-copy:active, .btn-sms:active { transform: scale(0.97); }

/* QR holder */
.qr-holder {
    margin-top: 20px;
    text-align: center;
}
.qr-holder canvas,
.qr-holder img {
    border-radius: var(--radius);
    background: white;
    padding: 8px;
}
.qr-caption {
    font-size: 11px;
    color: var(--muted);
    margin-top: 8px;
    letter-spacing: 1px;
}

/* ── Utility ──────────────────────────────────────────────── */
.text-gold { color: var(--gold); }
.hidden { display: none !important; }
