/* ============================================
   licensor.directory - Hand-Drawn Field Guide
   ============================================ */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: #F8F4E8;
    color: #3A3A30;
    font-family: 'Bitter', serif;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    line-height: 1.8;
    overflow-x: hidden;
    position: relative;
}

/* --- Hand-Drawn Connecting Line --- */
#connecting-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

#zigzag-path {
    stroke-dasharray: 15000;
    stroke-dashoffset: 15000;
    transition: none;
}

/* --- Margin Doodles --- */
#margin-doodles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.doodle {
    position: absolute;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.doodle.visible {
    opacity: 1;
}

.doodle-star {
    top: 15%;
    left: 3%;
}

.doodle-arrow {
    top: 28%;
    right: 4%;
    left: auto;
}

.doodle-bracket {
    top: 42%;
    left: 2%;
}

.doodle-face {
    top: 55%;
    right: 3%;
    left: auto;
}

.doodle-spiral {
    top: 70%;
    left: 4%;
}

.doodle-leaf {
    top: 85%;
    right: 5%;
    left: auto;
}

/* --- Hero Section --- */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    padding: 2rem;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    position: relative;
    z-index: 3;
}

#title-svg {
    width: 100%;
    max-width: 700px;
    height: auto;
    opacity: 0;
    animation: fadeDrawIn 2s ease-out forwards;
}

@keyframes fadeDrawIn {
    0% {
        opacity: 0;
        filter: blur(2px);
    }
    30% {
        opacity: 0.4;
        filter: blur(1px);
    }
    100% {
        opacity: 1;
        filter: blur(0);
    }
}

.hero-subtitle {
    font-family: 'Bitter', serif;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    font-weight: 300;
    color: #3A3A30;
    margin-top: 1rem;
    opacity: 0;
    animation: subtitleFadeIn 1.2s ease-out 1s forwards;
    letter-spacing: 0.02em;
}

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

/* --- Sticky Notes --- */
.hero-sticky-notes {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.sticky-note {
    display: inline-block;
    padding: 0.75rem 1.25rem;
    font-family: 'Patrick Hand', cursive;
    font-size: 1rem;
    color: #2A3A28;
    position: relative;
    box-shadow: 2px 3px 8px rgba(0, 0, 0, 0.1);
    opacity: 0;
    animation: stickyBounceIn 0.6s ease-out forwards;
}

.sticky-note:nth-child(1) {
    animation-delay: 1.6s;
}
.sticky-note:nth-child(2) {
    animation-delay: 1.9s;
}
.sticky-note:nth-child(3) {
    animation-delay: 2.2s;
}

@keyframes stickyBounceIn {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(0deg);
    }
    60% {
        opacity: 1;
        transform: scale(1.1) rotate(var(--sticky-rotate, 2deg));
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(var(--sticky-rotate, 2deg));
    }
}

.sticky-coral {
    background: #D87060;
    color: #F8F4E8;
    --sticky-rotate: -2deg;
    transform: rotate(-2deg);
    clip-path: polygon(0% 0%, 100% 0%, 100% 85%, 92% 100%, 0% 100%);
}

.sticky-green {
    background: #5A8A5A;
    color: #F8F4E8;
    --sticky-rotate: 1.5deg;
    transform: rotate(1.5deg);
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 8% 100%, 0% 88%);
}

.sticky-blue {
    background: #6A7A9A;
    color: #F8F4E8;
    --sticky-rotate: -1deg;
    transform: rotate(-1deg);
    clip-path: polygon(0% 0%, 100% 0%, 100% 90%, 95% 100%, 0% 100%);
}

/* --- Hero Botanical --- */
.hero-botanical {
    position: absolute;
    right: 5%;
    bottom: 10%;
    opacity: 0.5;
    z-index: 1;
}

/* --- Z-Pattern Sections --- */
.z-section {
    position: relative;
    z-index: 2;
    padding: 4rem 5%;
    max-width: 1300px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.z-section.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Section watercolor washes */
.section-watercolor {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    border-radius: 40% 60% 50% 40% / 40% 50% 60% 50%;
}

.watercolor-green-wash {
    background: radial-gradient(ellipse at 30% 50%, rgba(90, 138, 90, 0.06) 0%, transparent 70%);
}

.watercolor-coral-wash {
    background: radial-gradient(ellipse at 70% 40%, rgba(216, 112, 96, 0.06) 0%, transparent 70%);
}

.watercolor-blue-wash {
    background: radial-gradient(ellipse at 40% 60%, rgba(106, 122, 154, 0.06) 0%, transparent 70%);
}

/* Sticky-note category headers */
.sticky-note-header {
    display: inline-block;
    padding: 0.6rem 1.8rem 0.6rem 1.2rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
    box-shadow: 2px 3px 10px rgba(0, 0, 0, 0.1);
}

.sticky-note-header.sticky-coral {
    background: #D87060;
    transform: rotate(-1.5deg);
    clip-path: polygon(0% 0%, 100% 0%, 100% 85%, 93% 100%, 0% 100%);
}

.sticky-note-header.sticky-green {
    background: #5A8A5A;
    transform: rotate(1deg);
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 7% 100%, 0% 90%);
}

.sticky-note-header.sticky-blue {
    background: #6A7A9A;
    transform: rotate(-0.8deg);
    clip-path: polygon(0% 0%, 100% 0%, 100% 92%, 94% 100%, 0% 100%);
}

.sticky-text {
    font-family: 'Caveat', cursive;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    color: #F8F4E8;
    letter-spacing: 0.01em;
}

/* Z-content layout */
.z-content {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
    position: relative;
    z-index: 2;
}

.z-left .z-content {
    flex-direction: row;
}

.z-right .z-content {
    flex-direction: row;
}

.z-primary {
    flex: 3;
    min-width: 0;
}

.z-secondary {
    flex: 2;
    min-width: 0;
}

/* Category botanical icons */
.category-botanical {
    display: block;
    margin-bottom: 1rem;
    opacity: 0.7;
}

/* --- Entry Cards --- */
.entry-card {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: rgba(248, 244, 232, 0.7);
    position: relative;
    border-radius: 2px;
}

/* Sketch border effect using box-shadow and pseudo-elements */
.sketch-border {
    border: 1.5px solid rgba(42, 58, 40, 0.2);
    position: relative;
}

.sketch-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 1px solid rgba(42, 58, 40, 0.08);
    border-radius: 3px;
    transform: rotate(0.3deg);
    pointer-events: none;
}

.sketch-border::after {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border: 1px solid rgba(42, 58, 40, 0.06);
    border-radius: 1px;
    transform: rotate(-0.2deg);
    pointer-events: none;
}

/* Classical frame for featured entries */
.classical-frame {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid rgba(106, 122, 154, 0.2);
    pointer-events: none;
}

.classical-frame::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 20%;
    right: 20%;
    height: 6px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(106, 122, 154, 0.15) 20%,
        rgba(106, 122, 154, 0.2) 50%,
        rgba(106, 122, 154, 0.15) 80%,
        transparent 100%
    );
}

.classical-frame::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 30%;
    right: 30%;
    height: 4px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(106, 122, 154, 0.12) 30%,
        rgba(106, 122, 154, 0.15) 50%,
        rgba(106, 122, 154, 0.12) 70%,
        transparent 100%
    );
}

/* Pulse animation for featured entries */
.featured-pulse {
    animation: gentlePulse 2s ease-in-out infinite;
}

@keyframes gentlePulse {
    0%, 100% {
        transform: scale(1.0);
    }
    50% {
        transform: scale(1.02);
    }
}

/* Entry typography */
.entry-name {
    font-family: 'Caveat', cursive;
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    font-weight: 700;
    color: #2A3A28;
    letter-spacing: 0.01em;
    margin-bottom: 0.25rem;
}

.entry-type {
    font-family: 'Patrick Hand', cursive;
    font-size: 0.95rem;
    color: #6A5A4A;
    margin-bottom: 0.5rem;
}

.entry-desc {
    font-family: 'Bitter', serif;
    font-size: clamp(0.85rem, 1.1vw, 0.95rem);
    color: #3A3A30;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

/* Tags */
.entry-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    font-family: 'Patrick Hand', cursive;
    font-size: 0.85rem;
    color: #6A5A4A;
    background: rgba(106, 90, 74, 0.08);
    border: 1px solid rgba(106, 90, 74, 0.15);
    border-radius: 2px;
    margin-right: 0.4rem;
    transform: rotate(-0.5deg);
}

.tag-green {
    color: #5A8A5A;
    background: rgba(90, 138, 90, 0.08);
    border-color: rgba(90, 138, 90, 0.2);
}

.tag-blue {
    color: #6A7A9A;
    background: rgba(106, 122, 154, 0.08);
    border-color: rgba(106, 122, 154, 0.2);
}

/* --- Field Notes --- */
.field-note {
    position: relative;
    padding: 1.25rem 1.25rem 1.25rem 2.5rem;
    background: rgba(248, 244, 232, 0.5);
    border-left: 3px solid rgba(106, 90, 74, 0.2);
    margin-bottom: 1rem;
}

.note-pin {
    position: absolute;
    top: -8px;
    left: 8px;
}

.note-text {
    font-family: 'Bitter', serif;
    font-size: clamp(0.85rem, 1vw, 0.95rem);
    font-weight: 300;
    color: #3A3A30;
    line-height: 1.7;
    font-style: italic;
}

/* Annotations */
.annotation {
    padding: 0.5rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.annotation-marker {
    font-family: 'Caveat', cursive;
    font-size: 1.2rem;
    color: #D87060;
    line-height: 1;
    flex-shrink: 0;
}

.annotation-text {
    font-family: 'Patrick Hand', cursive;
    font-size: 0.9rem;
    color: #6A5A4A;
    line-height: 1.5;
}

/* --- Footer --- */
#footer {
    position: relative;
    z-index: 2;
    padding: 4rem 2rem 3rem;
    text-align: center;
    margin-top: 2rem;
    border-top: 1px dashed rgba(106, 90, 74, 0.2);
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-botanical {
    display: block;
    margin: 0 auto 1.5rem;
    opacity: 0.6;
}

.footer-text {
    font-family: 'Caveat', cursive;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    color: #2A3A28;
    letter-spacing: 0.01em;
}

.footer-note {
    font-family: 'Bitter', serif;
    font-size: 0.9rem;
    font-weight: 300;
    color: #6A5A4A;
    margin-top: 0.25rem;
    margin-bottom: 1.5rem;
}

.footer-tags {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-tag {
    font-family: 'Patrick Hand', cursive;
    font-size: 0.85rem;
    color: #6A5A4A;
    padding: 0.2rem 0.7rem;
    border: 1px solid rgba(106, 90, 74, 0.15);
    border-radius: 2px;
    opacity: 0.7;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .z-content {
        flex-direction: column !important;
    }

    .z-primary, .z-secondary {
        flex: 1 1 100%;
    }

    .z-section {
        padding: 3rem 4%;
    }

    .hero-sticky-notes {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .hero-botanical {
        display: none;
    }

    .doodle {
        display: none;
    }

    #connecting-line {
        display: none;
    }
}

@media (max-width: 480px) {
    .z-section {
        padding: 2rem 3%;
    }

    .entry-card {
        padding: 1rem;
    }

    .sticky-note-header {
        padding: 0.5rem 1rem;
    }
}
