@font-face {
    font-family: "EB Garamond";
    src: url("EBGaramond-Regular.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "EB Garamond";
    src: url("EBGaramond-Italic.ttf") format("truetype");
    font-style: italic;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "EB Garamond";
    src: url("EBGaramond-Bold.ttf") format("truetype");
    font-style: bold;
    font-weight: 700;
    font-display: swap;
}

::selection {
  background-color: #f3d2a0;
  color: #11100e;
}


body {
    font-family: "EB Garamond", Georgia, serif;
    margin-inline: 0;
    background: url(bg.png);
    color: #f3d2a0;
    font-size: 18px;
    font-weight: 400;
}

body::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://w3.org/2000/svg' width='100%' height='100%'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noise)' opacity='0.3'/%3E%3C/svg%3E");
    pointer-events: none;
}

section {
    margin: 1em;
}

hr {
    border: 0;
    height: 1px;
    margin:0;
    background: rgba(226, 174, 102, 0);
    background: linear-gradient(90deg,rgba(226, 174, 102, 0) 0%, rgba(226, 174, 102, 1) 50%, rgba(226, 174, 102, 0) 100%);
}
button {
    font-family: inherit;
}

.title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 42px;
    color: #3e301a;
    top: 40px;
}

.title h1 {
    color: color-mix(in srgb, #8f764c var(--title-light, 0%), currentColor);
    font-weight: normal;
    letter-spacing: 18px;
    margin: 0;
}

#elapsed-days {
    font-weight: normal;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: .5em;
    z-index: 2;
    font-size: 2em;
    text-shadow: 0 0 17px black;
}

#candle {
    width: 100%;
    height: 60vh;
    background: transparent;
}

#candle:not([hidden]) {
    display: block;
}

.candle-scene {
    position: relative;
    width: 100%;
    background: radial-gradient(
        ellipse min(240px, 45vw) 44% at 50% 72%,
        rgb(104 121 146 / 14%),
        rgb(74 88 112 / 6%) 50%,
        transparent 100%
    );
}

.candle-scene:has(#candle[hidden]) {
    height: 0;
}

#candle {
    position: relative;
    z-index: 2;
    mask-image: linear-gradient(to bottom, black calc(100% - 44px), transparent);
}

#candle-glow {
    position: absolute;
    top: -50%;
    left: 0;
    width: 100%;
    height: 200%;
    z-index: 1;
    pointer-events: none;
    mix-blend-mode: screen;
}

progress[value] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border: none;
    background: #383025;
  border-radius: 15px;
}

progress[value]::-webkit-progress-bar {
  background-color: #383025;
  border-radius: 15px;
}

progress[value]::-moz-progress-bar {
    background-color: #f3d2a0;
    border-radius: 15px;
}

progress[value]::-webkit-progress-value {
    background: #f3d2a0;
    border-radius: 15px; 
}
