:root {
    --xxxxxx: rgb(216, 211, 200);
    --bg-clr: 216, 211, 200;
    --background-clr: rgb(var(--bg-clr));
    --foreground-clr: rgb(0, 0, 0);
    --backgorund-mid: rgb(195, 185, 207);
    --backgorund-mid-cta: rgb(171, 156, 190);
    --section-text-clr: rgb(46, 30, 30);

    --corner-shadow: 10px 0 10px -10px rgba(0, 0, 0, 0.5);
}


@media screen and (prefers-color-scheme: dark) {
    
    :root {
        --xxxxxx: rgb(36, 35, 33);
        --bg-clr: 36, 35, 33;
        --background-clr: rgb(var(--bg-clr));
        --foreground-clr: rgb(255, 255, 255);
        --backgorund-mid: rgb(65, 62, 71);
        --backgorund-mid-cta: rgb(78, 70, 89);
        --section-text-clr: rgb(229, 216, 216);

        --corner-shadow: 10px 0 10px -10px black;
    }
}



body {
    margin: 0;

    background: var(--background-clr);
    color: var(--foreground-clr);

    /* overflow-x: clip; */

    text-wrap: pretty;
}

.default-font {
    font-family: "Noto Serif", serif;
    font-optical-sizing: auto;
    font-weight: normal;
    font-style: normal;
    font-variation-settings:
        "wdth" 100;
}

h1 {
    text-align: center;
    font-size: clamp(1.8rem, 6vw, 3rem); 
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
}

.conrers-pinned {
    position: relative;
}

.conrers-pinned::before, .conrers-pinned::after {
    --shaddow-width: 4rem;
    --shaddow-offset: 4rem;

    content: '';
    position: absolute;
    width: var(--shaddow-width);
    aspect-ratio: 1;
    background: var(--background-clr);
    box-shadow: var(--corner-shadow);
    clip-path: polygon(50% 50%, 200% 200%, 200% -100%);
    /* clip-path: polygon(100% 0, 50% 50%, 100% 100%, 200% 200%, 200% -100%); */
}
.conrers-pinned::before {
    transform: rotate(45deg) translateX( calc( var(--shaddow-offset) * -1 ) );
}

.conrers-pinned::after {
    bottom: 0;
    right: 0;
    transform: rotate(225deg) translateX( calc( var(--shaddow-offset) * -1 ) );
}


p {
    max-width: 80ch;
}

.container > .content-align > div{
    position: relative;
    top: 50%;
    transform: translate(0, -50%);
    height: min-content;
}



.obituary {
    background: var(--backgorund-mid);

    grid-area: ob;
}

.obituary .inner-grid-container {
    max-height: max( min( 70vw, 700px), 500px);
    overflow: hidden;
}

.obituary .inner-grid-container::after {
    content: '';

    width: 100%;
    height: 14rem;

    position: absolute;
    bottom: 0;
    left: 0;

    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);

    -webkit-mask-image: -webkit-gradient(linear, left 70%, left top, from(rgba(0,0,0,1)), to(rgba(0,0,0,0)));
}

.obituary .button {
    position: absolute;

    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.inner-grid-container{
    padding: 1rem;
}

.date {
    background: var(--backgorund-mid);

    grid-area: date;

}

.date .inner-grid-container {
    text-align: center;
}

.share {

    background: var(--backgorund-mid-cta);

    grid-area: share;

    min-height: 20rem;
}

.share .inner-grid-container {
    margin: auto;
    text-align: center;
}
.share .inner-grid-container p {
    margin-inline: auto;
    /* text-align: left; */
}

.share h2 {
    font-size: 1.9rem;
}

.photo img {
    /* aspect-ratio: 2881 / 2662; */
    width: 100%;
    display: block;
}

.photo {
    aspect-ratio: 2881 / 2662;
    background: white;

    grid-area: photo;
}

.container {
    display: grid;
    
    gap: 1.2rem;

    grid-template-areas:
    'photo ob'
    'date ob'
    'date ob'
    'date ob'
    'date ob'
    'date ob'
    'date ob'
    'date ob'
    'date ob'
    'date ob'
    'date ob'
    'date ob'
    'share share';

    overflow: hidden;

    padding: 1.2rem;
}

.container > * {
    box-shadow: 0px 0px 8px -1px rgba(0,0,0,0.3);
    color: var(--section-text-clr);
}

section {
    --wrapper-max-width: 1200px;
    --wrapper-padding: 0px; /*1rem;*/
    
    width: min(var(--wrapper-max-width), 100% - var(--wrapper-padding)*2);
    margin-inline: auto;

    margin-bottom: 3rem;
}

@media screen and (max-width: 800px) {
    .container {
        grid-template-areas:
        'photo photo'
        'date date'
        'ob ob'
        'share share';
    }
    section {
        --wrapper-max-width: 600px;
    }
}

a {
    color: unset;
    text-decoration: none;
}
.button {
    font-size: 1rem;
    color: var(--foreground-clr);

    background: var(--background-clr);
    width: max-content;
    padding: 1rem 2rem;

    box-shadow: inset 0px 0px 10px rgba(0,0,0,0.5);

    border: 0;
    cursor: pointer;

    margin: auto;
    display: block;
}

p a {
    text-decoration: underline;
}

header {

    position: sticky;
    top: 0;
    left: 0;

    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);

    padding-top: 1rem;
    padding-bottom: 3rem;
    margin-bottom: -1.6rem;

    -webkit-mask-image: -webkit-gradient(linear, left 50%, left bottom, from(rgba(0,0,0,1)), to(rgba(0,0,0,0)));

    z-index: 10;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    width: 100%;
    height: 30px;
    background: linear-gradient(
        var(--background-clr) 0%, 
        rgba(var(--bg-clr), 0.9) 20%,
        rgba(var(--bg-clr), 0.5) 50%,
        rgba(var(--bg-clr), 0.1) 80%,
        rgba(var(--bg-clr), 0) 100%
        );
}


header * {
    margin: 0;
}

* {
    box-sizing: border-box;
}



#ob-content {
    max-width: 100%;
}



/* Dialog styles */

dialog {
    border: 0;
    background: var(--backgorund-mid);
    color: var(--foreground-clr);
    padding: 0;
    margin: auto;
}


dialog::backdrop {
    background: rgba(var(--bg-clr), 0.4);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}

dialog[open]::backdrop {
    -webkit-animation: show-bd 1s ease normal;
}
dialog.hide::backdrop {
    -webkit-animation: hide-bd 1s ease normal;
}

dialog[open] {
    -webkit-animation: show 1s ease normal;
}
dialog.hide {
    -webkit-animation: hide 1s ease normal;
}

@-webkit-keyframes show{
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}
@-webkit-keyframes hide{
    to {
        transform: scale(0.9);
        opacity: 0;
    }
}
@-webkit-keyframes show-bd{
    from {
        opacity: 0;
    }
    70% {
        opacity: 1;
    }
}
@-webkit-keyframes hide-bd{
    20% {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

