/* ============================================
   MapToPoster — Minimalist Dark Aesthetic
   MVP v1.0 - 2026-02-01
   ============================================ */

:root {
    /* Colors */
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --bg-card: #141414;
    
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);
    
    --accent: #e8c547;
    --accent-soft: rgba(232, 197, 71, 0.15);
    
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    
    /* Typography */
    --font-serif: 'Instrument Serif', Georgia, serif;
    --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing */
    --container-max: 1200px;
    --section-padding: clamp(4rem, 10vw, 8rem);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    font-weight: 300;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 5vw, 3rem);
}

/* ============================================
   Navigation
   ============================================ */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem clamp(1.5rem, 5vw, 3rem);
    background: linear-gradient(to bottom, rgba(10, 10, 10, 0.95), transparent);
    backdrop-filter: blur(10px);
}

.logo {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.nav-cta {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.625rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: 100px;
    transition: var(--transition-fast);
}

.nav-cta:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background: var(--bg-tertiary);
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: var(--section-padding) clamp(1.5rem, 5vw, 3rem);
    position: relative;
    overflow: hidden;
}

/* Rotating background carousel */
.hero-carousel {
    position: absolute;
    inset: 0;
    display: flex;
    z-index: 0;
}

.hero-carousel-image {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-carousel-image.active {
    opacity: 1;
}

.hero-carousel-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.3) saturate(0.8);
    transform: scale(1.1);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(232, 197, 71, 0.12), transparent),
        linear-gradient(to bottom, rgba(10, 10, 10, 0.4), rgba(10, 10, 10, 0.8));
}

.hero-content {
    max-width: 720px;
    animation: fadeInUp 0.8s ease-out;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.hero-title em {
    font-style: italic;
    color: var(--accent);
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 540px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    animation: bounce 2s infinite;
    z-index: 2;
}

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

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 400;
    text-decoration: none;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: #f0d060;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(232, 197, 71, 0.3);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--border-hover);
}

.btn-full {
    width: 100%;
}

.btn-loading {
    display: none;
}

.btn.loading .btn-text {
    display: none;
}

.btn.loading .btn-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.spinner {
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

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

/* ============================================
   Section Headers
   ============================================ */

.section-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.section-title em {
    font-style: italic;
}

.section-subtitle {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    max-width: 480px;
    line-height: 1.7;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header .section-subtitle {
    margin: 0 auto;
}

/* ============================================
   Examples Gallery
   ============================================ */

.examples {
    padding: var(--section-padding) 0;
    background: var(--bg-secondary);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-tertiary);
    cursor: pointer;
    transition: var(--transition-base);
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.gallery-item-placeholder {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        var(--bg-tertiary) 0%,
        var(--bg-card) 50%,
        var(--bg-tertiary) 100%
    );
    background-size: 200% 200%;
    animation: shimmer 2s infinite;
}

.gallery-item.loaded .gallery-item-placeholder {
    opacity: 0;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
    opacity: 0;
}

.gallery-item.loaded img {
    opacity: 1;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 50%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: var(--transition-base);
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-city {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 0.25rem;
}

.gallery-item-theme {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ============================================
   CTA Section
   ============================================ */

.cta-section {
    padding: var(--section-padding) 0;
    background: var(--bg-primary);
    background-image: radial-gradient(ellipse 60% 40% at 50% 100%, rgba(232, 197, 71, 0.08), transparent);
}

.cta-content {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
}

.cta-content .section-subtitle {
    max-width: 100%;
    margin: 0 auto 2.5rem;
}

.cta-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem 2.5rem;
    margin-bottom: 2.5rem;
}

.cta-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.cta-feature-icon {
    color: var(--accent);
}

.btn-large {
    padding: 1.125rem 2.25rem;
    font-size: 1rem;
    gap: 0.75rem;
}

.btn-large svg {
    transition: transform var(--transition-fast);
}

.btn-large:hover svg {
    transform: translateX(4px);
}

/* ============================================
   Form Styles
   ============================================ */

.create-form-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.5rem;
}

.create-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.8125rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 1rem 1.25rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
    transition: var(--transition-fast);
    appearance: none;
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 500px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* Autocomplete Dropdown */
.autocomplete-wrapper {
    position: relative;
}

.autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    z-index: 50;
    display: none;
    max-height: 240px;
    overflow-y: auto;
}

.autocomplete-dropdown.active {
    display: block;
}

.autocomplete-item {
    padding: 0.875rem 1.25rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: var(--transition-fast);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: var(--bg-card);
}

.autocomplete-item-city {
    font-weight: 500;
}

.autocomplete-item-country {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ============================================
   Modal
   ============================================ */

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.95) translateY(20px);
    transition: var(--transition-base);
}

.modal-large {
    max-width: 1100px;
}

.modal-progress {
    max-width: 500px;
}

.modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 700px) {
    .modal-body {
        grid-template-columns: 1fr;
    }
}

.result-preview {
    aspect-ratio: 3 / 4;
    background: var(--bg-tertiary);
    overflow: hidden;
}

.result-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-info {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.result-info h3 {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.result-info p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.result-info .btn {
    margin-bottom: 1rem;
}

.success-tag {
    color: #4ade80 !important;
}

/* ============================================
   Preview Modal
   ============================================ */

.preview-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    min-height: 600px;
}

@media (max-width: 900px) {
    .preview-layout {
        grid-template-columns: 1fr;
    }
}

.preview-image-container {
    position: relative;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow: hidden;
}

.preview-image-container img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.preview-badge {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    padding: 0.5rem 1rem;
    background: rgba(232, 197, 71, 0.9);
    color: var(--bg-primary);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 100px;
}

.preview-panel {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
}

.preview-header {
    margin-bottom: 2rem;
}

.preview-header h3 {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.preview-subtitle {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.preview-controls {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.preview-actions {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.preview-note {
    text-align: center;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
}

.btn-large {
    padding: 1.125rem 2rem;
    font-size: 1rem;
}

.btn-text {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================
   Progress Modal
   ============================================ */

.progress-container {
    padding: 2.5rem;
}

.progress-header {
    text-align: center;
    margin-bottom: 2rem;
}

.progress-header h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.progress-header p {
    color: var(--text-secondary);
}

.progress-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    background: var(--bg-tertiary);
    border-radius: 10px;
    border: 1px solid var(--border);
    transition: var(--transition-fast);
}

.progress-step.active {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.progress-step.complete {
    border-color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
}

.progress-step.complete .step-icon {
    color: #4ade80;
}

.step-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border-radius: 50%;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.progress-step.active .step-icon {
    color: var(--accent);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.step-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.step-title {
    font-size: 0.9375rem;
    font-weight: 400;
}

.step-status {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.progress-step.active .step-status {
    color: var(--accent);
}

.progress-step.complete .step-status {
    color: #4ade80;
}

.progress-bar-container {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), #f0d060);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* ============================================
   Footer
   ============================================ */

.footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-brand p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.footer-credit {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

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

.footer-credit a:hover {
    color: var(--accent);
}

/* ============================================
   Loading States
   ============================================ */

.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-tertiary) 0%,
        var(--bg-card) 50%,
        var(--bg-tertiary) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   Scrollbar
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}
