/* ===================================================
   haroo.day — Swiss typography + vintage sepia journal
   =================================================== */

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

:root {
    --paper-base: #F4EDE4;
    --paper-warm: #E8DCD0;
    --ink-dark: #3A2E24;
    --ink-mid: #8A7B6A;
    --sepia-accent: #C4A882;
    --pressed-flower: #A07060;
    --vintage-blue: #6A7A8A;
    --font-display: 'Libre Caslon Display', serif;
    --font-body: 'Libre Caslon Text', serif;
    --font-mono: 'Space Mono', monospace;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background-color: var(--paper-base);
    color: var(--ink-dark);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(15px, 1.1vw, 17px);
    line-height: 1.9;
    overflow-x: hidden;
}

/* --- Selection --- */
::selection {
    background-color: var(--sepia-accent);
    color: var(--paper-base);
}

/* --- Shared Collage Element Styles --- */
.collage-element {
    filter: sepia(0.4) contrast(0.9);
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.1);
    animation: micro-tremor 4s ease-in-out infinite;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.collage-element:hover {
    box-shadow: 6px 6px 14px rgba(0, 0, 0, 0.18);
}

@keyframes micro-tremor {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(0.5px, -0.5px); }
    50% { transform: translate(-0.5px, 0.5px); }
    75% { transform: translate(0.5px, 0.5px); }
}

/* --- Pressed Flower SVGs --- */
.pressed-flower {
    transition: transform 0.3s ease-out;
}

.pressed-flower:hover {
    transform: scale(1.15);
}

/* --- Margin Notes --- */
.margin-note {
    position: absolute;
    pointer-events: none;
    opacity: 0.5;
}

/* ===================================================
   SECTION 1: Hero / Opening Viewport
   =================================================== */
#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    background-color: var(--paper-base);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#hero-logotype {
    position: absolute;
    top: 40px;
    left: 48px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.15em;
    color: var(--ink-mid);
    text-transform: lowercase;
    opacity: 0;
}

#hero-date-container {
    text-align: center;
    position: relative;
    z-index: 2;
}

#hero-date {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(48px, 10vw, 140px);
    color: var(--ink-dark);
    line-height: 1.1;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

#hero-date .date-char {
    display: inline-block;
    opacity: 0;
    transform: translateX(-10px);
}

#hero-rule {
    width: 0;
    height: 1px;
    background-color: var(--ink-mid);
    margin: 24px auto 0;
    transition: width 0.8s ease-out;
}

#hero-rule.animate {
    width: 70%;
}

#hero-subtitle {
    font-family: var(--font-body);
    font-style: italic;
    font-size: clamp(14px, 1.2vw, 18px);
    color: var(--ink-mid);
    margin-top: 16px;
    letter-spacing: 0.08em;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.6s ease 1.2s, transform 0.6s ease 1.2s;
}

#hero-subtitle.animate {
    opacity: 1;
    transform: translateY(0);
}

#hero-collage {
    position: absolute;
    bottom: 12%;
    right: 10%;
    width: clamp(140px, 18vw, 240px);
    height: clamp(180px, 22vw, 300px);
    background-color: var(--paper-warm);
    clip-path: polygon(2% 0%, 98% 1%, 100% 3%, 99% 97%, 97% 100%, 3% 99%, 0% 97%, 1% 2%);
    transform: translateX(100px) rotate(15deg);
    opacity: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

#hero-collage.animate {
    animation: collage-tumble 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, micro-tremor 4s ease-in-out 0.6s infinite;
}

@keyframes collage-tumble {
    from {
        transform: translateX(100px) rotate(15deg);
        opacity: 0;
    }
    to {
        transform: translateX(0) rotate(-3deg);
        opacity: 1;
    }
}

#hero-collage .collage-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 20px;
}

.hero-flower {
    width: 60%;
    height: auto;
    opacity: 0.8;
}

#hero-margin-note {
    bottom: 6%;
    left: 5%;
    width: 120px;
    height: 30px;
}

/* ===================================================
   SECTION 2: Daily Timeline & Reflections
   =================================================== */
#daily-entries {
    position: relative;
    padding: 80px 0 100px;
    background-color: var(--paper-base);
}

#entries-grid {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    gap: 0 48px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 48px;
}

#timeline-column {
    padding-right: 24px;
}

#reflection-column {
    padding-left: 24px;
}

#vertical-rule {
    width: 1px;
    background-color: var(--ink-mid);
    min-height: 100%;
    opacity: 0.5;
}

.section-label {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-mid);
    margin-bottom: 40px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--ink-mid);
}

/* Timeline entries */
.timeline-entry {
    margin-bottom: 36px;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.timeline-entry.visible {
    opacity: 1;
    transform: translateX(0);
}

.timestamp {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.06em;
    color: var(--ink-mid);
    display: block;
    margin-bottom: 6px;
}

.timeline-text {
    font-family: var(--font-body);
    color: var(--ink-dark);
    line-height: 1.9;
}

/* Reflection entries */
.reflection-entry {
    margin-bottom: 48px;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.reflection-entry.visible {
    opacity: 1;
    transform: translateX(0);
}

.reflection-entry h3 {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: clamp(16px, 1.3vw, 20px);
    color: var(--ink-dark);
    margin-bottom: 12px;
    letter-spacing: 0.01em;
}

.reflection-entry p {
    color: var(--ink-dark);
    line-height: 1.9;
}

.reflection-entry em {
    font-style: italic;
    color: var(--pressed-flower);
}

/* Section flower */
.section-flower {
    display: block;
    width: 40px;
    height: auto;
    margin: 60px auto 0;
    opacity: 0.7;
}

/* ===================================================
   SECTION 3: Collage Band
   =================================================== */
#collage-band {
    position: relative;
    width: 100%;
    min-height: 500px;
    padding: 80px 48px;
    background-color: var(--paper-warm);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.collage-piece-1 {
    position: absolute;
    left: 5%;
    top: 15%;
    width: clamp(160px, 18vw, 240px);
    height: clamp(120px, 14vw, 180px);
    background-color: var(--paper-base);
    clip-path: polygon(1% 2%, 97% 0%, 100% 4%, 98% 96%, 96% 100%, 2% 98%, 0% 95%, 3% 3%);
    transform: rotate(-2deg);
    opacity: 0;
    transition: transform 0.3s ease;
    overflow: hidden;
}

.collage-piece-1:hover {
    transform: rotate(0deg);
}

.collage-piece-2 {
    position: absolute;
    left: 28%;
    top: 40%;
    width: clamp(180px, 20vw, 280px);
    padding: 24px 28px;
    background-color: var(--paper-base);
    clip-path: polygon(0% 1%, 96% 0%, 100% 2%, 99% 98%, 97% 100%, 1% 99%, 0% 96%, 2% 3%);
    transform: rotate(3deg);
    opacity: 0;
    transition: transform 0.3s ease;
}

.collage-piece-2:hover {
    transform: rotate(5deg);
}

.collage-piece-3 {
    position: absolute;
    right: 25%;
    top: 10%;
    width: clamp(150px, 16vw, 220px);
    height: clamp(110px, 12vw, 160px);
    background-color: var(--paper-base);
    clip-path: polygon(3% 0%, 100% 2%, 98% 97%, 95% 100%, 0% 98%, 1% 4%);
    transform: rotate(-1deg);
    opacity: 0;
    transition: transform 0.3s ease;
    overflow: hidden;
}

.collage-piece-3:hover {
    transform: rotate(1deg);
}

.collage-piece-4 {
    position: absolute;
    right: 6%;
    top: 30%;
    width: clamp(100px, 12vw, 160px);
    height: clamp(140px, 16vw, 210px);
    background-color: var(--paper-base);
    clip-path: polygon(2% 1%, 98% 0%, 100% 3%, 99% 97%, 96% 100%, 1% 99%, 0% 96%, 3% 2%);
    transform: rotate(2deg);
    opacity: 0;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.collage-piece-4:hover {
    transform: rotate(4deg);
}

.collage-piece-4 svg {
    width: 80%;
    height: auto;
}

.collage-piece-5 {
    position: absolute;
    left: 15%;
    bottom: 12%;
    width: clamp(120px, 14vw, 190px);
    padding: 16px 20px;
    background-color: var(--paper-base);
    clip-path: polygon(0% 2%, 98% 0%, 100% 5%, 99% 95%, 97% 100%, 2% 98%, 0% 93%, 1% 4%);
    transform: rotate(-4deg);
    opacity: 0;
    transition: transform 0.3s ease;
}

.collage-piece-5:hover {
    transform: rotate(-2deg);
}

.collage-photo-content svg {
    width: 100%;
    height: 100%;
    display: block;
}

.handwritten {
    font-family: var(--font-body);
    font-style: italic;
    font-size: clamp(14px, 1.4vw, 20px);
    color: var(--ink-mid);
    line-height: 1.6;
    transform: rotate(-1deg);
}

.note-flower {
    width: 28px;
    height: auto;
    margin-top: 10px;
    display: block;
}

.ticket-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.ticket-label {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-mid);
}

.ticket-detail {
    font-family: var(--font-display);
    font-size: clamp(22px, 3vw, 36px);
    color: var(--ink-dark);
}

.ticket-number {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    color: var(--ink-mid);
}

.collage-margin-note {
    bottom: 8%;
    right: 8%;
    width: 100px;
    height: 25px;
}

/* ===================================================
   SECTION 4: Pull Quote
   =================================================== */
#pull-quote {
    position: relative;
    padding: 120px 48px;
    background-color: var(--paper-base);
    text-align: center;
}

#quote-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.quote-flower-left,
.quote-flower-right {
    width: 36px;
    height: auto;
    flex-shrink: 0;
    opacity: 0.7;
}

.quote-flower-right {
    transform: scaleX(-1);
}

#quote-text {
    font-family: var(--font-display);
    font-size: clamp(28px, 5vw, 60px);
    color: var(--ink-dark);
    line-height: 1.4;
    letter-spacing: -0.01em;
}

#quote-text p:first-child {
    margin-bottom: 16px;
}

.quote-translation {
    font-family: var(--font-body);
    font-style: italic;
    font-size: clamp(16px, 2vw, 24px);
    color: var(--ink-mid);
    letter-spacing: 0.02em;
}

#quote-rule {
    width: 120px;
    height: 1px;
    background-color: var(--ink-mid);
    margin: 60px auto 0;
    opacity: 0.5;
}

/* ===================================================
   SECTION 5: Footer
   =================================================== */
#footer {
    padding: 60px 48px 80px;
    background-color: var(--paper-base);
}

#footer-rule {
    width: 100%;
    height: 1px;
    background-color: var(--ink-mid);
    margin-bottom: 40px;
    opacity: 0.4;
}

#footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1100px;
    margin: 0 auto;
    gap: 40px;
}

#footer-logotype {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.15em;
    color: var(--ink-mid);
    text-transform: lowercase;
}

/* Calendar */
#footer-calendar {
    width: 240px;
}

#calendar-header {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-mid);
    margin-bottom: 12px;
    text-align: center;
}

#calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 6px;
}

.cal-day-label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.06em;
    color: var(--ink-mid);
    text-align: center;
    padding: 4px 0;
    opacity: 0.7;
}

#calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.cal-day {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--ink-dark);
    text-align: center;
    padding: 5px 0;
    position: relative;
    line-height: 1;
}

.cal-day.past {
    opacity: 0.5;
}

.cal-day.today {
    color: var(--ink-dark);
    font-weight: 700;
}

.cal-day.today::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 26px;
    height: 26px;
    border: 2px solid var(--sepia-accent);
    border-radius: 50%;
    pointer-events: none;
}

.cal-day.future {
    opacity: 0.8;
}

.cal-day.empty {
    visibility: hidden;
}

#footer-note {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 13px;
    color: var(--ink-mid);
    text-align: center;
    margin-top: 40px;
    letter-spacing: 0.04em;
}

/* ===================================================
   RULE LINE HOVER EFFECT
   =================================================== */
#hero-rule,
#vertical-rule,
#footer-rule,
#quote-rule,
.section-label {
    transition: background-color 0.3s ease, border-color 0.3s ease, width 0.8s ease-out;
}

/* ===================================================
   ANIMATIONS
   =================================================== */
@keyframes date-char-in {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.date-char.animate {
    animation: date-char-in 0.3s ease-out forwards;
}

/* Collage entry animations */
.collage-element.collage-visible {
    opacity: 1 !important;
}

@keyframes collage-enter-1 {
    from { transform: translateX(-60px) rotate(-12deg); opacity: 0; }
    to { transform: rotate(-2deg); opacity: 1; }
}

@keyframes collage-enter-2 {
    from { transform: translateY(60px) rotate(10deg); opacity: 0; }
    to { transform: rotate(3deg); opacity: 1; }
}

@keyframes collage-enter-3 {
    from { transform: translateX(60px) rotate(8deg); opacity: 0; }
    to { transform: rotate(-1deg); opacity: 1; }
}

@keyframes collage-enter-4 {
    from { transform: translateY(-60px) rotate(-10deg); opacity: 0; }
    to { transform: rotate(2deg); opacity: 1; }
}

@keyframes collage-enter-5 {
    from { transform: translateX(-40px) rotate(12deg); opacity: 0; }
    to { transform: rotate(-4deg); opacity: 1; }
}

.collage-piece-1.collage-visible {
    animation: collage-enter-1 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, micro-tremor 4s ease-in-out 0.6s infinite;
}

.collage-piece-2.collage-visible {
    animation: collage-enter-2 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s forwards, micro-tremor 4s ease-in-out 0.7s infinite;
}

.collage-piece-3.collage-visible {
    animation: collage-enter-3 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s forwards, micro-tremor 4s ease-in-out 0.8s infinite;
}

.collage-piece-4.collage-visible {
    animation: collage-enter-4 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s forwards, micro-tremor 4s ease-in-out 0.9s infinite;
}

.collage-piece-5.collage-visible {
    animation: collage-enter-5 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s forwards, micro-tremor 4s ease-in-out 1s infinite;
}

/* ===================================================
   RESPONSIVE
   =================================================== */
@media (max-width: 768px) {
    #entries-grid {
        grid-template-columns: 1fr;
        gap: 48px 0;
        padding: 0 24px;
    }

    #vertical-rule {
        display: none;
    }

    #timeline-column,
    #reflection-column {
        padding: 0;
    }

    #hero-logotype {
        top: 24px;
        left: 24px;
    }

    #hero-collage {
        width: 120px;
        height: 150px;
        bottom: 8%;
        right: 6%;
    }

    #collage-band {
        min-height: 400px;
        padding: 60px 24px;
    }

    .collage-piece-1 { left: 2%; top: 8%; }
    .collage-piece-2 { left: 20%; top: 45%; }
    .collage-piece-3 { right: 5%; top: 5%; }
    .collage-piece-4 { right: 3%; top: 40%; }
    .collage-piece-5 { left: 8%; bottom: 8%; }

    #quote-container {
        gap: 20px;
    }

    .quote-flower-left,
    .quote-flower-right {
        width: 24px;
    }

    #footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    #pull-quote {
        padding: 80px 24px;
    }

    #footer {
        padding: 40px 24px 60px;
    }
}
