/* === courthouse.app styles === */
/* Colors: #E8EEF0, #C8D4DA, #5A7A8A, #3A5A6A, #C87A6A, #F0F4F6, #8A9AA0, #E8D88A */
/* Grid: #B8C8D0 */

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #E8EEF0;
    color: #5A7A8A;
    font-family: 'Caveat', cursive;
    font-weight: 400;
    font-size: clamp(1rem, 1.3vw, 1.2rem);
    line-height: 1.75;
    overflow-x: hidden;
    position: relative;
}

/* Grid-Lines Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background:
        repeating-linear-gradient(
            to right,
            transparent,
            transparent 23px,
            rgba(200, 212, 218, 0.4) 23px,
            rgba(200, 212, 218, 0.4) 24px
        ),
        repeating-linear-gradient(
            to bottom,
            transparent,
            transparent 23px,
            rgba(200, 212, 218, 0.4) 23px,
            rgba(200, 212, 218, 0.4) 24px
        ),
        repeating-linear-gradient(
            to right,
            transparent,
            transparent 95px,
            rgba(184, 200, 208, 0.6) 95px,
            rgba(184, 200, 208, 0.6) 96px
        ),
        repeating-linear-gradient(
            to bottom,
            transparent,
            transparent 95px,
            rgba(184, 200, 208, 0.6) 95px,
            rgba(184, 200, 208, 0.6) 96px
        );
}

body > * {
    position: relative;
    z-index: 1;
}

/* === Navigation === */
#nav {
    position: fixed;
    top: 24px;
    right: 32px;
    display: flex;
    gap: 24px;
    z-index: 90;
}

.nav-link {
    font-family: 'Caveat', cursive;
    font-weight: 400;
    font-size: 14px;
    color: #5A7A8A;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #3A5A6A;
}

/* === Hero === */
#hero {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding-left: 15%;
}

.hero-content {
    position: relative;
    z-index: 10;
}

#hero-title {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 5rem);
    color: #5A7A8A;
    opacity: 0;
}

#hero-title span {
    display: inline;
    opacity: 0;
    transition: opacity 0.1s ease;
}

#hero-title span.visible {
    opacity: 1;
}

.hero-sub {
    font-family: 'Architects Daughter', cursive;
    font-size: 11px;
    color: #8A9AA0;
    margin-top: 8px;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.hero-sub.visible {
    opacity: 1;
}

.courthouse-facade {
    position: absolute;
    bottom: 15%;
    left: 15%;
    width: 300px;
    height: 220px;
}

.facade-stroke {
    transition: stroke-dashoffset 0.4s ease;
}

.facade-stroke.drawn {
    stroke-dashoffset: 0;
}

/* === Masonry Grid === */
.masonry-grid {
    column-count: 3;
    column-gap: 24px;
    padding: 48px 10%;
    max-width: 1200px;
    margin: 0 auto;
}

.sketch-card {
    break-inside: avoid;
    background: #F0F4F6;
    border: 1px solid #C8D4DA;
    box-shadow: 2px 3px 8px rgba(180, 190, 200, 0.2);
    padding: 24px;
    margin-bottom: 24px;
    position: relative;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.sketch-card.visible {
    opacity: 1;
}

.sketch-card:hover {
    transform: rotate(0deg) translateY(-2px) !important;
    border-color: #5A7A8A;
    box-shadow: 2px 4px 12px rgba(180, 190, 200, 0.3);
}

.sketch-card.tall {
    min-height: 300px;
}

.pin-shadow {
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(138, 154, 160, 0.2) 0%, transparent 70%);
}

.card-icon {
    margin-bottom: 12px;
}

.sketch-card h2 {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: #5A7A8A;
    margin-bottom: 12px;
    line-height: 1.2;
}

.red-mark {
    color: #C87A6A !important;
}

.sketch-card p {
    margin-bottom: 12px;
    color: #5A7A8A;
}

.sketch-card p:last-child {
    margin-bottom: 0;
}

.sketch-card.accent {
    border-color: rgba(200, 122, 106, 0.3);
}

.highlighted {
    background: rgba(232, 216, 138, 0.3);
    padding: 0 4px;
}

/* === Margin Notes === */
.margin-note {
    position: fixed;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Architects Daughter', cursive;
    font-size: 11px;
    color: #8A9AA0;
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    z-index: 50;
}

.margin-note.visible {
    opacity: 0.6;
    transform: translateX(0);
}

.mn-1 { top: 40%; }
.mn-2 { top: 65%; }

/* === Footer === */
#footer {
    padding: 32px 10%;
    text-align: center;
}

.footer-text {
    font-family: 'Architects Daughter', cursive;
    font-size: 12px;
    color: #8A9AA0;
}

/* === Responsive === */
@media (max-width: 900px) {
    .masonry-grid {
        column-count: 2;
        padding: 32px 24px;
    }

    #hero {
        padding-left: 24px;
    }

    .courthouse-facade {
        left: 24px;
        width: 200px;
    }
}

@media (max-width: 600px) {
    .masonry-grid {
        column-count: 1;
    }

    .margin-note {
        display: none;
    }

    #nav {
        right: 16px;
        gap: 16px;
    }
}
