/* diplomatic.day - Muji Clean Functional Calendar */
/* Palette: #ffffff, #1a1a1a, #888888, #e5e5e5, #d4d4d4, #0066cc */
/* Fonts: Inter 400/600, Source Code Pro 400 */

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

html {
    scroll-behavior: smooth;
}

body {
    background: #ffffff;
    color: #1a1a1a;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== HEADER ===== */
.header {
    padding: 48px 24px 0;
    max-width: 760px;
    margin: 0 auto;
}

.header-inner {
    padding-bottom: 16px;
}

.brand-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Calendar Icon (CSS-only) */
.calendar-icon {
    width: 20px;
    height: 20px;
    border: 1.5px solid #1a1a1a;
    border-radius: 2px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

.cal-header {
    height: 5px;
    background: #0066cc;
    flex-shrink: 0;
}

.cal-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr 1fr;
    gap: 1px;
    padding: 1px;
}

.cal-grid span {
    background: #e5e5e5;
    border-radius: 0.5px;
}

.cal-grid span:first-child {
    background: #0066cc;
}

.site-name {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: #1a1a1a;
    letter-spacing: -0.01em;
}

.today-date {
    font-family: 'Source Code Pro', monospace;
    font-weight: 400;
    font-size: 1.5rem;
    color: #1a1a1a;
    margin-top: 4px;
    letter-spacing: -0.02em;
}

.header-rule {
    height: 1px;
    background: #e5e5e5;
    width: 100%;
}

/* ===== MAIN CONTENT ===== */
.content {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 24px 64px;
}

/* ===== DAY SECTIONS ===== */
.day-section {
    padding-top: 32px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.section-header .section-label {
    margin-bottom: 0;
}

.section-label {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.7rem;
    color: #888888;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 16px;
}

.today-badge {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.6rem;
    color: #0066cc;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 2px 6px;
    border: 1px solid #0066cc;
    border-radius: 2px;
}

/* ===== EVENT GRID (Date-Content Columns) ===== */
.event-grid {
    display: grid;
    grid-template-columns: 120px 1px 1fr;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #e5e5e5;
    align-items: start;
}

.event-grid:first-of-type {
    border-top: 1px solid #e5e5e5;
}

/* Today highlight: blue left border */
#section-today .event-grid {
    border-left: 2px solid #0066cc;
    padding-left: 12px;
    margin-left: -14px;
}

.event-date-col {
    display: flex;
    flex-direction: column;
    padding-top: 2px;
}

.event-time {
    font-family: 'Source Code Pro', monospace;
    font-weight: 400;
    font-size: 0.85rem;
    color: #1a1a1a;
    line-height: 1.4;
}

.event-tz {
    font-family: 'Source Code Pro', monospace;
    font-weight: 400;
    font-size: 0.65rem;
    color: #888888;
    line-height: 1.4;
}

.event-day {
    font-family: 'Source Code Pro', monospace;
    font-weight: 400;
    font-size: 0.85rem;
    color: #888888;
    line-height: 1.4;
}

.event-separator {
    width: 1px;
    background: #d4d4d4;
    min-height: 100%;
    align-self: stretch;
}

.event-content-col {
    padding-top: 2px;
}

.event-title {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.875rem;
    color: #1a1a1a;
    line-height: 1.5;
    margin-bottom: 2px;
}

.event-desc {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 0.8rem;
    color: #888888;
    line-height: 1.7;
}

/* ===== MONTH NAVIGATION ===== */
.month-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.month-link {
    font-family: 'Source Code Pro', monospace;
    font-weight: 400;
    font-size: 0.7rem;
    color: #888888;
    text-decoration: none;
    padding: 2px 6px;
    border-radius: 2px;
    transition: color 0.2s ease, background 0.2s ease;
}

.month-link:hover {
    color: #1a1a1a;
    background: #e5e5e5;
}

.month-link.active {
    color: #0066cc;
    background: none;
    font-weight: 400;
}

/* ===== COMPACT EVENT LIST ===== */
.compact-list {
    display: flex;
    flex-direction: column;
}

.compact-event {
    display: grid;
    grid-template-columns: 50px 1px 1fr;
    gap: 12px;
    align-items: baseline;
    padding: 8px 0;
    border-bottom: 1px solid #e5e5e5;
}

.compact-event:first-child {
    border-top: 1px solid #e5e5e5;
}

.compact-date {
    font-family: 'Source Code Pro', monospace;
    font-weight: 400;
    font-size: 0.75rem;
    color: #888888;
}

.compact-sep {
    width: 1px;
    height: 14px;
    background: #d4d4d4;
    align-self: center;
}

.compact-title {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 0.8rem;
    color: #1a1a1a;
    line-height: 1.5;
}

/* ===== ARCHIVE SECTION ===== */
.archive-month {
    margin-bottom: 24px;
}

.archive-month-title {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.archive-month .compact-event {
    opacity: 0.7;
}

/* ===== FOOTER ===== */
.footer {
    max-width: 760px;
    margin: 0 auto;
    padding: 32px 24px;
    border-top: 1px solid #e5e5e5;
}

.footer-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-brand {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.7rem;
    color: #888888;
}

.footer-update {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 0.7rem;
    color: #888888;
}

.footer-year {
    font-family: 'Source Code Pro', monospace;
    font-weight: 400;
    font-size: 0.7rem;
    color: #888888;
}

.footer-sep {
    width: 1px;
    height: 12px;
    background: #d4d4d4;
    flex-shrink: 0;
}

/* ===== FADE-IN ANIMATION ===== */
.fade-in {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for sequential items */
.event-grid.fade-in:nth-child(2) { transition-delay: 0.05s; }
.event-grid.fade-in:nth-child(3) { transition-delay: 0.1s; }
.event-grid.fade-in:nth-child(4) { transition-delay: 0.15s; }
.event-grid.fade-in:nth-child(5) { transition-delay: 0.2s; }
.event-grid.fade-in:nth-child(6) { transition-delay: 0.25s; }
.event-grid.fade-in:nth-child(7) { transition-delay: 0.3s; }

.compact-event.fade-in:nth-child(2) { transition-delay: 0.03s; }
.compact-event.fade-in:nth-child(3) { transition-delay: 0.06s; }
.compact-event.fade-in:nth-child(4) { transition-delay: 0.09s; }
.compact-event.fade-in:nth-child(5) { transition-delay: 0.12s; }
.compact-event.fade-in:nth-child(6) { transition-delay: 0.15s; }
.compact-event.fade-in:nth-child(7) { transition-delay: 0.18s; }
.compact-event.fade-in:nth-child(8) { transition-delay: 0.21s; }
.compact-event.fade-in:nth-child(9) { transition-delay: 0.24s; }
.compact-event.fade-in:nth-child(10) { transition-delay: 0.27s; }
.compact-event.fade-in:nth-child(11) { transition-delay: 0.3s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
    .header {
        padding: 32px 16px 0;
    }

    .content {
        padding: 0 16px 48px;
    }

    .event-grid {
        grid-template-columns: 80px 1px 1fr;
        gap: 12px;
    }

    #section-today .event-grid {
        padding-left: 8px;
        margin-left: -10px;
    }

    .compact-event {
        grid-template-columns: 46px 1px 1fr;
        gap: 8px;
    }

    .month-nav {
        gap: 4px;
    }

    .month-link {
        font-size: 0.65rem;
        padding: 2px 4px;
    }

    .footer {
        padding: 24px 16px;
    }

    .footer-inner {
        flex-wrap: wrap;
        gap: 8px;
    }
}
