@font-face {
  font-family: "Alegreya";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/alegreya-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Alegreya";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/alegreya-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Alegreya";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/alegreya-normal-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Alegreya";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/alegreya-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Alegreya";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/alegreya-normal-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Alegreya";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/alegreya-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IM Fell English SC";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/im-fell-english-sc-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --px: 2px;
  --page: #0e0c0c;
  --inner: #282627;
  --inner-edge: #161515;
  --text: #c9c0b3;
  --muted: #8f867d;
  --heading: #ddd2bf;
  --rim: #8f3857;
  --focus: #c9a35b;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--page);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--text);
  font: 400 1.125rem/1.65 "Alegreya", Georgia, serif;
  padding: 24px 16px 32px;
}

img {
  image-rendering: pixelated;
}

.masthead {
  position: relative;
  max-width: 1024px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #151a14 url("assets/forest_storm.jpg") center / cover;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.masthead-video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.masthead-title {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 16px 4%;
  text-align: center;
  background:
    radial-gradient(ellipse 48% 38% at 50% 48%, rgba(10, 8, 8, 0.6), rgba(10, 8, 8, 0) 100%),
    linear-gradient(to bottom, rgba(14, 12, 12, 0.35), rgba(14, 12, 12, 0) 30%, rgba(14, 12, 12, 0) 65%, rgba(14, 12, 12, 0.55));
}

.masthead h1 {
  margin: 0;
  width: min(500px, 68%);
}

.logo {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: auto;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.85));
}

.tagline {
  margin: 10px 0 0;
  font: italic 400 1.4rem/1.3 "Alegreya", Georgia, serif;
  color: var(--heading);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9), 0 1px 0 rgba(0, 0, 0, 0.9);
}

.bar-logo {
  flex: none;
  display: flex;
  align-items: center;
  height: calc(32 * var(--px));
  max-width: 0;
  margin-right: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: max-width 0.35s ease, margin-right 0.35s ease, opacity 0.35s ease, visibility 0s linear 0.35s;
}

.bar-logo img {
  display: block;
  height: calc(22 * var(--px));
  width: auto;
  max-width: none;
  image-rendering: auto;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.7));
}

.menubar.show-logo .bar-logo {
  max-width: calc(80 * var(--px));
  margin-right: calc(8 * var(--px));
  opacity: 1;
  visibility: visible;
  transition: max-width 0.35s ease, margin-right 0.35s ease, opacity 0.35s ease, visibility 0s;
}

.bar-logo:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.menubar {
  position: sticky;
  top: 0;
  z-index: 10;
  max-width: 1024px;
  margin: 0 auto;
  padding: calc(4 * var(--px)) calc(19 * var(--px)) calc(6 * var(--px));
  background: #241d1b url("assets/wood_tile.jpg") 0 0 / 877px 425px repeat;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55);
}

.sheet {
  max-width: 1024px;
  margin: 0 auto;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.corner {
  position: absolute;
  width: calc(24 * var(--px));
  height: calc(24 * var(--px));
  pointer-events: none;
}

.corner-tl { top: 0; left: 0; }
.corner-tr { top: 0; right: 0; }
.corner-bl { bottom: 0; left: 0; }
.corner-br { bottom: 0; right: 0; }

.bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-left: calc(4 * var(--px));
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: calc(2 * var(--px));
  position: relative;
  z-index: 1;
}

.tab,
.discord {
  display: flex;
  align-items: center;
  height: calc(32 * var(--px));
  border: 0 solid transparent;
  border-image: url("assets/button.png") 12 fill / calc(12 * var(--px)) stretch;
  image-rendering: pixelated;
  filter: brightness(0.8);
  transition: filter 0.15s;
  text-decoration: none;
}

.tab {
  padding-right: calc(11 * var(--px));
  color: var(--heading);
  font: 400 1.3rem/1 "IM Fell English SC", Georgia, serif;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.7);
}

.tab img {
  flex: none;
  width: calc(32 * var(--px));
  height: calc(32 * var(--px));
  margin-right: calc(-3 * var(--px));
}

.tab span {
  padding-bottom: 2px;
}

.tab:hover,
.discord:hover {
  filter: brightness(0.95);
}

.tab[aria-current="true"] {
  filter: brightness(1.15);
}

.tab:focus-visible,
.discord:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

.social {
  display: flex;
  gap: calc(2 * var(--px));
  margin-left: auto;
}

.discord {
  flex: none;
  justify-content: center;
  width: calc(32 * var(--px));
}

.discord svg {
  width: calc(16 * var(--px));
  height: calc(16 * var(--px));
  fill: #fff;
}

.inner {
  display: block;
  padding: 44px clamp(20px, 5vw, 56px);
  scroll-margin-top: calc(42 * var(--px));
  background: var(--inner) url("assets/inner_tile.png") 0 0 / calc(433 * var(--px)) calc(167 * var(--px)) repeat;
  image-rendering: pixelated;
  border: var(--px) solid var(--inner-edge);
  border-top: 0;
}

.inner + .inner {
  margin-top: 24px;
  border-top: var(--px) solid var(--inner-edge);
}

.page {
  max-width: 62ch;
  margin-inline: auto;
  image-rendering: auto;
}

.page > :last-child {
  margin-bottom: 0;
}

.page + .page {
  margin-top: 56px;
}

.page h2 {
  margin: 0 0 12px;
  text-align: center;
  font: 400 1.9rem/1.2 "IM Fell English SC", Georgia, serif;
  color: var(--heading);
}

.page h3 {
  margin: 24px 0 8px;
  font: 400 1.35rem/1.2 "IM Fell English SC", Georgia, serif;
  color: var(--heading);
}

.hero-cut {
  position: relative;
  border: 1px solid #0b0909;
  outline: 1px solid rgba(221, 210, 191, 0.22);
  outline-offset: 3px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.6);
}

.hero-cut::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 240, 215, 0.1), inset 0 0 18px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.row-media video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
}

.page p {
  margin: 0 0 14px;
}

.page strong {
  font-weight: 500;
  color: var(--heading);
}

.imprint-owner {
  display: block;
  image-rendering: auto;
}

.text-link {
  color: var(--heading);
  text-decoration-color: var(--rim);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.text-link:hover {
  text-decoration-color: var(--heading);
}

.page .intro {
  max-width: 56ch;
  margin: 0 auto 14px;
  text-align: center;
  font-size: 1.2rem;
}

.tiles-title {
  text-align: center;
}

.page .tiles-title {
  margin: 30px 0 16px;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 0 0 30px;
  padding: 0;
  list-style: none;
}

.tiles li,
.join-card {
  position: relative;
  background: rgba(14, 12, 12, 0.45);
  border: 1px solid #0b0909;
  outline: 1px solid rgba(221, 210, 191, 0.12);
  outline-offset: -5px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}

.tiles li {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 96px;
  padding: 18px 20px;
  text-align: center;
  line-height: 1.4;
  color: var(--heading);
}

.tiles li::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  background: var(--rim);
  transform: rotate(45deg);
}

#vision .page .intro {
  margin-bottom: 36px;
}

.row {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px;
  align-items: center;
  margin-bottom: 44px;
}

.row-flip {
  grid-template-columns: 1fr 1.3fr;
}

.row-flip .row-media {
  order: 2;
}

.page .row-text h3 {
  margin-top: 0;
}

.row-text p:last-child {
  margin-bottom: 0;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 64px;
  margin: 6px 0 0;
  padding: 0 24px 2px 20px;
  border: 0 solid transparent;
  border-image: url("assets/button.png") 12 fill / 24px stretch;
  image-rendering: pixelated;
  filter: brightness(0.95);
  transition: filter 0.15s;
  color: var(--heading);
  font: 400 1.45rem/1 "IM Fell English SC", Georgia, serif;
  text-decoration: none;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.7);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.cta-row .cta {
  margin: 0;
}

.cta:hover {
  filter: brightness(1.15);
}

.cta:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.cta svg {
  flex: none;
  width: 28px;
  height: 28px;
  fill: #fff;
}

.footer {
  max-width: 1024px;
  margin: 24px auto 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer a {
  color: var(--muted);
  text-underline-offset: 3px;
}

.footer a:hover {
  color: var(--heading);
}

#home .page,
#vision .page,
#join .page {
  max-width: 860px;
}

.join-card {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 28px 36px;
}

.join-text {
  flex: 1 1 0;
  min-width: 0;
}

.oak-grow {
  --s: 1.5;
  flex: none;
  padding-top: calc(20px * var(--s));
}

.oak {
  position: relative;
  width: calc(158px * var(--s));
  height: calc(190px * var(--s));
}

.oak img {
  position: absolute;
  left: calc(var(--x) * 1px * var(--s));
  top: calc(var(--y) * 1px * var(--s));
  width: calc(var(--w) * 1px * var(--s));
  height: calc(var(--h) * 1px * var(--s));
  image-rendering: pixelated;
}

.l-roots { --x: 34; --y: 150; --w: 84; --h: 40; }
.l-stump { --x: 53; --y: 141; --w: 45; --h: 36; }
.l-trunk { --x: 2; --y: 0; --w: 156; --h: 154; }
.l-foliage { --x: 0; --y: 0; --w: 158; --h: 149; }

.oak .l-roots { animation: oak-roots 9s ease-out infinite; }
.oak .l-stump { animation: oak-stump 9s ease-out infinite; }
.oak .l-trunk { animation: oak-trunk 9s ease-out infinite; }
.oak .l-foliage { animation: oak-foliage 9s cubic-bezier(0.3, 1.4, 0.5, 1) infinite; }

@keyframes oak-roots {
  0% { opacity: 0; clip-path: inset(0 50% 0 50%); }
  10%, 92% { opacity: 1; clip-path: inset(0 0 0 0); }
  100% { opacity: 0; }
}

@keyframes oak-stump {
  0%, 8% { opacity: 0; clip-path: inset(100% 0 0 0); }
  18%, 92% { opacity: 1; clip-path: inset(0 0 0 0); }
  100% { opacity: 0; }
}

@keyframes oak-trunk {
  0%, 16% { opacity: 0; clip-path: inset(100% 0 0 0); }
  17% { opacity: 1; }
  40%, 92% { opacity: 1; clip-path: inset(0 0 0 0); }
  100% { opacity: 0; }
}

@keyframes oak-foliage {
  0%, 42% { opacity: 0; translate: 0 -40px; }
  52%, 92% { opacity: 1; translate: 0 0; }
  100% { opacity: 0; }
}

@media (max-width: 760px) {
  .join-card {
    flex-direction: column;
    align-items: center;
    padding: 24px 20px;
    text-align: center;
  }

  .cta-row {
    justify-content: center;
  }

  .tiles {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .tiles li {
    min-height: 84px;
    padding: 14px 12px;
    font-size: 1rem;
  }

  .row,
  .row-flip {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .row-flip .row-media {
    order: 0;
  }


  .oak-grow {
    --s: 1.25;
  }
}

@media (max-width: 560px) {
  .bar {
    --px: 1px;
    gap: 4px;
  }

  .tabs {
    gap: 4px;
  }

  .tab {
    padding-right: 7px;
    font-size: 0.95rem;
  }

  .tab img {
    margin-right: 2px;
  }

  body {
    padding-top: 16px;
  }

  .masthead {
    aspect-ratio: 4 / 3;
  }

  .masthead h1 {
    width: 78%;
  }

  .tagline {
    font-size: 1.05rem;
  }

  .menubar {
    --px: 1px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .bar {
    margin-left: 0;
  }

  .inner {
    padding: 28px 18px;
  }

  .inner + .inner {
    margin-top: 16px;
  }
}

@media (max-width: 360px) {
  .tab img {
    display: none;
  }

  .tab {
    padding-left: 7px;
  }
}
