/* The civil season sets the landscape and the base palette. */
:root[data-calendar-season="winter"] {
  --paper:#ecedea;
  --surface:#f8f8f3;
  --rule:#cbd0ca;
  --theme:#273b3d;
  --hero-edge:#4c6265;
  --accent:#dadbb3;
  --wash:#dde5e2;
  --focus:#496264;
  --sky:#657d84;
  --distant:#a3b4b8;
  --near:#2d474c;
  --sun-x:69%;
  --sun-y:27%;
  --sun-size:17%;
  --far-shape:polygon(0 62%, 17% 42%, 29% 48%, 48% 21%, 56% 28%, 66% 26%, 84% 52%, 100% 44%, 100% 100%, 0 100%);
  --near-shape:polygon(0 46%, 14% 41%, 26% 47%, 37% 56%, 61% 69%, 75% 58%, 91% 50%, 100% 58%, 100% 100%, 0 100%);
}

:root[data-calendar-season="spring"] {
  --paper:#eef0e7;
  --surface:#fafaf5;
  --rule:#ccd4c4;
  --theme:#293f32;
  --hero-edge:#45604a;
  --accent:#dfd399;
  --wash:#e1e9d9;
  --focus:#496247;
  --sky:#789283;
  --distant:#a4aa78;
  --near:#354c3b;
  --sun-x:61%;
  --sun-y:37%;
  --sun-size:24%;
  --far-shape:polygon(0 64%, 17% 54%, 30% 35%, 45% 31%, 55% 36%, 76% 57%, 92% 46%, 100% 43%, 100% 100%, 0 100%);
  --near-shape:polygon(0 67%, 21% 70%, 43% 63%, 57% 53%, 70% 50%, 84% 55%, 100% 70%, 100% 100%, 0 100%);
}

:root[data-calendar-season="summer"] {
  --paper:#f0eee3;
  --surface:#faf9f0;
  --rule:#d4d2bb;
  --theme:#343e2b;
  --hero-edge:#5c6240;
  --accent:#edd088;
  --wash:#e6e8d4;
  --focus:#626140;
  --sky:#7c8462;
  --distant:#aaa571;
  --near:#555c39;
  --sun-x:70%;
  --sun-y:33%;
  --sun-size:31%;
  --far-shape:polygon(0 51%, 18% 56%, 39% 55%, 53% 50%, 68% 39%, 81% 38%, 100% 42%, 100% 100%, 0 100%);
  --near-shape:polygon(0 66%, 14% 62%, 28% 58%, 45% 59%, 67% 67%, 86% 71%, 100% 68%, 100% 100%, 0 100%);
}

:root[data-calendar-season="autumn"] {
  --paper:#f3ede3;
  --surface:#fcf8f0;
  --rule:#ddceba;
  --theme:#45342a;
  --hero-edge:#684633;
  --accent:#edc28b;
  --wash:#ede0ce;
  --focus:#825538;
  --sky:#927362;
  --distant:#b3835e;
  --near:#6b4934;
  --sun-x:67%;
  --sun-y:49%;
  --sun-size:27%;
  --far-shape:polygon(0 48%, 12% 49%, 22% 46%, 38% 35%, 48% 37%, 60% 47%, 75% 55%, 86% 53%, 100% 48%, 100% 100%, 0 100%);
  --near-shape:polygon(0 72%, 13% 64%, 24% 63%, 37% 68%, 56% 65%, 76% 54%, 88% 51%, 100% 55%, 100% 100%, 0 100%);
}

/* The church season supplies the dominant colors. The landscape follows the month. */
:root[data-liturgical-theme="advent"] {
  --theme:#203c32;
  --hero-edge:#375b49;
  --accent:#e3c17e;
  --paper:#f0f1e7;
  --wash:#e0e9db;
  --focus:#826031;
}
:root[data-liturgical-theme="christmas"] {
  --theme:#302826;
  --hero-edge:#5b3931;
  --accent:#f5d49a;
  --paper:#f5eee3;
  --wash:#ede2d1;
  --focus:#854b3d;
}
:root[data-liturgical-theme="epiphany"] {
  --theme:#233445;
  --hero-edge:#385970;
  --accent:#e3d3a6;
  --paper:#eef0f0;
  --wash:#e1e8ed;
  --focus:#45677f;
}
:root[data-liturgical-theme="lent"] {
  --theme:#382e3d;
  --hero-edge:#5c465c;
  --accent:#e4c8ad;
  --paper:#f0ecec;
  --wash:#e7dde6;
  --focus:#76566d;
}
:root[data-liturgical-theme="holy-week"] {
  --theme:#482b2f;
  --hero-edge:#633a3a;
  --accent:#ecc5a0;
  --paper:#f4ece8;
  --wash:#eadbd6;
  --focus:#8a4f4d;
}
:root[data-liturgical-theme="passion"] {
  --theme:#29292a;
  --hero-edge:#443b3e;
  --accent:#dfc9bb;
  --paper:#f1eeee;
  --wash:#e5dedf;
  --focus:#70585e;
}
:root[data-liturgical-theme="easter"] {
  --theme:#393826;
  --hero-edge:#635d39;
  --accent:#f6dca2;
  --paper:#f6f1e4;
  --wash:#ede7cf;
  --focus:#80642d;
}
:root[data-liturgical-theme="pentecost"] {
  --theme:#532b24;
  --hero-edge:#824632;
  --accent:#f5c28a;
  --paper:#f5ebe4;
  --wash:#f0ded2;
  --focus:#934b36;
}

#calendar-season:not(:empty) {
  border-inline-start:1px solid currentColor;
  padding-inline-start:.7rem;
  color:#f0eee2;
}

.hero-text {position:relative;z-index:1}
.hero::after {
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(90deg, var(--theme) 8%, transparent 74%);
  pointer-events:none;
}
.hero-art {
  position:absolute;
  right:clamp(1.6rem, 6.5vw, 5rem);
  bottom:-1.1rem;
  width:clamp(13rem, 29vw, 20rem);
  height:calc(100% - 1.3rem);
  pointer-events:none;
  color:var(--accent);
}
.hero-art::before,.hero-art::after,.window {
  position:absolute;
  border-radius:50% 50% 0 0 / 60% 60% 0 0;
}
.hero-art::before,.hero-art::after {
  content:"";
  border:1px solid currentColor;
  inset:0 -.7rem -.5rem;
  opacity:.55;
}
.hero-art::after {
  inset:.6rem 0 -.5rem;
  opacity:.32;
}
.window {
  inset:1.25rem .72rem 0;
  overflow:hidden;
  background:linear-gradient(165deg, var(--sky, #67817a), var(--hero-edge) 95%);
  box-shadow:inset 0 0 1.75rem #19171547;
}
.sun {
  position:absolute;
  top:var(--sun-y, 28%);
  left:var(--sun-x, 65%);
  width:var(--sun-size, 22%);
  aspect-ratio:1;
  border-radius:50%;
  transform:translate(-50%,-50%);
  background:currentColor;
  box-shadow:0 0 1.35rem color-mix(in srgb, currentColor 42%, transparent);
  opacity:.88;
}
.ridge {position:absolute;inset:0}
.ridge-far {background:var(--distant, #829389);clip-path:var(--far-shape, polygon(0 38%, 50% 55%, 100% 32%, 100% 100%, 0 100%));opacity:.74}
.ridge-near {background:var(--near, #50655a);clip-path:var(--near-shape, polygon(0 70%, 55% 53%, 100% 62%, 100% 100%, 0 100%))}
.window-cross {
  position:absolute;
  left:50%;
  bottom:0;
  height:68%;
  width:1px;
  background:currentColor;
  opacity:.75;
}
.window-cross::after {
  content:"";
  position:absolute;
  left:50%;
  top:27%;
  width:4.1rem;
  height:1px;
  transform:translateX(-50%);
  background:currentColor;
}

@media (max-width: 640px) {
  .hero-art {right:-4rem;width:15rem;opacity:.55}
  .hero::after {background:linear-gradient(90deg,var(--theme) 16%,transparent 100%)}
}

@media (forced-colors: active) {
  .hero-art,.hero::after {display:none}
}
