/* ============================================================
   Goddards Video Diary — Stylesheet
   ============================================================ */

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

:root {
    --green-dark:  #1e3d1a;
    --green:       #2d5a27;
    --green-light: #4a7c42;
    --cream:       #f7f3ec;
    --cream-dark:  #e8e2d6;
    --gold:        #b8963e;
    --text:        #2c2c2c;
    --text-muted:  #6b6b6b;
    --white:       #ffffff;
    --shadow-sm:   0 2px 8px  rgba(0,0,0,0.07);
    --shadow:      0 4px 20px rgba(0,0,0,0.10);
    --radius:      8px;
}

/* ---- Base ---- */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--cream);
    color: var(--text);
    line-height: 1.6;
}

/* ---- Header ---- */
header {
    background: linear-gradient(150deg, var(--green-dark) 0%, var(--green) 55%, var(--green-light) 100%);
    color: var(--white);
    text-align: center;
    padding: 4.5rem 2rem 3.5rem;
    position: relative;
    overflow: hidden;
}

/* Subtle texture overlay */
header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.035'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.header-content {
    position: relative;
    z-index: 1;
}

header h1 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 400;
    letter-spacing: 0.02em;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.85;
    font-style: italic;
    letter-spacing: 0.04em;
    margin-bottom: 0.75rem;
}

.dates {
    font-size: 0.85rem;
    opacity: 0.65;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ---- Sticky day navigation ---- */
nav#day-nav {
    background: var(--white);
    border-bottom: 1px solid var(--cream-dark);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

nav#day-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
}

nav#day-nav a {
    display: block;
    padding: 1rem 2rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-bottom: 3px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

nav#day-nav a:hover {
    color: var(--green);
    border-bottom-color: var(--green-light);
}

nav#day-nav a.active {
    color: var(--green-dark);
    border-bottom-color: var(--green);
}

/* ---- Main diary area ---- */
main#diary {
    max-width: 960px;
    margin: 0 auto;
    padding: 3rem 1.5rem 5rem;
}

/* ---- Day section ---- */
.day-section {
    margin-bottom: 4rem;
    scroll-margin-top: 72px;
}

.day-header {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding-bottom: 0.85rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--green);
}

.day-label {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--green-dark);
}

.day-date {
    font-size: 0.875rem;
    color: var(--text-muted);
    letter-spacing: 0.03em;
}

/* ---- Video grid ---- */
.video-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

/* Two-up layout when there are multiple clips */
.video-grid.multi {
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
}

/* ---- Video card ---- */
.video-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--cream-dark);
    transition: box-shadow 0.2s;
}

.video-card:hover {
    box-shadow: var(--shadow);
}

.video-card video {
    width: 100%;
    display: block;
    background: #000;
    max-height: 540px;
    /* Prevent browser chrome from opening an external media player */
    -webkit-media-controls-overflow-menu-button: hidden;
}

.video-info {
    padding: 0.85rem 1.1rem 1rem;
    border-top: 1px solid var(--cream-dark);
}

.video-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.2rem;
}

.video-description {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.55;
}

/* ---- Empty day placeholder ---- */
.day-empty {
    background: var(--cream-dark);
    border: 2px dashed #cfc9bc;
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
}

.day-empty .icon {
    font-size: 1.8rem;
    display: block;
    margin-bottom: 0.5rem;
    opacity: 0.45;
}

/* ---- Footer ---- */
footer {
    background: var(--green-dark);
    color: rgba(255,255,255,0.55);
    text-align: center;
    padding: 1.5rem 1rem;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
    nav#day-nav a {
        padding: 0.75rem 0.85rem;
        font-size: 0.75rem;
    }

    .video-grid.multi {
        grid-template-columns: 1fr;
    }

    .day-header {
        flex-direction: column;
        gap: 0.2rem;
    }

    main#diary {
        padding: 2rem 1rem 4rem;
    }
}
