/* ============================================================
   felikinesis — a memorial for Feliz Tupe
   Risograph-inspired design system
   ============================================================ */

:root {
    /* Palette drawn from her line-drawing artwork */
    --teal:      #3fbed1;
    --teal-deep: #2b93a3;   /* deeper teal for dark surfaces + white text */
    --periwinkle:#afc6e8;
    --slate:     #8b9298;
    --sun:       #ffd32c;
    --white:     #ffffff;

    --ink:    #1c2226;   /* near-black line, cool */
    --paper:  #f5f2ea;   /* soft off-white */
    --paper-2:#eae4d6;

    /* Organic blob radii */
    --blob-1: 42% 58% 63% 37% / 45% 38% 62% 55%;
    --blob-2: 63% 37% 42% 58% / 55% 62% 38% 45%;
    --blob-3: 38% 62% 55% 45% / 62% 42% 58% 38%;

    --maxw: 1080px;
    --radius: 18px;
    --ease: cubic-bezier(.22,.61,.36,1);

    --font-display: "Fraunces", Georgia, serif;
    --font-sans: "Space Grotesk", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    background: var(--paper);
    color: var(--ink);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- Grain / print texture overlay --- */
.grain {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: .05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-block;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: .01em;
    padding: .85rem 1.6rem;
    border-radius: 100px;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid var(--ink);
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), color .25s var(--ease);
}
.btn--solid {
    background: var(--ink);
    color: var(--paper);
    box-shadow: 5px 5px 0 var(--teal);
}
.btn--solid:hover {
    transform: translate(-2px,-2px);
    box-shadow: 8px 8px 0 var(--teal);
}
.btn--ghost {
    background: transparent;
    color: var(--ink);
    box-shadow: 5px 5px 0 var(--sun);
}
.btn--ghost:hover {
    transform: translate(-2px,-2px);
    box-shadow: 8px 8px 0 var(--sun);
    background: var(--sun);
}

/* ============================================================
   Navigation
   ============================================================ */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    transition: background .3s var(--ease), box-shadow .3s var(--ease);
}
.nav--scrolled {
    background: rgba(246,241,231,.85);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(26,22,34,.12);
}
.nav__inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 1.1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav__brand {
    display: inline-flex;
    align-items: center;
    color: var(--ink);
    text-decoration: none;
}
.nav__logo {
    height: 48px;
    width: auto;
    display: block;
    margin-top: 14px;
}
.nav__links {
    display: flex;
    align-items: center;
    gap: 1.6rem;
}
.nav__links a {
    color: var(--ink);
    text-decoration: none;
    font-size: .98rem;
    position: relative;
}
.nav__links a:not(.nav__cta)::after {
    content: "";
    position: absolute;
    left: 0; bottom: -4px;
    width: 0; height: 2px;
    background: var(--teal);
    transition: width .25s var(--ease);
}
.nav__links a:not(.nav__cta):hover::after { width: 100%; }
.nav__cta {
    background: var(--teal);
    color: var(--ink) !important;
    padding: .5rem 1.1rem;
    border-radius: 100px;
    font-weight: 700;
}
.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}
.nav__toggle span {
    width: 26px; height: 2px;
    background: var(--ink);
    transition: transform .3s var(--ease), opacity .3s var(--ease);
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 1.5rem 3rem;
    overflow: hidden;
}
.hero__inner {
    position: relative;
    z-index: 2;
    max-width: 760px;
}
.hero__crane {
    width: 110px;
    margin: 0 auto 1.2rem;
    animation: float 6s ease-in-out infinite;
}
.hero__portrait {
    position: relative;
    z-index: 1;
    margin: 0 auto 1.8rem;
    max-width: 360px;
    border: 3px solid var(--ink);
    border-radius: var(--radius);
    overflow: hidden;
    line-height: 0;
    background: var(--paper);
    box-shadow: 12px 12px 0 var(--teal);
    transform: rotate(-1.5deg);
}
.hero__portrait img { width: 100%; height: auto; display: block; }
.hero__crane svg { width: 100%; height: auto; }
.crane-wing { fill: var(--riso-pink); stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.crane-body { fill: var(--riso-yellow); stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.crane-line { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

@keyframes float {
    0%,100% { transform: translateY(0) rotate(-1deg); }
    50%     { transform: translateY(-14px) rotate(1deg); }
}

.hero__eyebrow {
    font-family: var(--font-sans);
    text-transform: lowercase;
    letter-spacing: .35em;
    font-size: .9rem;
    color: var(--riso-blue);
    margin-bottom: 1rem;
}
.hero__name {
    position: relative;
    z-index: 2;
    margin-top: 1.4rem;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(3rem, 11vw, 7rem);
    line-height: .95;
    letter-spacing: -.03em;
}
.hero__dates,
.hero__tagline { position: relative; z-index: 2; }
.hero__tagline {
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(1.5rem, 3vw, 1.85rem);
    margin: 2.3rem auto .7rem;
    max-width: 34ch;
    color: var(--ink);
}
.hero__dates {
    font-family: var(--font-sans);
    font-size: 1.45rem;
    letter-spacing: .1em;
    margin: 0 0 2.2rem;
    color: var(--ink);
    opacity: .7;
}

/* Organic morphing blobs in her palette */
.hero__blob {
    position: absolute;
    filter: blur(6px);
    opacity: .72;
    mix-blend-mode: multiply;
    z-index: 1;
}
.hero__blob--pink   { width: 38vw; height: 34vw; background: var(--periwinkle); top: -6%; left: -8%; border-radius: var(--blob-1); animation: morph 18s ease-in-out infinite; }
.hero__blob--blue   { width: 33vw; height: 35vw; background: var(--teal);       bottom: -12%; right: -6%; border-radius: var(--blob-2); animation: morph 23s ease-in-out infinite reverse; }
.hero__blob--yellow { width: 22vw; height: 22vw; background: var(--slate);      bottom: 8%; left: 8%; border-radius: var(--blob-3); animation: morph 27s ease-in-out infinite; }

@keyframes morph {
    0%,100% { border-radius: var(--blob-1); transform: translate(0,0) rotate(0deg); }
    33%     { border-radius: var(--blob-2); transform: translate(4%,-3%) rotate(8deg); }
    66%     { border-radius: var(--blob-3); transform: translate(-3%,4%) rotate(-6deg); }
}

/* The sun, peeking from behind her portrait */
.hero__sun {
    position: absolute;
    top: -18px;
    left: 50%;
    width: 320px;
    height: 320px;
    transform: translateX(-50%);
    background: var(--sun);
    border-radius: 50%;
    z-index: 0;
}

/* ============================================================
   Sections (shared)
   ============================================================ */
.section {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 6rem 1.5rem;
}
.section__head { margin-bottom: 3rem; max-width: 720px; }
.kicker {
    display: inline-block;
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: .2em;
    font-size: .78rem;
    color: var(--teal-deep);
    margin-bottom: .8rem;
}
.section h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.05;
    letter-spacing: -.02em;
}
.section__note { margin-top: 1rem; opacity: .75; }

/* Editable placeholders — visually flagged so you know what to fill in */
.edit-me {
    background: repeating-linear-gradient(45deg, rgba(255,211,44,.38), rgba(255,211,44,.38) 8px, rgba(255,211,44,.2) 8px, rgba(255,211,44,.2) 16px);
    padding: .1em .35em;
    border-radius: 4px;
    font-style: italic;
}

/* --- Tribute (centered) --- */
.tribute { text-align: center; }
.tribute .section__head { margin-left: auto; margin-right: auto; }
.tribute__body { max-width: 748px; margin: 0 auto; font-size: 1.15rem; }
.tribute__body p { margin-bottom: 1.4rem; }
.tribute__lead { font-family: var(--font-display); font-size: 1.4rem; line-height: 1.5; }

/* --- Her words / quotes --- */
.quote-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}
.quote {
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    padding: 2rem 1.6rem;
    position: relative;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.25rem;
    line-height: 1.4;
}
.quote::before {
    content: "\201C";
    position: absolute;
    top: -.3em; left: .3em;
    font-size: 4rem;
    opacity: .25;
}
.quote--pink   { background: var(--riso-pink); color: #fff; box-shadow: 6px 6px 0 var(--ink); }
.quote--blue   { background: var(--riso-blue); color: #fff; box-shadow: 6px 6px 0 var(--ink); }
.quote--yellow { background: var(--riso-yellow); color: var(--ink); box-shadow: 6px 6px 0 var(--ink); }
.words__link {
    margin-top: 3rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.2rem;
}
.words__link p { font-size: 1.1rem; }

/* --- Gallery --- */
/* Collage: masonry columns with varied tile sizes */
.gallery__grid {
    column-count: 3;
    column-gap: 1.1rem;
}
.tile {
    width: 100%;
    height: 240px;
    margin: 0 0 1.1rem;
    break-inside: avoid;
    border: 2px solid var(--ink);
    border-radius: 16px;
    display: flex;
    align-items: flex-end;
    padding: 1rem;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
/* Varied heights for a collaged feel */
.tile:nth-child(1) { height: 300px; }
.tile:nth-child(2) { height: 210px; }
.tile:nth-child(3) { height: 265px; }
.tile:nth-child(4) { height: 330px; }
.tile:nth-child(5) { height: 220px; }
.tile:nth-child(6) { height: 285px; }
.tile:hover { transform: translateY(-5px); box-shadow: 7px 7px 0 var(--ink); }

@media (max-width: 860px) { .gallery__grid { column-count: 2; } }
@media (max-width: 520px) { .gallery__grid { column-count: 1; } }
.tile figcaption {
    font-size: .9rem;
    background: var(--paper);
    border: 1.5px solid var(--ink);
    padding: .2rem .6rem;
    border-radius: 100px;
    position: relative;
    z-index: 2;
}
.tile--pink   { background-color: var(--periwinkle); }
.tile--blue   { background-color: var(--teal); }
.tile--yellow { background-color: var(--sun); }
/* halftone dot texture over tiles */
.tile::after {
    content: "";
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(0,0,0,.25) 1.5px, transparent 1.6px);
    background-size: 10px 10px;
    mix-blend-mode: multiply;
    opacity: .5;
    z-index: 1;
}

/* --- Memories --- */
/* Collage: bigger pebbles in masonry columns with varied sizes */
.memories__grid {
    column-count: 3;
    column-gap: 1.5rem;
}
.memory {
    width: 100%;
    break-inside: avoid;
    margin: 0 0 1.5rem;
    background: var(--paper-2);
    border: 2px solid var(--ink);
    border-radius: var(--blob-3);
    padding: 2.6rem 2.4rem;
    box-shadow: 8px 8px 0 var(--periwinkle);
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.memory:nth-child(2n) { border-radius: var(--blob-1); box-shadow: 8px 8px 0 var(--teal); }
.memory:nth-child(3n) { border-radius: var(--blob-2); box-shadow: 8px 8px 0 var(--sun); }
/* Varied sizes for a collaged feel */
.memory:nth-child(1) { min-height: 250px; }
.memory:nth-child(2) { min-height: 310px; }
.memory:nth-child(3) { min-height: 220px; }
.memory:nth-child(4) { min-height: 290px; }
.memory:nth-child(5) { min-height: 240px; }
.memory p { font-family: var(--font-display); font-size: 1.28rem; font-style: italic; margin-bottom: 1rem; }
.memory footer { font-size: .95rem; opacity: .7; }

@media (max-width: 860px) { .memories__grid { column-count: 2; } }
@media (max-width: 520px) { .memories__grid { column-count: 1; } }
.memories__cta { margin-top: 2.5rem; text-align: center; }
.memories__hint { margin-top: 1rem; font-size: .85rem; }

/* --- Donate --- */
.donate { max-width: var(--maxw); }
.donate__card {
    background: var(--teal-deep);
    color: #fff;
    border-radius: var(--blob-2);
    padding: clamp(2.5rem, 6vw, 4.5rem);
    text-align: center;
    box-shadow: 12px 12px 0 var(--ink);
    border: 2px solid var(--ink);
}
.donate__card .kicker { color: var(--sun); }
.donate__card h2 { margin-bottom: 1rem; }
.donate__card p { max-width: 46ch; margin: 0 auto 2rem; font-size: 1.15rem; }
.donate__card .edit-me { color: var(--ink); }
.donate__actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.donate__card .btn--solid { background: var(--sun); color: var(--ink); border-color: var(--ink); box-shadow: 5px 5px 0 var(--periwinkle); }
.donate__card .btn--ghost { color: #fff; border-color: var(--paper); box-shadow: 5px 5px 0 var(--sun); }
.donate__card .btn--ghost:hover { background: var(--sun); color: var(--ink); border-color: var(--ink); }

/* ============================================================
   Footer
   ============================================================ */
.footer {
    text-align: center;
    padding: 2.5rem 1.5rem;
    border-top: 2px solid var(--ink);
    margin-top: 2.5rem;
}
.footer__name { font-family: var(--font-display); font-weight: 700; font-size: 1.8rem; }
.footer__tag { opacity: .7; margin-top: .4rem; }
.footer__links { display: flex; gap: 1.4rem; justify-content: center; margin: 1.4rem 0; }
.footer__links a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.footer__made { font-family: var(--font-display); font-style: italic; opacity: .7; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 720px) {
    .nav__links {
        position: fixed;
        top: 0; right: 0;
        height: 100vh;
        width: min(78vw, 320px);
        background: var(--paper);
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 1.8rem;
        padding: 2rem 2.4rem;
        transform: translateX(100%);
        transition: transform .35s var(--ease);
        box-shadow: -10px 0 40px rgba(0,0,0,.15);
    }
    .nav__links.open { transform: translateX(0); }
    .nav__links a { font-size: 1.3rem; }
    .nav__toggle { display: flex; z-index: 1001; }
    .nav__toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav__toggle.open span:nth-child(2) { opacity: 0; }
    .nav__toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    .section { padding: 4rem 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; scroll-behavior: auto; }
}
