/* ═══════════════════════════════════════════════════════
   HUMAN SENTIMENT — Minimal Elegance
   ═══════════════════════════════════════════════════════ */

:root {
    --bg: #faf9f7;
    --bg-warm: #f5f3ef;
    --text: #2c2c2c;
    --text-light: #6b6b6b;
    --text-muted: #a0a0a0;
    --accent: #2c2c2c;
    --border: rgba(44, 44, 44, 0.1);
    
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, sans-serif;
    
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Grain Texture Overlay */
.grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.03;
    z-index: 1000;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Container */
.container {
    width: 100%;
    min-height: 100vh;
    position: relative;
}

/* Views */
.view {
    display: none;
    min-height: 100vh;
    padding: 2rem;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.view.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

/* Header */
.header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 2rem;
    width: 100%;
    position: relative;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 300;
    letter-spacing: 0.15em;
    color: var(--text-muted);
}

.back-btn {
    position: absolute;
    left: 0;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-light);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

.back-btn:hover {
    color: var(--text);
}

/* ═══════════════════════════════════════════════════════
   QUESTION VIEW
   ═══════════════════════════════════════════════════════ */

#question-view {
    justify-content: space-between;
    align-items: center;
}

.question-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.question {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 300;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.question em {
    font-style: italic;
    font-weight: 300;
}

.tagline {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 300;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    margin-bottom: 3rem;
    font-style: italic;
}

/* Moods Grid */
.moods-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    width: 100%;
    max-width: 480px;
}

@media (max-width: 540px) {
    .moods-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

.mood-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.25rem 1rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.4s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.mood-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--hover-color, var(--bg-warm));
    opacity: 0;
    transition: opacity 0.4s var(--ease-out);
    z-index: 0;
}

.mood-btn:hover::before {
    opacity: 1;
}

.mood-btn:hover {
    border-color: transparent;
    transform: translateY(-2px);
}

.mood-btn:active {
    transform: translateY(0) scale(0.98);
}

.mood-icon {
    font-size: 1.5rem;
    position: relative;
    z-index: 1;
    transition: transform 0.4s var(--ease-out);
}

.mood-btn:hover .mood-icon {
    transform: scale(1.15);
}

.mood-label {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: lowercase;
    color: var(--text-light);
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.mood-btn:hover .mood-label {
    color: var(--text);
}

/* Footer */
.footer {
    padding-top: 2rem;
    text-align: center;
}

.link-btn {
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    letter-spacing: 0.03em;
    transition: color 0.3s ease;
}

.link-btn:hover {
    color: var(--text);
}

.email-link {
    display: block;
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.email-link:hover {
    color: var(--text);
}

.email-link-a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.email-link-a:hover {
    color: var(--text);
}

/* ═══════════════════════════════════════════════════════
   THANK YOU VIEW
   ═══════════════════════════════════════════════════════ */

#thankyou-view {
    justify-content: center;
    align-items: center;
    text-align: center;
}

.thankyou-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.thankyou-icon {
    font-size: 3rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.thankyou-text {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 300;
}

.thankyou-subtext {
    font-size: 0.9375rem;
    color: var(--text-light);
    max-width: 280px;
}

.primary-btn {
    margin-top: 1rem;
    padding: 1rem 2rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--bg);
    background: var(--text);
    border: none;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(44, 44, 44, 0.2);
}

.primary-btn:active {
    transform: translateY(0);
}

/* Share Card */
.share-card {
    margin: 1.5rem 0;
    padding: 4px;
    background: linear-gradient(135deg, var(--text-muted) 0%, var(--text-light) 100%);
    border-radius: 20px;
}

.share-card-inner {
    background: var(--bg);
    border-radius: 16px;
    padding: 2.5rem 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    min-width: 280px;
}

.share-card-icon {
    font-size: 4rem;
    line-height: 1;
    color: var(--text) !important;
}

.share-card-mood {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--text);
    text-transform: lowercase;
}

.share-card-tagline {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 0.5rem;
}

.share-card-brand {
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    margin-top: 0.25rem;
}

.share-buttons {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.share-btn {
    padding: 0.75rem 1.5rem;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.03em;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-light);
}

.share-btn:hover {
    border-color: var(--text-light);
    color: var(--text);
}

.share-btn.primary {
    background: var(--text);
    border-color: var(--text);
    color: var(--bg);
}

.share-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 44, 44, 0.2);
}

/* ═══════════════════════════════════════════════════════
   COLLECTIVE VIEW
   ═══════════════════════════════════════════════════════ */

#collective-view {
    align-items: center;
}

#collective-view .header {
    max-width: 800px;
}

.collective-content {
    flex: 1;
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 0;
}

.collective-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 300;
    margin-bottom: 0.5rem;
}

.collective-subtitle {
    font-size: 0.9375rem;
    color: var(--text-light);
    margin-bottom: 3rem;
}

/* Moodboard */
.moodboard {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--bg-warm);
    border-radius: 24px;
    width: 100%;
    min-height: 200px;
}

.moodboard-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: var(--bg);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    animation: fadeInUp 0.5s var(--ease-out) backwards;
}

.moodboard-item:nth-child(1) { animation-delay: 0.1s; }
.moodboard-item:nth-child(2) { animation-delay: 0.15s; }
.moodboard-item:nth-child(3) { animation-delay: 0.2s; }
.moodboard-item:nth-child(4) { animation-delay: 0.25s; }
.moodboard-item:nth-child(5) { animation-delay: 0.3s; }
.moodboard-item:nth-child(6) { animation-delay: 0.35s; }
.moodboard-item:nth-child(7) { animation-delay: 0.4s; }
.moodboard-item:nth-child(8) { animation-delay: 0.45s; }

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

.moodboard-icon {
    font-size: 1.75rem;
}

.moodboard-name {
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: lowercase;
}

.moodboard-count {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text);
}

.moodboard-percent {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

/* Stats */
.stats {
    display: flex;
    gap: 4rem;
    margin-bottom: 3rem;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 400;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

/* Hourly Chart */
.hourly-chart {
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    height: 120px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.chart-bar {
    flex: 1;
    max-width: 30px;
    background: var(--bar-color, var(--text));
    border-radius: 4px 4px 0 0;
    opacity: 0.7;
    transition: all 0.3s ease;
    position: relative;
}

.chart-bar:hover {
    opacity: 1;
}

.chart-bar::after {
    content: attr(data-hour);
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.625rem;
    color: var(--text-muted);
}

.update-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */

@media (max-width: 640px) {
    .view {
        padding: 1.5rem;
    }
    
    .stats {
        gap: 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .moodboard {
        padding: 1.25rem;
        gap: 0.5rem;
    }
    
    .moodboard-item {
        padding: 0.75rem 1rem;
    }
}

/* ═══════════════════════════════════════════════════════
   LOADING STATE
   ═══════════════════════════════════════════════════════ */

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.loading::after {
    content: '';
    width: 24px;
    height: 24px;
    border: 2px solid var(--border);
    border-top-color: var(--text);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ═══════════════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════════════ */

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-style: italic;
}
