/* ==========================================================
   BACKGROUND DEMO
========================================================== */

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  overflow-y: auto;
}

/* ==========================================================
   PAGE
========================================================== */

.background-demo {
  width: 100%;
  max-width: 1200px;

  margin: 0 auto;

  padding: 32px;

  box-sizing: border-box;
}

/* ==========================================================
   HEADER
========================================================== */

.background-demo__header {
  margin-bottom: 40px;
}

.background-demo__back {
  display: inline-flex;

  margin-bottom: 24px;

  color: var(--text-muted);

  font-size: 13px;
  font-weight: 700;

  text-decoration: none;
}

.background-demo__back:hover {
  opacity: 0.75;
}

.background-demo__eyebrow {
  margin: 0 0 6px;

  color: var(--text-muted);

  font-size: 11px;
  font-weight: 800;

  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.background-demo__title {
  margin: 0;

  color: var(--text);

  font-size: 32px;
  line-height: 1.1;
}

.background-demo__description {
  max-width: 620px;

  margin: 10px 0 0;

  color: var(--text-muted);

  font-size: 14px;
  line-height: 1.5;
}

/* ==========================================================
   SECTION
========================================================== */

.background-demo__section {
  margin-bottom: 44px;
}

.background-demo__section-header {
  display: flex;

  align-items: center;
  justify-content: space-between;

  margin-bottom: 14px;
}

.background-demo__section-header h2 {
  margin: 0;

  color: var(--text);

  font-size: 18px;
  font-weight: 900;
}

.background-demo__section-header span {
  color: var(--text-muted);

  font-size: 11px;
  font-weight: 800;

  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ==========================================================
   PREVIEWS
========================================================== */

.background-demo__previews {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1fr);

  gap: 16px;

  align-items: start;
}

/* ==========================================================
   PREVIEW
========================================================== */

.background-demo__preview {
  min-width: 0;
}

.background-demo__label {
  display: flex;

  align-items: center;
  justify-content: space-between;

  margin-bottom: 8px;

  color: var(--text);

  font-size: 12px;
  font-weight: 900;
}

.background-demo__label span {
  color: var(--text-muted);

  font-size: 10px;
  font-weight: 700;
}

/* ==========================================================
   FRAME
========================================================== */

.background-demo__frame {
  position: relative;

  overflow: hidden;

  width: 100%;

  border: 2px solid var(--border);

  border-radius: var(--radius-md);

  background: var(--surface);

  box-shadow: 0 4px 0 var(--border);
}

.background-demo__frame--desktop {
  aspect-ratio: 16 / 9;
}

.background-demo__frame--mobile {
  width: 55%;

  margin: 0 auto;

  aspect-ratio: 9 / 16;
}

/*
   Background component harus memenuhi frame.
*/

.background-demo__frame > * {
  width: 100%;
  height: 100%;
}

/* ==========================================================
   FOOTER
========================================================== */

.background-demo__footer {
  padding: 24px 0 12px;

  display: flex;

  flex-direction: column;

  align-items: center;

  gap: 6px;

  color: var(--text-muted);

  text-align: center;

  border-top: 2px solid var(--border);
}

.background-demo__footer strong {
  color: var(--text);

  font-size: 15px;
}

.background-demo__footer span {
  font-size: 11px;
}

/* ==========================================================
   RESPONSIVE
========================================================== */

@media (max-width: 700px) {
  .background-demo {
    padding: 24px 16px;
  }

  .background-demo__title {
    font-size: 28px;
  }

  /*
       Tetap kiri-kanan jika layar masih cukup.
    */

  .background-demo__previews {
    grid-template-columns:
      minmax(0, 1fr)
      minmax(0, 1fr);

    gap: 8px;
  }

  .background-demo__frame--mobile {
    width: 65%;
  }
}

@media (max-width: 480px) {
  /*
       Pada layar sangat kecil,
       preview boleh ditumpuk agar tidak terlalu sempit.
    */

  .background-demo__previews {
    grid-template-columns: 1fr;
  }

  .background-demo__frame--mobile {
    width: 55%;
  }
}
