* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #ebece8;
  color: #000;
  font-family: Arial, Helvetica, sans-serif;
}

#page {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

#fabric-panel {
  flex: 0 0 35.6%;
  width: 35.6%;
  height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  align-items: center;
  justify-items: center;
  padding: 4vh 2vw;
  background: #c6a83a url("textile.jpg") center / cover no-repeat;
}

.instrument {
  margin: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.instrument img {
  display: block;
  width: auto;
  height: auto;
  max-width: 72%;
  max-height: 68%;
  object-fit: contain;
}

#info-panel {
  flex: 1 1 auto;
  min-width: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#event-header {
  position: relative;
  flex: 0 0 auto;
  height: auto;
  background: #ebece8;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 0;
  overflow: hidden;
}

#translate-button {
  align-self: flex-start;
  margin: 1.4vh 2% 0 2.6%;
  padding: 0.4em 0.75em;
  border: 1px solid #111;
  background: #fff;
  color: #111;
  font-family: inherit;
  font-size: clamp(14px, 1vw, 18px);
  font-weight: 800;
  cursor: pointer;
}

#translate-button:hover,
#translate-button:focus-visible {
  background: #f7f7f5;
}

#event-facts {
  padding: 1.6vh 2% 0 2.6%;
}

.fact a,
.fact a:visited {
  color: #0b57d0;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

#event-signup {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  width: 100%;
  height: 11vh;
}

.fact {
  margin: 0;
  font-size: clamp(22px, 2.35vw, 46px);
  font-weight: 800;
  line-height: 1.45;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.fact-label,
.fact-separator,
.fact-value {
  font: inherit;
}

#fact-prompt {
  display: flex;
  align-items: center;
  margin-left: 2.6%;
  line-height: 1.15;
  white-space: normal;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

#back-button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 0.35em;
  margin: 0 0 0 2.6%;
  padding: 0 0.75em;
  border: 1px solid #111;
  background: #fff;
  color: #111;
  font: inherit;
  font-size: clamp(18px, 1.65vw, 32px);
  font-weight: 800;
  cursor: pointer;
}

.back-arrow {
  display: inline-block;
}

#signup-button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28%;
  width: 28%;
  height: 100%;
  border: 0;
  background: #7a1f2b;
  color: #fff;
  text-decoration: none;
  font-family: inherit;
  font-size: clamp(18px, 1.65vw, 32px);
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
}

#signup-button:hover,
#signup-button:focus-visible {
  background: #641825;
}

h2{
  width: fit-content;
  background-color: #FDC81E;
}

#detail-panel {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: #fff;
  padding: 2.2vh 6% 8vh 2.4%;
  font-size: clamp(16px, 1.15vw, 20px);
  line-height: 1.45;
  outline: none;
}

.detail {
  margin: 0 0 1.15em;
}

.detail-heading {
  margin: 1.35em 0 0.4em;
  font-size: 1.2em;
  font-weight: 800;
  line-height: 1.25;
}

.detail a {
  color: #7a1f2b;
  font-weight: 700;
}

[hidden] {
  display: none !important;
}

.signup-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  font-weight: 700;
}

.field input,
.field textarea {
  font: inherit;
  font-weight: 400;
  padding: 0.45rem 0.55rem;
  border: 1px solid #111;
  background: #fff;
  color: #000;
}

.signup-note {
  margin: 0;
  font-weight: 400;
}

.signup-error {
  margin: 0;
  color: #7a1f2b;
  font-weight: 700;
}

.signup-error a {
  color: #7a1f2b;
  font-weight: 700;
}

.form-submit {
  align-self: flex-start;
  margin-top: 0.3rem;
  border: 0;
  background: #7a1f2b;
  color: #fff;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.7rem 1.1rem;
  cursor: pointer;
}

.form-submit:hover,
.form-submit:focus-visible {
  background: #641825;
}

.signup-thanks a {
  color: #7a1f2b;
  font-weight: 700;
}

@media (max-width: 760px) {
  #fabric-panel {
    flex-basis: 4.6rem;
    width: 4.6rem;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, 1fr);
    padding: 0.35rem 0;
  }

  .instrument img {
    max-width: 90%;
    max-height: 90%;
  }

  #translate-button {
    margin: 0.55rem 0.55rem 0 0.65rem;
    font-size: 0.95rem;
  }

  #event-facts {
    padding: 0.55rem 0.55rem 0 0.65rem;
  }

  #fact-prompt {
    margin-left: 0.65rem;
  }

  #back-button {
    margin: 0 0 0 0.65rem;
  }

  .fact {
    white-space: normal;
    font-size: 1.2rem;
    line-height: 1.25;
  }

  #back-button {
    font-size: 0.95rem;
  }

  #event-signup {
    height: 3.2rem;
  }

  #signup-button {
    flex-basis: 42%;
    width: 42%;
    height: 100%;
    font-size: 0.95rem;
  }

  #detail-panel {
    padding: 0.75rem 0.65rem 2rem;
    font-size: 1.1rem;
  }
}
