/* haru.cam — styles.css */
/* Colors: #2C2416 #F7F0E6 #E8D5B7 #7A6654 #9B8672 #F2E6D4 #B5977A #C4A882 */
/* Fonts: Nunito Sans, Playfair Display */

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    background-color: #F7F0E6;
    color: #2C2416;
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    line-height: 1.75;
    font-feature-settings: "kern" 1, "liga" 1;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

/* ===== GRAIN FILTER ===== */
#grain-filter {
    position: absolute;
    width: 0;
    height: 0;
    pointer-events: none;
}

.grain-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    opacity: 0.08;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 300px 300px;
    mix-blend-mode: multiply;
}

/* ===== SECTIONS ===== */
.section {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    z-index: 1;
}

.section__bg {
    position: absolute;
    inset: -20%;
    z-index: 0;
    pointer-events: none;
    background-size: cover;
    background-position: center;
    transition: transform 0.1s linear;
    will-change: transform;
}

.section__content {
    position: relative;
    z-index: 3;
    max-width: 720px;
    margin: 0 auto;
    padding: 120px 48px 160px;
}

.section__content--offset {
    margin-left: 10vw;
    margin-right: 0;
}

/* ===== DIAGONAL CLIP-PATHS ===== */
.section--hero {
    clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
    margin-bottom: -6vw;
    z-index: 2;
    background: #2C2416;
}

.section--story {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 92%);
    margin-bottom: -6vw;
    z-index: 3;
    background: #F7F0E6;
}

.section--story.section--alt {
    clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
    background: #E8D5B7;
    z-index: 4;
}

.section--contact-sheet {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 92%);
    margin-bottom: -6vw;
    z-index: 5;
    background: #2C2416;
    min-height: auto;
    padding: 80px 0;
}

.section--contact {
    clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
    margin-bottom: -6vw;
    z-index: 6;
    background: #F2E6D4;
    min-height: 40vh;
    display: flex;
    align-items: center;
}

/* ===== HERO ===== */
.section--hero .section__bg {
    background: radial-gradient(ellipse at 30% 40%, rgba(196,168,130,0.6) 0%, rgba(44,36,22,0.95) 60%),
                radial-gradient(ellipse at 70% 60%, rgba(181,151,122,0.4) 0%, transparent 50%),
                radial-gradient(ellipse at 50% 80%, rgba(154,134,114,0.3) 0%, transparent 40%),
                #2C2416;
}

.hero__margin-note {
    position: absolute;
    left: -60px;
    top: 130px;
}

.timestamp {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 300;
    font-style: italic;
    font-size: 13px;
    color: #9B8672;
    transform: rotate(-2deg);
    display: block;
    white-space: nowrap;
}

.hero__title {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 300;
    font-size: 72px;
    letter-spacing: -0.02em;
    color: #F7F0E6;
    line-height: 1.05;
    margin-bottom: 24px;
}

.title-dot {
    color: #B5977A;
}

.hero__subtitle {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 300;
    font-size: 18px;
    color: #C4A882;
    line-height: 1.6;
    letter-spacing: 0.01em;
    max-width: 340px;
}

.hero__leaf--macro {
    position: absolute;
    right: -40px;
    bottom: 60px;
    width: 300px;
    height: 300px;
    opacity: 0.25;
    pointer-events: none;
    z-index: 1;
}

.hero__leaf--macro svg {
    width: 100%;
    height: 100%;
}

/* ===== SECTION TITLES ===== */
.section-title {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 600;
    font-size: 28px;
    text-transform: lowercase;
    color: #2C2416;
    margin-bottom: 28px;
    letter-spacing: 0;
    line-height: 1.2;
    opacity: 0;
    transform: translateY(24px);
}

.section--alt .section-title {
    color: #2C2416;
}

.section-title.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 400ms cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
    transition-delay: 100ms;
}

/* ===== STORY BODY ===== */
.story-body p {
    color: #2C2416;
    font-size: 17px;
    line-height: 1.75;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.leaf-bullet {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 4px;
}

.story-aside {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 300;
    font-style: italic;
    font-size: 15px;
    color: #9B8672;
    margin-top: 12px;
    display: block;
}

/* ===== MARGIN TIMESTAMP ===== */
.margin-timestamp {
    position: absolute;
    left: -80px;
    top: 50%;
    transform: rotate(-2deg) translateY(-50%);
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 300;
    font-style: italic;
    font-size: 13px;
    color: #9B8672;
    white-space: nowrap;
}

/* ===== LEAF WATERMARK ===== */
.leaf-watermark--mid {
    position: absolute;
    width: 64px;
    height: 64px;
    opacity: 0.08;
    pointer-events: none;
    z-index: 1;
    top: 60px;
    left: 24px;
    transform: rotate(-8deg);
}

.leaf-watermark--right {
    left: auto;
    right: 24px;
    transform: rotate(12deg);
}

.leaf-watermark--mid svg {
    width: 100%;
    height: 100%;
}

/* ===== CONTACT SHEET ===== */
.section--contact-sheet {
    position: relative;
}

.contact-sheet__sprockets {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    z-index: 4;
    padding: 20px 0;
}

.sprocket {
    display: block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #C4A882;
    opacity: 0.3;
}

.contact-sheet__strip {
    position: relative;
    z-index: 3;
    padding: 40px 48px 60px 60px;
}

.contact-sheet__label {
    margin-bottom: 20px;
}

.film-label {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 300;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #9B8672;
    opacity: 0.7;
}

.contact-sheet__frames {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 12px;
}

.contact-sheet__frames::-webkit-scrollbar {
    display: none;
}

.frame {
    flex-shrink: 0;
    width: 160px;
    cursor: pointer;
    transform: rotate(var(--rot));
    transition: transform 0.3s ease;
    opacity: 0;
    transform: rotate(var(--rot)) scale(0.92);
}

.frame.is-visible {
    opacity: 1;
    transform: rotate(var(--rot)) scale(1);
    transition: opacity 400ms cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.frame:hover {
    transform: rotate(0deg) scale(1);
}

.frame__bokeh {
    width: 160px;
    height: 110px;
    border: 1px solid transparent;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    transition: border-color 0.3s ease;
}

.frame:hover .frame__bokeh {
    border-color: #C4A882;
}

/* Bokeh backgrounds - CSS-generated light orb simulations */
.frame__bokeh--1 {
    background:
        radial-gradient(circle 45px at 65% 35%, rgba(242,230,212,0.85) 0%, transparent 60%),
        radial-gradient(circle 25px at 30% 60%, rgba(196,168,130,0.7) 0%, transparent 55%),
        radial-gradient(circle 30px at 80% 70%, rgba(181,151,122,0.5) 0%, transparent 50%),
        radial-gradient(circle 18px at 20% 25%, rgba(247,240,230,0.6) 0%, transparent 45%),
        #2C2416;
}

.frame__bokeh--2 {
    background:
        radial-gradient(circle 50px at 50% 45%, rgba(242,230,212,0.9) 0%, transparent 60%),
        radial-gradient(circle 20px at 25% 70%, rgba(196,168,130,0.6) 0%, transparent 50%),
        radial-gradient(circle 15px at 75% 25%, rgba(181,151,122,0.5) 0%, transparent 45%),
        radial-gradient(circle 35px at 85% 65%, rgba(247,240,230,0.4) 0%, transparent 55%),
        #1a1008;
}

.frame__bokeh--3 {
    background:
        radial-gradient(circle 30px at 40% 55%, rgba(155,134,114,0.8) 0%, transparent 55%),
        radial-gradient(circle 40px at 70% 35%, rgba(196,168,130,0.7) 0%, transparent 60%),
        radial-gradient(circle 20px at 15% 75%, rgba(242,230,212,0.5) 0%, transparent 45%),
        radial-gradient(circle 25px at 85% 80%, rgba(247,240,230,0.4) 0%, transparent 50%),
        #1f1810;
}

.frame__bokeh--4 {
    background:
        radial-gradient(circle 55px at 55% 40%, rgba(232,213,183,0.7) 0%, transparent 65%),
        radial-gradient(circle 22px at 20% 60%, rgba(196,168,130,0.6) 0%, transparent 50%),
        radial-gradient(circle 18px at 80% 25%, rgba(181,151,122,0.5) 0%, transparent 45%),
        radial-gradient(circle 12px at 35% 80%, rgba(247,240,230,0.6) 0%, transparent 40%),
        #2C2416;
}

.frame__bokeh--5 {
    background:
        radial-gradient(circle 35px at 60% 50%, rgba(242,230,212,0.8) 0%, transparent 60%),
        radial-gradient(circle 45px at 30% 30%, rgba(196,168,130,0.5) 0%, transparent 65%),
        radial-gradient(circle 20px at 75% 70%, rgba(247,240,230,0.6) 0%, transparent 45%),
        radial-gradient(circle 15px at 90% 20%, rgba(181,151,122,0.4) 0%, transparent 40%),
        #1a1008;
}

.frame__bokeh--6 {
    background:
        radial-gradient(circle 40px at 45% 45%, rgba(181,151,122,0.75) 0%, transparent 60%),
        radial-gradient(circle 28px at 70% 65%, rgba(196,168,130,0.6) 0%, transparent 55%),
        radial-gradient(circle 20px at 25% 35%, rgba(242,230,212,0.7) 0%, transparent 45%),
        radial-gradient(circle 15px at 85% 30%, rgba(247,240,230,0.5) 0%, transparent 40%),
        #2C2416;
}

.frame__caption {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 11px;
    color: #9B8672;
    margin-top: 6px;
    padding: 0 2px;
    text-align: center;
}

/* ===== SECTION BG BOKEH (full-panel) ===== */
#story1-bg {
    background:
        radial-gradient(ellipse 200px 160px at 20% 30%, rgba(247,240,230,0.45) 0%, transparent 70%),
        radial-gradient(ellipse 140px 180px at 75% 60%, rgba(242,230,212,0.35) 0%, transparent 65%),
        radial-gradient(ellipse 100px 120px at 55% 15%, rgba(196,168,130,0.3) 0%, transparent 60%),
        radial-gradient(ellipse 80px 90px at 10% 80%, rgba(181,151,122,0.25) 0%, transparent 55%),
        rgba(232,213,183,0.4);
}

#story2-bg {
    background:
        radial-gradient(ellipse 180px 200px at 80% 25%, rgba(247,240,230,0.4) 0%, transparent 70%),
        radial-gradient(ellipse 120px 150px at 30% 65%, rgba(242,230,212,0.3) 0%, transparent 60%),
        radial-gradient(ellipse 90px 100px at 60% 80%, rgba(196,168,130,0.25) 0%, transparent 55%),
        radial-gradient(ellipse 60px 70px at 45% 10%, rgba(181,151,122,0.2) 0%, transparent 50%),
        rgba(247,240,230,0.5);
}

#story3-bg {
    background:
        radial-gradient(ellipse 160px 140px at 35% 40%, rgba(232,213,183,0.4) 0%, transparent 65%),
        radial-gradient(ellipse 200px 160px at 70% 70%, rgba(247,240,230,0.35) 0%, transparent 70%),
        radial-gradient(ellipse 80px 100px at 15% 60%, rgba(196,168,130,0.25) 0%, transparent 55%),
        radial-gradient(ellipse 110px 90px at 85% 15%, rgba(181,151,122,0.2) 0%, transparent 50%),
        rgba(232,213,183,0.35);
}

/* ===== SEPIA OVERLAY ON BG ===== */
.section--story .section__bg::after,
.section--story.section--alt .section__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(155,134,114,0.28);
    mix-blend-mode: multiply;
}

/* ===== CONTACT SECTION ===== */
.section--contact {
    padding: 80px 48px;
}

.contact-leaf-sep {
    width: 24px;
    height: 24px;
    margin: 0 auto 24px;
    opacity: 0.6;
}

.contact-leaf-sep svg {
    width: 100%;
    height: 100%;
}

.contact-text {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: 17px;
    color: #2C2416;
    text-align: center;
}

.contact-link {
    color: #2C2416;
    text-decoration: underline;
    text-decoration-color: #B5977A;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.contact-link:hover {
    color: #B5977A;
}

/* ===== FOOTER ===== */
.footer {
    position: relative;
    z-index: 7;
    background: #7A6654;
    padding: 60px 48px 48px;
    overflow: hidden;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer__leaf {
    position: absolute;
    right: -40px;
    bottom: -60px;
    width: 300px;
    height: 300px;
    pointer-events: none;
    opacity: 1;
}

.footer__leaf svg {
    width: 100%;
    height: 100%;
}

.footer__content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.footer__text {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 300;
    font-size: 22px;
    color: #F7F0E6;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.footer__sub {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 300;
    font-style: italic;
    font-size: 13px;
    color: #C4A882;
}

/* ===== BOUNCE-ENTER INITIAL STATE ===== */
.bounce-enter {
    opacity: 0;
    transform: translateY(24px);
}

.bounce-enter.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 400ms cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== KEYFRAME ANIMATIONS ===== */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: translateY(24px) scale(0.92);
    }
    60% {
        opacity: 1;
        transform: translateY(-2px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes leafSettle {
    0% { transform: rotate(-15deg); }
    60% { transform: rotate(3deg); }
    100% { transform: rotate(0deg); }
}

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

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    .hero__title {
        font-size: 48px;
    }

    .section__content {
        padding: 80px 24px 120px;
    }

    .section__content--offset {
        margin-left: 0;
    }

    .margin-timestamp {
        position: static;
        transform: none;
        display: block;
        margin-bottom: 12px;
    }

    .hero__margin-note {
        position: static;
        margin-bottom: 16px;
    }

    .contact-sheet__strip {
        padding: 40px 24px 60px 36px;
    }

    .story-aside {
        margin-left: 0 !important;
    }
}
