@font-face {
  font-family: 'Alegreya';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("../fonts/alegreya-var.woff2") format("woff2");
}

@font-face {
  font-family: 'Alegreya';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/alegreya-italic-400.woff2") format("woff2");
}

@font-face {
  font-family: 'Alegreya SC';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/alegreya-sc-500.woff2") format("woff2");
}

@font-face {
  font-family: 'Alegreya SC';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/alegreya-sc-700.woff2") format("woff2");
}

:root {
  --linen: #ede4d0;
  --undyed: #f7f2e6;
  --woad: #2c4a7a;
  --madder: #a8352a;
  --weld: #d8b54a;
  --thread: #2a2522;
  --moss: #4f6b3a;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Alegreya", Georgia, serif;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--thread);
  background-color: var(--linen);
  background-image:
    repeating-linear-gradient(0deg, rgba(42, 37, 34, 0.03) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(42, 37, 34, 0.03) 0 1px, transparent 1px 4px);
}

h1,
h2,
h3 {
  font-family: "Alegreya SC", Georgia, serif;
  color: var(--woad);
  line-height: 1.2;
}

h1 {
  margin: 0 0 20px;
  font-size: clamp(2rem, 7vw, 3rem);
  font-weight: 700;
}

h2 {
  margin: 48px 0 14px;
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 700;
}

h3 {
  margin: 24px 0 8px;
  font-size: 1.35rem;
  font-weight: 500;
}

p,
ul,
ol {
  margin: 0 0 16px;
}

main p,
main li {
  max-width: 68ch;
}

a {
  color: var(--woad);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

a:hover {
  color: var(--madder);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--madder);
  outline-offset: 3px;
}

img {
  max-width: 100%;
  height: auto;
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.row p {
  flex: 1 1 260px;
  margin: 0;
}

.band {
  padding: 20px 16px 0;
  background: var(--woad);
  color: var(--linen);
  text-align: center;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  color: var(--linen);
  font-family: "Alegreya SC", Georgia, serif;
  font-size: 2.25rem;
  font-weight: 700;
  text-decoration: none;
}

.mark:hover {
  color: var(--weld);
}

.motto {
  max-width: 560px;
  margin: 10px auto 0;
  padding: 10px 0 16px;
  border-top: 2px dashed var(--weld);
  font-size: 1rem;
}

.tabs {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 6px;
  margin-bottom: -18px;
}

.tabs a {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 6px 16px 20px;
  background: var(--madder);
  color: var(--linen);
  font-family: "Alegreya SC", Georgia, serif;
  font-size: 1.05rem;
  font-weight: 500;
  text-decoration: none;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 16px), 50% 100%, 0 calc(100% - 16px));
  transition: background-color 0.2s;
}

.tabs a:hover {
  background: var(--moss);
  color: var(--linen);
}

.tabs a[aria-current="page"] {
  background: var(--weld);
  color: var(--thread);
}

.tabs a:focus-visible {
  outline: 3px solid var(--thread);
  outline-offset: -6px;
  text-decoration: underline;
}

.rest {
  padding: 30px 0 14px;
  background: var(--weld);
  color: var(--thread);
}

main {
  padding-top: 44px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 24px;
  border: 0;
  background: var(--woad);
  color: var(--linen);
  font-family: "Alegreya SC", Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
  transition: background-color 0.2s;
}

.btn:hover {
  background: var(--madder);
  color: var(--linen);
}

.btn:focus-visible {
  outline: 3px solid var(--weld);
  outline-offset: -6px;
}

.stitched {
  position: relative;
  padding: 22px;
  border: 3px solid var(--madder);
  background: var(--undyed);
}

.stitched::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 2px dashed var(--weld);
  pointer-events: none;
}

.arrows {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.strip {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0;
  padding: 0 0 14px;
  list-style: none;
}

.panel {
  display: flex;
  flex-direction: column;
}

.panel h3 {
  margin-top: 0;
}

.panel .btn {
  align-self: flex-start;
  margin-top: auto;
}

.emblem {
  display: block;
  width: 100%;
  margin-bottom: 14px;
  border: 2px solid var(--woad);
}

.by {
  margin-bottom: 10px;
  color: var(--moss);
  font-style: italic;
}

.facts {
  padding-left: 22px;
}

.facts li {
  margin-bottom: 6px;
}

@media (min-width: 760px) {
  .strip {
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
  }

  .panel {
    flex: 0 0 340px;
    scroll-snap-align: start;
  }
}

.tale {
  display: grid;
  gap: 18px;
  margin-bottom: 28px;
}

.tale h2 {
  margin-top: 0;
}

@media (min-width: 700px) {
  .tale {
    grid-template-columns: 260px 1fr;
    align-items: start;
  }
}

.nudge {
  margin-top: 40px;
  padding: 16px 20px;
  border-left: 5px solid var(--moss);
  background: var(--undyed);
}

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

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  font-size: 1rem;
}

.crumbs li + li::before {
  content: "\203A";
  margin: 0 10px;
  color: var(--madder);
}

.crumbs a {
  display: inline-block;
  padding: 10px 0;
}

.frame {
  position: relative;
  width: 100%;
  max-width: 1000px;
  aspect-ratio: 3 / 4;
  min-height: 480px;
  border: 3px solid var(--madder);
  background: var(--woad);
  color: var(--linen);
}

.frame iframe {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  border: 0;
}

.wait {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 24px;
  text-align: center;
}

main .wait {
  max-width: none;
}

@media (min-width: 700px) {
  .frame {
    aspect-ratio: 16 / 9;
    min-height: 0;
  }
}

.under {
  max-width: 1000px;
  margin-top: 12px;
  font-size: 1rem;
  font-style: italic;
}

.sheet {
  width: 100%;
  max-width: 720px;
  border-collapse: collapse;
  background: var(--undyed);
}

.sheet th,
.sheet td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(168, 53, 42, 0.35);
  text-align: left;
  vertical-align: top;
}

.sheet th {
  width: 34%;
  color: var(--woad);
  font-family: "Alegreya SC", Georgia, serif;
  font-weight: 500;
}

.others {
  padding-left: 22px;
}

.others a {
  display: inline-block;
  padding: 10px 0;
}

.date {
  color: var(--moss);
  font-style: italic;
}

.post {
  display: grid;
  gap: 8px;
  max-width: 620px;
}

.post label {
  margin-top: 10px;
  color: var(--woad);
  font-family: "Alegreya SC", Georgia, serif;
  font-size: 1.05rem;
  font-weight: 500;
}

.post input,
.post textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 2px solid var(--woad);
  background: var(--undyed);
  color: var(--thread);
  font: inherit;
}

.post .btn {
  justify-self: start;
  margin-top: 16px;
}

.foot {
  margin-top: 72px;
  padding-bottom: 28px;
  background: var(--woad);
  color: var(--linen);
}

.foot::before {
  content: "";
  display: block;
  height: 32px;
  background: url("../img/knotwork.svg") repeat-x left center / 80px 32px;
}

.cols {
  display: grid;
  gap: 28px;
  padding-top: 28px;
}

@media (min-width: 760px) {
  .cols {
    grid-template-columns: 3fr 2fr;
    gap: 48px;
  }
}

.foot a {
  color: var(--linen);
}

.foot a:hover {
  color: var(--weld);
}

.foot a:focus-visible,
.cloth a:focus-visible {
  outline-color: var(--weld);
}

.foot .mark {
  font-size: 1.9rem;
}

.vows {
  padding-left: 22px;
}

.vows li {
  margin-bottom: 8px;
}

.help {
  margin: 8px 0 0;
  font-family: "Alegreya SC", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
}

.links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  column-gap: 16px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.links a {
  display: inline-block;
  padding: 10px 0;
}

.badge {
  flex: 0 0 auto;
}

.cloth .btn,
.foot .btn {
  background: var(--linen);
  color: var(--woad);
}

.cloth .btn:hover,
.foot .btn:hover {
  background: var(--weld);
  color: var(--thread);
}

.copy {
  margin: 28px 0 0;
  font-size: 1rem;
  text-align: center;
}

.gate {
  position: fixed;
  inset: 0;
  z-index: 30;
  overflow-y: auto;
  padding: 16px;
  background: rgba(237, 228, 208, 0.9);
}

.held {
  overflow: hidden;
}

.cloth {
  max-width: 520px;
  margin: 6vh auto 0;
  padding: 32px 24px 96px;
  border-top: 6px solid var(--weld);
  background: var(--woad);
  color: var(--linen);
  text-align: center;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 64px), 50% 100%, 0 calc(100% - 64px));
}

.cloth h2 {
  margin-top: 0;
  color: var(--linen);
}

.away {
  display: inline-block;
  margin-top: 14px;
  padding: 10px 6px;
  color: var(--linen);
}

.away:hover {
  color: var(--weld);
}

.notice {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  padding: 18px 0 14px;
  border-top: 3px solid var(--madder);
  background: var(--undyed);
  box-shadow: 0 -4px 12px rgba(42, 37, 34, 0.15);
}

.notice::before {
  content: "";
  position: absolute;
  top: 4px;
  right: 0;
  left: 0;
  border-top: 2px dashed var(--weld);
}

@media (prefers-reduced-motion: reduce) {
  html,
  .strip {
    scroll-behavior: auto;
  }

  a,
  .btn,
  .tabs a {
    transition: none;
  }
}
