
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700&display=swap');

:root {
    --background: #f8f4ed;
    --background-soft: #fffdf9;
    --cream: #f1e8da;
    --gold: #b6975c;
    --gold-light: #d8c49b;
    --gold-dark: #927345;
    --text: #51483e;
    --text-soft: #887b6d;
    --rose: #b98585;
    --border: rgba(182, 151, 92, 0.25);
    --shadow: 0 15px 45px rgba(104, 79, 48, 0.08);
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(255,255,255,.95), transparent 55%),
        var(--background);
    color: var(--text);
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-weight: 400;
    line-height: 2;
}

::selection {
    background: var(--gold-light);
    color: #463a2b;
}

/* Background decoration */

.page-decoration {
    position: fixed;
    z-index: 0;
    width: 360px;
    height: 360px;
    pointer-events: none;
    opacity: .12;
    border: 1px solid var(--gold);
    border-radius: 50%;
}

.decoration-top {
    top: -220px;
    right: -170px;
    box-shadow:
        0 0 0 20px rgba(182,151,92,.08),
        0 0 0 45px rgba(182,151,92,.05);
}

.decoration-bottom {
    bottom: -240px;
    left: -180px;
    box-shadow:
        0 0 0 20px rgba(182,151,92,.08),
        0 0 0 45px rgba(182,151,92,.05);
}

.memorial-container {
    position: relative;
    z-index: 1;
    width: min(100% - 40px, 900px);
    margin: 0 auto;
    padding: 55px 0 35px;
}

/* Hero */

.hero {
    text-align: center;
}

.top-ornament {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 17px;
    margin-bottom: 24px;
    color: var(--gold);
}

.top-ornament span:not(.ornament-flower) {
    width: 65px;
    height: 1px;
    background: var(--gold-light);
}

.ornament-flower {
    font-size: 27px;
}

.eyebrow {
    color: var(--gold-dark);
    font-size: 13px;
    letter-spacing: 1px;
    font-weight: 500;
}

.hero h1 {
    margin-top: 12px;
    color: #65513d;
    font-size: clamp(27px, 5vw, 43px);
    font-weight: 600;
    line-height: 1.8;
}

.hero h1 span {
    display: block;
    margin-top: 2px;
    color: var(--gold-dark);
    font-size: .68em;
    font-weight: 400;
}

.hero-divider {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 23px auto 27px;
    color: var(--gold);
    font-size: 16px;
}

.hero-divider::before,
.hero-divider::after {
    content: "";
    width: 70px;
    height: 1px;
    margin: 0 12px;
    background: var(--gold-light);
}

/* Portrait */

.portrait-frame {
    position: relative;
    width: min(360px, 82vw);
    aspect-ratio: 4 / 5;
    margin: 0 auto;
    padding: 11px;
    border: 1px solid var(--gold);
    border-radius: 190px 190px 18px 18px;
    background: rgba(255,255,255,.55);
    box-shadow:
        0 0 0 6px rgba(255,255,255,.5),
        0 0 0 7px rgba(182,151,92,.3),
        0 20px 50px rgba(91,67,40,.14);
}

.portrait-inner {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 180px 180px 10px 10px;
    background: var(--cream);
}

.grandmother-photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.portrait-corner {
    position: absolute;
    width: 26px;
    height: 26px;
    border-color: var(--gold-dark);
    border-style: solid;
    opacity: .8;
}

.corner-top {
    top: -9px;
    right: -9px;
    border-width: 2px 2px 0 0;
}

.corner-bottom {
    bottom: -9px;
    left: -9px;
    border-width: 0 0 2px 2px;
}

.portrait-caption {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 27px;
    color: var(--gold-dark);
}

.portrait-caption span {
    color: var(--rose);
    font-size: 17px;
}

.portrait-caption p {
    font-size: 13px;
    font-weight: 400;
}

/* Shared section heading */

.memory-section,
.audio-section {
    margin-top: 85px;
}

.section-heading {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    text-align: center;
}

.section-heading h2 {
    color: #715b40;
    font-size: clamp(20px, 3.5vw, 26px);
    font-weight: 500;
}

.heading-flower {
    color: var(--rose);
    font-size: 22px;
}

/* Memorial message */

.memory-card {
    position: relative;
    padding: 42px 48px;
    border: 1px solid var(--border);
    border-radius: 5px 45px 5px 45px;
    background: rgba(255, 253, 249, .8);
    box-shadow: var(--shadow);
    text-align: center;
}

.memory-card::before,
.memory-card::after {
    position: absolute;
    color: var(--gold-light);
    font-family: Georgia, serif;
    font-size: 65px;
    line-height: 1;
}

.memory-card::before {
    content: "“";
    top: 7px;
    right: 18px;
}

.memory-card::after {
    content: "”";
    bottom: 4px;
    left: 18px;
}

.memory-card p {
    margin-bottom: 20px;
    color: var(--text);
    font-size: 15px;
    font-weight: 300;
    line-height: 2.6;
}

.memory-card p:nth-child(2) {
    color: var(--gold-dark);
    font-size: 19px;
    font-weight: 600;
}

.final-words {
    margin-top: 30px;
    color: #8b6748;
    font-size: 18px;
    font-weight: 600;
    line-height: 2.2;
}

.heart-decoration {
    margin: 13px 0;
    color: var(--rose);
    font-size: 20px;
}

.memory-card .signature {
    margin: 0;
    color: var(--text-soft);
    font-size: 13px;
}

/* Audio section */

.audio-section {
    margin-top: 95px;
}

.audio-intro {
    margin-bottom: 8px;
    color: var(--gold-dark);
    text-align: center;
    font-size: 19px;
    font-weight: 500;
}

.audio-description {
    max-width: 650px;
    margin: 0 auto 32px;
    color: var(--text-soft);
    text-align: center;
    font-size: 14px;
    font-weight: 300;
    line-height: 2.5;
}

.audio-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.audio-card {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    min-width: 0;
    padding: 17px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: rgba(255, 253, 249, .88);
    box-shadow: 0 7px 22px rgba(104, 79, 48, .045);
    transition: transform .25s ease, box-shadow .25s ease;
}

.audio-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(104, 79, 48, .09);
}

.audio-number {
    display: flex;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gold-light);
    border-radius: 50%;
    color: var(--gold-dark);
    font-size: 12px;
    direction: ltr;
}

.audio-info {
    flex: 1;
    min-width: 0;
}

.audio-info h3 {
    color: #67523b;
    font-size: 16px;
    font-weight: 600;
}

.audio-info span {
    display: block;
    color: #a19484;
    font-size: 11px;
}

.audio-card audio {
    display: block;
    width: 100%;
    height: 38px;
    margin-top: 5px;
    accent-color: var(--gold-dark);
}

/* Footer */

.memorial-footer {
    margin-top: 90px;
    padding: 35px 15px 15px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-flower {
    color: var(--rose);
    font-size: 35px;
}

.footer-quote {
    margin-top: 12px;
    color: #806a50;
    font-size: 16px;
    font-weight: 400;
}

.footer-love {
    margin-top: 8px;
    color: var(--text-soft);
    font-size: 12px;
}

.footer-hearts {
    margin-top: 18px;
    color: var(--rose);
    font-size: 16px;
    letter-spacing: 5px;
}

/* Responsive */

@media (max-width: 650px) {
    .memorial-container {
        width: min(100% - 28px, 520px);
        padding-top: 35px;
    }

    .memory-section {
        margin-top: 65px;
    }

    .audio-section {
        margin-top: 70px;
    }

    .memory-card {
        padding: 34px 22px;
        border-radius: 5px 30px 5px 30px;
    }

    .memory-card p {
        font-size: 14px;
        line-height: 2.5;
    }

    .final-words {
        font-size: 16px;
    }

    .audio-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .audio-card {
        padding: 14px;
    }

    .audio-description {
        font-size: 13px;
    }

    .portrait-caption p {
        font-size: 12px;
    }

    .memorial-footer {
        margin-top: 65px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
