/* loves.day - non-profit humanist warm, airy minimalist */

:root {
    --sky: #e8f0fe;
    --dawn: #fde8d8;
    --card: #ffffff;
    --text: #2a2a2a;
    --love-1: #e87070;
    --love-2: #e8a060;
    --love-3: #70b870;
    --love-4: #7090e8;
    --love-5: #c070c0;
    --muted: #8a8a94;
    --counter-bg: rgba(255, 255, 255, 0.85);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-card-hover: 0 6px 20px rgba(42, 42, 42, 0.08);
    --shadow-hero: 0 10px 40px rgba(42, 42, 42, 0.06);
    --radius: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text);
    background: #fbf8f3;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 56px; /* counter bar */
}

/* ===== Hero / Sunrise ===== */
.hero {
    background: linear-gradient(0deg, var(--dawn), var(--sky));
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 1.5rem 5rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 18%;
    right: 12%;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 220, 180, 0.7), rgba(255, 220, 180, 0));
    pointer-events: none;
    animation: sunGlow 8s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(42, 42, 42, 0.08), transparent);
}

@keyframes sunGlow {
    0%, 100% { transform: scale(1); opacity: 0.85; }
    50% { transform: scale(1.15); opacity: 1; }
}

.hero-inner {
    width: 100%;
    max-width: 720px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1.25rem;
    opacity: 0;
    animation: fadeUp 0.9s ease 0.1s forwards;
}

.domain-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: clamp(2.4rem, 7vw, 4.2rem);
    line-height: 1.05;
    color: var(--text);
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeUp 0.9s ease 0.25s forwards;
}

.domain-name::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    margin: 1.25rem auto 0;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--love-1), var(--love-2), var(--love-3), var(--love-4), var(--love-5));
}

.hero-tagline {
    font-family: 'Source Serif 4', Georgia, serif;
    font-style: italic;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text);
    max-width: 520px;
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: fadeUp 0.9s ease 0.4s forwards;
}

.featured-card {
    width: 100%;
    max-width: 560px;
    background: var(--card);
    border-radius: var(--radius);
    border-left: 4px solid var(--love-1);
    padding: 1.75rem 1.75rem 1.5rem;
    box-shadow: var(--shadow-hero);
    text-align: left;
    position: relative;
    opacity: 0;
    animation: fadeUp 0.9s ease 0.55s forwards;
}

.featured-card::before {
    content: '';
    position: absolute;
    top: 14px;
    left: -6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--love-1);
    box-shadow: 0 0 0 2px #ffffff;
}

.featured-tag {
    font-family: 'Outfit', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--love-1);
    display: inline-block;
    margin-bottom: 0.6rem;
}

.featured-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: clamp(1.25rem, 3vw, 1.6rem);
    color: var(--text);
    line-height: 1.3;
    margin-bottom: 0.6rem;
    letter-spacing: -0.01em;
}

.featured-body {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text);
    margin-bottom: 1.1rem;
}

.featured-meta,
.story-meta {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.meta-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--muted);
    opacity: 0.6;
}

.hero-scroll-hint {
    margin-top: 2.5rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    opacity: 0;
    animation: fadeUp 0.9s ease 0.75s forwards;
}

.hint-arrow {
    font-size: 1.1rem;
    animation: bob 2.4s ease-in-out infinite;
}

@keyframes bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}

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

/* ===== Board ===== */
.board {
    max-width: 1280px;
    margin: 0 auto;
    padding: 4rem 2rem 5rem;
}

.board-header {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
    padding: 0 0.5rem;
}

.board-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--text);
    letter-spacing: -0.01em;
}

.board-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-pill {
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--muted);
    background: transparent;
    border: 1px solid rgba(138, 138, 148, 0.25);
    border-radius: 999px;
    padding: 0.45rem 1rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.filter-pill:hover {
    color: var(--text);
    border-color: rgba(42, 42, 42, 0.35);
}

.filter-pill.is-active {
    background: var(--text);
    color: #ffffff;
    border-color: var(--text);
}

/* ===== Masonry ===== */
.masonry {
    columns: 3;
    column-gap: 1.25rem;
    padding: 0;
}

.story-card {
    break-inside: avoid;
    margin-bottom: 1.25rem;
    background: var(--card);
    border-radius: var(--radius);
    border-left: 4px solid var(--love-1);
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
    position: relative;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    display: inline-block;
    width: 100%;
}

.story-card::before {
    content: '';
    position: absolute;
    top: 12px;
    left: -6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--love-1);
    box-shadow: 0 0 0 2px #ffffff;
    transition: transform 0.35s ease;
}

.story-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card-hover);
}

.story-card:hover::before {
    transform: scale(1.3);
}

/* 5-color rotation */
.story-card:nth-child(5n+1) { border-left-color: var(--love-1); }
.story-card:nth-child(5n+1)::before { background: var(--love-1); }

.story-card:nth-child(5n+2) { border-left-color: var(--love-2); }
.story-card:nth-child(5n+2)::before { background: var(--love-2); }

.story-card:nth-child(5n+3) { border-left-color: var(--love-3); }
.story-card:nth-child(5n+3)::before { background: var(--love-3); }

.story-card:nth-child(5n+4) { border-left-color: var(--love-4); }
.story-card:nth-child(5n+4)::before { background: var(--love-4); }

.story-card:nth-child(5n+5) { border-left-color: var(--love-5); }
.story-card:nth-child(5n+5)::before { background: var(--love-5); }

.story-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.35;
    color: var(--text);
    letter-spacing: -0.005em;
    margin-bottom: 0.55rem;
}

.story-body {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--text);
    margin-bottom: 1rem;
}

.story-card.is-hidden {
    display: none;
}

.story-card.is-new {
    animation: pinIn 0.6s ease both;
}

@keyframes pinIn {
    0% { opacity: 0; transform: translateY(-12px) rotate(-1.5deg); }
    60% { transform: translateY(2px) rotate(0.5deg); }
    100% { opacity: 1; transform: translateY(0) rotate(0); }
}

/* ===== Board footer ===== */
.board-footer {
    margin-top: 3rem;
    padding: 0 0.5rem;
    text-align: center;
}

.share-btn {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: #ffffff;
    background: var(--text);
    border: none;
    border-radius: 999px;
    padding: 0.85rem 1.75rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    box-shadow: 0 4px 14px rgba(42, 42, 42, 0.15);
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(42, 42, 42, 0.22);
    background: #1a1a1a;
}

.share-plus {
    font-size: 1.2rem;
    line-height: 1;
    display: inline-block;
    transform: translateY(-1px);
}

.board-note {
    margin-top: 1.5rem;
    font-family: 'Source Serif 4', Georgia, serif;
    font-style: italic;
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.7;
}

/* ===== Counter bar ===== */
.counter-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: var(--counter-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid rgba(42, 42, 42, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--muted);
    z-index: 50;
}

.counter-heart {
    width: 12px;
    height: 12px;
    position: relative;
    display: inline-block;
    transform: translateY(-1px);
}

.counter-heart::before,
.counter-heart::after {
    content: '';
    position: absolute;
    top: 0;
    width: 7px;
    height: 11px;
    background: var(--love-1);
    border-radius: 7px 7px 0 0;
}

.counter-heart::before {
    left: 6px;
    transform: rotate(-45deg);
    transform-origin: 0 100%;
}

.counter-heart::after {
    left: 0;
    transform: rotate(45deg);
    transform-origin: 100% 100%;
}

.counter-bar.is-pulsing .counter-heart {
    animation: heartPulse 0.55s ease;
}

@keyframes heartPulse {
    0% { transform: translateY(-1px) scale(1); }
    35% { transform: translateY(-1px) scale(1.3); }
    100% { transform: translateY(-1px) scale(1); }
}

.counter-number {
    font-weight: 600;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
}

.counter-label {
    color: var(--muted);
}

.counter-pulse {
    display: none;
}

/* ===== Share modal ===== */
.share-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.share-modal.is-open {
    display: flex;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.share-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(42, 42, 42, 0.35);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.share-panel {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 25px 60px rgba(42, 42, 42, 0.3);
    border-left: 4px solid var(--love-1);
    animation: panelIn 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

.share-close {
    position: absolute;
    top: 0.75rem;
    right: 0.9rem;
    background: transparent;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: color 0.2s ease;
}

.share-close:hover { color: var(--text); }

.share-heading {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1.4rem;
    color: var(--text);
    margin-bottom: 0.4rem;
    letter-spacing: -0.01em;
}

.share-sub {
    font-family: 'Source Serif 4', Georgia, serif;
    font-style: italic;
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.share-form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.share-input,
.share-textarea,
.share-mini {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 0.95rem;
    color: var(--text);
    background: #faf7f2;
    border: 1px solid rgba(42, 42, 42, 0.1);
    border-radius: 8px;
    padding: 0.7rem 0.85rem;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease;
    width: 100%;
}

.share-input::placeholder,
.share-textarea::placeholder,
.share-mini::placeholder {
    color: var(--muted);
    font-style: italic;
}

.share-input:focus,
.share-textarea:focus,
.share-mini:focus {
    border-color: var(--love-1);
    background: #ffffff;
}

.share-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.7;
}

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

.share-mini {
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
}

.share-submit {
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    color: #ffffff;
    background: var(--text);
    border: none;
    border-radius: 999px;
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    margin-top: 0.4rem;
    transition: transform 0.2s ease, background 0.2s ease;
}

.share-submit:hover {
    transform: translateY(-1px);
    background: #1a1a1a;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .masonry {
        columns: 2;
    }
}

@media (max-width: 640px) {
    .hero {
        padding: 3rem 1.25rem 4rem;
        min-height: 80vh;
    }
    .hero::before {
        right: 6%;
        top: 10%;
        width: 90px;
        height: 90px;
    }
    .featured-card {
        padding: 1.5rem 1.25rem;
    }
    .board {
        padding: 3rem 1.25rem 4rem;
    }
    .masonry {
        columns: 1;
        column-gap: 0;
    }
    .counter-bar {
        font-size: 0.78rem;
        gap: 0.4rem;
    }
    .counter-label {
        display: none;
    }
    .counter-bar::after {
        content: 'shared today';
        color: var(--muted);
    }
    .share-panel {
        padding: 1.5rem 1.25rem;
    }
    .share-row {
        grid-template-columns: 1fr;
    }
}
