* {
  box-sizing: border-box;
}

html {
  background: #17130f;
}

body {
  margin: 0;
  min-height: 100vh;

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  color: #ede2c4;

  background:
    radial-gradient(
      circle at top,
      #383020 0%,
      #1d1812 38%,
      #100d0a 100%
    );
}


.page {
  width: min(1000px, 94%);
  margin: 0 auto;

  padding:
    70px
    0
    40px;
}


/* ---------------- HEADER ---------------- */

header {
  text-align: center;

  margin-bottom: 50px;
}


.eyebrow {
  margin: 0 0 14px;

  font-family:
    Arial,
    sans-serif;

  font-size: 12px;

  letter-spacing: 4px;

  text-transform: uppercase;

  opacity: 0.6;
}


h1 {
  margin: 0;

  font-size: clamp(
    50px,
    9vw,
    100px
  );

  line-height: 0.82;

  letter-spacing: -4px;
}


.subtitle {
  margin-top: 25px;

  font-style: italic;

  font-size: 18px;

  opacity: 0.75;
}


/* ---------------- PAINTING ---------------- */

.painting-section {
  display: flex;

  flex-direction: column;

  align-items: center;
}


.painting-frame {
  position: relative;

  width: min(
    520px,
    90vw
  );

  padding: 18px;

  background: #261c12;

  border: 9px solid #8c6736;

  box-shadow:
    0 0 0 4px #3c2917,
    0 20px 60px rgba(0, 0, 0, 0.7);
}


/*
  The Mona Lisa is 20 pixels wide
  and 30 pixels tall.
*/
.painting {
  width: 100%;

  aspect-ratio: 2 / 3;

  display: grid;

  grid-template-columns:
    repeat(20, 1fr);

  grid-template-rows:
    repeat(30, 1fr);

  background: #0c0b09;

  overflow: hidden;
}


.pixel {
  position: relative;

  width: 100%;
  height: 100%;

  background: #0b0a08;

  outline:
    1px solid rgba(
      255,
      255,
      255,
      0.025
    );

  transition:
    filter 0.12s ease,
    transform 0.12s ease;
}


.pixel.painted {
  cursor: crosshair;
}


.pixel.painted:hover {
  filter: brightness(1.45);

  z-index: 3;

  transform: scale(1.15);

  outline:
    1px solid rgba(
      255,
      255,
      255,
      0.8
    );
}


/* ---------------- TOOLTIP ---------------- */

.tooltip {
  position: fixed;

  display: none;

  pointer-events: none;

  z-index: 1000;

  padding:
    8px
    11px;

  border-radius: 5px;

  color: white;

  background:
    rgba(
      0,
      0,
      0,
      0.92
    );

  font-family:
    Arial,
    sans-serif;

  font-size: 13px;

  white-space: nowrap;

  box-shadow:
    0 4px
    15px
    rgba(
      0,
      0,
      0,
      0.5
    );
}


/* ---------------- PROGRESS ---------------- */

.progress-area {
  width: min(
    520px,
    90vw
  );

  margin-top: 28px;

  text-align: center;
}


.progress-text {
  font-size: 17px;

  margin-bottom: 10px;
}


.progress-bar {
  width: 100%;
  height: 12px;

  border-radius: 50px;

  background:
    rgba(
      255,
      255,
      255,
      0.08
    );

  overflow: hidden;
}


.progress-fill {
  width: 0%;
  height: 100%;

  border-radius: 50px;

  background:
    linear-gradient(
      90deg,
      #7a4e22,
      #e0bd6b
    );

  transition:
    width 0.5s ease;
}


.percent-text {
  margin-top: 8px;

  opacity: 0.55;

  font-size: 13px;

  font-family:
    Arial,
    sans-serif;
}


/* ---------------- SUBMISSION ---------------- */

.submission-section {
  display: flex;

  justify-content: center;

  margin-top: 65px;
}


.submission-card {
  width: min(
    520px,
    100%
  );

  padding: 32px;

  border:
    1px solid
    rgba(
      255,
      255,
      255,
      0.12
    );

  background:
    rgba(
      255,
      255,
      255,
      0.035
    );

  box-shadow:
    0 15px
    40px
    rgba(
      0,
      0,
      0,
      0.3
    );
}


.submission-card h2 {
  margin:
    0
    0
    10px;

  font-size: 28px;
}


.submission-card p {
  line-height: 1.6;

  opacity: 0.75;
}


label {
  display: block;

  margin:
    25px
    0
    8px;

  font-family:
    Arial,
    sans-serif;

  font-size: 12px;

  font-weight: bold;

  text-transform: uppercase;

  letter-spacing: 1px;
}


input {
  width: 100%;

  padding:
    15px
    14px;

  color: #f4ecd6;

  background: #100e0b;

  border:
    1px solid #5c4a31;

  font-size: 17px;

  font-family:
    Georgia,
    serif;

  outline: none;
}


input:focus {
  border-color: #c39a55;
}


button {
  width: 100%;

  margin-top: 15px;

  padding: 16px;

  border: 0;

  cursor: pointer;

  color: #21170d;

  background: #d5ad62;

  font-weight: bold;

  font-family:
    Arial,
    sans-serif;

  font-size: 14px;

  letter-spacing: 1px;

  transition:
    transform 0.12s ease,
    filter 0.12s ease;
}


button:hover {
  filter: brightness(1.1);

  transform:
    translateY(-2px);
}


button:disabled {
  cursor: not-allowed;

  opacity: 0.4;

  transform: none;
}


.message {
  display: none;

  margin-top: 20px;

  padding: 15px;

  text-align: center;

  line-height: 1.5;

  background:
    rgba(
      255,
      255,
      255,
      0.05
    );

  font-family:
    Arial,
    sans-serif;

  font-size: 14px;
}


.message.show {
  display: block;
}


/* ---------------- ABOUT ---------------- */

.about {
  max-width: 600px;

  margin:
    90px
    auto
    0;

  text-align: center;

  line-height: 1.7;
}


.about h2 {
  font-size: 30px;
}


.about p {
  opacity: 0.65;
}


/* ---------------- FOOTER ---------------- */

footer {
  margin-top: 100px;

  padding-top: 25px;

  border-top:
    1px solid
    rgba(
      255,
      255,
      255,
      0.08
    );

  text-align: center;

  font-family:
    Arial,
    sans-serif;

  font-size: 11px;

  letter-spacing: 3px;

  text-transform: uppercase;

  opacity: 0.35;
}


/* ---------------- MOBILE ---------------- */

@media (max-width: 600px) {

  .page {
    padding-top: 40px;
  }


  .painting-frame {
    padding: 10px;

    border-width: 6px;
  }


  .submission-card {
    padding: 24px;
  }


  h1 {
    letter-spacing: -2px;
  }

}