/* Phantasia: altarskåpet vid natt.
   Jungle-night ground, cream ink from the logo, old gold for frames and the one primary action,
   a cold moon edge for the active choice only. */

@font-face {
  font-family: "Grenze Gotisch";
  src: url("../fonts/grenze-gotisch-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/eb-garamond-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/eb-garamond-latin-wght-italic.woff2") format("woff2");
  font-weight: 400 800;
  font-style: italic;
  font-display: swap;
}

:root {
  --ground: #070d0a;
  --panel: #0d1812;
  --panel-deep: #08110c;
  --ink: #f1e4c3;
  --ink-soft: #cdbf9a;
  --gold: #e7b04a;
  --gold-bright: #f4c964;
  --gold-line: rgba(231, 176, 74, 0.62);
  --gold-faint: rgba(231, 176, 74, 0.26);
  --moon: #dce9ff;
  --error: #ff9a88;
  --on-gold: #1a1306;

  --display: "Grenze Gotisch", "Palatino Linotype", Palatino, serif;
  --body: "EB Garamond", Garamond, "Palatino Linotype", Georgia, serif;

  --step--1: 0.95rem;
  --step-0: 1.1875rem;
  --step-1: 1.5rem;
  --step-2: clamp(1.8rem, 1.4rem + 1.6vw, 2.5rem);
  --step-3: clamp(2.4rem, 1.6rem + 3.2vw, 3.9rem);

  --wrap: 1240px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-y: scroll;
  color-scheme: dark;
  scrollbar-color: rgba(231, 176, 74, 0.5) #0b1510;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--ground);
  background-image: linear-gradient(180deg, #0c1812 0, var(--ground) 38rem);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.6;
  caret-color: var(--gold);
  cursor: url("../images/cursor/drak-01.png") 0 0, auto;
}

main {
  flex: 1 0 auto;
}

::selection {
  background: var(--gold);
  color: var(--on-gold);
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.08;
  text-wrap: balance;
}

p {
  margin: 0 0 1.1em;
}

a {
  color: var(--ink);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  text-decoration-color: var(--gold-line);
  cursor: inherit;
}

a:hover {
  color: var(--gold-bright);
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: 0;
  z-index: 10;
  padding: 0.7rem 1rem;
  background: var(--gold);
  color: var(--on-gold);
  text-decoration: none;
  transform: translateY(-120%);
}

.skip:focus {
  transform: translateY(0);
}

.skip:hover {
  color: var(--on-gold);
}

/* ---------- Site header ---------- */

.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 1.1rem var(--gutter);
}

.brand {
  display: block;
  line-height: 0;
}

.brand img {
  width: clamp(140px, 18vw, 190px);
}

.site-nav {
  display: flex;
  gap: 0.25rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
}

.site-nav a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--moon);
}

.home .site-head {
  flex-direction: column;
  justify-content: center;
  padding-top: 1.6rem;
  padding-bottom: 1.3rem;
  gap: 0.35rem;
}

.home .brand img {
  width: clamp(210px, 24vw, 300px);
}

/* ---------- Altarpiece ---------- */

.altar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(0.75rem, 1.6vw, 1.5rem);
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0.5rem var(--gutter) 0;
  perspective: 1800px;
  grid-template-rows: 3.5rem auto;
}

.altar .wing-left {
  grid-column: 1;
  grid-row: 2;
}

.altar .panel-centre {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.altar .wing-right {
  grid-column: 3;
  grid-row: 2;
}

.wing,
.panel {
  position: relative;
  background: linear-gradient(180deg, #112019 0%, var(--panel) 38%, #0a130e 100%);
  border: 1px solid var(--gold-line);
  border-radius: 6px;
  box-shadow: 0 22px 36px -16px rgba(0, 0, 0, 0.85), 0 3px 8px rgba(0, 0, 0, 0.5);
}

.wing::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid var(--gold-faint);
  border-radius: 3px;
  pointer-events: none;
}

.wing {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.4rem, 2.6vw, 2.4rem);
}

.wing-left {
  transform-origin: left center;
}

.wing-right {
  transform-origin: right center;
}

.wing h1 {
  font-size: clamp(2.3rem, 1.3rem + 2.6vw, 3.6rem);
  margin-bottom: 1.1rem;
}

.wing h2 {
  font-size: var(--step-2);
  margin-bottom: 0.7rem;
}

.lead {
  font-size: 1.3rem;
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 0;
}

.muted {
  color: var(--ink-soft);
}

.arch {
  margin: 0;
  padding: 10px;
  border-radius: 999px 999px 6px 6px;
}

.arch img {
  width: 100%;
  height: 100%;
  min-height: 34rem;
  object-fit: cover;
  object-position: 40% 55%;
  border-radius: 999px 999px 3px 3px;
}

@media (prefers-reduced-motion: no-preference) and (min-width: 860px) {
  .wing-left {
    animation: open-left 1.5s var(--ease-out) 0.15s backwards;
  }

  .wing-right {
    animation: open-right 1.5s var(--ease-out) 0.15s backwards;
  }

  .panel-centre {
    animation: rise 1.2s var(--ease-out) backwards;
  }

  @keyframes open-left {
    from {
      transform: rotateY(78deg);
      filter: brightness(0.35);
    }
  }

  @keyframes open-right {
    from {
      transform: rotateY(-78deg);
      filter: brightness(0.35);
    }
  }

  @keyframes rise {
    from {
      transform: translateY(14px);
      opacity: 0.4;
    }
  }
}

/* ---------- Sections ---------- */

.section {
  max-width: var(--wrap);
  margin: clamp(4rem, 9vw, 7rem) auto 0;
  padding: 0 var(--gutter);
}

.section > h2,
.section-head h2 {
  font-size: var(--step-3);
  margin-bottom: 1.5rem;
}

.story {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  align-items: start;
}

.story h2 {
  font-size: var(--step-3);
  margin: 0;
}

.prose {
  max-width: 62ch;
}

.prose p:last-child {
  margin-bottom: 0;
}

.gatherings-teaser {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 2rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.teaser-link {
  display: block;
  text-decoration: none;
}

.teaser-link .frame {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border: 1px solid var(--gold-line);
  border-radius: 6px;
  box-shadow: 0 22px 36px -16px rgba(0, 0, 0, 0.85), 0 3px 8px rgba(0, 0, 0, 0.5);
}

.teaser-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 12%;
  transition: transform 0.7s var(--ease-out);
}

.teaser-link:hover img {
  transform: scale(1.03);
}

.teaser-link h3 {
  margin-top: 1rem;
  font-size: var(--step-1);
}

.teaser-link:hover h3 {
  color: var(--gold-bright);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.teaser-link p {
  margin: 0.15rem 0 0;
  color: var(--ink-soft);
}

/* ---------- Inner pages ---------- */

.page-head {
  max-width: var(--wrap);
  margin: clamp(1.5rem, 4vw, 3rem) auto 0;
  padding: 0 var(--gutter);
}

.page-head h1 {
  font-size: var(--step-3);
}

.page-head p {
  max-width: 54ch;
  margin: 0.9rem 0 0;
  color: var(--ink-soft);
  font-size: 1.25rem;
}

.upcoming {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: start;
  max-width: var(--wrap);
  margin: clamp(2rem, 5vw, 3.5rem) auto 0;
  padding: 0 var(--gutter);
}

.slab {
  position: relative;
  padding: clamp(1.4rem, 3vw, 2.6rem);
  background: linear-gradient(180deg, #112019 0%, var(--panel) 38%, #0a130e 100%);
  border: 1px solid var(--gold-line);
  border-radius: 6px;
  box-shadow: 0 22px 36px -16px rgba(0, 0, 0, 0.85), 0 3px 8px rgba(0, 0, 0, 0.5);
}

.slab::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid var(--gold-faint);
  border-radius: 3px;
  pointer-events: none;
}

.slab h2 {
  font-size: var(--step-2);
  margin-bottom: 0.6rem;
}

.slab > p:last-child {
  margin-bottom: 0;
}

.gathering {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(1.25rem, 4vw, 3.5rem);
  align-items: start;
  max-width: var(--wrap);
  margin: clamp(3rem, 7vw, 5.5rem) auto 0;
  padding: 0 var(--gutter);
}

.gathering .arch img {
  min-height: 0;
  height: auto;
  aspect-ratio: auto;
  object-position: center top;
}

.arch.flat,
.arch.flat img {
  border-radius: 6px;
}

.gathering h2 {
  font-size: var(--step-3);
}

.gathering .date {
  margin: 0.4rem 0 1.4rem;
  color: var(--ink-soft);
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
}

.gathering h3 {
  margin-bottom: 0.6rem;
  font-family: var(--body);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--gold);
}

.lineup {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 0.25rem 1.5rem;
  margin: 0 0 1.8rem;
  padding: 0;
  list-style: none;
  font-size: 1.3rem;
}

.lineup li {
  position: relative;
  padding-left: 1.1rem;
}

.lineup li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.8em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

.film {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--gold-line);
  border-radius: 6px;
  box-shadow: 0 22px 36px -16px rgba(0, 0, 0, 0.85);
}

/* ---------- Forms ---------- */

.field {
  margin-bottom: 1.1rem;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1rem;
}

label {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--ink-soft);
  font-size: var(--step--1);
  letter-spacing: 0.02em;
}

input[type="text"],
input[type="email"],
textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0.65rem 0.85rem;
  background: var(--panel-deep);
  color: var(--ink);
  border: 1px solid rgba(241, 228, 195, 0.4);
  border-radius: 3px;
  font: inherit;
  font-size: 1.1rem;
  line-height: 1.4;
  cursor: text;
}

textarea {
  min-height: 9rem;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--gold);
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

input:user-invalid,
textarea:user-invalid {
  border-color: var(--error);
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.55rem 1.5rem;
  background: var(--gold);
  color: var(--on-gold);
  border: 0;
  border-radius: 3px;
  box-shadow: 0 8px 14px -8px rgba(0, 0, 0, 0.9), 0 1px 0 rgba(255, 255, 255, 0.3) inset;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
  text-decoration: none;
  cursor: inherit;
}

.btn:hover {
  background: var(--gold-bright);
  color: var(--on-gold);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.6;
}

.form-status {
  margin: 0.9rem 0 0;
  color: var(--ink-soft);
}

.form-status:empty {
  margin: 0;
}

.form-status[data-state="ok"] {
  color: var(--ink);
}

.form-status[data-state="error"] {
  color: var(--error);
}

.signup .field {
  margin-bottom: 0.9rem;
}

/* ---------- Social ---------- */

.social {
  display: flex;
  gap: 0.75rem;
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
}

.social a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0 0.35rem;
  text-decoration: none;
}

.social svg {
  width: 26px;
  height: 26px;
  flex: none;
}

.social a:hover span {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

/* ---------- Music ---------- */

.player-wrap {
  max-width: var(--wrap);
  margin: clamp(1.5rem, 4vw, 2.5rem) auto 0;
  padding: 0 var(--gutter);
}

.player-wrap > * {
  max-width: 860px;
}

.now-title {
  font-family: var(--body);
  font-size: var(--step-2);
  font-weight: 600;
  line-height: 1.15;
}

.now-artist {
  margin: 0.25rem 0 1.2rem;
  color: var(--ink-soft);
  font-size: 1.25rem;
}

.mixcloud-widget {
  min-height: 120px;
  background: var(--panel);
  border: 1px solid var(--gold-line);
  border-radius: 6px;
  overflow: hidden;
}

.mixcloud-widget iframe {
  display: block;
  border: 0;
}

.elsewhere {
  margin: 0.9rem 0 0;
  color: var(--ink-soft);
}

.playlist {
  display: grid;
  gap: 0.6rem;
  margin-top: 2rem;
}

.track {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 0.6rem 1rem 0.6rem 0.6rem;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--gold-faint);
  border-radius: 4px;
  font: inherit;
  text-align: left;
  cursor: inherit;
}

.track:hover {
  border-color: var(--gold-line);
  background: #122219;
}

.track.active {
  border-color: var(--moon);
}

.track img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 3px;
}

.track .tt {
  display: block;
  font-family: var(--body);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.15;
}

.track .ta {
  display: block;
  color: var(--ink-soft);
}

.track .dur {
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  max-width: var(--wrap);
  margin: clamp(2rem, 5vw, 3.5rem) auto 0;
  padding: 0 var(--gutter);
  align-items: start;
}

.aside-stack {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2.5rem);
}

@media (min-width: 860px) {
  .contact-grid {
    align-items: stretch;
  }

  .aside-stack {
    grid-template-rows: auto 1fr;
  }
}

/* ---------- Footer ---------- */

.site-foot {
  max-width: var(--wrap);
  width: 100%;
  margin: clamp(4rem, 9vw, 7rem) auto 0;
  padding: 1.6rem var(--gutter) 2.2rem;
  border-top: 1px solid var(--gold-faint);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 2rem;
  color: var(--ink-soft);
}

.site-foot p {
  margin: 0;
}

.site-foot .motto {
  font-family: var(--display);
  font-size: 1.3rem;
  color: var(--ink);
}

/* ---------- Narrow screens ---------- */

@media (max-width: 859px) {
  .altar {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    max-width: 560px;
  }

  .altar .wing-left,
  .altar .panel-centre,
  .altar .wing-right {
    grid-column: auto;
    grid-row: auto;
  }

  .altar .panel-centre {
    order: 0;
    max-width: 440px;
    width: 100%;
    margin: 0 auto;
  }

  .altar .wing-left {
    order: 1;
  }

  .altar .wing-right {
    order: 2;
  }

  .wing {
    align-self: stretch;
  }

  .arch img {
    min-height: 0;
    aspect-ratio: 4 / 5;
  }

  .story,
  .upcoming,
  .gathering,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .gathering .arch {
    max-width: 440px;
  }

  .gatherings-teaser {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .site-head {
    flex-direction: column;
    gap: 0.2rem;
    padding-top: 1rem;
  }

  .brand img {
    width: 170px;
  }

  .home .brand img {
    width: 210px;
  }

  .site-nav a {
    padding: 0 0.85rem;
  }

  .field-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .track {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .track img {
    width: 52px;
    height: 52px;
  }

  .track .dur {
    display: none;
  }

  .social {
    flex-direction: column;
    gap: 0;
  }
}
