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

/* === Custom Properties === */
:root {
    --primary: #C9A84C;
    --primary-glow: rgba(201, 168, 76, 0.4);
    --secondary: #C9A84C;
    --bg: #0a0a0a;
    --bg-light: #111111;
    --text: #f0ede6;
    --text-muted: #a09b90;
    --card-bg: #111111;
    --error: #e53e3e;
    --success: #38a169;
    --advisor-primary: var(--primary);
    --advisor-secondary: var(--secondary);
    --font-display: 'Cinzel', Georgia, serif;
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

h1, h2, h3, .nav-brand {
    font-family: var(--font-display);
}

/* === Base === */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-stack);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--secondary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* === Navigation === */
.nav {
    background-color: rgba(10, 10, 10, 0.95);
    border-bottom: 1px solid rgba(201, 168, 76, 0.2);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
    text-decoration: none;
    letter-spacing: 0.05em;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-brand:hover {
    text-decoration: none;
    color: var(--secondary);
}

.nav-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.nav-text {
    letter-spacing: 0.05em;
}

/* === Main Content === */
.main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    width: 100%;
}

/* === Hero Section === */
.hero {
    text-align: center;
    padding: 3rem 1rem;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 0.75rem;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* === How It Works === */
.how-it-works {
    padding: 2rem 0;
    margin-bottom: 3rem;
    text-align: center;
}

.how-it-works h2 {
    font-size: 1.5rem;
    color: var(--secondary);
    margin-bottom: 2rem;
}

.how-it-works-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.how-step {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(201, 168, 76, 0.15);
}

.how-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.how-step h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.how-step p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* === Landing Hero === */
.hero-landing {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1rem;
    background:
        radial-gradient(1px 1px at 10% 20%, rgba(201,168,76,0.5) 1px, transparent 0),
        radial-gradient(1px 1px at 30% 60%, rgba(201,168,76,0.3) 1px, transparent 0),
        radial-gradient(1px 1px at 50% 10%, rgba(201,168,76,0.4) 1px, transparent 0),
        radial-gradient(1px 1px at 70% 80%, rgba(201,168,76,0.25) 1px, transparent 0),
        radial-gradient(1px 1px at 90% 40%, rgba(201,168,76,0.35) 1px, transparent 0),
        radial-gradient(1.5px 1.5px at 20% 90%, rgba(201,168,76,0.3) 1px, transparent 0),
        radial-gradient(1.5px 1.5px at 80% 30%, rgba(201,168,76,0.2) 1px, transparent 0),
        linear-gradient(180deg, #0a0a0a 0%, #111111 100%);
}

.hero-landing h1 {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-landing p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.cta-primary {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--primary);
    color: #0a0a0a;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.3s, transform 0.2s;
}

.cta-primary:hover {
    background: #d4b85c;
    transform: translateY(-2px);
    text-decoration: none;
}

/* === Social Proof === */
.social-proof {
    padding: 4rem 1rem;
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
}

.reading-counter {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 3rem;
}

.counter-number {
    font-size: 2.5rem;
    font-weight: 700;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.testimonial-card {
    background: var(--card-bg);
    border: 1px solid rgba(201, 168, 76, 0.15);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: left;
}

.testimonial-quote {
    margin-bottom: 0.75rem;
}

.testimonial-quote svg {
    fill: var(--primary);
}

.testimonial-text {
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 0.75rem;
    font-style: italic;
}

.testimonial-author {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.trust-badge svg {
    fill: var(--primary);
}

/* === How It Works v2 === */
.how-it-works-v2 {
    background: #111111;
    padding: 4rem 1rem;
    text-align: center;
}

.how-it-works-v2 h2 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 3rem;
}

.how-steps-v2 {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.how-step-v2 {
    flex: 1;
    position: relative;
    padding: 1.5rem 1rem;
}

.how-step-v2:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 2.5rem;
    right: -1.25rem;
    width: 2.5rem;
    height: 2px;
    background: var(--primary);
}

.how-step-v2 svg {
    fill: var(--primary);
    margin-bottom: 1rem;
}

.how-step-v2 .step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--primary);
    color: #0a0a0a;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.how-step-v2 h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.how-step-v2 p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* === Advisor Grid === */
.advisor-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1rem 0;
}

/* === Advisor Card (image-based) === */
.advisor-card {
    background: var(--card-bg);
    border: 2px solid rgba(201, 168, 76, 0.2);
    border-radius: 12px;
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    opacity: 0;
    animation: cardFadeIn 0.4s ease forwards;
    display: flex;
    flex-direction: column;
}

.advisor-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 32px rgba(201, 168, 76, 0.3);
    border-color: var(--primary);
}

.advisor-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.advisor-card-link:hover {
    text-decoration: none;
}

.advisor-card-image {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    position: relative;
}

.advisor-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.advisor-card-info {
    padding: 1rem;
}

.advisor-card-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: var(--primary);
}

.advisor-title {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.advisor-specialty {
    display: inline-block;
    background: rgba(201, 168, 76, 0.1);
    color: var(--primary);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    border: 1px solid rgba(201, 168, 76, 0.2);
    margin-bottom: 0.75rem;
}

.advisor-variant-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 0 1rem 0.5rem;
}

.variant-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(201, 168, 76, 0.3);
    display: block;
    transition: border-color 0.2s ease;
}

.variant-dot:hover,
.variant-dot.active {
    border-color: var(--primary);
}

.variant-dot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-cta {
    display: block;
    margin: 0 1rem 1rem;
    padding: 0.6rem 1rem;
    background: var(--primary);
    color: var(--bg);
    border-radius: 8px;
    font-weight: 700;
    font-family: var(--font-display);
    text-decoration: none;
    transition: background 0.2s ease;
    font-size: 0.9rem;
}

.btn-cta:hover {
    background: #d4b454;
    text-decoration: none;
    color: var(--bg);
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Buttons === */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--advisor-primary, var(--primary));
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary);
    color: #fff;
    opacity: 0.9;
}

.btn-unlock {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--secondary), #e6ac00);
    color: #0a0a0a;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(201, 168, 76, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-unlock:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(201, 168, 76, 0.5);
    text-decoration: none;
    color: #0a0a0a;
}

/* === Forms === */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(201, 168, 76, 0.2);
    border-radius: 8px;
    background: rgba(17, 17, 17, 0.8);
    color: var(--text);
    font-family: var(--font-stack);
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.2);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-errors {
    background: rgba(229, 62, 62, 0.1);
    border: 1px solid var(--error);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.form-errors .error {
    color: var(--error);
    margin-bottom: 0.25rem;
}

.field-error {
    color: var(--error);
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: block;
}

/* === Advisor Detail Page Hero (D-13) === */
.advisor-hero {
    margin: -2rem -1rem 2rem;
    width: calc(100% + 2rem);
}

.advisor-hero-image {
    position: relative;
    width: 100%;
    height: 50vh;
    min-height: 300px;
    max-height: 500px;
    overflow: hidden;
    background: var(--bg);
}

.advisor-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.advisor-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem 2rem 1.5rem;
    background: linear-gradient(to top, rgba(10, 10, 10, 0.95) 0%, rgba(10, 10, 10, 0.7) 50%, transparent 100%);
    text-align: center;
}

.advisor-hero-overlay h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.advisor-hero-title {
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.advisor-hero-specialty {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* === Variant Picker (D-07) === */
.variant-picker {
    text-align: center;
    padding: 1rem 0;
    margin-bottom: 1.5rem;
}

.variant-picker-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.variant-picker-thumbs {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.variant-thumb {
    width: 60px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(201, 168, 76, 0.3);
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
    padding: 0;
    background: none;
}

.variant-thumb:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

.variant-thumb.selected {
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(201, 168, 76, 0.4);
}

.variant-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* === Advisor Bio Section (D-14) === */
.advisor-bio-section {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 2rem;
    padding: 0 1rem;
}

.advisor-bio-text {
    color: var(--text);
    line-height: 1.8;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.advisor-category-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.category-tag {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border: 1px solid rgba(201, 168, 76, 0.3);
    border-radius: 999px;
    color: var(--primary);
    font-size: 0.8rem;
    background: rgba(201, 168, 76, 0.05);
}

/* === Intake Form Dark Theme (D-15) === */
.intake-form {
    max-width: 500px;
    margin: 0 auto 2rem;
}

.intake-form h2 {
    font-family: var(--font-display);
    color: var(--primary);
    text-align: center;
    margin-bottom: 1.5rem;
}

.intake-form .form-group label {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--text);
}

.intake-form .form-group input,
.intake-form .form-group select,
.intake-form .form-group textarea {
    background: rgba(17, 17, 17, 0.9);
    border: 1px solid rgba(201, 168, 76, 0.2);
    color: var(--text);
}

.intake-form .form-group input:focus,
.intake-form .form-group select:focus,
.intake-form .form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
}

/* === Teaser Content === */
.teaser-content {
    position: relative;
    max-height: 400px;
    overflow: hidden;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid rgba(201, 168, 76, 0.2);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.teaser-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(10, 10, 10, 0.8) 40%,
        rgba(10, 10, 10, 1)
    );
    backdrop-filter: blur(4px);
    pointer-events: none;
}

/* === CTA Section === */
.cta-section {
    text-align: center;
    padding: 2rem;
    margin: 2rem 0;
}

.cta-section h3 {
    font-size: 1.5rem;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.cta-section p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* === Reading Content === */
.reading-content {
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid rgba(201, 168, 76, 0.2);
    margin-bottom: 2rem;
}

.reading-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.reading-link {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* === Loading Spinner === */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(201, 168, 76, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 1rem auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-section {
    text-align: center;
    padding: 3rem 1rem;
}

.loading-section h2 {
    margin-bottom: 1rem;
    color: var(--secondary);
}

.loading-section p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* === Success Page === */
.success-section {
    text-align: center;
    padding: 3rem 1rem;
}

.success-section h2 {
    color: var(--success);
    margin-bottom: 1rem;
}

/* === 404 Page === */
.not-found {
    text-align: center;
    padding: 4rem 1rem;
}

.not-found h1 {
    font-size: 3rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.not-found p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* === Disclaimer === */
.disclaimer {
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(201, 168, 76, 0.2);
    padding-top: 1rem;
    margin-top: 2rem;
    text-align: center;
}

/* === Footer === */
.footer {
    background: rgba(10, 10, 10, 0.95);
    padding: 2rem 1rem;
    text-align: center;
    margin-top: auto;
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 1rem;
}

/* === Section headers === */
.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.75rem;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

/* === Media Queries === */

/* Tablet: 640px+ */
@media (min-width: 640px) {
    .advisor-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .how-it-works-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero h1 {
        font-size: 2.5rem;
    }
}

/* Small Desktop: 768px+ */
@media (min-width: 768px) {
    .advisor-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Desktop: 1024px+ */
@media (min-width: 1024px) {
    .how-it-works-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero p {
        font-size: 1.25rem;
    }
}

/* Wide Desktop: 1200px+ */
@media (min-width: 1200px) {
    .advisor-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Landing page responsive overrides */
@media (max-width: 768px) {
    .hero-landing h1 {
        font-size: 2rem;
    }

    .hero-landing {
        min-height: auto;
        padding: 4rem 1rem;
    }

    .testimonial-grid {
        grid-template-columns: 1fr;
    }

    .how-steps-v2 {
        flex-direction: column;
        align-items: center;
    }

    .how-step-v2:not(:last-child)::after {
        display: none;
    }

    .trust-badges {
        gap: 1.5rem;
    }
}

@media (min-width: 768px) {
    .how-steps-v2 {
        gap: 3rem;
    }
}

/* Phase 5: Payment flow styles */
.btn-unlock[disabled] {
    opacity: 0.6;
    pointer-events: none;
    cursor: not-allowed;
}

.retry-prompt {
    text-align: center;
    padding: 24px;
    background: rgba(229, 62, 62, 0.08);
    border: 1px solid rgba(229, 62, 62, 0.3);
    border-radius: 12px;
    margin: 32px 0;
}

.retry-prompt p {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.timeout-message {
    color: var(--text-muted);
    padding: 16px 0;
    text-align: center;
}

.timeout-message .btn {
    margin-top: 16px;
}
