@font-face {
  font-family: Areal;
  src: url("fonts/ABCArealSuperfamilyVariable.woff2") format("woff2");
  font-display: swap;
}

@keyframes gesture-reveal {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Page */
:root {
  --paper-line-spacing: 9.9vw;
}

body {
  margin: 0;
  background-color: #CEC8BC;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;

  color: #1C1E1D;
  font-family: Areal, Arial, sans-serif;
}

#paper-page {
  background-color: #cbb39a;
  background-image: url("images/paper.jpg");
  background-size: 155% auto;
  background-position: -35px top;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--under-screen-height, 100svh) * 0.10);
  min-height: var(--under-screen-height, 100svh);
  box-sizing: border-box;
}

/* Introduction */

.introduction {
  padding: 48px 7% 30px;
  text-align: center;

 background: radial-gradient(
  ellipse at 35% 50%,
  rgba(165, 112, 76, 0.25) 0%,
  rgba(165, 112, 76, 0.12) 45%,
  transparent 80%
);
}

.eyebrow {
  font-family: "Courier New", monospace;
  font-size: 12px;
  letter-spacing: .5;
  margin: 0 0 14px;
}

h1 {
  font-family: "Courier New", monospace;
  font-size: 32px;
  font-weight: normal;
  letter-spacing: .02em;
  margin: 0 0 24px;
}

.description {
  font-family: Areal, Arial, sans-serif;
  font-variation-settings: "MONO" 75;
  font-size: 15px;
  line-height: var(--paper-line-spacing);
  max-width: 290px;
  margin: 0 0 24px;
}

.instructions {
  font-family: Areal, Arial, sans-serif;
  font-variation-settings: "MONO" 75;
  font-size: 13px;
  opacity: .7;
  text-align: center;
  line-height: var(--paper-line-spacing);
  max-width: 290px;
  margin: 0;
}

/* Gesture window */

#gesture-area {
  position: relative;
  width: 75%;
  aspect-ratio: 1;
  margin: 0 auto 24px;
  display: none;
  border: 1px solid #192129;
  animation: gesture-reveal 700ms ease-out;
  
}

#gesture-area .reset-view-button {
  position: absolute;
  bottom: 4px;
  right: 4px;
  z-index: 1;
  width: auto;
  margin: 0;
  padding: 12px;
  border: none;
  background: transparent;
  color: #b7b0a393;
}


#gesture-area canvas {
  display: block;
}

#gesture-area,
#gesture-area * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

#gesture-area .expand-view-button {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 1;
  width: auto;
  margin: 0;
  padding: 12px;
  border: none;
  background: transparent;
  color: #b7b0a393;
}

#gesture-area.is-expanded {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  margin: 0;
  border: none;
  z-index: 100;
}

#gesture-area.is-expanded .expand-view-button {
  top: calc(4px + env(safe-area-inset-top));
  right: calc(4px + env(safe-area-inset-right));
}

#gesture-area.is-expanded .reset-view-button {
  bottom: calc(4px + env(safe-area-inset-bottom));
  right: calc(4px + env(safe-area-inset-right));
}

/* Controls */

button {
  display: block;
  width: 70%;
  margin: 0 auto 24px;
  padding: 15px;

  background: rgba(225, 220, 209, 0.75);
  color: #121922;

  border: 1px solid #444944;
  border-radius: 0;

  font-family: "Courier New", monospace;
  font-size: 13px;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

#controls button {
  width: fit-content;
  max-width: 85%;
  padding: 10px 18px;
  margin-bottom: 28px;
}

button:active {
  background: #B7B0A3;
}

/* Status */

body > p {
  font-family: "Courier New", monospace;
  font-size: 12px;
  text-align: center;
  margin: 20px 0 24px;
}

html {
  touch-action: manipulation;
}

.eyebrow {
  margin-left: 2%;
}

h1 {
  margin-left: 7%;
}

.description {
  margin-left: 13%;
}

.instructions {
  margin-left: 4%;
}

#about-under {
  background-color: #192129;
  color: #ddd9d0;
  padding: 30px 30px 100px;
}
#about-under h1{
  font-family: Areal, Arial, sans-serif;
  text-align: left;
}

#about-under h2 {
  max-width: 500px;
  margin: 50px auto 28px;

  font-family: "Courier New", monospace;
  font-size: 21px;
  font-weight: normal;
  line-height: 1.4;
  color: inherit;
}

#about-under h2:first-child {
  margin-top: 0;
}

#about-under p {
  max-width: 500px;
  margin: 0 auto 26px;

  font-family: Areal, Arial, sans-serif;
  font-variation-settings: "MONO" 75;
  font-size: 15px;
  line-height: 1.75;
   color: #b9b6ae;
}

#trim-toggle[hidden],
#trim-controls[hidden] {
  display: none;
}

#trim-timeline {
  position: relative;
  width: 75%;
  height: 44px;
  margin: 0 auto 24px;
}

.trim-track {
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(28, 30, 29, 0.2);
}

#trim-selection {
  position: absolute;
  top: 20px;
  left: 0;
  width: 100%;
  height: 4px;
  background: #1C1E1D;
}

.trim-handle {
  position: absolute;
  top: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  transform: translateX(-50%);
  touch-action: none;
}

.trim-handle::after {
  content: "";
  display: block;
  width: 3px;
  height: 24px;
  margin: auto;
  background: #1C1E1D;
}

#trim-start-handle {
  left: 0;
}

#trim-end-handle {
  left: 100%;
}

#trim-controls,
#trim-controls * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}


/* Dark paper experiment */

body {
  background: #171715;
  color: #e8e3d8;
}

#paper-page {
  background: #0f0f0e;
}

.introduction {
  background: none;
}

/* Opening composition */

.introduction {
  text-align: left;
  padding: 48px 7% 30px;
}

.introduction h1,
.introduction .eyebrow,
.introduction .description {
  margin-left: 0;
  transform: none;
}

.description {
  line-height: 1.4;
}

.introduction h1 {
  margin-bottom: 6px;
}

.introduction .eyebrow {
  margin-bottom: 0;
}

.introduction .description {
  margin-top: clamp(80px, 16svh, 140px);
  font-family: Areal, Arial, sans-serif;
  font-variation-settings: "MONO" 0;
  font-size: 16px;
  line-height: 1.5;
  color: #b0a799;
}

#about-under {
  background-color: #0f0f0e;
  margin-top: 0;
}


#controls button {
  background: transparent;
  border: none;
  color: #b8b3aa;
  text-decoration: underline;
  text-underline-offset: 5px;
}

#recording-status-area {
  display: none;
}

#motion-message {
  max-width: 280px;
  margin: 0 auto 24px;
  color: #b8b3aa;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

#motion-message[hidden] {
  display: none;
}

#paper-page {
  display: flex;
  flex-direction: column;
}

#controls {
  margin-top: auto;
}

#capture-button-area {
  padding-bottom: 20px;
}

#capture-button-area button {
  width: fit-content;
  min-width: 170px;
  max-width: 85%;
  min-height: 54px;
  padding: 12px 28px;

  background: transparent;
  color: #e8e3d8;
  border: 1px solid #a49e93;
  border-radius: 0;

  font-family: Areal, Arial, sans-serif;
  font-size: 16px;
  font-variation-settings: "MONO" 50;
}

#capture-button-area button:active {
  background: #292925;
}


#movement-ideas {
  position: relative;
  width: 85%;
  max-width: 280px;
  margin: 0 auto 12px;
  text-align: center;
  color: #aaa59b;
}

#movement-ideas summary {
  display: grid;
  place-items: center;
  min-height: 44px;
  list-style: none;
  cursor: pointer;

  font-family: Areal, Arial, sans-serif;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

#movement-ideas summary::-webkit-details-marker {
  display: none;
}

#movement-ideas p {
  position: absolute;
  top: 100%;
  width: 100%;
  box-sizing: border-box;
  margin: 8px 0 0;
  padding: 8px;

  background: #0f0f0e;
  font-size: 14px;
  line-height: 1.5;
}

#capture-button-area {
  padding-bottom: 0;
}

#capture-button-area button {
  margin-bottom: 8px;
}

.opening-rule {
  border: none;
  border-top: 1px solid #3b3934;
  width: calc(100% + 14vw);
  margin: 24px 0 0 -7vw;
}

.introduction h1 {
  color: #b0a799;
}

.introduction .eyebrow {
  color: #898277;
}

.opening-rule {
  border-top-color: #302d28;
}

.introduction h1 {
  font-family: Georgia, serif;
  font-size: 42px;
  font-weight: normal;
  letter-spacing: -0.03em;
}

.introduction .eyebrow {
  font-family: Areal, Arial, sans-serif;
  font-variation-settings: "MONO" 0;
  font-size: 13px;
  letter-spacing: 0;
}

/* About — typography */

#about-under {
  padding: 72px 8% 100px;
}

#about-under h2 {
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: normal;
  letter-spacing: -0.02em;
  margin-bottom: 36px;
}

#about-under p {
  font-family: Georgia, serif;
  font-size: 17px;
  line-height: 1.8;
  color: #d0c9bd;
  max-width: 480px;
  margin-bottom: 24px;
}

#about-under .about-signature {
  font-style: italic;
  margin-top: 36px;
}

/* Acknowledgments */

.about-credits {
  max-width: 480px;
  margin: 72px auto 0;
  padding-top: 28px;
  border-top: 1px solid #302d28;
}

#about-under .about-credits h2 {
  font-size: 18px;
  margin-bottom: 20px;
}

#about-under .about-credits p {
  font-family: Areal, Arial, sans-serif;
  font-variation-settings: "MONO" 0;
  font-size: 14px;
  line-height: 1.65;
  color: #aaa59b;
}

#about-disclosure {
  background: #0f0f0e;
  padding: 24px 8% 48px;
}

#about-disclosure summary {
  width: fit-content;
  cursor: pointer;
  list-style: none;

  font-family: Georgia, serif;
  font-size: 14px;
  font-style: italic;
  color: #898277;
}

#about-disclosure summary::-webkit-details-marker {
  display: none;
}

#about-disclosure summary::after {
  content: " +";
}

#about-disclosure[open] summary::after {
  content: " −";
}

#about-disclosure #about-under {
  padding: 40px 0 60px;
}

h1 img {
  display: block;
  width: 120px;
  height: auto;
}